Annotation of /trunk/extras/nss/nss-3.12.4-r3.smage2
Parent Directory | Revision Log
Revision 3785 -
(hide annotations)
(download)
Tue Nov 3 21:19:56 2009 UTC (14 years, 10 months ago) by niro
File size: 3752 byte(s)
Tue Nov 3 21:19:56 2009 UTC (14 years, 10 months ago) by niro
File size: 3752 byte(s)
auto added: ver bump to 3.12.4-r3
1 | niro | 3785 | # $Id$ |
2 | |||
3 | PNAME="nss" | ||
4 | PVER="3.12.4" | ||
5 | PBUILD="r3" | ||
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 | mirror://${PNAME}/${PNAME}-${PVER}-no-local-sql.patch | ||
33 | ) | ||
34 | |||
35 | 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'" | ||
36 | |||
37 | src_prepare() | ||
38 | { | ||
39 | munpack ${SRCFILE} || die | ||
40 | cd ${SRCDIR} | ||
41 | |||
42 | mpatch ${PNAME}-${PVER}-no-local-sql.patch || 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 | # use system sqlite | ||
56 | export NSS_USE_SYSTEM_SQLITE=1 | ||
57 | |||
58 | export FREEBL_NO_DEPEND=1 | ||
59 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 | ||
60 | export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 | ||
61 | |||
62 | # get the right nspr includes and libs on multilib systems | ||
63 | export NSPR_INCLUDE_DIR=$(pkg-config --cflags-only-I nspr | sed 's:-I::') | ||
64 | export NSPR_LIB_DIR=$(pkg-config --libs-only-L nspr | sed 's:-L::') | ||
65 | |||
66 | mmake -j1 BUILD_OPT=1 -C coreconf || die | ||
67 | mmake -j1 BUILD_OPT=1 -C dbm || die | ||
68 | mmake -j1 BUILD_OPT=1 -C nss || die | ||
69 | } | ||
70 | |||
71 | src_install() | ||
72 | { | ||
73 | cd ${SRCDIR}/mozilla/security/dist | ||
74 | |||
75 | # put all *.a files in /usr/lib/nss | ||
76 | # (because some have conflicting names with existing libraries) | ||
77 | minstalldir /usr/$(mlibdir)/nss || die | ||
78 | cp -L */lib/*.a ${BINDIR}/usr/$(mlibdir)/nss || die | ||
79 | cp -L */lib/*.so ${BINDIR}/usr/$(mlibdir)/nss || die | ||
80 | cp -L */lib/*.chk ${BINDIR}/usr/$(mlibdir)/nss || die | ||
81 | |||
82 | # all the include files | ||
83 | minstalldir /usr/include/nss || die | ||
84 | minstallfile private/nss/\*.h /usr/include/nss || die | ||
85 | minstallfile public/nss/\*.h /usr/include/nss || die | ||
86 | |||
87 | # install nss-config and pkgconfig file | ||
88 | minstalldir /usr/bin || die | ||
89 | minstalldir /usr/$(mlibdir)/pkgconfig || die | ||
90 | minstallexec -s nss-config.in-${CONF_CVS_REV} /usr/bin/nss-config || die | ||
91 | minstallfile -s nss.pc.in-${PC_CVS_REV} /usr/$(mlibdir)/pkgconfig/nss.pc || die | ||
92 | local NSS_VMAJOR=$(cat ${SRCDIR}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}') | ||
93 | local NSS_VMINOR=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}') | ||
94 | local NSS_VPATCH=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}') | ||
95 | |||
96 | sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \ | ||
97 | -e "s:@prefix@:/usr:g" \ | ||
98 | -e "s:@exec_prefix@:\$\{prefix}:g" \ | ||
99 | -e "s:@includedir@:\$\{prefix}/include/nss:g" \ | ||
100 | -e "s:@MOD_MAJOR_VERSION@:${NSS_VMAJOR}:g" \ | ||
101 | -e "s:@MOD_MINOR_VERSION@:${NSS_VMINOR}:g" \ | ||
102 | -e "s:@MOD_PATCH_VERSION@:${NSS_VPATCH}:g" \ | ||
103 | -i ${BINDIR}/usr/bin/nss-config || die | ||
104 | |||
105 | sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \ | ||
106 | -e "s:@prefix@:/usr:g" \ | ||
107 | -e "s:@exec_prefix@:\$\{prefix}:g" \ | ||
108 | -e "s:@includedir@:\$\{prefix}/include/nss:" \ | ||
109 | -e "s:@NSPR_VERSION@:$(nspr-config --version):g" \ | ||
110 | -e "s:@NSS_VERSION@:$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH:g" \ | ||
111 | -i ${BINDIR}/usr/$(mlibdir)/pkgconfig/nss.pc || die | ||
112 | |||
113 | # inform the system about the new ldpath | ||
114 | minstalldir /etc/env.d || die | ||
115 | echo "LDPATH=/usr/$(mlibdir)/nss" > ${BINDIR}/etc/env.d/08nss || die | ||
116 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |