wok-next view nss/stuff/patches/nss-3.41-standalone-1.patch @ rev 21105
Small updates... "bzip2" and "cairo": follow "libpkg - pkg - pkg-dev" rule
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Jan 04 17:29:48 2019 +0200 (2019-01-04) |
parents | |
children |
line source
1 Submitted By: DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
2 Date: 2016-12-27
3 Initial Package Version: 3.12.4
4 Upstream Status: Not applicable
5 Origin: Self, rediffed for nss-3.28.
6 Description: Adds auto-generated nss.pc and nss-config script, and
7 allows building without nspr in the source tree.
8 For 3.40.1, Requires: updated to nspr >= 4.20.
10 diff -Naurp nss-3.28-orig/nss/Makefile nss-3.28/nss/Makefile
11 --- nss-3.28-orig/nss/Makefile 2016-12-21 05:56:27.000000000 -0600
12 +++ nss-3.28/nss/Makefile 2016-12-26 22:24:52.695146032 -0600
13 @@ -46,7 +46,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
14 # (7) Execute "local" rules. (OPTIONAL). #
15 #######################################################################
17 -nss_build_all: build_nspr all latest
18 +nss_build_all: all latest
20 nss_clean_all: clobber_nspr clobber
22 diff -Naurp nss-3.28-orig/nss/config/Makefile nss-3.28/nss/config/Makefile
23 --- nss-3.28-orig/nss/config/Makefile 1969-12-31 18:00:00.000000000 -0600
24 +++ nss-3.28/nss/config/Makefile 2016-12-26 22:20:40.008205774 -0600
25 @@ -0,0 +1,40 @@
26 +CORE_DEPTH = ..
27 +DEPTH = ..
28 +
29 +include $(CORE_DEPTH)/coreconf/config.mk
30 +
31 +NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
32 +NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
33 +NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
34 +PREFIX = /usr
35 +
36 +all: export libs
37 +
38 +export:
39 + # Create the nss.pc file
40 + mkdir -p $(DIST)/lib/pkgconfig
41 + sed -e "s,@prefix@,$(PREFIX)," \
42 + -e "s,@exec_prefix@,\$${prefix}," \
43 + -e "s,@libdir@,\$${prefix}/lib," \
44 + -e "s,@includedir@,\$${prefix}/include/nss," \
45 + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
46 + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
47 + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
48 + nss.pc.in > nss.pc
49 + chmod 0644 nss.pc
50 + ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig
51 +
52 + # Create the nss-config script
53 + mkdir -p $(DIST)/bin
54 + sed -e "s,@prefix@,$(PREFIX)," \
55 + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
56 + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
57 + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
58 + nss-config.in > nss-config
59 + chmod 0755 nss-config
60 + ln -sf ../../../nss/config/nss-config $(DIST)/bin
61 +
62 +libs:
63 +
64 +dummy: all export libs
65 +
66 diff -Naurp nss-3.28-orig/nss/config/nss-config.in nss-3.28/nss/config/nss-config.in
67 --- nss-3.28-orig/nss/config/nss-config.in 1969-12-31 18:00:00.000000000 -0600
68 +++ nss-3.28/nss/config/nss-config.in 2016-12-26 22:20:40.008205774 -0600
69 @@ -0,0 +1,153 @@
70 +#!/bin/sh
71 +
72 +prefix=@prefix@
73 +
74 +major_version=@NSS_MAJOR_VERSION@
75 +minor_version=@NSS_MINOR_VERSION@
76 +patch_version=@NSS_PATCH_VERSION@
77 +
78 +usage()
79 +{
80 + cat <<EOF
81 +Usage: nss-config [OPTIONS] [LIBRARIES]
82 +Options:
83 + [--prefix[=DIR]]
84 + [--exec-prefix[=DIR]]
85 + [--includedir[=DIR]]
86 + [--libdir[=DIR]]
87 + [--version]
88 + [--libs]
89 + [--cflags]
90 +Dynamic Libraries:
91 + nss
92 + nssutil
93 + smime
94 + ssl
95 + softokn
96 +EOF
97 + exit $1
98 +}
99 +
100 +if test $# -eq 0; then
101 + usage 1 1>&2
102 +fi
103 +
104 +lib_nss=yes
105 +lib_nssutil=yes
106 +lib_smime=yes
107 +lib_ssl=yes
108 +lib_softokn=yes
109 +
110 +while test $# -gt 0; do
111 + case "$1" in
112 + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
113 + *) optarg= ;;
114 + esac
115 +
116 + case $1 in
117 + --prefix=*)
118 + prefix=$optarg
119 + ;;
120 + --prefix)
121 + echo_prefix=yes
122 + ;;
123 + --exec-prefix=*)
124 + exec_prefix=$optarg
125 + ;;
126 + --exec-prefix)
127 + echo_exec_prefix=yes
128 + ;;
129 + --includedir=*)
130 + includedir=$optarg
131 + ;;
132 + --includedir)
133 + echo_includedir=yes
134 + ;;
135 + --libdir=*)
136 + libdir=$optarg
137 + ;;
138 + --libdir)
139 + echo_libdir=yes
140 + ;;
141 + --version)
142 + echo ${major_version}.${minor_version}.${patch_version}
143 + ;;
144 + --cflags)
145 + echo_cflags=yes
146 + ;;
147 + --libs)
148 + echo_libs=yes
149 + ;;
150 + nss)
151 + lib_nss=yes
152 + ;;
153 + nssutil)
154 + lib_nssutil=yes
155 + ;;
156 + smime)
157 + lib_smime=yes
158 + ;;
159 + ssl)
160 + lib_ssl=yes
161 + ;;
162 + softokn)
163 + lib_softokn=yes
164 + ;;
165 + *)
166 + usage 1 1>&2
167 + ;;
168 + esac
169 + shift
170 +done
171 +
172 +# Set variables that may be dependent upon other variables
173 +if test -z "$exec_prefix"; then
174 + exec_prefix=`pkg-config --variable=exec_prefix nss`
175 +fi
176 +if test -z "$includedir"; then
177 + includedir=`pkg-config --variable=includedir nss`
178 +fi
179 +if test -z "$libdir"; then
180 + libdir=`pkg-config --variable=libdir nss`
181 +fi
182 +
183 +if test "$echo_prefix" = "yes"; then
184 + echo $prefix
185 +fi
186 +
187 +if test "$echo_exec_prefix" = "yes"; then
188 + echo $exec_prefix
189 +fi
190 +
191 +if test "$echo_includedir" = "yes"; then
192 + echo $includedir
193 +fi
194 +
195 +if test "$echo_libdir" = "yes"; then
196 + echo $libdir
197 +fi
198 +
199 +if test "$echo_cflags" = "yes"; then
200 + echo -I$includedir
201 +fi
202 +
203 +if test "$echo_libs" = "yes"; then
204 + libdirs="-L$libdir"
205 + if test -n "$lib_nss"; then
206 + libdirs="$libdirs -lnss${major_version}"
207 + fi
208 + if test -n "$lib_nssutil"; then
209 + libdirs="$libdirs -lnssutil${major_version}"
210 + fi
211 + if test -n "$lib_smime"; then
212 + libdirs="$libdirs -lsmime${major_version}"
213 + fi
214 + if test -n "$lib_ssl"; then
215 + libdirs="$libdirs -lssl${major_version}"
216 + fi
217 + if test -n "$lib_softokn"; then
218 + libdirs="$libdirs -lsoftokn${major_version}"
219 + fi
220 + echo $libdirs
221 +fi
222 +
223 diff -Naurp nss-3.28-orig/nss/config/nss.pc.in nss-3.28/nss/config/nss.pc.in
224 --- nss-3.28-orig/nss/config/nss.pc.in 1969-12-31 18:00:00.000000000 -0600
225 +++ nss-3.28/nss/config/nss.pc.in 2016-12-26 22:22:53.300694346 -0600
226 @@ -0,0 +1,12 @@
227 +prefix=@prefix@
228 +exec_prefix=@exec_prefix@
229 +libdir=@libdir@
230 +includedir=@includedir@
231 +
232 +Name: NSS
233 +Description: Network Security Services
234 +Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
235 +Requires: nspr >= 4.20
236 +Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
237 +Cflags: -I${includedir}
238 +
239 diff -Naurp nss-3.28-orig/nss/manifest.mn nss-3.28/nss/manifest.mn
240 --- nss-3.28-orig/nss/manifest.mn 2016-12-21 05:56:27.000000000 -0600
241 +++ nss-3.28/nss/manifest.mn 2016-12-26 22:24:12.278991843 -0600
242 @@ -10,4 +10,4 @@ IMPORTS = nspr20/v4.8 \
244 RELEASE = nss
246 -DIRS = coreconf lib cmd cpputil gtests
247 +DIRS = coreconf lib cmd cpputil gtests config