1 |
commit: e1b2fa669c59eb49fa1df6f5d5d5a64feffda001 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 4 09:36:41 2015 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 4 09:36:52 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1b2fa66 |
7 |
|
8 |
dev-libs/nspr: Bump to version 4.11 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
dev-libs/nspr/Manifest | 1 + |
14 |
dev-libs/nspr/nspr-4.11.ebuild | 122 +++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 123 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/nspr/Manifest b/dev-libs/nspr/Manifest |
18 |
index 3a7fb04..aa8726c 100644 |
19 |
--- a/dev-libs/nspr/Manifest |
20 |
+++ b/dev-libs/nspr/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST nspr-4.10.10.tar.gz 1134164 SHA256 343614971c30520d0fa55f4af0a72578e2d8674bb71caf7187490c3379523107 SHA512 60e035c4bd037bbf4bfacc97e2b1097ea78a179969fccead6a964069d826e917f07aaa35a26f123b7297521910728c11e27556fc9bbc09e385c1e8aef9dbf376 WHIRLPOOL db63a6d1e0c9d57dfa059aecf8eeff8e36d0385f598290665d525a85eb6fe173cd899bba017c82b26815d894d8ea6e728dbb7a77483036551c06c78c900d7ee3 |
23 |
DIST nspr-4.10.8.tar.gz 1131130 SHA256 507ea57c525c0c524dae4857a642b4ef5c9d795518754c7f83422d22fe544a15 SHA512 f14e3bd46cd1dee9d7163adbf3b09a450ea8c6c65499c5b6696eba7e85b6b12d3f90561a1dfe0dc0dc5fe1b14758b4191e546d9f0e29a66f33c69dd6ed6f50d9 WHIRLPOOL 67be897d54e2446d563cfe505047b23880025bd3f1ea5492964f8d286f56776e41a8e63bd9d197d3115efae0d63bd0c7005fb9fc56abdfce0702c27e6a9e872c |
24 |
+DIST nspr-4.11.tar.gz 1134106 SHA256 cb320a9eee7028275ac0fce7adc39dee36f14f02fd8432fce1b7e1aa5e3685c2 SHA512 26c47ba618f5a7748cacc5152348b6fd37bdcc82806bbff485ed4d485aecad13d202270a837c735670030e96380ec3177f3bc8a47e0dca359cfb097a84242c02 WHIRLPOOL f8707154d1981a09140d31d359d5a40867eaad447620a4731a11c770cae13b8e9a64ef45c82123083e37e2effedfb0c367cc57969a3baf65628ff1e9ccf41517 |
25 |
|
26 |
diff --git a/dev-libs/nspr/nspr-4.11.ebuild b/dev-libs/nspr/nspr-4.11.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..17c82b2 |
29 |
--- /dev/null |
30 |
+++ b/dev-libs/nspr/nspr-4.11.ebuild |
31 |
@@ -0,0 +1,122 @@ |
32 |
+# Copyright 1999-2015 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI=5 |
37 |
+WANT_AUTOCONF="2.5" |
38 |
+ |
39 |
+inherit autotools eutils multilib toolchain-funcs versionator multilib-minimal |
40 |
+ |
41 |
+MIN_PV="$(get_version_component_range 2)" |
42 |
+ |
43 |
+DESCRIPTION="Netscape Portable Runtime" |
44 |
+HOMEPAGE="http://www.mozilla.org/projects/nspr/" |
45 |
+SRC_URI="http://archive.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/${P}.tar.gz" |
46 |
+ |
47 |
+LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
50 |
+IUSE="debug" |
51 |
+ |
52 |
+RDEPEND=" |
53 |
+ abi_x86_32? ( |
54 |
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r12 |
55 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
56 |
+ )" |
57 |
+ |
58 |
+MULTILIB_CHOST_TOOLS=( |
59 |
+ /usr/bin/nspr-config |
60 |
+) |
61 |
+ |
62 |
+src_prepare() { |
63 |
+ cd "${S}"/nspr || die |
64 |
+ epatch "${FILESDIR}"/${PN}-4.7.0-prtime.patch |
65 |
+ epatch "${FILESDIR}"/${PN}-4.7.1-solaris.patch |
66 |
+ epatch "${FILESDIR}"/${PN}-4.10.6-solaris.patch |
67 |
+ epatch "${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch |
68 |
+ epatch "${FILESDIR}"/${PN}-4.8.9-link-flags.patch |
69 |
+ # We do not need to pass -L$libdir via nspr-config --libs |
70 |
+ epatch "${FILESDIR}"/${PN}-4.9.5_nspr_config.patch |
71 |
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1128029 |
72 |
+ epatch "${FILESDIR}"/${PN}-4.10.10-musl-support.patch |
73 |
+ |
74 |
+ # rename configure.in to configure.ac for new autotools compatibility |
75 |
+ if [[ -e "${S}"/nspr/configure.in ]] ; then |
76 |
+ einfo "Renaming configure.in to configure.ac" |
77 |
+ mv "${S}"/nspr/configure.{in,ac} || die |
78 |
+ fi |
79 |
+ # We must run eautoconf to regenerate configure |
80 |
+ eautoconf |
81 |
+ |
82 |
+ # make sure it won't find Perl out of Prefix |
83 |
+ sed -i -e "s/perl5//g" "${S}"/nspr/configure || die |
84 |
+ |
85 |
+ # Respect LDFLAGS |
86 |
+ sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \ |
87 |
+ "${S}"/nspr/config/rules.mk || die |
88 |
+} |
89 |
+ |
90 |
+multilib_src_configure() { |
91 |
+ # We use the standard BUILD_xxx but nspr uses HOST_xxx |
92 |
+ tc-export_build_env BUILD_CC |
93 |
+ export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS} |
94 |
+ tc-export AR CC CXX RANLIB |
95 |
+ [[ ${CBUILD} != ${CHOST} ]] \ |
96 |
+ && export CROSS_COMPILE=1 \ |
97 |
+ || unset CROSS_COMPILE |
98 |
+ |
99 |
+ local myconf=() |
100 |
+ |
101 |
+ # The configure has some fancy --enable-{{n,x}32,64bit} switches |
102 |
+ # that trigger some code conditional to platform & arch. This really |
103 |
+ # matters for the few common arches (x86, ppc) but we pass a little |
104 |
+ # more of them to be future-proof. |
105 |
+ |
106 |
+ # use ABI first, this will work for most cases |
107 |
+ case "${ABI}" in |
108 |
+ alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;; |
109 |
+ n32) myconf+=( --enable-n32 );; |
110 |
+ x32) myconf+=( --enable-x32 );; |
111 |
+ s390x|*64) myconf+=( --enable-64bit );; |
112 |
+ default) # no abi actually set, fall back to old check |
113 |
+ einfo "Running a short build test to determine 64bit'ness" |
114 |
+ echo > "${T}"/test.c || die |
115 |
+ ${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die |
116 |
+ case $(file "${T}"/test.o) in |
117 |
+ *32-bit*x86-64*) myconf+=( --enable-x32 );; |
118 |
+ *64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );; |
119 |
+ *32-bit*|*ppc*|*i386*) ;; |
120 |
+ *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
121 |
+ esac ;; |
122 |
+ *) ;; |
123 |
+ esac |
124 |
+ |
125 |
+ # Ancient autoconf needs help finding the right tools. |
126 |
+ LC_ALL="C" ECONF_SOURCE="${S}/nspr" \ |
127 |
+ ac_cv_path_AR="${AR}" \ |
128 |
+ econf \ |
129 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
130 |
+ $(use_enable debug) \ |
131 |
+ $(use_enable !debug optimize) \ |
132 |
+ "${myconf[@]}" |
133 |
+} |
134 |
+ |
135 |
+multilib_src_install() { |
136 |
+ # Their build system is royally confusing, as usual |
137 |
+ MINOR_VERSION=${MIN_PV} # Used for .so version |
138 |
+ emake DESTDIR="${D}" install |
139 |
+ |
140 |
+ einfo "removing static libraries as upstream has requested!" |
141 |
+ rm -f "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries." |
142 |
+ |
143 |
+ # install nspr-config |
144 |
+ dobin config/nspr-config |
145 |
+ |
146 |
+ # Remove stupid files in /usr/bin |
147 |
+ rm "${ED}"/usr/bin/prerr.properties || die |
148 |
+ |
149 |
+ # This is used only to generate prerr.c and prerr.h at build time. |
150 |
+ # No other projects use it, and we don't want to depend on perl. |
151 |
+ # Talked to upstream and they agreed w/punting. |
152 |
+ rm "${ED}"/usr/bin/compile-et.pl || die |
153 |
+} |