Magellan Linux

Contents of /trunk/extras/nss/nss-3.12.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3775 - (show annotations) (download)
Tue Nov 3 18:06:58 2009 UTC (14 years, 6 months ago) by niro
File size: 3621 byte(s)
-fixed build on multilib arches
1 # $Id$
2
3 PNAME="nss"
4 PVER="3.12.4"
5 PBUILD="r1"
6
7 PCATEGORIE="dev-libs"
8 STATE="unstable"
9
10 DESCRIPTION="Network Security Services (NSS)."
11 HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
12
13 DEPEND=">= virtual/glibc
14 >= dev-libs/nspr-4.8.2"
15
16 SDEPEND=">= sys-apps/sed-4"
17
18 SRCFILE="${PNAME}-${PVER}.tar.gz"
19 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
20
21 sminclude mtools
22
23 CONF_CVS_REV=1.2
24 PC_CVS_REV=1.2
25
26 SRC_URI=(
27 ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(echo ${PVER} | sed "s:\.:\_:g")_RTM/src/${SRCFILE}
28 mirror://${PNAME}/${SRCFILE}
29 mirror://${PNAME}/nss-config.in-${CONF_CVS_REV}
30 mirror://${PNAME}/nss.pc.in-${PC_CVS_REV}
31 )
32
33 UP2DATE="updatecmd 'http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/?C=M;D=A' | grep NSS | sed -n 's/.*NSS_\(.*\)_RTM.*/\1/;s/_/./g;$ p'"
34
35 src_prepare()
36 {
37 munpack ${SRCFILE} || die
38 cd ${SRCDIR}
39
40 # hack nspr paths (taken from gentoo)
41 echo 'INCLUDES += -I/usr/include/nspr -I$(DIST)/include/dbm' \
42 >> ${SRCDIR}/mozilla/security/coreconf/headers.mk || die
43
44 # modify install path
45 sed -i 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
46 ${SRCDIR}/mozilla/security/coreconf/source.mk || die
47 }
48
49 src_compile()
50 {
51 cd ${SRCDIR}/mozilla/security
52
53 [[ ${ARCH} = x86_64 ]] && export USE_64=1
54
55 # get the right nspr includes and libs on multilib systems
56 export NSPR_INCLUDE_DIR=$(pkg-config --cflags-only-I nspr | sed 's:-I::')
57 export NSPR_LIB_DIR=$(pkg-config --libs-only-L nspr | sed 's:-L::')
58
59 mmake -j1 BUILD_OPT=1 -C coreconf || die
60 mmake -j1 BUILD_OPT=1 -C dbm || die
61 mmake -j1 BUILD_OPT=1 -C nss || die
62 }
63
64 src_install()
65 {
66 cd ${SRCDIR}/mozilla/security/dist
67
68 # put all *.a files in /usr/lib/nss
69 # (because some have conflicting names with existing libraries)
70 minstalldir /usr/$(mlibdir)/nss || die
71 cp -L */lib/*.a ${BINDIR}/usr/$(mlibdir)/nss || die
72 cp -L */lib/*.so ${BINDIR}/usr/$(mlibdir)/nss || die
73 cp -L */lib/*.chk ${BINDIR}/usr/$(mlibdir)/nss || die
74
75 # all the include files
76 minstalldir /usr/include/nss || die
77 minstallfile private/nss/\*.h /usr/include/nss || die
78 minstallfile public/nss/\*.h /usr/include/nss || die
79
80 # install nss-config and pkgconfig file
81 minstalldir /usr/bin || die
82 minstalldir /usr/$(mlibdir)/pkgconfig || die
83 minstallexec -s nss-config.in-${CONF_CVS_REV} /usr/bin/nss-config || die
84 minstallfile -s nss.pc.in-${PC_CVS_REV} /usr/$(mlibdir)/pkgconfig/nss.pc || die
85 local NSS_VMAJOR=$(cat ${SRCDIR}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}')
86 local NSS_VMINOR=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}')
87 local NSS_VPATCH=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}')
88
89 sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \
90 -e "s:@prefix@:/usr:g" \
91 -e "s:@exec_prefix@:\$\{prefix}:g" \
92 -e "s:@includedir@:\$\{prefix}/include/nss:g" \
93 -e "s:@MOD_MAJOR_VERSION@:${NSS_VMAJOR}:g" \
94 -e "s:@MOD_MINOR_VERSION@:${NSS_VMINOR}:g" \
95 -e "s:@MOD_PATCH_VERSION@:${NSS_VPATCH}:g" \
96 -i ${BINDIR}/usr/bin/nss-config || die
97
98 sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \
99 -e "s:@prefix@:/usr:g" \
100 -e "s:@exec_prefix@:\$\{prefix}:g" \
101 -e "s:@includedir@:\$\{prefix}/include/nss:" \
102 -e "s:@NSPR_VERSION@:$(nspr-config --version):g" \
103 -e "s:@NSS_VERSION@:$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH:g" \
104 -i ${BINDIR}/usr/$(mlibdir)/pkgconfig/nss.pc || die
105
106 # inform the system about the new ldpath
107 minstalldir /etc/env.d || die
108 echo "LDPATH=/usr/$(mlibdir)/nss" > ${BINDIR}/etc/env.d/08nss || die
109 }

Properties

Name Value
svn:keywords Id