source: trunk/dports/net/nss/Portfile @ 89415

Last change on this file since 89415 was 89415, checked in by and.damore@…, 9 years ago

port nss: update to 3.13.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1# $Id: Portfile 89415 2012-01-28 15:47:51Z and.damore@macports.org $
2
3PortSystem          1.0
4
5name                nss
6version             3.13.1
7set NSS_VMAJOR      [lindex [split ${version} .] 0]
8set NSS_VMINOR      [lindex [split ${version} .] 1]
9set NSS_VPATCH      [lindex [split ${version} .] 2]
10categories          net
11maintainers         jeremyhu openmaintainer
12license             {MPL-1.1 GPL-2+ LGPL-2.1+}
13description         Network Security Service libraries.
14
15long_description    ${description}
16use_configure       no
17homepage            http://www.mozilla.org/projects/security/pki/nss/
18platforms           darwin
19
20set my_release      NSS_[strsed ${version} {g/\./_/}]_RTM
21
22use_bzip2           no
23master_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
26checksums       sha1    d8e7ee9f9f1e0bfa2ea8b72d25727634fea130a6 \
27                rmd160  c1743308c380169d666e5c08b23a455f86b360bd
28
29depends_lib     port:nspr \
30                port:sqlite3
31
32patchfiles      patch-UNIX.mk.diff \
33                patch-Darwin.mk.diff
34
35# This is all kinds of messed up for universal...
36universal_variant no
37
38post-patch {
39        reinplace "s|@executable_path|${prefix}/lib/nss|g" \
40        ${worksrcpath}/mozilla/security/coreconf/Darwin.mk \
41        ${worksrcpath}/mozilla/security/nss/lib/freebl/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
53build {
54    if {[info exists build_arch] && (${build_arch} == "x86_64" || $build_arch == "ppc64")} {
55        set use_64 " USE_64=1"
56    } else {
57        set use_64 ""
58    }
59    set make_args "NSPR_LIB_DIR=${prefix}/lib/nspr NSS_USE_SYSTEM_SQLITE=1${use_64}"
60    system "cd ${worksrcpath} && \
61            make -C mozilla/security/coreconf/nsinstall ${make_args} && \
62            make -C mozilla/security/dbm ${make_args} && \
63            make -C mozilla/security/nss ${make_args}"
64}
65
66destroot {
67    xinstall -m 755 -d ${destroot}${prefix}/include/nss
68    eval xinstall -m 755 [glob ${worksrcpath}/mozilla/dist/public/nss/*] ${destroot}${prefix}/include/nss
69    eval xinstall -m 755 [glob ${worksrcpath}/mozilla/dist/public/dbm/*] ${destroot}${prefix}/include/nss
70    xinstall -m 755 -d ${destroot}${prefix}/bin
71    foreach f [glob ${worksrcpath}/mozilla/dist/Darwin*/bin/*] {
72        xinstall -m 755 $f ${destroot}${prefix}/bin/nss-[file tail $f]
73    }
74    xinstall -m 755 -d ${destroot}${prefix}/lib/nss
75    eval xinstall -m 755 [glob ${worksrcpath}/mozilla/dist/Darwin*/lib/*.dylib] ${destroot}${prefix}/lib/nss
76    eval xinstall -m 644 [glob ${worksrcpath}/mozilla/dist/Darwin*/lib/libcrmf.a] ${destroot}${prefix}/lib/nss
77
78    xinstall -m 755 -d ${destroot}${prefix}/lib/pkgconfig
79
80    xinstall ${filespath}/nss.pc.in ${destroot}${prefix}/lib/pkgconfig/nss.pc
81    xinstall -m 755 ${filespath}/nss-config.in ${destroot}${prefix}/bin/nss-config
82
83    reinplace "s,@libdir@,${prefix}/lib/nss,g" ${destroot}${prefix}/bin/nss-config
84    reinplace "s,@prefix@,${prefix},g" ${destroot}${prefix}/bin/nss-config
85    reinplace "s,@exec_prefix@,${prefix},g" ${destroot}${prefix}/bin/nss-config
86    reinplace "s,@includedir@,${prefix}/include/nss,g" ${destroot}${prefix}/bin/nss-config
87    reinplace "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" ${destroot}${prefix}/bin/nss-config
88    reinplace "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" ${destroot}${prefix}/bin/nss-config
89    reinplace "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" ${destroot}${prefix}/bin/nss-config
90
91    set nspr_version [exec ${prefix}/bin/nspr-config --version]
92    set nss_version [exec ${destroot}${prefix}/bin/nss-config --version]
93
94    reinplace "s,@libdir@,${prefix}/lib/nss,g" ${destroot}${prefix}/lib/pkgconfig/nss.pc
95    reinplace "s,@prefix@,${prefix},g" ${destroot}${prefix}/lib/pkgconfig/nss.pc
96    reinplace "s,@exec_prefix@,${prefix},g" ${destroot}${prefix}/lib/pkgconfig/nss.pc
97    reinplace "s,@includedir@,${prefix}/include/nss," ${destroot}${prefix}/lib/pkgconfig/nss.pc
98    reinplace "s,@NSPR_VERSION@,${nspr_version},g"  ${destroot}${prefix}/lib/pkgconfig/nss.pc
99    reinplace "s,@NSS_VERSION@,${nss_version},g" ${destroot}${prefix}/lib/pkgconfig/nss.pc
100}
101
102livecheck.type    regex
103livecheck.url     http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/
104livecheck.version "${NSS_VMAJOR}_${NSS_VMINOR}_${NSS_VPATCH}"
105livecheck.regex   {(\d+_\d+(?:_\d+)*)}
Note: See TracBrowser for help on using the repository browser.