Magellan Linux

Contents of /trunk/extras/nspr/nspr-4.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id