# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
set NSS_VMAJOR [lindex [split ${version} .] 0]
set NSS_VMINOR [lindex [split ${version} .] 1]
set NSS_VPATCH [lindex [split ${version} .] 2]
if {${NSS_VPATCH} eq ""} {
# NSS_VPATCH should always be a number
license {MPL-2 GPL-2+ LGPL-2.1+}
description Network Security Service libraries.
long_description ${description}
homepage http://www.mozilla.org/projects/security/pki/nss/
set my_release NSS_[strsed ${version} {g/\./_/}]_RTM
master_sites https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/ \
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/
checksums rmd160 77b06721a1563a5360ed984d26e78b2d58febaf9 \
sha256 0562087b8bda072bf5964f8acf851f9c0997a59c384f4887cb517b3b628b32dd \
destroot.dir ${destroot.dir}/dist
build.dir ${build.dir}/nss
# external tests require libc++ and don't build on some systems with libc++ anyways, just disable them
build.args NSS_DISABLE_GTESTS=1
build.args-append NSS_ENABLE_WERROR=0
# muniversal destroot requires a Makefile
xinstall -d -m 0755 ${destroot.dir}
copy ${filespath}/Makefile-MacPorts-Install.in ${destroot.dir}/Makefile-MacPorts-Install
reinplace "s|__MACPORTS_PREFIX__|${prefix}|g" ${destroot.dir}/Makefile-MacPorts-Install
-f Makefile-MacPorts-Install
# libraries are not relative to any main executable, so no need for @executable_path
reinplace "s|@executable_path|${prefix}/lib/nss|g" \
${build.dir}/coreconf/Darwin.mk \