summaryrefslogtreecommitdiffstats
path: root/main/celt051
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-09 11:58:50 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-09 11:58:50 +0000
commit8f74060778d77defafcd1f9b817d59910d0f94b5 (patch)
treee2d16175cede23e02e1d48bf8da834e9396ab8e1 /main/celt051
parentec1c0313f0d4e9dc7cca19421c0f60ce084797b6 (diff)
downloadaports-8f74060778d77defafcd1f9b817d59910d0f94b5.tar.bz2
aports-8f74060778d77defafcd1f9b817d59910d0f94b5.tar.xz
main/celt051: fix musl build
Diffstat (limited to 'main/celt051')
-rw-r--r--main/celt051/APKBUILD11
-rw-r--r--main/celt051/fix-gnuc-prereq.patch20
2 files changed, 29 insertions, 2 deletions
diff --git a/main/celt051/APKBUILD b/main/celt051/APKBUILD
index caa933e23..9143af52d 100644
--- a/main/celt051/APKBUILD
+++ b/main/celt051/APKBUILD
@@ -11,7 +11,9 @@ depends=""
makedepends="libogg-dev"
install=""
subpackages="$pkgname-dev"
-source="http://downloads.us.xiph.org/releases/celt/celt-$pkgver.tar.gz"
+source="http://downloads.us.xiph.org/releases/celt/celt-$pkgver.tar.gz
+ fix-gnuc-prereq.patch
+ "
_builddir="$srcdir"/celt-$pkgver
prepare() {
@@ -45,4 +47,9 @@ package() {
rm -f "$pkgdir"/usr/lib/*.la
}
-md5sums="67e7b5e45db57a6f1f0a6962f5ecb190 celt-0.5.1.3.tar.gz"
+md5sums="67e7b5e45db57a6f1f0a6962f5ecb190 celt-0.5.1.3.tar.gz
+c06dbc5c4867cbaf1163ac9bf709aea6 fix-gnuc-prereq.patch"
+sha256sums="fc2e5b68382eb436a38c3104684a6c494df9bde133c139fbba3ddb5d7eaa6a2e celt-0.5.1.3.tar.gz
+a4002f49a3e6856eae52d42b9c2d73a247581376ec8b2370b2d33cb4c9f211b4 fix-gnuc-prereq.patch"
+sha512sums="bf5621dc3ec1b0808bdd83f006fd7b88df1b6caffe07e18eb696c268b31c6c7127329ecb4c9582c44e0ecf9577bbe2f3dbe40f15b80f8681bb7f4115f1501921 celt-0.5.1.3.tar.gz
+11008485bcf5dc61c107045c7ae292aa1296e54fc53ef835b58c38128f878af4021d14098ef87db9bf7e3162fac41739efa1522aa206c1a592244c57aa043663 fix-gnuc-prereq.patch"
diff --git a/main/celt051/fix-gnuc-prereq.patch b/main/celt051/fix-gnuc-prereq.patch
new file mode 100644
index 000000000..5d2731492
--- /dev/null
+++ b/main/celt051/fix-gnuc-prereq.patch
@@ -0,0 +1,20 @@
+--- celt-0.5.1.3.orig/libcelt/ecintrin.h
++++ celt-0.5.1.3/libcelt/ecintrin.h
+@@ -52,8 +52,7 @@
+ /*Count leading zeros.
+ This macro should only be used for implementing ec_ilog(), if it is defined.
+ All other code should use EC_ILOG() instead.*/
+-#ifdef __GNUC_PREREQ
+-#if __GNUC_PREREQ(3,4)
++#if defined(__GNUC__) && ((__GNUC__<<16)+__GNUC_MINOR__) >= 0x304
+ # if INT_MAX>=2147483647
+ # define EC_CLZ0 sizeof(unsigned)*CHAR_BIT
+ # define EC_CLZ(_x) (__builtin_clz(_x))
+@@ -61,7 +60,6 @@
+ # define EC_CLZ0 sizeof(unsigned long)*CHAR_BIT
+ # define EC_CLZ(_x) (__builtin_clzl(_x))
+ # endif
+-#endif
+ #endif
+
+ #if defined(EC_CLZ)