diff -Naur nss-3.12-orig/mozilla/security/nss/cmd/manifest.mn nss-3.12/mozilla/security/nss/cmd/manifest.mn --- nss-3.12-orig/mozilla/security/nss/cmd/manifest.mn 2007-01-25 13:04:56.000000000 -0600 +++ nss-3.12/mozilla/security/nss/cmd/manifest.mn 2008-11-10 21:50:42.000000000 -0600 @@ -54,6 +54,7 @@ dbtest \ derdump \ digest \ + disttools \ fipstest \ makepqg \ ocspclnt \ diff -Naur nss-3.12-orig/mozilla/security/nss/cmd/disttools/Makefile nss-3.12/mozilla/security/nss/cmd/disttools/Makefile --- nss-3.12-orig/mozilla/security/nss/cmd/disttools/Makefile 1969-12-31 18:00:00.000000000 -0600 +++ nss-3.12/mozilla/security/nss/cmd/disttools/Makefile 2008-11-10 22:19:41.000000000 -0600 @@ -0,0 +1,66 @@ +#! gmake +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Netscape security libraries. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1994-2000 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# DJ Lucas +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +CORE_DEPTH = ../../.. + +VERSION = $(shell grep NSS_VERSION $(CORE_DEPTH)/../dist/public/nss/nss.h | \ + cut -d\" -f2) +NSS_VERSION_MAJOR = $(shell echo $(VERSION) | cut -d. -f1) +NSS_VERSION_MINOR = $(shell echo $(VERSION) | cut -d. -f2) +NSS_VERSION_PATCH = $(shell echo $(VERSION) | cut -d. -f3) + + +all: export + +export: + sed -e 's/@NSS_VERSION_MAJOR@/$(NSS_VERSION_MAJOR)/' \ + -e 's/@NSS_VERSION_MINOR@/$(NSS_VERSION_MINOR)/' \ + -e 's/@NSS_VERSION_PATCH@/$(NSS_VERSION_PATCH)/' \ + nss-config.in > nss-config + sed -e 's/@NSS_VERSION_MAJOR@/$(NSS_VERSION_MAJOR)/' \ + -e 's/@NSS_VERSION_MINOR@/$(NSS_VERSION_MINOR)/' \ + -e 's/@NSS_VERSION_PATCH@/$(NSS_VERSION_PATCH)/' \ + nss.pc.in > nss.pc + +libs: + # Do Nothing + echo "Done." + +.phony: all export + diff -Naur nss-3.12-orig/mozilla/security/nss/cmd/disttools/nss-config.in nss-3.12/mozilla/security/nss/cmd/disttools/nss-config.in --- nss-3.12-orig/mozilla/security/nss/cmd/disttools/nss-config.in 1969-12-31 18:00:00.000000000 -0600 +++ nss-3.12/mozilla/security/nss/cmd/disttools/nss-config.in 2008-11-10 22:22:13.000000000 -0600 @@ -0,0 +1,145 @@ +#!/bin/sh + +prefix=/usr + +major_version=@NSS_VERSION_MAJOR@ +minor_version=@NSS_VERSION_MINOR@ +patch_version=@NSS_VERSION_PATCH@ + +usage() +{ + cat <&2 +fi + +lib_ssl=yes +lib_smime=yes +lib_nssutil=yes +lib_nss=yes +lib_softokn=yes + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --includedir=*) + includedir=$optarg + ;; + --includedir) + echo_includedir=yes + ;; + --libdir=*) + libdir=$optarg + ;; + --libdir) + echo_libdir=yes + ;; + --version) + echo ${major_version}.${minor_version}.${patch_version} + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + ssl) + lib_ssl=yes + ;; + smime) + lib_smime=yes + ;; + nss) + lib_nss=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +# Set variables that may be dependent upon other variables +if test -z "$exec_prefix"; then + exec_prefix=${prefix} +fi +if test -z "$includedir"; then + includedir=${prefix}/include/nss +fi +if test -z "$libdir"; then + libdir=${prefix}/lib +fi + +if test "$echo_prefix" = "yes"; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes"; then + echo $exec_prefix +fi + +if test "$echo_includedir" = "yes"; then + echo $includedir +fi + +if test "$echo_libdir" = "yes"; then + echo $libdir +fi + +if test "$echo_cflags" = "yes"; then + echo -I$includedir +fi + +if test "$echo_libs" = "yes"; then + libdirs="-Wl,-R$libdir -L$libdir" + if test -n "$lib_ssl"; then + libdirs="$libdirs -lssl${major_version}" + fi + if test -n "$lib_smime"; then + libdirs="$libdirs -lsmime${major_version}" + fi + if test -n "$lib_nssutil"; then + libdirs="$libdirs -lnssutil${major_version}" + fi + if test -n "$lib_nss"; then + libdirs="$libdirs -lnss${major_version}" + fi + if test -n "$lib_softokn"; then + libdirs="$libdirs -lsoftokn${major_version}" + fi + echo $libdirs +fi + diff -Naur nss-3.12-orig/mozilla/security/nss/cmd/disttools/nss.pc.in nss-3.12/mozilla/security/nss/cmd/disttools/nss.pc.in --- nss-3.12-orig/mozilla/security/nss/cmd/disttools/nss.pc.in 1969-12-31 18:00:00.000000000 -0600 +++ nss-3.12/mozilla/security/nss/cmd/disttools/nss.pc.in 2008-11-10 22:06:55.000000000 -0600 @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=/usr +libdir=/usr/lib +includedir=/usr/include + +Name: NSS +Description: Mozilla Network Security Services +Version: @NSS_VERSION_MAJOR@.@NSS_VERSION_MINOR@.@NSS_VERSION_PATCH@ +Requires: nspr >= 4.7.0 +Libs: -Wl,-R${libdir} -L${libdir} -lnss3 -lsmime3 -lnssutil3 -lssl3 -lsoftokn3 +Cflags: -I${includedir}/nss + .