Mail archive
alpine-devel

[alpine-devel] [PATCH] /main/gcc - make libatomic a subpackage

From: Stuart Cardall <developer_at_it-offshore.co.uk>
Date: Tue, 15 Apr 2014 23:59:47 +0000

This patch makes libatomic a subpackage of gcc which stops openvswitch
installing gcc & all of it's dependencies.

Closes https://bugs.alpinelinux.org/issues/2844
---
 main/gcc/APKBUILD | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index cba7184..568a1d1 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
_at_@ -105,6 +105,8 @@ x86 | x86_64)	LIBQUADMATH=$LANG_FORTRAN ;;
 *)		LIBQUADMATH=false ;;
 esac
 
+# libatomic is a dependency for openvswitch
+$LIBATOMIC && subpackages="$subpackages libatomic"
 $LIBGCC && subpackages="$subpackages libgcc"
 $LIBQUADMATH && subpackages="$subpackages libquadmath"
 if $LIBGOMP; then
_at_@ -427,6 +429,17 @@ package() {
 	fi
 }
 
+libatomic() {
+        pkgdesc="GCC Atomic library"
+        depends=
+        CARCH="$CTARGET_ARCH"
+
+        mkdir -p "$subpkgdir"/usr/lib
+        mv "$pkgdir"/usr/lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \
+                cp -a "$pkgdir"/usr/$CTARGET/lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \
+                return 1
+}
+
 libcxx() {
 	pkgdesc="GNU C++ standard runtime library"
 	depends=
-- 
1.9.1
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Apr 15 2014 - 23:59:47 UTC