Lines 2-7
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.8.4-r1.ebuild,v 1.1 2010/05/16 18:39:14 anarchy Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.8.4-r1.ebuild,v 1.1 2010/05/16 18:39:14 anarchy Exp $ |
4 |
|
4 |
|
|
|
5 |
EAPI=3 |
6 |
|
5 |
inherit eutils multilib toolchain-funcs versionator |
7 |
inherit eutils multilib toolchain-funcs versionator |
6 |
|
8 |
|
7 |
MIN_PV="$(get_version_component_range 2)" |
9 |
MIN_PV="$(get_version_component_range 2)" |
Lines 12-52
Link Here
|
12 |
|
14 |
|
13 |
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" |
15 |
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" |
14 |
SLOT="0" |
16 |
SLOT="0" |
15 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
17 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
16 |
IUSE="debug" |
18 |
IUSE="debug" |
17 |
|
19 |
|
18 |
src_unpack() { |
20 |
src_prepare() { |
19 |
unpack ${A} |
|
|
20 |
cd "${S}" |
21 |
mkdir build inst |
21 |
mkdir build inst |
22 |
epatch "${FILESDIR}"/${PN}-4.8-config.patch |
22 |
epatch "${FILESDIR}"/${PN}-4.8-config.patch |
23 |
epatch "${FILESDIR}"/${PN}-4.6.1-config-1.patch |
23 |
epatch "${FILESDIR}"/${PN}-4.6.1-config-1.patch |
24 |
epatch "${FILESDIR}"/${PN}-4.6.1-lang.patch |
24 |
epatch "${FILESDIR}"/${PN}-4.6.1-lang.patch |
25 |
epatch "${FILESDIR}"/${PN}-4.7.0-prtime.patch |
25 |
epatch "${FILESDIR}"/${PN}-4.7.0-prtime.patch |
26 |
epatch "${FILESDIR}"/${PN}-4.8-pkgconfig-gentoo-3.patch |
26 |
epatch "${FILESDIR}"/${PN}-4.8-pkgconfig-gentoo-3.patch |
|
|
27 |
epatch "${FILESDIR}"/${PN}-4.7.1-solaris.patch |
28 |
epatch "${FILESDIR}"/${PN}-4.7.4-solaris.patch |
29 |
epatch "${FILESDIR}"/${PN}-4.8.3-aix-gcc.patch |
30 |
epatch "${FILESDIR}"/${PN}-4.8.3-aix-soname.patch |
31 |
epatch "${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch |
32 |
# make sure it won't find Perl out of Prefix |
33 |
sed -i -e "s/perl5//g" mozilla/nsprpub/configure || die |
27 |
|
34 |
|
28 |
# Respect LDFLAGS |
35 |
# Respect LDFLAGS |
29 |
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \ |
36 |
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \ |
30 |
mozilla/nsprpub/config/rules.mk |
37 |
mozilla/nsprpub/config/rules.mk |
31 |
} |
38 |
} |
32 |
|
39 |
|
33 |
src_compile() { |
40 |
src_configure() { |
34 |
cd "${S}"/build |
41 |
cd "${S}"/build |
35 |
|
42 |
|
36 |
echo > "${T}"/test.c |
43 |
echo > "${T}"/test.c |
37 |
$(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o |
44 |
$(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o |
38 |
case $(file "${T}"/test.o) in |
45 |
case $(file "${T}"/test.o) in |
39 |
*64-bit*) myconf="${myconf} --enable-64bit";; |
46 |
*64-bit*|*ppc64*|*x86_64*) myconf="${myconf} --enable-64bit";; |
40 |
*32-bit*) ;; |
47 |
*32-bit*|*ppc*|*i386*|*"RISC System/6000"*) ;; |
41 |
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
48 |
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
42 |
esac |
49 |
esac |
43 |
|
50 |
|
44 |
myconf="${myconf} --libdir=/usr/$(get_libdir)" |
51 |
myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" |
45 |
|
52 |
|
46 |
ECONF_SOURCE="../mozilla/nsprpub" econf \ |
53 |
ECONF_SOURCE="../mozilla/nsprpub" econf \ |
47 |
$(use_enable debug) \ |
54 |
$(use_enable debug) \ |
48 |
$(use_enable !debug optimize) \ |
55 |
$(use_enable !debug optimize) \ |
49 |
${myconf} || die "econf failed" |
56 |
${myconf} || die "econf failed" |
|
|
57 |
} |
58 |
|
59 |
src_compile() { |
50 |
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "failed to build" |
60 |
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "failed to build" |
51 |
} |
61 |
} |
52 |
|
62 |
|
Lines 56-70
Link Here
|
56 |
cd "${S}"/build |
66 |
cd "${S}"/build |
57 |
emake DESTDIR="${D}" install || die "emake install failed" |
67 |
emake DESTDIR="${D}" install || die "emake install failed" |
58 |
|
68 |
|
59 |
cd "${D}"/usr/$(get_libdir) |
69 |
cd "${ED}"/usr/$(get_libdir) |
60 |
for file in *.a; do |
70 |
for file in *.a; do |
61 |
einfo "removing static libraries as upstream has requested!" |
71 |
einfo "removing static libraries as upstream has requested!" |
62 |
rm -f ${file} || die "failed to remove staic libraries." |
72 |
rm -f ${file} || die "failed to remove staic libraries." |
63 |
done |
73 |
done |
64 |
|
74 |
|
65 |
for file in *.so; do |
75 |
local n= |
66 |
mv ${file} ${file}.${MINOR_VERSION} || die "failed to mv files around" |
76 |
# aix-soname.patch does this already |
67 |
ln -s ${file}.${MINOR_VERSION} ${file} || die "failed to symlink files." |
77 |
[[ ${CHOST} == *-aix* ]] || |
|
|
78 |
for file in *$(get_libname); do |
79 |
n=${file%$(get_libname)}$(get_libname ${MINOR_VERSION}) |
80 |
mv ${file} ${n} || die "failed to mv files around" |
81 |
ln -s ${n} ${file} || die "failed to symlink files." |
82 |
if [[ ${CHOST} == *-darwin* ]]; then |
83 |
install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${n}" ${n} || die |
84 |
fi |
68 |
done |
85 |
done |
69 |
|
86 |
|
70 |
# install nspr-config |
87 |
# install nspr-config |
Lines 75-81
Link Here
|
75 |
doins "${S}"/build/config/nspr.pc || die "failed to insall nspr pkg-config file" |
92 |
doins "${S}"/build/config/nspr.pc || die "failed to insall nspr pkg-config file" |
76 |
|
93 |
|
77 |
# Remove stupid files in /usr/bin |
94 |
# Remove stupid files in /usr/bin |
78 |
rm -f "${D}"/usr/bin/prerr.properties || die "failed to cleanup unneeded files" |
95 |
rm -f "${ED}"/usr/bin/prerr.properties || die "failed to cleanup unneeded files" |
79 |
} |
96 |
} |
80 |
|
97 |
|
81 |
pkg_postinst() { |
98 |
pkg_postinst() { |