Contents of /branches/R11-unstable/extras/nspr/nspr-4.10.8-r1.smage2
Parent Directory | Revision Log
Revision 25677 -
(show annotations)
(download)
Tue Nov 25 04:09:09 2014 UTC (9 years, 10 months ago) by niro
File size: 2565 byte(s)
Tue Nov 25 04:09:09 2014 UTC (9 years, 10 months ago) by niro
File size: 2565 byte(s)
-release branches/R11-unstable
1 | # $Id$ |
2 | |
3 | PNAME="nspr" |
4 | PVER="4.10.8" |
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_x86_64=">= sys-apps/multiarch-wrapper-1" |
13 | SPECIAL_VARS="DEPEND_x86_64" |
14 | |
15 | DEPEND="$(marchdepend) |
16 | >= virtual/glibc" |
17 | |
18 | SRCFILE="${PNAME}-${PVER/.0/}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER/.0/}" |
20 | |
21 | sminclude mtools multilib |
22 | msetfeature "!check" |
23 | |
24 | SRC_URI=( |
25 | ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PVER/.0/}/src/${SRCFILE} |
26 | mirror://${PNAME}/${SRCFILE} |
27 | ) |
28 | |
29 | UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/ | grep 'releases/v[0-9]' | sed 's:.*releases/v\(.*\):\1:' | sed 's:/::' | upsort_pipe" |
30 | |
31 | src_prepare() |
32 | { |
33 | munpack ${SRCFILE} || die |
34 | |
35 | all-abis install -d ${SRCDIR}-$(mabi)/build || die |
36 | all-abis install -d ${SRCDIR}-$(mabi)/inst || die |
37 | } |
38 | |
39 | src_compile() |
40 | { |
41 | local abi |
42 | for abi in ${MULTILIB_ABIS} |
43 | do |
44 | case ${abi} in |
45 | m32) ABI_LIBDIR="lib";; |
46 | m64) ABI_LIBDIR="lib64";; |
47 | esac |
48 | cd ${SRCDIR}-${abi}/build |
49 | |
50 | local conf |
51 | [[ ${abi} = m64 ]]&& conf="--enable-64bit" |
52 | |
53 | ../nspr/configure \ |
54 | --host=${CHOST} \ |
55 | --prefix=/usr \ |
56 | --infodir=/usr/share/info \ |
57 | --mandir=/usr/share/man \ |
58 | --libdir=/usr/$(mlibdir)/nspr \ |
59 | --enable-ipv6 \ |
60 | ${conf} \ |
61 | || die |
62 | |
63 | make || die |
64 | done |
65 | } |
66 | |
67 | src_install() |
68 | { |
69 | local abi |
70 | for abi in ${MULTILIB_ABIS} |
71 | do |
72 | case ${abi} in |
73 | m32) ABI_LIBDIR="lib";; |
74 | m64) ABI_LIBDIR="lib64";; |
75 | esac |
76 | cd ${SRCDIR}-${abi}/build |
77 | |
78 | make install || die |
79 | |
80 | minstalldir /usr || die |
81 | cp -rfL dist/* ${BINDIR}/usr || die |
82 | |
83 | # remove the libs from bindir |
84 | rm -rf ${BINDIR}/usr/bin/lib*.so || die |
85 | |
86 | # move all file to /usr/lib/nspr as the built system is broken |
87 | # this fixes libdir on 64bit arches also |
88 | minstalldir /usr/$(mlibdir)/nspr || die |
89 | mv ${BINDIR}/usr/lib/*so* ${BINDIR}/usr/$(mlibdir)/nspr || die |
90 | mv ${BINDIR}/usr/lib/*\.a ${BINDIR}/usr/$(mlibdir)/nspr || die |
91 | |
92 | # install nspr-config |
93 | minstallexec config/nspr-config /usr/bin/nspr-config-${abi} || die |
94 | |
95 | # install pkg-config file |
96 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
97 | minstallfile config/nspr.pc /usr/$(mlibdir)/pkgconfig || die |
98 | |
99 | # inform the system about the new ldpath |
100 | minstalldir /etc/env.d || die |
101 | echo "LDPATH=/usr/$(mlibdir)/nspr" > ${BINDIR}/etc/env.d/08nspr-${abi} || die |
102 | |
103 | if [[ ${ARCH} = x86_64 ]] |
104 | then |
105 | mlink multiarch-wrapper /usr/bin/nspr-config || die |
106 | else |
107 | mlink nspr-config-${abi} /usr/bin/nspr-config || die |
108 | fi |
109 | done |
110 | } |
111 | |
112 | postinstall() |
113 | { |
114 | if [[ -f ${MROOT}/etc/env.d/08nspr ]] |
115 | then |
116 | rm ${MROOT}/etc/env.d/08nspr |
117 | fi |
118 | } |