| 1 |
# $Id$ |
| 2 |
|
| 3 |
PortSystem 1.0 |
| 4 |
|
| 5 |
name nss |
| 6 |
version 3.12.3 |
| 7 |
set NSS_VMAJOR 3 |
| 8 |
set NSS_VMINOR 12 |
| 9 |
set NSS_VPATCH 3 |
| 10 |
categories net |
| 11 |
maintainers jeremyhu openmaintainer |
| 12 |
description Network Security Service libraries. |
| 13 |
depends_lib port:nspr |
| 14 |
|
| 15 |
long_description ${description} |
| 16 |
use_configure no |
| 17 |
homepage http://www.mozilla.org/projects/security/pki/nss/ |
| 18 |
platforms darwin |
| 19 |
|
| 20 |
set my_release NSS_[strsed ${version} {g/\./_/}]_RTM |
| 21 |
|
| 22 |
use_bzip2 yes |
| 23 |
master_sites ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/ \ |
| 24 |
http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/ |
| 25 |
checksums md5 ecb7079ba4ebcf29b7716775384f1f18 \ |
| 26 |
sha1 eeca14a37629287baa10eb7562a5fb927e9dd171 \ |
| 27 |
rmd160 b5339eda9dfc87385b2c11e2ca53be249b75ed69 |
| 28 |
|
| 29 |
depends_lib \ |
| 30 |
port:nspr \ |
| 31 |
port:sqlite3 |
| 32 |
|
| 33 |
patchfiles patch-UNIX.mk.diff \ |
| 34 |
patch-Darwin.mk.diff |
| 35 |
|
| 36 |
post-patch { |
| 37 |
reinplace "s|@executable_path|${prefix}/lib/nss|g" \ |
| 38 |
${worksrcpath}/mozilla/security/coreconf/Darwin.mk \ |
| 39 |
${worksrcpath}/mozilla/security/nss/cmd/platlibs.mk \ |
| 40 |
${worksrcpath}/mozilla/security/nss/lib/smime/config.mk \ |
| 41 |
${worksrcpath}/mozilla/security/nss/lib/ssl/config.mk |
| 42 |
reinplace "s|@@PREFIX@@|${prefix}|g" \ |
| 43 |
${worksrcpath}/mozilla/security/coreconf/Darwin.mk \ |
| 44 |
${worksrcpath}/mozilla/security/coreconf/UNIX.mk |
| 45 |
reinplace "s|= cc\$|= ${configure.cc}|" \ |
| 46 |
${worksrcpath}/mozilla/security/coreconf/Darwin.mk |
| 47 |
reinplace "s|= c++\$|= ${configure.cxx}|" \ |
| 48 |
${worksrcpath}/mozilla/security/coreconf/Darwin.mk |
| 49 |
reinplace "s|= ranlib\$|= /usr/bin/ranlib|" \ |
| 50 |
${worksrcpath}/mozilla/security/coreconf/Darwin.mk |
| 51 |
} |
| 52 |
|
| 53 |
build {system "cd ${worksrcpath} && make -C mozilla/security/coreconf/nsinstall && make -C mozilla/security/dbm && make -C mozilla/security/nss NSPR_LIB_DIR=${prefix}/lib/nspr NSS_USE_SYSTEM_SQLITE=1"} |
| 54 |
|
| 55 |
destroot { |
| 56 |
xinstall -m 755 -d ${destroot}${prefix}/include/nss |
| 57 |
eval xinstall -m 755 [glob ${worksrcpath}/mozilla/dist/public/nss/*] ${destroot}${prefix}/include/nss |
| 58 |
eval xinstall -m 755 [glob ${worksrcpath}/mozilla/dist/public/dbm/*] ${destroot}${prefix}/include/nss |
| 59 |
xinstall -m 755 -d ${destroot}${prefix}/bin |
| 60 |
foreach f [glob ${worksrcpath}/mozilla/dist/Darwin*/bin/*] { |
| 61 |
xinstall -m 755 $f ${destroot}${prefix}/bin/nss-[file tail $f] |
| 62 |
} |
| 63 |
xinstall -m 755 -d ${destroot}${prefix}/lib/nss |
| 64 |
eval xinstall -m 755 [glob ${worksrcpath}/mozilla/dist/Darwin*/lib/*.dylib] ${destroot}${prefix}/lib/nss |
| 65 |
eval xinstall -m 644 [glob ${worksrcpath}/mozilla/dist/Darwin*/lib/libcrmf.a] ${destroot}${prefix}/lib/nss |
| 66 |
|
| 67 |
xinstall -m 755 -d ${destroot}${prefix}/lib/pkgconfig |
| 68 |
|
| 69 |
xinstall ${filespath}/nss.pc.in ${destroot}${prefix}/lib/pkgconfig/nss.pc |
| 70 |
xinstall -m 755 ${filespath}/nss-config.in ${destroot}${prefix}/bin/nss-config |
| 71 |
|
| 72 |
reinplace "s,@libdir@,${prefix}/lib/nss,g" ${destroot}${prefix}/bin/nss-config |
| 73 |
reinplace "s,@prefix@,${prefix},g" ${destroot}${prefix}/bin/nss-config |
| 74 |
reinplace "s,@exec_prefix@,${prefix},g" ${destroot}${prefix}/bin/nss-config |
| 75 |
reinplace "s,@includedir@,${prefix}/include/nss,g" ${destroot}${prefix}/bin/nss-config |
| 76 |
reinplace "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" ${destroot}${prefix}/bin/nss-config |
| 77 |
reinplace "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" ${destroot}${prefix}/bin/nss-config |
| 78 |
reinplace "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" ${destroot}${prefix}/bin/nss-config |
| 79 |
|
| 80 |
set nspr_version [exec ${prefix}/bin/nspr-config --version] |
| 81 |
set nss_version [exec ${destroot}${prefix}/bin/nss-config --version] |
| 82 |
|
| 83 |
reinplace "s,@libdir@,${prefix}/lib/nss,g" ${destroot}${prefix}/lib/pkgconfig/nss.pc |
| 84 |
reinplace "s,@prefix@,${prefix},g" ${destroot}${prefix}/lib/pkgconfig/nss.pc |
| 85 |
reinplace "s,@exec_prefix@,${prefix},g" ${destroot}${prefix}/lib/pkgconfig/nss.pc |
| 86 |
reinplace "s,@includedir@,${prefix}/include/nss," ${destroot}${prefix}/lib/pkgconfig/nss.pc |
| 87 |
reinplace "s,@NSPR_VERSION@,${nspr_version},g" ${destroot}${prefix}/lib/pkgconfig/nss.pc |
| 88 |
reinplace "s,@NSS_VERSION@,${nss_version},g" ${destroot}${prefix}/lib/pkgconfig/nss.pc |
| 89 |
} |