Contents of /branches/magellan-next/extras/nspr/nspr-4.8.6-r1.smage2
Parent Directory | Revision Log
Revision 7000 -
(show annotations)
(download)
Mon Sep 27 16:39:52 2010 UTC (14 years ago) by niro
File size: 2184 byte(s)
Mon Sep 27 16:39:52 2010 UTC (14 years ago) by niro
File size: 2184 byte(s)
auto added: ver bump to 4.8.6-r1
1 | # $Id: nspr-4.8.2-r1.smage2 3772 2009-11-03 17:22:41Z niro $ |
2 | |
3 | PNAME="nspr" |
4 | PVER="4.8.6" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="dev-libs" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="Netscape Portable Runtime (NSPR)." |
11 | HOMEPAGE="http://www.mozilla.org/projects/nspr/" |
12 | |
13 | DEPEND=">= virtual/glibc" |
14 | |
15 | SRCFILE="${PNAME}-${PVER/.0/}.tar.gz" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER/.0/}" |
17 | |
18 | sminclude mtools |
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.6.6-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 | cd ${SRCDIR} |
33 | |
34 | # add missing pkgconfig file |
35 | mpatch ${PNAME}-4.6.6-pkgconfig.patch || die |
36 | |
37 | install -d ${SRCDIR}/build || die |
38 | install -d ${SRCDIR}/inst || die |
39 | } |
40 | |
41 | src_compile() |
42 | { |
43 | cd ${SRCDIR}/build |
44 | |
45 | local conf |
46 | [[ ${ARCH} = x86_64 ]]&& conf="--enable-64bit" |
47 | |
48 | ../mozilla/nsprpub/configure \ |
49 | --host=${CHOST} \ |
50 | --prefix=/usr \ |
51 | --infodir=/usr/share/info \ |
52 | --mandir=/usr/share/man \ |
53 | --libdir=/usr/$(mlibdir)/nspr \ |
54 | --enable-ipv6 \ |
55 | ${conf} \ |
56 | || die |
57 | |
58 | mmake || die |
59 | } |
60 | |
61 | src_install() |
62 | { |
63 | cd ${SRCDIR}/build |
64 | |
65 | make install || die |
66 | |
67 | minstalldir /usr || die |
68 | cp -rfL dist/* ${BINDIR}/usr || die |
69 | |
70 | # remove the libs from bindir |
71 | rm -rf ${BINDIR}/usr/bin/lib*.so || die |
72 | |
73 | # move all file to /usr/lib/nspr as the built system is broken |
74 | # this fixes libdir on 64bit arches also |
75 | minstalldir /usr/lib/nspr || die |
76 | mv ${BINDIR}/usr/lib/*so* ${BINDIR}/usr/lib/nspr || die |
77 | mv ${BINDIR}/usr/lib/*\.a ${BINDIR}/usr/lib/nspr || die |
78 | if [[ $(mlibdir) != lib ]] |
79 | then |
80 | mv ${BINDIR}/usr/lib ${BINDIR}/usr/$(mlibdir) || die |
81 | fi |
82 | |
83 | # install nspr-config |
84 | minstallexec config/nspr-config || die |
85 | |
86 | # install pkg-config file |
87 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
88 | minstallfile config/nspr.pc /usr/$(mlibdir)/pkgconfig || die |
89 | |
90 | # inform the system about the new ldpath |
91 | minstalldir /etc/env.d || die |
92 | echo "LDPATH=/usr/$(mlibdir)/nspr" > ${BINDIR}/etc/env.d/08nspr || die |
93 | } |