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 2687 - (show annotations) (download)
Mon Jul 11 17:38:23 2011 UTC (12 years, 9 months ago) by niro
File size: 2156 byte(s)
-config protect mask etc/env.d
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 REMOVE_DEPRECATED_MAGE_TARGETS=1
18 ALX_ONLY_KEEP="etc/env.d usr/$(mlibdir)/nspr/*.so usr/$(mlibdir)/nspr/*.so.*"
19 sminclude mtools alx-split
20
21 SRC_URI=(
22 ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PVER/.0/}/src/${SRCFILE}
23 mirror://${PNAME}/${SRCFILE}
24 mirror://${PNAME}/${PNAME}-4.6.6-pkgconfig.patch
25 )
26
27 UP2DATE="updatecmd ${HOMEPAGE} | grep 'current release' | sed 's/.* is \(.*\). See.*/\1/'"
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 alx_generic_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 }
94
95 preinstall()
96 {
97 add_conf_prot_mask /etc/env.d
98 }