From 08640dfe2cddbccf0468408effbace3b7bdf39ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sun, 20 May 2018 15:35:16 +0200 Subject: [PATCH 01/10] Generic lib: libVersion, libVersionCompat, debuginfo, runconfigure --- generic/generic_lib-1.2.3.recipe | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/generic/generic_lib-1.2.3.recipe b/generic/generic_lib-1.2.3.recipe index 210a2bf0..52ff58bb 100644 --- a/generic/generic_lib-1.2.3.recipe +++ b/generic/generic_lib-1.2.3.recipe @@ -20,9 +20,12 @@ ADDITIONAL_FILES="projectx.rdef" ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" SECONDARY_ARCHITECTURES="x86" +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + PROVIDES=" projectx$secondaryArchSuffix = $portVersion - lib:libprojectx$secondaryArchSuffix = $portVersion + lib:libprojectx$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix @@ -30,7 +33,7 @@ REQUIRES=" PROVIDES_devel=" projectx${secondaryArchSuffix}_devel = $portVersion - devel:libprojectx$secondaryArchSuffix = $portVersion + devel:libprojectx$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" projectx$secondaryArchSuffix == $portVersion base @@ -40,28 +43,27 @@ BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" - makefile_engine cmd:make cmd:gcc$secondaryArchSuffix " +defineDebugInfoPackage projectx$secondaryArchSuffix \ + "$libDir"/libprojectx.so.$libVersion + BUILD() { - make $jobArgs OBJ_DIR=objects + runConfigure ./configure + make $jobArgs } INSTALL() { - mkdir -p $libDir - mkdir -p $includeDir - - cp -a objects/libprojectx.so $libDir - cp -R include/. $includeDir + make install prepareInstalledDevelLibs \ libprojectx packageEntries devel \ - $developDir + "$developDir" } TEST() From f48aa7e0c3e56a874983aeffb2e13165543d7736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sun, 20 May 2018 15:40:57 +0200 Subject: [PATCH 02/10] Generic CMD: sec arch, commandsuffix/bindir, debuginfo, global settings --- generic/generic_cmd-1.2.3.recipe | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/generic/generic_cmd-1.2.3.recipe b/generic/generic_cmd-1.2.3.recipe index 4220c4a2..1b09507b 100644 --- a/generic/generic_cmd-1.2.3.recipe +++ b/generic/generic_cmd-1.2.3.recipe @@ -18,10 +18,19 @@ PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +# On x86_gcc2 we don't want to install the commands in bin//, but in bin/. +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi PROVIDES=" projectx = $portVersion - cmd:projectx = $portVersion + cmd:projectx$commandSuffix = $portVersion " REQUIRES=" haiku @@ -35,15 +44,25 @@ BUILD_PREREQUIRES=" cmd:gcc " +GLOBAL_WRITABLE_FILES=" + settings/projectx.conf keep-old + " + +defineDebugInfoPackage projectx \ + "$commandBinDir"/projectx + BUILD() { + runConfigure --omit-dirs "binDir sbinDir" ./configure \ + --bindir="$commandBinDir" \ + --sbindir="$commandBinDir" make $jobArgs } INSTALL() { - mkdir -p $binDir - cp -a objects/projectx $binDir + mkdir -p $commandBinDir + cp -a objects/projectx $commandBinDir } TEST() From 9d01c45dd3e0b4d682942bc8f4a66c065689c09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sun, 20 May 2018 15:44:13 +0200 Subject: [PATCH 03/10] Generic Font: cleanup --- generic/generic_font-1.2.3.recipe | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/generic/generic_font-1.2.3.recipe b/generic/generic_font-1.2.3.recipe index 0800b0b1..02014950 100644 --- a/generic/generic_font-1.2.3.recipe +++ b/generic/generic_font-1.2.3.recipe @@ -19,14 +19,20 @@ DISABLE_SOURCE_PACKAGE=yes PROVIDES=" generic_font = $portVersion " -REQUIRES="" +REQUIRES=" + : + " -BUILD_REQUIRES="" -BUILD_PREREQUIRES="" +BUILD_REQUIRES=" + : + " +BUILD_PREREQUIRES=" + : + " BUILD() { - true + : # means nothing. } INSTALL() From 96923bea2102c426259a025081f0d99eea2064e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sun, 20 May 2018 15:51:30 +0200 Subject: [PATCH 04/10] Generic Haiku app: debuginfo, settings, icon, mime --- generic/generic_haiku_app-1.2.3.recipe | 38 ++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/generic/generic_haiku_app-1.2.3.recipe b/generic/generic_haiku_app-1.2.3.recipe index 4161d3f2..802069b6 100644 --- a/generic/generic_haiku_app-1.2.3.recipe +++ b/generic/generic_haiku_app-1.2.3.recipe @@ -36,6 +36,13 @@ BUILD_PREREQUIRES=" cmd:gcc " +defineDebugInfoPackage projectx$secondaryArchSuffix \ + "$appsDir"/ProjectX + +GLOBAL_WRITABLE_FILES=" + settings/projectx.rc keep-old # If there is any + " + BUILD() { make $jobArgs OBJ_DIR=objects @@ -43,9 +50,34 @@ BUILD() INSTALL() { - mkdir -p $appsDir - cp -a objects/ProjectX $appsDir - addAppDeskbarSymlink $appsDir/ProjectX + mkdir -p "$appsDir" + cp -a objects/ProjectX "$appsDir" + + # Create the extra attributes + local APP_SIGNATURE="application/x-vnd.ProjectX" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" +# local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="0" + local LONG_INFO="$SUMMARY" + + # Add them to the rdef file + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/projectx.rdef.in > projectx.rdef + + # Add the resources to the application + addResourcesToBinaries projectx.rdef "$appsDir"/ProjectX + + # Set the acceptable mimetypes + mimeset -f "$appsDir"/ProjectX + + # Create a Deskbar icon + addAppDeskbarSymlink "$appsDir"/ProjectX } TEST() From 38cc9f107f4bc36e17f0e03a6d88d109aa782d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sun, 20 May 2018 16:01:26 +0200 Subject: [PATCH 05/10] Sample rdef --- generic/additional-files/projectx.rdef.in | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 generic/additional-files/projectx.rdef.in diff --git a/generic/additional-files/projectx.rdef.in b/generic/additional-files/projectx.rdef.in new file mode 100644 index 00000000..d8044441 --- /dev/null +++ b/generic/additional-files/projectx.rdef.in @@ -0,0 +1,26 @@ + +resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "Audacious", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; + +resource file_types message { + "types" = "application/x-asf", + "types" = "audio" +}; + +resource vector_icon { + $"6E636966020300AAFF05010102044030C34530BC3A30304030BC3A30C3454050" + $"BC3A50C34550504050C34550BC3A020A0101001001158400040A00010000" +}; From cfba6703531aa660a974f7357169a3b94d4d633c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sun, 20 May 2018 18:32:09 +0200 Subject: [PATCH 06/10] Install instead of mkdir and cp --- generic/generic_cmd-1.2.3.recipe | 4 ++-- generic/generic_font-1.2.3.recipe | 8 ++++---- generic/generic_haiku_app-1.2.3.recipe | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/generic/generic_cmd-1.2.3.recipe b/generic/generic_cmd-1.2.3.recipe index 1b09507b..ca79a61f 100644 --- a/generic/generic_cmd-1.2.3.recipe +++ b/generic/generic_cmd-1.2.3.recipe @@ -61,8 +61,8 @@ BUILD() INSTALL() { - mkdir -p $commandBinDir - cp -a objects/projectx $commandBinDir + install -d $commandBinDir + install -t objects/projectx $commandBinDir } TEST() diff --git a/generic/generic_font-1.2.3.recipe b/generic/generic_font-1.2.3.recipe index 02014950..43c77630 100644 --- a/generic/generic_font-1.2.3.recipe +++ b/generic/generic_font-1.2.3.recipe @@ -38,8 +38,8 @@ BUILD() INSTALL() { FONTDIR=$fontsDir/ttfonts - mkdir -p ${FONTDIR} - cp generic-font1.ttf ${FONTDIR} - cp generic-font2.ttf ${FONTDIR} - cp generic-font-bold.ttf ${FONTDIR} + install -d ${FONTDIR} + install -t generic-font1.ttf ${FONTDIR} + install -t generic-font2.ttf ${FONTDIR} + install -t generic-font-bold.ttf ${FONTDIR} } diff --git a/generic/generic_haiku_app-1.2.3.recipe b/generic/generic_haiku_app-1.2.3.recipe index 802069b6..f94da503 100644 --- a/generic/generic_haiku_app-1.2.3.recipe +++ b/generic/generic_haiku_app-1.2.3.recipe @@ -50,8 +50,8 @@ BUILD() INSTALL() { - mkdir -p "$appsDir" - cp -a objects/ProjectX "$appsDir" + install -d "$appsDir" + install -t objects/ProjectX "$appsDir" # Create the extra attributes local APP_SIGNATURE="application/x-vnd.ProjectX" From cabde07ebbf7caa59265738445e48b8fee9a933a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Mon, 18 Feb 2019 19:34:25 +0100 Subject: [PATCH 07/10] Cleanup, sec-arch recipes --- generic/generic_cmd-1.2.3.recipe | 23 ++--- .../generic_cmd_secondary_arch-1.2.3.recipe | 73 ++++++++++++++++ generic/generic_font-1.2.3.recipe | 9 +- generic/generic_haiku_app-1.2.3.recipe | 6 +- ...eric_haiku_app_secondary_arch-1.2.3.recipe | 86 +++++++++++++++++++ generic/generic_lib-1.2.3.recipe | 4 +- 6 files changed, 174 insertions(+), 27 deletions(-) create mode 100644 generic/generic_cmd_secondary_arch-1.2.3.recipe create mode 100644 generic/generic_haiku_app_secondary_arch-1.2.3.recipe diff --git a/generic/generic_cmd-1.2.3.recipe b/generic/generic_cmd-1.2.3.recipe index ca79a61f..4185b523 100644 --- a/generic/generic_cmd-1.2.3.recipe +++ b/generic/generic_cmd-1.2.3.recipe @@ -17,20 +17,11 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" -SECONDARY_ARCHITECTURES="x86" - -# On x86_gcc2 we don't want to install the commands in bin//, but in bin/. -commandSuffix=$secondaryArchSuffix -commandBinDir=$binDir -if [ "$targetArchitecture" = x86_gcc2 ]; then - commandSuffix= - commandBinDir=$prefix/bin -fi +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" PROVIDES=" projectx = $portVersion - cmd:projectx$commandSuffix = $portVersion + cmd:projectx = $portVersion " REQUIRES=" haiku @@ -53,16 +44,16 @@ defineDebugInfoPackage projectx \ BUILD() { - runConfigure --omit-dirs "binDir sbinDir" ./configure \ - --bindir="$commandBinDir" \ - --sbindir="$commandBinDir" + runConfigure ./configure make $jobArgs } INSTALL() { - install -d $commandBinDir - install -t objects/projectx $commandBinDir + make install + # or + install -d $binDir + install -t $binDir objects/projectx } TEST() diff --git a/generic/generic_cmd_secondary_arch-1.2.3.recipe b/generic/generic_cmd_secondary_arch-1.2.3.recipe new file mode 100644 index 00000000..d2e417cf --- /dev/null +++ b/generic/generic_cmd_secondary_arch-1.2.3.recipe @@ -0,0 +1,73 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 80 characters and use \ +a backslash to wrap the line." +HOMEPAGE="https://homepage/of/projectx.org" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="$portVersionedName" +PATCHES="projectx-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" + +# On x86_gcc2 we don't want to install the commands in bin//, but in bin/. +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +PROVIDES=" + projectx = $portVersion + cmd:projectx$commandSuffix = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc + " + +GLOBAL_WRITABLE_FILES=" + settings/projectx.conf keep-old + " + +defineDebugInfoPackage projectx \ + "$commandBinDir"/projectx + +BUILD() +{ + runConfigure --omit-dirs "binDir sbinDir" ./configure \ + --bindir="$commandBinDir" \ + --sbindir="$commandBinDir" + make $jobArgs +} + +INSTALL() +{ + make install + # or + install -d $commandBinDir + install -t $commandBinDir objects/projectx +} + +TEST() +{ + make check +} diff --git a/generic/generic_font-1.2.3.recipe b/generic/generic_font-1.2.3.recipe index 43c77630..f58b27c5 100644 --- a/generic/generic_font-1.2.3.recipe +++ b/generic/generic_font-1.2.3.recipe @@ -20,14 +20,11 @@ PROVIDES=" generic_font = $portVersion " REQUIRES=" - : " BUILD_REQUIRES=" - : " BUILD_PREREQUIRES=" - : " BUILD() @@ -39,7 +36,7 @@ INSTALL() { FONTDIR=$fontsDir/ttfonts install -d ${FONTDIR} - install -t generic-font1.ttf ${FONTDIR} - install -t generic-font2.ttf ${FONTDIR} - install -t generic-font-bold.ttf ${FONTDIR} + install -t ${FONTDIR} generic-font1.ttf + install -t ${FONTDIR} generic-font2.ttf + install -t ${FONTDIR} generic-font-bold.ttf } diff --git a/generic/generic_haiku_app-1.2.3.recipe b/generic/generic_haiku_app-1.2.3.recipe index f94da503..710ebcfc 100644 --- a/generic/generic_haiku_app-1.2.3.recipe +++ b/generic/generic_haiku_app-1.2.3.recipe @@ -17,7 +17,7 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" PROVIDES=" projectx = $portVersion @@ -36,7 +36,7 @@ BUILD_PREREQUIRES=" cmd:gcc " -defineDebugInfoPackage projectx$secondaryArchSuffix \ +defineDebugInfoPackage projectx \ "$appsDir"/ProjectX GLOBAL_WRITABLE_FILES=" @@ -51,7 +51,7 @@ BUILD() INSTALL() { install -d "$appsDir" - install -t objects/ProjectX "$appsDir" + install -t "$appsDir" objects/ProjectX # Create the extra attributes local APP_SIGNATURE="application/x-vnd.ProjectX" diff --git a/generic/generic_haiku_app_secondary_arch-1.2.3.recipe b/generic/generic_haiku_app_secondary_arch-1.2.3.recipe new file mode 100644 index 00000000..52a642f6 --- /dev/null +++ b/generic/generic_haiku_app_secondary_arch-1.2.3.recipe @@ -0,0 +1,86 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 80 characters and use \ +a backslash to wrap the line." +HOMEPAGE="https://homepage/of/projectx.org" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="$portVersionedName" +PATCHES="projectx-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" + +PROVIDES=" + projectx = $portVersion + app:projectx = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + makefile_engine + cmd:make + cmd:gcc + " + +defineDebugInfoPackage projectx$secondaryArchSuffix \ + "$appsDir"/ProjectX + +GLOBAL_WRITABLE_FILES=" + settings/projectx.rc keep-old # If there is any + " + +BUILD() +{ + make $jobArgs OBJ_DIR=objects +} + +INSTALL() +{ + install -d "$appsDir" + install -t "$appsDir" objects/ProjectX + + # Create the extra attributes + local APP_SIGNATURE="application/x-vnd.ProjectX" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" +# local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="0" + local LONG_INFO="$SUMMARY" + + # Add them to the rdef file + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/projectx.rdef.in > projectx.rdef + + # Add the resources to the application + addResourcesToBinaries projectx.rdef "$appsDir"/ProjectX + + # Set the acceptable mimetypes + mimeset -f "$appsDir"/ProjectX + + # Create a Deskbar icon + addAppDeskbarSymlink "$appsDir"/ProjectX +} + +TEST() +{ + make check +} diff --git a/generic/generic_lib-1.2.3.recipe b/generic/generic_lib-1.2.3.recipe index 52ff58bb..596daaf2 100644 --- a/generic/generic_lib-1.2.3.recipe +++ b/generic/generic_lib-1.2.3.recipe @@ -17,8 +17,8 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" -SECONDARY_ARCHITECTURES="x86" +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" libVersion="$portVersion" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" From 8b3d7c780992e12e54e9e39433097256de6b70ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Mon, 18 Feb 2019 19:44:47 +0100 Subject: [PATCH 08/10] Python example --- generic/generic_python-1.2.3.recipe | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 generic/generic_python-1.2.3.recipe diff --git a/generic/generic_python-1.2.3.recipe b/generic/generic_python-1.2.3.recipe new file mode 100644 index 00000000..5018ad6b --- /dev/null +++ b/generic/generic_python-1.2.3.recipe @@ -0,0 +1,68 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 80 characters and use \ +a backslash to wrap the line." +HOMEPAGE="https://homepage/of/projectx.org" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="$portVersionedName" +PATCHES="projectx-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python python3) +PYTHON_VERSIONS=(2.7 3.6) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}_$pythonPackage = $portVersion\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku\n\ + cmd:python$pythonVersion\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + setuptools_$pythonPackage" +BUILD_PREREQUIRES="$BUILD_PREREQUIRES + cmd:python$pythonVersion" +done + +INSTALL() +{ + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + python=python$pythonVersion + installLocation=$prefix/lib/$python/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + rm -rf build + $python setup.py build install \ + --root=/ --prefix=$prefix + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +} From 15c5110f90918959091f254361638445ac50519b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Mon, 18 Feb 2019 19:46:14 +0100 Subject: [PATCH 09/10] Cleanup --- generic/additional-files/projectx.rdef.in | 2 +- generic/generic_cmd-1.2.3.recipe | 19 ++++--- .../generic_cmd_secondary_arch-1.2.3.recipe | 29 +++++------ generic/generic_font-1.2.3.recipe | 24 +++------ generic/generic_haiku_app-1.2.3.recipe | 35 ++++++------- ...eric_haiku_app_secondary_arch-1.2.3.recipe | 42 +++++++-------- generic/generic_lib-1.2.3.recipe | 19 ++++--- generic/generic_python-1.2.3.recipe | 51 +++++++++++-------- 8 files changed, 108 insertions(+), 113 deletions(-) diff --git a/generic/additional-files/projectx.rdef.in b/generic/additional-files/projectx.rdef.in index d8044441..c2ee6c52 100644 --- a/generic/additional-files/projectx.rdef.in +++ b/generic/additional-files/projectx.rdef.in @@ -9,7 +9,7 @@ resource app_version { variety = B_APPV_FINAL, internal = 0, - short_info = "Audacious", + short_info = "Project X", long_info = "@LONG_INFO@" }; diff --git a/generic/generic_cmd-1.2.3.recipe b/generic/generic_cmd-1.2.3.recipe index 4185b523..eb7185be 100644 --- a/generic/generic_cmd-1.2.3.recipe +++ b/generic/generic_cmd-1.2.3.recipe @@ -3,8 +3,8 @@ DESCRIPTION="Long ProjectX description. Spanning several paragraphs, maybe - containing - bullet points etc. -You can also have really long lines that do not fit in 80 characters and use \ -a backslash to wrap the line." +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." HOMEPAGE="https://homepage/of/projectx.org" COPYRIGHT="2014 Developer name 2016 Another developer's name" @@ -15,9 +15,12 @@ SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVers CHECKSUM_SHA256="000000000000000000000000000000000" SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" -ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?all" + +GLOBAL_WRITABLE_FILES=" + settings/projectx.conf keep-old + " PROVIDES=" projectx = $portVersion @@ -31,16 +34,12 @@ BUILD_REQUIRES=" haiku_devel " BUILD_PREREQUIRES=" - cmd:make cmd:gcc - " - -GLOBAL_WRITABLE_FILES=" - settings/projectx.conf keep-old + cmd:make " defineDebugInfoPackage projectx \ - "$commandBinDir"/projectx + $binDir/projectx BUILD() { diff --git a/generic/generic_cmd_secondary_arch-1.2.3.recipe b/generic/generic_cmd_secondary_arch-1.2.3.recipe index d2e417cf..ce385c70 100644 --- a/generic/generic_cmd_secondary_arch-1.2.3.recipe +++ b/generic/generic_cmd_secondary_arch-1.2.3.recipe @@ -3,8 +3,8 @@ DESCRIPTION="Long ProjectX description. Spanning several paragraphs, maybe - containing - bullet points etc. -You can also have really long lines that do not fit in 80 characters and use \ -a backslash to wrap the line." +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." HOMEPAGE="https://homepage/of/projectx.org" COPYRIGHT="2014 Developer name 2016 Another developer's name" @@ -15,9 +15,8 @@ SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVers CHECKSUM_SHA256="000000000000000000000000000000000" SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" -ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?all !x86_gcc2" SECONDARY_ARCHITECTURES="?x86" # On x86_gcc2 we don't want to install the commands in bin//, but in bin/. @@ -28,34 +27,34 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then commandBinDir=$prefix/bin fi +GLOBAL_WRITABLE_FILES=" + settings/projectx.conf keep-old + " + PROVIDES=" - projectx = $portVersion + projectx$secondaryArchSuffix = $portVersion cmd:projectx$commandSuffix = $portVersion " REQUIRES=" - haiku + haiku$secondaryArchSuffix " BUILD_REQUIRES=" - haiku_devel + haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix cmd:make - cmd:gcc - " - -GLOBAL_WRITABLE_FILES=" - settings/projectx.conf keep-old " defineDebugInfoPackage projectx \ - "$commandBinDir"/projectx + $commandBinDir/projectx BUILD() { runConfigure --omit-dirs "binDir sbinDir" ./configure \ - --bindir="$commandBinDir" \ - --sbindir="$commandBinDir" + --bindir=$commandBinDir \ + --sbindir=$commandBinDir make $jobArgs } diff --git a/generic/generic_font-1.2.3.recipe b/generic/generic_font-1.2.3.recipe index f58b27c5..90fa4e63 100644 --- a/generic/generic_font-1.2.3.recipe +++ b/generic/generic_font-1.2.3.recipe @@ -3,8 +3,8 @@ DESCRIPTION="Long FontX description. Spanning several paragraphs, maybe - containing - bullet points etc. -You can also have really long lines that do not fit in 80 characters and use \ -a backslash to wrap the line." +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." HOMEPAGE="https://homepage/of/fontx.org" COPYRIGHT="2015 Haikutype" LICENSE="SIL Open Font License v1.1" @@ -19,24 +19,14 @@ DISABLE_SOURCE_PACKAGE=yes PROVIDES=" generic_font = $portVersion " -REQUIRES=" - " - -BUILD_REQUIRES=" - " -BUILD_PREREQUIRES=" - " +REQUIRES="" -BUILD() -{ - : # means nothing. -} +BUILD_REQUIRES="" +BUILD_PREREQUIRES="" INSTALL() { FONTDIR=$fontsDir/ttfonts - install -d ${FONTDIR} - install -t ${FONTDIR} generic-font1.ttf - install -t ${FONTDIR} generic-font2.ttf - install -t ${FONTDIR} generic-font-bold.ttf + mkdir -p ${FONTDIR} + cp -a *.ttf ${FONTDIR} } diff --git a/generic/generic_haiku_app-1.2.3.recipe b/generic/generic_haiku_app-1.2.3.recipe index 710ebcfc..441a36a4 100644 --- a/generic/generic_haiku_app-1.2.3.recipe +++ b/generic/generic_haiku_app-1.2.3.recipe @@ -3,8 +3,8 @@ DESCRIPTION="Long ProjectX description. Spanning several paragraphs, maybe - containing - bullet points etc. -You can also have really long lines that do not fit in 80 characters and use \ -a backslash to wrap the line." +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." HOMEPAGE="https://homepage/of/projectx.org" COPYRIGHT="2014 Developer name 2016 Another developer's name" @@ -17,7 +17,11 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?all" + +GLOBAL_WRITABLE_FILES=" + settings/projectx.rc keep-old # If there is any + " PROVIDES=" projectx = $portVersion @@ -32,16 +36,12 @@ BUILD_REQUIRES=" " BUILD_PREREQUIRES=" makefile_engine - cmd:make cmd:gcc + cmd:make " defineDebugInfoPackage projectx \ - "$appsDir"/ProjectX - -GLOBAL_WRITABLE_FILES=" - settings/projectx.rc keep-old # If there is any - " + $appsDir/ProjectX BUILD() { @@ -50,14 +50,14 @@ BUILD() INSTALL() { - install -d "$appsDir" - install -t "$appsDir" objects/ProjectX + install -d $appsDir + install -t $appsDir objects/ProjectX # Create the extra attributes local APP_SIGNATURE="application/x-vnd.ProjectX" local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" -# local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" local MINOR="0" local LONG_INFO="$SUMMARY" @@ -71,16 +71,11 @@ INSTALL() $portDir/additional-files/projectx.rdef.in > projectx.rdef # Add the resources to the application - addResourcesToBinaries projectx.rdef "$appsDir"/ProjectX + addResourcesToBinaries projectx.rdef $appsDir/ProjectX # Set the acceptable mimetypes - mimeset -f "$appsDir"/ProjectX + mimeset -f $appsDir/ProjectX # Create a Deskbar icon - addAppDeskbarSymlink "$appsDir"/ProjectX -} - -TEST() -{ - make check + addAppDeskbarSymlink $appsDir/ProjectX } diff --git a/generic/generic_haiku_app_secondary_arch-1.2.3.recipe b/generic/generic_haiku_app_secondary_arch-1.2.3.recipe index 52a642f6..234fda95 100644 --- a/generic/generic_haiku_app_secondary_arch-1.2.3.recipe +++ b/generic/generic_haiku_app_secondary_arch-1.2.3.recipe @@ -3,8 +3,8 @@ DESCRIPTION="Long ProjectX description. Spanning several paragraphs, maybe - containing - bullet points etc. -You can also have really long lines that do not fit in 80 characters and use \ -a backslash to wrap the line." +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." HOMEPAGE="https://homepage/of/projectx.org" COPYRIGHT="2014 Developer name 2016 Another developer's name" @@ -17,31 +17,32 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?all !x86_gcc2" +SECONDARY_ARCHITECTURES="?x86" + +GLOBAL_WRITABLE_FILES=" + settings/projectx.rc keep-old + " PROVIDES=" - projectx = $portVersion + projectx$secondaryArchSuffix = $portVersion app:projectx = $portVersion " REQUIRES=" - haiku + haiku$secondaryArchSuffix " BUILD_REQUIRES=" - haiku_devel + haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" makefile_engine + cmd:gcc$secondaryArchSuffix cmd:make - cmd:gcc " defineDebugInfoPackage projectx$secondaryArchSuffix \ - "$appsDir"/ProjectX - -GLOBAL_WRITABLE_FILES=" - settings/projectx.rc keep-old # If there is any - " + $appsDir/ProjectX BUILD() { @@ -50,14 +51,14 @@ BUILD() INSTALL() { - install -d "$appsDir" - install -t "$appsDir" objects/ProjectX + install -d $appsDir + install -t $appsDir objects/ProjectX # Create the extra attributes local APP_SIGNATURE="application/x-vnd.ProjectX" local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" -# local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" local MINOR="0" local LONG_INFO="$SUMMARY" @@ -71,16 +72,11 @@ INSTALL() $portDir/additional-files/projectx.rdef.in > projectx.rdef # Add the resources to the application - addResourcesToBinaries projectx.rdef "$appsDir"/ProjectX + addResourcesToBinaries projectx.rdef $appsDir/ProjectX # Set the acceptable mimetypes - mimeset -f "$appsDir"/ProjectX + mimeset -f $appsDir/ProjectX # Create a Deskbar icon - addAppDeskbarSymlink "$appsDir"/ProjectX -} - -TEST() -{ - make check + addAppDeskbarSymlink $appsDir/ProjectX } diff --git a/generic/generic_lib-1.2.3.recipe b/generic/generic_lib-1.2.3.recipe index 596daaf2..f9e16751 100644 --- a/generic/generic_lib-1.2.3.recipe +++ b/generic/generic_lib-1.2.3.recipe @@ -3,8 +3,8 @@ DESCRIPTION="Long ProjectX description. Spanning several paragraphs, maybe - containing - bullet points etc. -You can also have really long lines that do not fit in 80 characters and use \ -a forward-slash to wrap the line." +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." HOMEPAGE="https://homepage/of/projectx.org" COPYRIGHT="2014 Developer name 2016 Another developer's name" @@ -17,7 +17,7 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?all ?x86_gcc2" SECONDARY_ARCHITECTURES="?x86" libVersion="$portVersion" @@ -26,6 +26,7 @@ libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" projectx$secondaryArchSuffix = $portVersion lib:libprojectx$secondaryArchSuffix = $libVersionCompat + lib:libprojectx_1$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix @@ -34,6 +35,7 @@ REQUIRES=" PROVIDES_devel=" projectx${secondaryArchSuffix}_devel = $portVersion devel:libprojectx$secondaryArchSuffix = $libVersionCompat + devel:libprojectx_1$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" projectx$secondaryArchSuffix == $portVersion base @@ -43,12 +45,13 @@ BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" - cmd:make cmd:gcc$secondaryArchSuffix + cmd:make " defineDebugInfoPackage projectx$secondaryArchSuffix \ - "$libDir"/libprojectx.so.$libVersion + "$libDir"/libprojectx.so.$libVersion \ + "$libDir"/libprojectx_1.so.$libVersion BUILD() { @@ -60,8 +63,12 @@ INSTALL() { make install + # Use prepareInstalledDevelLib if only one library is involved prepareInstalledDevelLibs \ - libprojectx + libprojectx \ + libprojectx_1 + fixPkgconfig + packageEntries devel \ "$developDir" } diff --git a/generic/generic_python-1.2.3.recipe b/generic/generic_python-1.2.3.recipe index 5018ad6b..58fa5d27 100644 --- a/generic/generic_python-1.2.3.recipe +++ b/generic/generic_python-1.2.3.recipe @@ -3,8 +3,8 @@ DESCRIPTION="Long ProjectX description. Spanning several paragraphs, maybe - containing - bullet points etc. -You can also have really long lines that do not fit in 80 characters and use \ -a backslash to wrap the line." +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." HOMEPAGE="https://homepage/of/projectx.org" COPYRIGHT="2014 Developer name 2016 Another developer's name" @@ -30,39 +30,48 @@ BUILD_REQUIRES=" haiku_devel " -PYTHON_PACKAGES=(python python3) -PYTHON_VERSIONS=(2.7 3.6) -for i in "${!PYTHON_PACKAGES[@]}"; do -pythonPackage=${PYTHON_PACKAGES[i]} -pythonVersion=${PYTHON_VERSIONS[$i]} -eval "PROVIDES_${pythonPackage}=\"\ - ${portName}_$pythonPackage = $portVersion\ - \"; \ -REQUIRES_$pythonPackage=\"\ - haiku\n\ - cmd:python$pythonVersion\ - \"" -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - cmd:python$pythonVersion" +# add python versions if needed: eg (3.10 3.11) +PYTHON_VERSIONS=(3.10) + +for i in "${!PYTHON_VERSIONS[@]}"; do + pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} + + eval "PROVIDES_$pythonPackage=\" + ${portName}_$pythonPackage = $portVersion + \"" + + eval "REQUIRES_$pythonPackage=\" + $REQUIRES + cmd:python$pythonVersion + \"" + + BUILD_REQUIRES+=" + setuptools_$pythonPackage + " + BUILD_PREREQUIRES+=" + cmd:python$pythonVersion + " done INSTALL() { - for i in "${!PYTHON_PACKAGES[@]}"; do - pythonPackage=${PYTHON_PACKAGES[i]} + for i in "${!PYTHON_VERSIONS[@]}"; do pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} python=python$pythonVersion + installLocation=$prefix/lib/$python/vendor-packages/ export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation rm -rf build + $python setup.py build install \ --root=/ --prefix=$prefix - packageEntries $pythonPackage \ + packageEntries $pythonPackage \ $prefix/lib/python* done } From 83dc39d33f8cb563724e960412c7e477af569d0a Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Thu, 24 Oct 2024 12:38:38 +0200 Subject: [PATCH 10/10] Update generic/generic_python-1.2.3.recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joachim Mairböck --- generic/generic_python-1.2.3.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/generic_python-1.2.3.recipe b/generic/generic_python-1.2.3.recipe index 58fa5d27..e6c20237 100644 --- a/generic/generic_python-1.2.3.recipe +++ b/generic/generic_python-1.2.3.recipe @@ -30,7 +30,7 @@ BUILD_REQUIRES=" haiku_devel " -# add python versions if needed: eg (3.10 3.11) +# add python versions if needed: eg (3.10 3.13) PYTHON_VERSIONS=(3.10) for i in "${!PYTHON_VERSIONS[@]}"; do