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] 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 }