nss-3.18.1-standalone-1.patch 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. Submitted By: Armin K. <krejzi at email dot com>
  2. Date: 2014-09-26
  3. Initial Package Version: 3.15
  4. Comment: Modified manifest.mn diff (Fernando)
  5. Upstream Status: Not applicable
  6. Origin: Based on dj's original patch, rediffed and modified for 3.15
  7. Description: Adds auto-generated nss.pc and nss-config script, and allows
  8. building without nspr in the source tree.
  9. --- a/nss/config/Makefile 1970-01-01 01:00:00.000000000 +0100
  10. +++ b/nss/config/Makefile 2013-07-02 14:53:56.684750636 +0200
  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 ../../../../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 ../../../nss/config/nss-config $(DIST)/bin
  47. +
  48. +libs:
  49. +
  50. +dummy: all export libs
  51. +
  52. --- a/nss/config/nss-config.in 1970-01-01 01:00:00.000000000 +0100
  53. +++ b/nss/config/nss-config.in 2013-07-02 14:52:58.328084334 +0200
  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. --- a/nss/config/nss.pc.in 1970-01-01 01:00:00.000000000 +0100
  209. +++ b/nss/config/nss.pc.in 2013-07-02 14:52:58.328084334 +0200
  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. --- a/nss/Makefile 2013-05-28 23:43:24.000000000 +0200
  224. +++ b/nss/Makefile 2013-07-02 14:52:58.328084334 +0200
  225. @@ -44,7 +44,7 @@
  226. # (7) Execute "local" rules. (OPTIONAL). #
  227. #######################################################################
  228. -nss_build_all: build_nspr all
  229. +nss_build_all: all
  230. nss_clean_all: clobber_nspr clobber
  231. --- a/nss/manifest.mn.orig 2014-09-26 16:46:44.201965538 -0300
  232. +++ b/nss/manifest.mn 2014-09-26 16:51:11.386336520 -0300
  233. @@ -10,7 +10,7 @@
  234. RELEASE = nss
  235. -DIRS = coreconf lib cmd
  236. +DIRS = coreconf lib cmd config
  237. ifdef NSS_BUILD_GTESTS
  238. DIRS += external_tests