Mail archive
alpine-aports

[alpine-aports] [PATCH 4/4] testing/cabal new aport

From: Mitch Tishmack <mitch.tishmack_at_gmail.com>
Date: Sun, 15 May 2016 22:30:18 -0500

---
 testing/cabal/APKBUILD                       | 53 ++++++++++++++++++++++++++++
 testing/cabal/cabal-0001-force-ld.gold.patch | 10 ++++++
 2 files changed, 63 insertions(+)
 create mode 100644 testing/cabal/APKBUILD
 create mode 100644 testing/cabal/cabal-0001-force-ld.gold.patch
diff --git a/testing/cabal/APKBUILD b/testing/cabal/APKBUILD
new file mode 100644
index 0000000..2b6a389
--- /dev/null
+++ b/testing/cabal/APKBUILD
_at_@ -0,0 +1,53 @@
+# Maintainer: Mitch Tishmack <mitch.tishmack_at_gmail.com>
+pkgname=cabal
+pkgver=1.24.0.0
+pkgrel=0
+pkgdesc="The Haskell Cabal"
+url="http://haskell.org"
+arch="x86_64 armhf"
+license="bsd3"
+depends="musl zlib gmp"
+makedepends="ghc ghc-dev binutils-gold chrpath"
+install=""
+subpackages=""
+source="
+	https://www.haskell.org/$pkgname/release/$pkgname-install-$pkgver/$pkgname-install-$pkgver.tar.gz
+	cabal-0001-force-ld.gold.patch
+"
+_builddir="$srcdir/$pkgname-install-$pkgver"
+
+prepare() {                         
+        cd "$_builddir" || return 1
+        for i in $source; do         
+                case $i in        
+                cabal-*.patch)
+                        msg "Applying $i..."         
+                        patch -s -p0 -N -i "$srcdir"/$i || return 1
+                        ;;
+                esac                                           
+        done                                                    
+}    
+
+build() {
+	cd "$_builddir"
+	(
+		export HOME="$_builddir"
+		export NO_DOCUMENTATION=1
+		export EXTRA_BUILD_OPTS="--ghc-option=-fPIC"
+		./bootstrap.sh || return 1
+	) || return 1
+}
+
+package() {
+	cd "$_builddir"
+	install -d "$pkgdir/usr/bin" || return 1
+	install -m755 "$_builddir/dist/build/cabal/cabal" "$pkgdir/usr/bin/cabal" || return 1
+	chrpath -d "$pkgdir/usr/bin/cabal" || return 1
+	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
+}
+md5sums="beb998cdc385523935620381abe393f4  cabal-install-1.24.0.0.tar.gz
+e64c6868b8696f8d49945900af80b30c  cabal-0001-force-ld.gold.patch"
+sha256sums="d840ecfd0a95a96e956b57fb2f3e9c81d9fc160e1fd0ea350b0d37d169d9e87e  cabal-install-1.24.0.0.tar.gz
+74a2516bbcb5c7a5a9c8d7633630ce5b3397e160bd0e0c06fd10f104ac08002f  cabal-0001-force-ld.gold.patch"
+sha512sums="0bbd217259e6cd953731179e89dd0b9c972e8634c78d1270c9141daf8be4c53f4817812c93bec86c3cbaf5cc3467497137a4d30c0c594cc27204f0e9aebe6830  cabal-install-1.24.0.0.tar.gz
+35a9127f9aa5689047fbb3ad8757c3c0a3834c15f90d764edcb9ca24652f271c180458715c447d550f5329c0e2368207502318e4ae31292e593c667eeb79d386  cabal-0001-force-ld.gold.patch"
diff --git a/testing/cabal/cabal-0001-force-ld.gold.patch b/testing/cabal/cabal-0001-force-ld.gold.patch
new file mode 100644
index 0000000..86ed3a3
--- /dev/null
+++ b/testing/cabal/cabal-0001-force-ld.gold.patch
_at_@ -0,0 +1,10 @@
+--- bootstrap.sh.original	2016-02-10 06:45:52.000000000 -0600
++++ bootstrap.sh	2016-03-18 23:28:06.000000000 -0500
+_at_@ -74,6 +74,7 @@
+ 
+ # Fall back to "ld"... might work.
+ [ -$LINK- = -""- ] && LINK=ld
++LINK="ld.gold"
+ 
+ # And finally, see if we can compile and link something.
+   echo 'int main(){}' | $CC -xc - -o /dev/null ||
-- 
2.8.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun May 15 2016 - 22:30:18 GMT