summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/abuild/APKBUILD8
-rw-r--r--system/abuild/bang.patch10
-rw-r--r--system/abuild/modernise.patch164
3 files changed, 180 insertions, 2 deletions
diff --git a/system/abuild/APKBUILD b/system/abuild/APKBUILD
index cb6cb9ba9..b2ccb8f8d 100644
--- a/system/abuild/APKBUILD
+++ b/system/abuild/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=abuild
pkgver=3.3.1
-pkgrel=3
+pkgrel=4
pkgdesc="Script to build APK packages"
url="https://code.foxkit.us/adelie/abuild"
arch="all"
@@ -21,6 +21,8 @@ pkggroups="abuild"
source="https://distfiles.adelielinux.org/source/abuild-$pkgver+adelie.tar.xz
keyhole.patch
auto-dev-symbols.patch
+ bang.patch
+ modernise.patch
"
builddir="$srcdir/$pkgname-$pkgver+adelie"
@@ -58,4 +60,6 @@ _rootbld() {
sha512sums="c358f84d198527eeeac1a1aacc101174e18f9f34f692b12a4e4deb6b32d5f3ebdc703c90de6a6f81f195a81eebb90a11f9bfea13ef5db531d9b5d5ae6ecd6a66 abuild-3.3.1+adelie.tar.xz
757d750d4b5c88bf00774b64f2b93a9461e03f284d9423dc58c581e1309f276628de3114fcb510afd7c3cd55ceb721c1278e42756977c97ebe2597207805318d keyhole.patch
-2aa43539fc465f5abdc7c3d994363b80d1f7494c2d659093e5a2c45056e07617506ad8ea98f0e7d4ebe2596802b76605cd7c9f3ffc5a30c488c30bb36248e3d2 auto-dev-symbols.patch"
+2aa43539fc465f5abdc7c3d994363b80d1f7494c2d659093e5a2c45056e07617506ad8ea98f0e7d4ebe2596802b76605cd7c9f3ffc5a30c488c30bb36248e3d2 auto-dev-symbols.patch
+0fccb03673f2f72a7bd2d2afd1c79141eeb73b3119e83fff966fb8a2851c0484912be70a7b384be1dc384c344cf27427e2fc2426c2f9bf56aa5625f32436524d bang.patch
+b5b200da56c4319d332a7c5ddf38879fba0a4af723e1c6492f80a101afc8711d978dd7e1e5c31c80ed7fee15dcb19e7c449c92761b509a8063e417869885edc5 modernise.patch"
diff --git a/system/abuild/bang.patch b/system/abuild/bang.patch
new file mode 100644
index 000000000..7140f4dd8
--- /dev/null
+++ b/system/abuild/bang.patch
@@ -0,0 +1,10 @@
+diff --git a/abuild.in b/abuild.in
+index acee26f..6e06f29 100644
+--- a/abuild.in
++++ b/abuild.in
+@@ -1,4 +1,4 @@
+-#!/bin/sh -e
++#!/bin/bash -e
+
+ # abuild - build apk packages (light version of makepkg)
+ # Copyright (c) 2008-2015 Natanael Copa <ncopa@alpinelinux.org>
diff --git a/system/abuild/modernise.patch b/system/abuild/modernise.patch
new file mode 100644
index 000000000..b87b098f9
--- /dev/null
+++ b/system/abuild/modernise.patch
@@ -0,0 +1,164 @@
+From 9221c1d06e9185b734d58c155764ed24fcfc48ed Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Tue, 14 Jan 2020 04:46:41 -0600
+Subject: [PATCH 1/2] newapkbuild: Drastically modernise output APKBUILD file
+
+---
+ newapkbuild.in | 44 +++++++++++++++++++++++++++++++-------------
+ 1 file changed, 31 insertions(+), 13 deletions(-)
+
+diff --git a/newapkbuild.in b/newapkbuild.in
+index 85f838f..dbcef14 100644
+--- a/newapkbuild.in
++++ b/newapkbuild.in
+@@ -68,13 +68,9 @@ build_cmake() {
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \\
+ -DCMAKE_CXX_FLAGS="\$CXXFLAGS" \\
+ -DCMAKE_C_FLAGS="\$CFLAGS" \\
+- \${CMAKE_CROSSOPTS}
++ \${CMAKE_CROSSOPTS} \\
++ .
+ make
+-}
+-
+-check() {
+- cd "\$builddir"
+- CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+ __EOF__
+ }
+
+@@ -115,6 +111,12 @@ check_make() {
+ __EOF__
+ }
+
++check_cmake() {
++ cat >>APKBUILD<<__EOF__
++ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
++__EOF__
++}
++
+ check_python() {
+ cat >>APKBUILD<<__EOF__
+ python3 setup.py test
+@@ -193,7 +195,7 @@ newaport() {
+ python) makedepends="python3-dev";;
+ cmake) makedepends="cmake";;
+ meson) makedepends="meson";;
+- *) makedepends="\$depends_dev";;
++ *) makedepends="";;
+ esac
+
+ # Replace pkgver in $source
+@@ -226,9 +228,15 @@ url="$url"
+ arch="all"
+ license="$license"
+ depends="$depends"
+-depends_dev=""
+ makedepends="$makedepends"
++__EOF__
++ if [ -n "$install" ]; then
++ cat >>APKBUILD<<__EOF__
+ install="$install"
++__EOF__
++ fi
++
++ cat >>APKBUILD<<__EOF__
+ subpackages="\$pkgname-dev \$pkgname-doc"
+ source="$source"
+ __EOF__
+@@ -241,7 +249,12 @@ __EOF__
+ builddir=$(echo ${i#*/} | sed "s/$pv/\$pkgver/g")
+ fi
+ done
+- printf 'builddir="$srcdir/%s"\n\n' "$builddir" >> APKBUILD
++ if [ -n "$sdir" ] && [ "$sdir" = "src/$pkgname-$pv" ]; then
++ # No builddir needed.
++ :
++ else
++ printf 'builddir="$srcdir/%s"\n\n' "$builddir" >> APKBUILD
++ fi
+
+ # Subpackage -dev is usually required only for C/C++. Since depends_dev
+ # confuses a lot people, remove it if there's no .h or .hpp file.
+@@ -271,7 +284,6 @@ __EOF__
+ # Create build() function
+ cat >>APKBUILD<<__EOF__
+ build() {
+- cd "\$builddir"
+ __EOF__
+
+ case "$buildtype" in
+@@ -287,6 +299,8 @@ __EOF__
+ build_perl;;
+ python)
+ build_python;;
++ *)
++ printf '# Add build instructions here.' >> APKBUILD
+ esac
+
+ cat >>APKBUILD<<__EOF__
+@@ -297,14 +311,17 @@ __EOF__
+ # Create check() function
+ cat >>APKBUILD<<__EOF__
+ check() {
+- cd "\$builddir"
+ __EOF__
+
+ case "$buildtype" in
+- make|cmake|autotools|perl)
++ make|autotools|perl)
+ check_make;;
++ cmake)
++ check_cmake;;
+ python)
+ check_python;;
++ *)
++ printf '# Add test instructions here.' >> APKBUILD
+ esac
+
+ cat >>APKBUILD<<__EOF__
+@@ -315,7 +332,6 @@ __EOF__
+ # Create package() function
+ cat >>APKBUILD<<__EOF__
+ package() {
+- cd "\$builddir"
+ __EOF__
+
+ case "$buildtype" in
+@@ -329,6 +345,8 @@ __EOF__
+ package_perl;;
+ python)
+ package_python;;
++ *)
++ printf '# Add packaging instructions here.' >> APKBUILD
+ esac
+
+ if [ -n "$cpinitd" ]; then
+--
+2.24.1
+
+From 59cb9822c0ac347d58f1c37627a58fe14dce965d Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Tue, 14 Jan 2020 04:47:36 -0600
+Subject: [PATCH 2/2] newapkbuild: Newline after source
+
+---
+ newapkbuild.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/newapkbuild.in b/newapkbuild.in
+index dbcef14..9c4ffbf 100644
+--- a/newapkbuild.in
++++ b/newapkbuild.in
+@@ -251,7 +251,7 @@ __EOF__
+ done
+ if [ -n "$sdir" ] && [ "$sdir" = "src/$pkgname-$pv" ]; then
+ # No builddir needed.
+- :
++ printf '\n' >> APKBUILD
+ else
+ printf 'builddir="$srcdir/%s"\n\n' "$builddir" >> APKBUILD
+ fi
+--
+2.24.1
+