Contents of /trunk/extras/nss/nss-3.12.4-r2.smage2
Parent Directory | Revision Log
Revision 3783 -
(show annotations)
(download)
Tue Nov 3 21:01:12 2009 UTC (15 years ago) by niro
File size: 3537 byte(s)
Tue Nov 3 21:01:12 2009 UTC (15 years ago) by niro
File size: 3537 byte(s)
-rebuild against system sqlite3
1 | # $Id$ |
2 | |
3 | PNAME="nss" |
4 | PVER="3.12.4" |
5 | PBUILD="r2" |
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 | >= dev-db/sqlite-3.6.18" |
16 | |
17 | SDEPEND=">= sys-apps/sed-4" |
18 | |
19 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
20 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
21 | |
22 | sminclude mtools |
23 | |
24 | CONF_CVS_REV=1.2 |
25 | PC_CVS_REV=1.2 |
26 | |
27 | SRC_URI=( |
28 | ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(echo ${PVER} | sed "s:\.:\_:g")_RTM/src/${SRCFILE} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/nss-config.in-${CONF_CVS_REV} |
31 | mirror://${PNAME}/nss.pc.in-${PC_CVS_REV} |
32 | ) |
33 | |
34 | 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'" |
35 | |
36 | src_prepare() |
37 | { |
38 | munpack ${SRCFILE} || die |
39 | cd ${SRCDIR} |
40 | |
41 | # modify install path |
42 | sed -i 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \ |
43 | ${SRCDIR}/mozilla/security/coreconf/source.mk || die |
44 | } |
45 | |
46 | src_compile() |
47 | { |
48 | cd ${SRCDIR}/mozilla/security |
49 | |
50 | [[ ${ARCH} = x86_64 ]] && export USE_64=1 |
51 | |
52 | # use system sqlite |
53 | export NSS_USE_SYSTEM_SQLITE=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 |