diff --git a/media-gfx/leocad/additional-files/icons.zip b/media-gfx/leocad/additional-files/icons.zip new file mode 100644 index 000000000..dacffa433 Binary files /dev/null and b/media-gfx/leocad/additional-files/icons.zip differ diff --git a/media-gfx/leocad/additional-files/leocad.rdef.in b/media-gfx/leocad/additional-files/leocad.rdef.in new file mode 100644 index 000000000..5d6e81093 --- /dev/null +++ b/media-gfx/leocad/additional-files/leocad.rdef.in @@ -0,0 +1,44 @@ + +resource app_flags B_MULTIPLE_LAUNCH; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = 0, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "LeoCAD", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; + +resource vector_icon { + $"6E636966090400620500020006023A9CCC3B06B8BB06B83A9CCC4AB8B84863AE" + $"00F8C35EFFFFAA000200060238EA3D384F5CB84F5C38EA3D4C0C0047FCCC00A7" + $"6404FF7F4C00020006023D00000000000000003D00004A0000CA800000FFE5B3" + $"FFFDBE44020006033A00000000000000003A000049400049800000DC93053F94" + $"6304FFB27704020006023CE0000000000000003CE000496000CAA00000FFFFFF" + $"FFE79A06020006033A600000000000000039BFFF4A15FF4803FF007F4C0040FF" + $"AA06FF854F03020006023CB2000000000000003CB2004A84FFCAF7FF00FFECC7" + $"FFFFAA00090606FF075CC1195CC119C730C4E64060C377C8B3426046604460C5" + $"98C8F760C1E5C90BC56ECBF8C1A15CC119CB6FC15D5CC119C1190608FF7F223E" + $"223E22C136224F22C3772C54405E3659C334C83F5A44C6A7C4CC5ABF165A335A" + $"BCD3C664303E2AC2AB2DBB3CB9A3223EB783BC4C223E3E0606FF07404B404B36" + $"C268223E2CC0AD22C136224F22C3772C54405E365940C92E404B40C6A7404B4B" + $"0606FF07404B404BC334435A33C6A73B5ABCD35A445ABF16C6A7C4CC405EC334" + $"C83F40C92E404B40C6A7404B4B0606FF07404B404BC334435A33C6A73BC66430" + $"3E2AC2AB2DBB3CB9A3223EB783BC4C2CC0AD404B36C268404B4B0608FF7F2F3C" + $"2F3C2FBD463738BA6738BDEB383F3C3FBD463F3D3F3F3F3E3FC03A3743BDEB43" + $"BA67432F3F2FC03A2F3E2F3C2F3D2F3C3C0606FF072F3B2F3B2FBCE03737BA67" + $"37BDEB373F3B3FBCE03FBEA2373FBDEB3FBA673F2F3B2FBEA22F3B3B0608FF7F" + $"BE94BA38BE94BA38BE94B965C191B8BABFEAB8BAC337B8BAC48EBA38C48EB965" + $"C48EBA98C48EBB57C48E34C48E37C191BCD6C337BCD6BFEABCD6BE94BB57BE94" + $"37BE9434BE94BA38BE94BA98BE94BA38BA380606FF07BE94B9D9BE94B9D9BE94" + $"B905C191B85ABFEAB85AC337B85AC48EB9D9C48EB905C48EBAABC191BB57C337" + $"BB57BFEABB57BE94B9D9BE94BAABBE94B9D9B9D9090A000100000A0101011001" + $"178400040A020102000A030103000A040104000A050105000A060106000A0701" + $"07000A08010800" +}; diff --git a/media-gfx/leocad/leocad-21.06.recipe b/media-gfx/leocad/leocad-21.06.recipe new file mode 100644 index 000000000..335809822 --- /dev/null +++ b/media-gfx/leocad/leocad-21.06.recipe @@ -0,0 +1,97 @@ +SUMMARY="A CAD program for creating virtual LEGO models" +DESCRIPTION="LeoCAD has an intuitive interface that is designed to allow new users to start \ +creating new models without having to spend too much time learning the application. +At the same time, it has a rich feature set that enables experienced users to \ +build models by using techniques that are more advanced. + +LeoCAD is fully compatible with the LDraw Standard and related tools, and it reads \ +and writes LDR and MPD files so that you can share and download models from the Internet. +It also uses the LDraw parts library, which has over 10,000 different parts \ +and continues to receive updates." +HOMEPAGE="https://www.leocad.org/" +COPYRIGHT="LeoCAD Team" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/leozide/leocad/archive/refs/tags/v$portVersion.tar.gz" +CHECKSUM_SHA256="bd28c47f920fa1bc458b6e5f476b93ccc1aa40e30158a3dd2397368cc3d79099" +libVersion="20.03" +SOURCE_URI_2="https://github.com/leozide/leocad/releases/download/v$portVersion/Library-$libVersion.zip" +CHECKSUM_SHA256_2="88d6d28b3a494a15ae63e984c1e732e28362fabc2e145ffab828fed2eb5e3632" +PATCHES="leocad-$portVersion.patchset" +ADDITIONAL_FILES=" + leocad.rdef.in + icons.zip + " + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + leocad$secondaryArchSuffix = $portVersion + app:LeoCAD = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5OpenGL$secondaryArchSuffix + lib:libQt5Svg$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libGL$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + devel:libQt5OpenGL$secondaryArchSuffix + devel:libQt5Svg$secondaryArchSuffix + devel:libQt5Widgets$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:find + cmd:g++$secondaryArchSuffix + cmd:lrelease$secondaryArchSuffix >= 5 + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:qmake$secondaryArchSuffix >= 5 + cmd:which + " + +PATCH() +{ + unzip -o $sourceDir/../../additional-files/icons.zip -d $sourceDir/resources +} + +BUILD() +{ + export DISABLE_ASLR=1 + + qmake DISABLE_UPDATE_CHECK=1 + make $jobArgs +} + +INSTALL() +{ + mkdir -p $appsDir/LeoCAD + + cp -f build/release/leocad $appsDir/LeoCAD/LeoCAD + cp -f $sourceDir2/library.bin $appsDir/LeoCAD + + local APP_SIGNATURE="application/x-vnd.leocad" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/leocad.rdef.in > leocad.rdef + + addResourcesToBinaries leocad.rdef $appsDir/LeoCAD/LeoCAD + addAppDeskbarSymlink $appsDir/LeoCAD/LeoCAD +} diff --git a/media-gfx/leocad/patches/leocad-21.06.patchset b/media-gfx/leocad/patches/leocad-21.06.patchset new file mode 100644 index 000000000..573f7692e --- /dev/null +++ b/media-gfx/leocad/patches/leocad-21.06.patchset @@ -0,0 +1,24 @@ +From 0b6947f07af9da9f3dab786f9a8681f0ad8c7930 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 31 Mar 2022 22:43:45 +1000 +Subject: Add haiku fixes + + +diff --git a/qt/qtmain.cpp b/qt/qtmain.cpp +index a38dd01..7b3da32 100644 +--- a/qt/qtmain.cpp ++++ b/qt/qtmain.cpp +@@ -184,6 +184,10 @@ int main(int argc, char *argv[]) + LibraryPaths += qMakePair(QDir::cleanPath(QCoreApplication::applicationDirPath() + "/library.bin"), true); + #endif + ++#ifdef Q_OS_HAIKU ++ LibraryPaths += qMakePair(QDir::cleanPath(QCoreApplication::applicationDirPath() + "/library.bin"), true); ++#endif ++ + #ifdef Q_OS_LINUX + LibraryPaths += qMakePair(QDir::cleanPath(QCoreApplication::applicationDirPath() + "/../share/leocad/library.bin"), true); + #endif +-- +2.30.2 +