Contents of /trunk/extras/nspr/nspr-4.9.2-r1.smage2
Parent Directory | Revision Log
Revision 13022 -
(show annotations)
(download)
Fri Aug 17 09:15:26 2012 UTC (12 years, 1 month ago) by niro
File size: 2488 byte(s)
Fri Aug 17 09:15:26 2012 UTC (12 years, 1 month ago) by niro
File size: 2488 byte(s)
auto added: ver bump to 4.9.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="nspr" |
4 | PVER="4.9.2" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="dev-libs" |
8 | |
9 | DESCRIPTION="Netscape Portable Runtime (NSPR)." |
10 | HOMEPAGE="http://www.mozilla.org/projects/nspr/" |
11 | |
12 | DEPEND=">= virtual/glibc" |
13 | |
14 | SRCFILE="${PNAME}-${PVER/.0/}.tar.gz" |
15 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER/.0/}" |
16 | |
17 | sminclude mtools multilib |
18 | msetfeature "!check" |
19 | |
20 | SRC_URI=( |
21 | ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PVER/.0/}/src/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${PNAME}-4.9-pkgconfig.patch |
24 | ) |
25 | |
26 | #UP2DATE="updatecmd ${HOMEPAGE} | grep 'current release' | sed 's/.* is \(.*\). See.*/\1/'" |
27 | UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/ | grep 'releases/v[0-9]' | sed -n 's:.*releases/v\(.*\):\1:;$ p'" |
28 | |
29 | src_prepare() |
30 | { |
31 | munpack ${SRCFILE} || die |
32 | |
33 | # add missing pkgconfig file |
34 | mpatch ${PNAME}-4.9-pkgconfig.patch || die |
35 | |
36 | all-abis install -d ${SRCDIR}-$(mabi)/build || die |
37 | all-abis install -d ${SRCDIR}-$(mabi)/inst || die |
38 | } |
39 | |
40 | src_compile() |
41 | { |
42 | local abi |
43 | for abi in ${MULTILIB_ABIS} |
44 | do |
45 | case ${abi} in |
46 | m32) ABI_LIBDIR="lib";; |
47 | m64) ABI_LIBDIR="lib64";; |
48 | esac |
49 | cd ${SRCDIR}-${abi}/build |
50 | |
51 | local conf |
52 | [[ ${abi} = m64 ]]&& conf="--enable-64bit" |
53 | |
54 | ../mozilla/nsprpub/configure \ |
55 | --host=${CHOST} \ |
56 | --prefix=/usr \ |
57 | --infodir=/usr/share/info \ |
58 | --mandir=/usr/share/man \ |
59 | --libdir=/usr/$(mlibdir)/nspr \ |
60 | --enable-ipv6 \ |
61 | ${conf} \ |
62 | || die |
63 | |
64 | make || die |
65 | done |
66 | } |
67 | |
68 | src_install() |
69 | { |
70 | local abi |
71 | for abi in ${MULTILIB_ABIS} |
72 | do |
73 | case ${abi} in |
74 | m32) ABI_LIBDIR="lib";; |
75 | m64) ABI_LIBDIR="lib64";; |
76 | esac |
77 | cd ${SRCDIR}-${abi}/build |
78 | |
79 | make install || die |
80 | |
81 | minstalldir /usr || die |
82 | cp -rfL dist/* ${BINDIR}/usr || die |
83 | |
84 | # remove the libs from bindir |
85 | rm -rf ${BINDIR}/usr/bin/lib*.so || die |
86 | |
87 | # move all file to /usr/lib/nspr as the built system is broken |
88 | # this fixes libdir on 64bit arches also |
89 | minstalldir /usr/$(mlibdir)/nspr || die |
90 | mv ${BINDIR}/usr/lib/*so* ${BINDIR}/usr/$(mlibdir)/nspr || die |
91 | mv ${BINDIR}/usr/lib/*\.a ${BINDIR}/usr/$(mlibdir)/nspr || die |
92 | |
93 | # install nspr-config |
94 | minstallexec config/nspr-config || die |
95 | |
96 | # install pkg-config file |
97 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
98 | minstallfile config/nspr.pc /usr/$(mlibdir)/pkgconfig || die |
99 | |
100 | # inform the system about the new ldpath |
101 | minstalldir /etc/env.d || die |
102 | echo "LDPATH=/usr/$(mlibdir)/nspr" > ${BINDIR}/etc/env.d/08nspr-${abi} || die |
103 | done |
104 | } |
105 | |
106 | postinstall() |
107 | { |
108 | if [[ -f ${MROOT}/etc/env.d/08nspr ]] |
109 | then |
110 | rm ${MROOT}/etc/env.d/08nspr |
111 | fi |
112 | } |