1 Submitted By: Xi Ruoyao <xry111_AT_mengyan1223_DOT_wang>
3 Initial Package Version: 3.12.4
4 Upstream Status: Not applicable
5 Origin: Self, adjusted for nss-3.56.
6 Description: Adds auto-generated nss.pc and nss-config script, and
7 allows building without nspr in the source tree.
8 Minimum NSPR version is now read out from package,
9 instead of hardcoded value in the patch.
11 diff --color -uNar nss-3.55.orig/nss/config/Makefile nss-3.55/nss/config/Makefile
12 --- nss-3.55.orig/nss/config/Makefile 1970-01-01 08:00:00.000000000 +0800
13 +++ nss-3.55/nss/config/Makefile 2020-07-25 19:34:36.272982957 +0800
18 +include $(CORE_DEPTH)/coreconf/config.mk
20 +NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
21 +NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
22 +NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
23 +NSS_NSPR_MINIMUM = `head -n1 ../automation/release/nspr-version.txt`
29 + # Create the nss.pc file
30 + mkdir -p $(DIST)/lib/pkgconfig
31 + sed -e "s,@prefix@,$(PREFIX)," \
32 + -e "s,@exec_prefix@,\$${prefix}," \
33 + -e "s,@libdir@,\$${prefix}/lib," \
34 + -e "s,@includedir@,\$${prefix}/include/nss," \
35 + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
36 + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
37 + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
38 + -e "s,@NSS_NSPR_MINIMUM@,$(NSS_NSPR_MINIMUM)," \
41 + ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig
43 + # Create the nss-config script
44 + mkdir -p $(DIST)/bin
45 + sed -e "s,@prefix@,$(PREFIX)," \
46 + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
47 + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
48 + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
49 + nss-config.in > nss-config
50 + chmod 0755 nss-config
51 + ln -sf ../../../nss/config/nss-config $(DIST)/bin
55 +dummy: all export libs
57 diff --color -uNar nss-3.55.orig/nss/config/nss-config.in nss-3.55/nss/config/nss-config.in
58 --- nss-3.55.orig/nss/config/nss-config.in 1970-01-01 08:00:00.000000000 +0800
59 +++ nss-3.55/nss/config/nss-config.in 2020-07-25 19:32:37.239032214 +0800
65 +major_version=@NSS_MAJOR_VERSION@
66 +minor_version=@NSS_MINOR_VERSION@
67 +patch_version=@NSS_PATCH_VERSION@
72 +Usage: nss-config [OPTIONS] [LIBRARIES]
75 + [--exec-prefix[=DIR]]
76 + [--includedir[=DIR]]
91 +if test $# -eq 0; then
101 +while test $# -gt 0; do
103 + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
115 + exec_prefix=$optarg
118 + echo_exec_prefix=yes
124 + echo_includedir=yes
133 + echo ${major_version}.${minor_version}.${patch_version}
163 +# Set variables that may be dependent upon other variables
164 +if test -z "$exec_prefix"; then
165 + exec_prefix=`pkg-config --variable=exec_prefix nss`
167 +if test -z "$includedir"; then
168 + includedir=`pkg-config --variable=includedir nss`
170 +if test -z "$libdir"; then
171 + libdir=`pkg-config --variable=libdir nss`
174 +if test "$echo_prefix" = "yes"; then
178 +if test "$echo_exec_prefix" = "yes"; then
182 +if test "$echo_includedir" = "yes"; then
186 +if test "$echo_libdir" = "yes"; then
190 +if test "$echo_cflags" = "yes"; then
194 +if test "$echo_libs" = "yes"; then
195 + libdirs="-L$libdir"
196 + if test -n "$lib_nss"; then
197 + libdirs="$libdirs -lnss${major_version}"
199 + if test -n "$lib_nssutil"; then
200 + libdirs="$libdirs -lnssutil${major_version}"
202 + if test -n "$lib_smime"; then
203 + libdirs="$libdirs -lsmime${major_version}"
205 + if test -n "$lib_ssl"; then
206 + libdirs="$libdirs -lssl${major_version}"
208 + if test -n "$lib_softokn"; then
209 + libdirs="$libdirs -lsoftokn${major_version}"
214 diff --color -uNar nss-3.55.orig/nss/config/nss.pc.in nss-3.55/nss/config/nss.pc.in
215 --- nss-3.55.orig/nss/config/nss.pc.in 1970-01-01 08:00:00.000000000 +0800
216 +++ nss-3.55/nss/config/nss.pc.in 2020-07-25 19:33:05.958889937 +0800
219 +exec_prefix=@exec_prefix@
221 +includedir=@includedir@
224 +Description: Network Security Services
225 +Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
226 +Requires: nspr >= @NSS_NSPR_MINIMUM@
227 +Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
228 +Cflags: -I${includedir}
230 diff --color -uNar nss-3.55.orig/nss/Makefile nss-3.55/nss/Makefile
231 --- nss-3.55.orig/nss/Makefile 2020-07-24 23:10:32.000000000 +0800
232 +++ nss-3.55/nss/Makefile 2020-07-25 19:32:37.239032214 +0800
234 # License, v. 2.0. If a copy of the MPL was not distributed with this
235 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
237 +default: nss_build_all
239 #######################################################################
240 # (1) Include initial platform-independent assignments (MANDATORY). #
241 #######################################################################
243 #######################################################################
251 - $(MAKE) clobber_nspr
254 NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status
255 diff --color -uNar nss-3.55.orig/nss/manifest.mn nss-3.55/nss/manifest.mn
256 --- nss-3.55.orig/nss/manifest.mn 2020-07-24 23:10:32.000000000 +0800
257 +++ nss-3.55/nss/manifest.mn 2020-07-25 19:32:37.240032237 +0800
262 -DIRS = coreconf lib cmd cpputil gtests
263 +DIRS = coreconf lib cmd cpputil gtests config