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