aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaine Gholson <laine.gholson@gmail.com>2016-05-27 16:51:17 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-05-27 16:51:17 -0400
commit5820fda13099e54cb9d977c435e5660365a7be8e (patch)
treeeb0aa1f1339bd57bd0280166ced7874cd61cf0a1
parentx11-libs/libva-vdpau-driver: fix bug #584352 (diff)
downloadmusl-5820fda1.tar.gz
musl-5820fda1.tar.bz2
musl-5820fda1.zip
dev-libs/pth: fix build on musl
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--dev-libs/pth/Manifest9
-rw-r--r--dev-libs/pth/files/pth-2.0.5-parallelfix.patch15
-rw-r--r--dev-libs/pth/files/pth-2.0.6-ldflags.patch17
-rw-r--r--dev-libs/pth/files/pth-2.0.6-sigstack.patch22
-rw-r--r--dev-libs/pth/files/pth-2.0.7-ia64.patch30
-rw-r--r--dev-libs/pth/files/pth-2.0.7-kernel-3.patch24
-rw-r--r--dev-libs/pth/files/pth-2.0.7-parallel-install.patch12
-rw-r--r--dev-libs/pth/metadata.xml8
-rw-r--r--dev-libs/pth/pth-2.0.7-r3.ebuild51
9 files changed, 188 insertions, 0 deletions
diff --git a/dev-libs/pth/Manifest b/dev-libs/pth/Manifest
new file mode 100644
index 00000000..c3dd04a3
--- /dev/null
+++ b/dev-libs/pth/Manifest
@@ -0,0 +1,9 @@
+AUX pth-2.0.5-parallelfix.patch 415 SHA256 f005fbb328c8fc82624c2968da037189f39d0957b759432a3ec20f6f691325f5 SHA512 a294f725dff68f887540bcdd1b8d8b76ca7b3ce2d0d10ad9b93d9eece83c05d4d1e98095af85d37ae2070049bf12efd4d02d1306a5b20d12b5656a81abe75868 WHIRLPOOL 63ddde1afd253245d3cdb1aa76be6a5875f9e09e5cbb3e9a3b1e766f6ab2c1b253c05f0c41bee8c2aef52038e5774501bc56ee422f1f7d508a59df3f1dc98d63
+AUX pth-2.0.6-ldflags.patch 813 SHA256 ed366b2f28a458e2d718dc3a90f54a91a478a8e3f64ee6e4fa3c8a7d7693bd9c SHA512 099c8221d0011dd5284a96d216ed5315619ae377c3c0a01d15af2976aec57e286166601740b139852f340b36fdc7c5ce62f69faf268d6feaabe70db2bbfdf372 WHIRLPOOL a73438ba84865e9aecf7c9a839eee59803f59685a5ab35498004cb0a333fadc0a84841ee10cf0bdb62c0068e11aaea21f131ec14067d2b1a8e804394c7ee441b
+AUX pth-2.0.6-sigstack.patch 820 SHA256 b1f090242535640fc6518796b162d108c8436551f4e6bb43fd7cb8c9e916a868 SHA512 0011405ae5e8371390adb2a718277d675db5bc085fe5c5f6054ba1bb08f2276d9e5f4d5c083e833417893173210b1e791a2d0f0a9b6d13194f11c9f587397635 WHIRLPOOL c7d5bd555c01124ddeea8b96fd8816fe3e28fd50b4becd3f82d69459b03d5da721dfaaa4afa164b4747bf4b278e887bfe660a6e6e04c1ab42dd071a08ef8727e
+AUX pth-2.0.7-ia64.patch 1207 SHA256 c4d2509cc218d0001081ce23796f0a4a22e8ccc8aa3b00ad14d80dfd50c1c073 SHA512 984edb59caca26081c0db48372b5035a2845087c5e93265486edbd03c1f262de8a18b04ad810756f6fc86cae2b6af551f65056a3bd45a675d30df07cd47875ac WHIRLPOOL 05d1454933d7aa08a0377dc088c72d0615112b6ea26f0b0a5d74a82ad3891f417a13e36ba7599f4d841d3558f829726cff52529123de75c6d6e57ffef971fa30
+AUX pth-2.0.7-kernel-3.patch 825 SHA256 c09f733f31c4813cd26198b305693c3fe82263595d79dabc90e894f2e9f01483 SHA512 c7dd07dbea6cfdd5479e65d9c741f1f7813698f287a33b19e5f1a2bfac9ca4457df61bb7fc3f8a339dfeeaf919da3869843308f595d35d0bd7f82febf3606fd7 WHIRLPOOL 36fc7d84f8dce37ba1a57562a0cf5efd179bee98353ce036c60df24375f009de888a23eaadc36663527a466c30b2401d55862ce498d49c52a0903b6a1501a5c5
+AUX pth-2.0.7-parallel-install.patch 428 SHA256 92e5d8ada700573e0a68e2c30e418ae95b7dcc5a7429a963d3c9ea207205c0c3 SHA512 b9abcfbe02a275e19e7f4d7676d84bb8d78f4e7eda882efda0be697311efc09598b4d3f0128c8a8182cefd18e63400573cde46de62f5741433e155aefa8113c4 WHIRLPOOL df14957560978b555378a6db7ee2a2fd8ef074743be7c8b629bbda057559cbaf8ec77c8b1e4e23f52c7938cdc0dff9080c053482c30c6be14c05a2998d542b14
+DIST pth-2.0.7.tar.gz 652640 SHA256 72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232 SHA512 f79d74047c50e06f3198356f88647c5c1c8a04ebdd94641fc31d5ab0fd2750d86615fcb81da2f98d7ea73d012a501195d3fa09060571d18dcfdaec5d7a0ecb12 WHIRLPOOL 9b8f60823d40a8e003d3c6555d392974e3b891336a535458c133e7863abb9b6f2e731591f11ba17fed1fe1eec6c8b00ba5352cfd3a8bc2906ad4b55aa6c345f8
+EBUILD pth-2.0.7-r3.ebuild 1323 SHA256 c0963af2232ecec231d9f3007ef7b54e189f9f94554642ea3d085c8f77d43681 SHA512 19bc6b39490d00fc5e2f3df799f3251bd5542b9ff3fe42b230818f73ceab8ec00e6a4634bc14cba85a43392ef3202da26469ce27ec8f06fde24b8aafbf4d1708 WHIRLPOOL dc8f0a7436538a70310067564f9de5ead8879e87b43ebba3d9fe90f1b6f061882eb59a3ae3caa36647026a61f904df06d8c88e83c205329e6346c46e98cbb885
+MISC metadata.xml 236 SHA256 dd25b46c95b0c63da84b7ff5778479e31449a385df066e9ee14bf0d7d176f42f SHA512 5f6cd6a85527534d5de7118de5af212ee3044c8c5530a7f7087a28074a2d4ab7be1728325bd985adc063dc795d3cf2b1c4e58a4c4c4ec02d739bd4bbc544ef08 WHIRLPOOL b15a2dfb001c41c8de2895842148b2531b74949e89e93ff8c366519c35792996e344918eaf9144fb081fc240796e47890be356d2339bea60b1e1d41830447d31
diff --git a/dev-libs/pth/files/pth-2.0.5-parallelfix.patch b/dev-libs/pth/files/pth-2.0.5-parallelfix.patch
new file mode 100644
index 00000000..a305f593
--- /dev/null
+++ b/dev-libs/pth/files/pth-2.0.5-parallelfix.patch
@@ -0,0 +1,15 @@
+--- Makefile.in.orig 2005-11-08 05:58:55.000000000 +1100
++++ Makefile.in 2005-11-08 06:29:02.000000000 +1100
+@@ -148,10 +148,9 @@
+
+ # be aware of libtool when building the objects
+ .SUFFIXES:
+-.SUFFIXES: .c .o .lo
+-.c.o:
++%.o: %.c $(TARGET_PREQ)
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+-.c.lo:
++%.lo: %.c $(TARGET_PREQ)
+ $(LIBTOOL) --mode=compile --quiet $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+
+ # the default target
diff --git a/dev-libs/pth/files/pth-2.0.6-ldflags.patch b/dev-libs/pth/files/pth-2.0.6-ldflags.patch
new file mode 100644
index 00000000..7a4a5ab3
--- /dev/null
+++ b/dev-libs/pth/files/pth-2.0.6-ldflags.patch
@@ -0,0 +1,17 @@
+Index: pth-2.0.6/Makefile.in
+===================================================================
+--- pth-2.0.6.orig/Makefile.in
++++ pth-2.0.6/Makefile.in
+@@ -168,10 +168,10 @@ pth_p.h: $(S)pth_p.h.in
+
+ # build the static and possibly shared libraries
+ libpth.la: $(LOBJS)
+- $(LIBTOOL) --mode=link --quiet $(CC) -o libpth.la $(LOBJS) \
++ $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o libpth.la $(LOBJS) \
+ -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)`
+ libpthread.la: pthread.lo $(LOBJS)
+- $(LIBTOOL) --mode=link --quiet $(CC) -o libpthread.la pthread.lo $(LOBJS) \
++ $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o libpthread.la pthread.lo $(LOBJS) \
+ -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)`
+
+ # build the manual pages
diff --git a/dev-libs/pth/files/pth-2.0.6-sigstack.patch b/dev-libs/pth/files/pth-2.0.6-sigstack.patch
new file mode 100644
index 00000000..3914dea7
--- /dev/null
+++ b/dev-libs/pth/files/pth-2.0.6-sigstack.patch
@@ -0,0 +1,22 @@
+diff -urNp pth-2.0.6.old/aclocal.m4 pth-2.0.6/aclocal.m4
+--- pth-2.0.6.old/aclocal.m4 2004-12-31 21:33:19.000000000 +0200
++++ pth-2.0.6/aclocal.m4 2006-09-20 14:46:59.000000000 +0300
+@@ -1522,6 +1522,7 @@ int main(int argc, char *argv[])
+ int sksize;
+ char result[1024];
+ int i;
++exit (1);
+ sksize = 32768;
+ skbuf = (char *)malloc(sksize*2+2*sizeof(union alltypes));
+ if (skbuf == NULL)
+diff -urNp pth-2.0.6.old/configure pth-2.0.6/configure
+--- pth-2.0.6.old/configure 2005-11-22 09:49:21.000000000 +0200
++++ pth-2.0.6/configure 2006-09-20 14:55:23.000000000 +0300
+@@ -24735,6 +24735,7 @@ int main(int argc, char *argv[])
+ int sksize;
+ char result[1024];
+ int i;
++exit (1);
+ sksize = 32768;
+ skbuf = (char *)malloc(sksize*2+2*sizeof(union alltypes));
+ if (skbuf == NULL)
diff --git a/dev-libs/pth/files/pth-2.0.7-ia64.patch b/dev-libs/pth/files/pth-2.0.7-ia64.patch
new file mode 100644
index 00000000..8b08b82c
--- /dev/null
+++ b/dev-libs/pth/files/pth-2.0.7-ia64.patch
@@ -0,0 +1,30 @@
+# http://bugs.debian.org/225780
+diff -Naurp pth.orig/pth_sched.c pth/pth_sched.c
+--- pth.orig/pth_sched.c 2009-07-16 23:16:52.000000000 +0000
++++ pth/pth_sched.c 2009-07-16 23:20:51.000000000 +0000
+@@ -297,8 +297,15 @@ intern void *pth_scheduler(void *dummy)
+ /*
+ * Check for stack overflow
+ */
++#ifndef __ia64__
+ if (pth_current->stackguard != NULL) {
+ if (*pth_current->stackguard != 0xDEAD) {
++#else
++ /* On ia64 the stack grows down but the bottom part is used for register
++ * backing store which grows up. So we check for a meet in the middle
++ */
++ if (pth_current->mctx.uc.uc_mcontext.sc_gr[12] <= pth_current->mctx.uc.uc_mcontext.sc_ar_bsp) {
++#endif
+ pth_debug3("pth_scheduler: stack overflow detected for thread 0x%lx (\"%s\")",
+ (unsigned long)pth_current, pth_current->name);
+ /*
+@@ -324,7 +331,9 @@ intern void *pth_scheduler(void *dummy)
+ pth_current->state = PTH_STATE_DEAD;
+ kill(getpid(), SIGSEGV);
+ }
++#ifndef __ia64__
+ }
++#endif
+
+ /*
+ * If previous thread is now marked as dead, kick it out
diff --git a/dev-libs/pth/files/pth-2.0.7-kernel-3.patch b/dev-libs/pth/files/pth-2.0.7-kernel-3.patch
new file mode 100644
index 00000000..c8a1afb3
--- /dev/null
+++ b/dev-libs/pth/files/pth-2.0.7-kernel-3.patch
@@ -0,0 +1,24 @@
+diff -ur pth-2.0.7.orig/aclocal.m4 pth-2.0.7/aclocal.m4
+--- pth-2.0.7.orig/aclocal.m4 2012-08-08 16:25:05.289931224 +0200
++++ pth-2.0.7/aclocal.m4 2012-08-08 16:26:45.164932424 +0200
+@@ -1074,7 +1074,7 @@
+ braindead=no
+ case "x`uname -r`" in
+ changequote(, )dnl
+- x2.[23456789]* ) ;;
++ x2.[23456789]* | x3.[0-9]* ) ;;
+ changequote([, ])
+ * ) braindead=yes ;;
+ esac
+diff -ur pth-2.0.7.orig/configure pth-2.0.7/configure
+--- pth-2.0.7.orig/configure 2012-08-08 16:25:05.289931224 +0200
++++ pth-2.0.7/configure 2012-08-08 16:27:00.391494004 +0200
+@@ -22512,7 +22512,7 @@
+ *-*-linux* )
+ braindead=no
+ case "x`uname -r`" in
+- x2.[23456789]* ) ;;
++ x2.[23456789]* | x3.[0-9]* ) ;;
+
+ * ) braindead=yes ;;
+ esac
diff --git a/dev-libs/pth/files/pth-2.0.7-parallel-install.patch b/dev-libs/pth/files/pth-2.0.7-parallel-install.patch
new file mode 100644
index 00000000..7952cff5
--- /dev/null
+++ b/dev-libs/pth/files/pth-2.0.7-parallel-install.patch
@@ -0,0 +1,12 @@
+--- Makefile.in 2010-12-13 12:59:07.000000000 -0500
++++ Makefile.new 2010-12-13 13:00:22.000000000 -0500
+@@ -215,7 +215,8 @@
+
+ # install the package
+ install: all-for-install
+- @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@
++ @$(MAKE) $(MKFLAGS) install-dirs
++ @$(MAKE) $(MKFLAGS) install-pth @INSTALL_PTHREAD@
+ @touch .done-install >/dev/null 2>&1 || $(TRUE)
+ @$(MAKE) $(MKFLAGS) what-next
+ install-dirs:
diff --git a/dev-libs/pth/metadata.xml b/dev-libs/pth/metadata.xml
new file mode 100644
index 00000000..f1c3d59f
--- /dev/null
+++ b/dev-libs/pth/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-libs/pth/pth-2.0.7-r3.ebuild b/dev-libs/pth/pth-2.0.7-r3.ebuild
new file mode 100644
index 00000000..c4bf1ef4
--- /dev/null
+++ b/dev-libs/pth/pth-2.0.7-r3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils fixheadtails libtool flag-o-matic
+
+DESCRIPTION="GNU Portable Threads"
+HOMEPAGE="https://www.gnu.org/software/pth/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux"
+IUSE="debug static-libs"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+DOCS="ANNOUNCE AUTHORS ChangeLog NEWS README THANKS USERS"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.5-parallelfix.patch
+ epatch "${FILESDIR}"/${PN}-2.0.6-ldflags.patch
+ epatch "${FILESDIR}"/${PN}-2.0.6-sigstack.patch
+ epatch "${FILESDIR}"/${PN}-2.0.7-parallel-install.patch
+ epatch "${FILESDIR}"/${PN}-2.0.7-ia64.patch
+ epatch "${FILESDIR}"/${PN}-2.0.7-kernel-3.patch
+
+ ht_fix_file aclocal.m4 configure
+
+ elibtoolize
+}
+
+src_configure() {
+ # bug 350815
+ ( use arm || use sh ) && append-flags -U_FORTIFY_SOURCE
+
+ local conf
+ use debug && conf="${conf} --enable-debug" # have a bug --disable-debug and shared
+ econf \
+ ${conf} \
+ --with-mctx-mth=sjlj --with-mctx-dsp=ssjlj --with-mctx-stk=sas --enable-shared=no
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}