Magellan Linux

Contents of /smage/branches/alx-0_6_0/extras/nspr/nspr-4.8.8-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2657 - (show annotations) (download)
Mon Jul 11 11:21:38 2011 UTC (12 years, 10 months ago) by niro
File size: 1974 byte(s)
auto added: ver bump to 4.8.8-r1
1 # $Id$
2
3 PNAME="nspr"
4 PVER="4.8.8"
5 PBUILD="r1"
6
7 PCATEGORIE="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
18
19 SRC_URI=(
20 ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PVER/.0/}/src/${SRCFILE}
21 mirror://${PNAME}/${SRCFILE}
22 mirror://${PNAME}/${PNAME}-4.6.6-pkgconfig.patch
23 )
24
25 UP2DATE="updatecmd ${HOMEPAGE} | grep 'current release' | sed 's/.* is \(.*\). See.*/\1/'"
26
27 src_prepare()
28 {
29 munpack ${SRCFILE} || die
30 cd ${SRCDIR}
31
32 # add missing pkgconfig file
33 mpatch ${PNAME}-4.6.6-pkgconfig.patch || die
34
35 install -d ${SRCDIR}/build || die
36 install -d ${SRCDIR}/inst || die
37 }
38
39 src_compile()
40 {
41 cd ${SRCDIR}/build
42
43 local conf
44 [[ ${ARCH} = x86_64 ]]&& conf="--enable-64bit"
45
46 ../mozilla/nsprpub/configure \
47 --host=${CHOST} \
48 --prefix=/usr \
49 --infodir=/usr/share/info \
50 --mandir=/usr/share/man \
51 --libdir=/usr/$(mlibdir)/nspr \
52 --enable-ipv6 \
53 ${conf} \
54 || die
55
56 mmake || die
57 }
58
59 src_install()
60 {
61 cd ${SRCDIR}/build
62
63 make install || die
64
65 minstalldir /usr || die
66 cp -rfL dist/* ${BINDIR}/usr || die
67
68 # remove the libs from bindir
69 rm -rf ${BINDIR}/usr/bin/lib*.so || die
70
71 # move all file to /usr/lib/nspr as the built system is broken
72 # this fixes libdir on 64bit arches also
73 minstalldir /usr/lib/nspr || die
74 mv ${BINDIR}/usr/lib/*so* ${BINDIR}/usr/lib/nspr || die
75 mv ${BINDIR}/usr/lib/*\.a ${BINDIR}/usr/lib/nspr || die
76 if [[ $(mlibdir) != lib ]]
77 then
78 mv ${BINDIR}/usr/lib ${BINDIR}/usr/$(mlibdir) || die
79 fi
80
81 # install nspr-config
82 minstallexec config/nspr-config || die
83
84 # install pkg-config file
85 minstalldir /usr/$(mlibdir)/pkgconfig || die
86 minstallfile config/nspr.pc /usr/$(mlibdir)/pkgconfig || die
87
88 # inform the system about the new ldpath
89 minstalldir /etc/env.d || die
90 echo "LDPATH=/usr/$(mlibdir)/nspr" > ${BINDIR}/etc/env.d/08nspr || die
91 }