001-lfs-nss-config+nss_pc.patch 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. diff -Nur nss-3.13.6.orig/mozilla/security/nss/Makefile nss-3.13.6/mozilla/security/nss/Makefile
  2. --- nss-3.13.6.orig/mozilla/security/nss/Makefile 2011-11-05 23:59:15.000000000 +0100
  3. +++ nss-3.13.6/mozilla/security/nss/Makefile 2012-10-01 12:37:24.000000000 +0200
  4. @@ -78,7 +78,7 @@
  5. # (7) Execute "local" rules. (OPTIONAL). #
  6. #######################################################################
  7. -nss_build_all: build_coreconf build_nspr build_dbm all
  8. +nss_build_all: build_coreconf build_dbm all
  9. nss_clean_all: clobber_coreconf clobber_nspr clobber_dbm clobber
  10. @@ -140,12 +140,6 @@
  11. --with-dist-prefix='$(NSPR_PREFIX)' \
  12. --with-dist-includedir='$(NSPR_PREFIX)/include'
  13. -build_nspr: $(NSPR_CONFIG_STATUS)
  14. - cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)
  15. -
  16. -clobber_nspr: $(NSPR_CONFIG_STATUS)
  17. - cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE) clobber
  18. -
  19. build_dbm:
  20. ifdef NSS_DISABLE_DBM
  21. @echo "skipping the build of DBM"
  22. diff -Nur nss-3.13.6.orig/mozilla/security/nss/Makefile.orig nss-3.13.6/mozilla/security/nss/Makefile.orig
  23. --- nss-3.13.6.orig/mozilla/security/nss/Makefile.orig 1970-01-01 01:00:00.000000000 +0100
  24. +++ nss-3.13.6/mozilla/security/nss/Makefile.orig 2011-11-05 23:59:15.000000000 +0100
  25. @@ -0,0 +1,185 @@
  26. +#! gmake
  27. +#
  28. +# ***** BEGIN LICENSE BLOCK *****
  29. +# Version: MPL 1.1/GPL 2.0/LGPL 2.1
  30. +#
  31. +# The contents of this file are subject to the Mozilla Public License Version
  32. +# 1.1 (the "License"); you may not use this file except in compliance with
  33. +# the License. You may obtain a copy of the License at
  34. +# http://www.mozilla.org/MPL/
  35. +#
  36. +# Software distributed under the License is distributed on an "AS IS" basis,
  37. +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  38. +# for the specific language governing rights and limitations under the
  39. +# License.
  40. +#
  41. +# The Original Code is the Netscape security libraries.
  42. +#
  43. +# The Initial Developer of the Original Code is
  44. +# Netscape Communications Corporation.
  45. +# Portions created by the Initial Developer are Copyright (C) 1994-2000
  46. +# the Initial Developer. All Rights Reserved.
  47. +#
  48. +# Contributor(s):
  49. +#
  50. +# Alternatively, the contents of this file may be used under the terms of
  51. +# either the GNU General Public License Version 2 or later (the "GPL"), or
  52. +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  53. +# in which case the provisions of the GPL or the LGPL are applicable instead
  54. +# of those above. If you wish to allow use of your version of this file only
  55. +# under the terms of either the GPL or the LGPL, and not to allow others to
  56. +# use your version of this file under the terms of the MPL, indicate your
  57. +# decision by deleting the provisions above and replace them with the notice
  58. +# and other provisions required by the GPL or the LGPL. If you do not delete
  59. +# the provisions above, a recipient may use your version of this file under
  60. +# the terms of any one of the MPL, the GPL or the LGPL.
  61. +#
  62. +# ***** END LICENSE BLOCK *****
  63. +
  64. +#######################################################################
  65. +# (1) Include initial platform-independent assignments (MANDATORY). #
  66. +#######################################################################
  67. +
  68. +include manifest.mn
  69. +
  70. +#######################################################################
  71. +# (2) Include "global" configuration information. (OPTIONAL) #
  72. +#######################################################################
  73. +
  74. +include $(CORE_DEPTH)/coreconf/config.mk
  75. +
  76. +#######################################################################
  77. +# (3) Include "component" configuration information. (OPTIONAL) #
  78. +#######################################################################
  79. +
  80. +
  81. +
  82. +#######################################################################
  83. +# (4) Include "local" platform-dependent assignments (OPTIONAL). #
  84. +#######################################################################
  85. +
  86. +ifeq ($(OS_TARGET),WINCE)
  87. +DIRS = lib # omit cmd since wince has no command line shell
  88. +endif
  89. +
  90. +#######################################################################
  91. +# (5) Execute "global" rules. (OPTIONAL) #
  92. +#######################################################################
  93. +
  94. +include $(CORE_DEPTH)/coreconf/rules.mk
  95. +
  96. +#######################################################################
  97. +# (6) Execute "component" rules. (OPTIONAL) #
  98. +#######################################################################
  99. +
  100. +
  101. +
  102. +#######################################################################
  103. +# (7) Execute "local" rules. (OPTIONAL). #
  104. +#######################################################################
  105. +
  106. +nss_build_all: build_coreconf build_nspr build_dbm all
  107. +
  108. +nss_clean_all: clobber_coreconf clobber_nspr clobber_dbm clobber
  109. +
  110. +build_coreconf:
  111. + cd $(CORE_DEPTH)/coreconf ; $(MAKE)
  112. +
  113. +clobber_coreconf:
  114. + cd $(CORE_DEPTH)/coreconf ; $(MAKE) clobber
  115. +
  116. +NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)/config.status
  117. +NSPR_CONFIGURE = $(CORE_DEPTH)/../nsprpub/configure
  118. +
  119. +#
  120. +# Translate coreconf build options to NSPR configure options.
  121. +#
  122. +
  123. +ifdef BUILD_OPT
  124. +NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize
  125. +endif
  126. +ifdef USE_64
  127. +NSPR_CONFIGURE_OPTS += --enable-64bit
  128. +endif
  129. +ifeq ($(OS_TARGET),WIN95)
  130. +NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
  131. +endif
  132. +ifdef USE_DEBUG_RTL
  133. +NSPR_CONFIGURE_OPTS += --enable-debug-rtl
  134. +endif
  135. +ifdef NS_USE_GCC
  136. +NSPR_COMPILERS = CC=gcc CXX=g++
  137. +endif
  138. +
  139. +#
  140. +# Some pwd commands on Windows (for example, the pwd
  141. +# command in Cygwin) return a pathname that begins
  142. +# with a (forward) slash. When such a pathname is
  143. +# passed to Windows build tools (for example, cl), it
  144. +# is mistaken as a command-line option. If that is the case,
  145. +# we use a relative pathname as NSPR's prefix on Windows.
  146. +#
  147. +
  148. +USEABSPATH="YES"
  149. +ifeq (,$(filter-out WIN%,$(OS_TARGET)))
  150. +ifeq (,$(findstring :,$(shell pwd)))
  151. +USEABSPATH="NO"
  152. +endif
  153. +endif
  154. +ifeq ($(USEABSPATH),"YES")
  155. +NSPR_PREFIX = $(shell pwd)/../../dist/$(OBJDIR_NAME)
  156. +else
  157. +NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME)
  158. +endif
  159. +
  160. +$(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
  161. + $(NSINSTALL) -D $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)
  162. + cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; \
  163. + $(NSPR_COMPILERS) sh ../configure \
  164. + $(NSPR_CONFIGURE_OPTS) \
  165. + --with-dist-prefix='$(NSPR_PREFIX)' \
  166. + --with-dist-includedir='$(NSPR_PREFIX)/include'
  167. +
  168. +build_nspr: $(NSPR_CONFIG_STATUS)
  169. + cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)
  170. +
  171. +clobber_nspr: $(NSPR_CONFIG_STATUS)
  172. + cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE) clobber
  173. +
  174. +build_dbm:
  175. +ifdef NSS_DISABLE_DBM
  176. + @echo "skipping the build of DBM"
  177. +else
  178. + cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs
  179. +endif
  180. +
  181. +clobber_dbm:
  182. + cd $(CORE_DEPTH)/dbm ; $(MAKE) clobber
  183. +
  184. +moz_import::
  185. +ifeq (,$(filter-out WIN%,$(OS_TARGET)))
  186. + $(NSINSTALL) -D $(DIST)/include/nspr
  187. + cp $(DIST)/../include/nspr/*.h $(DIST)/include/nspr
  188. + cp $(DIST)/../include/* $(DIST)/include
  189. +ifdef BUILD_OPT
  190. + cp $(DIST)/../WIN32_O.OBJ/lib/* $(DIST)/lib
  191. +else
  192. + cp $(DIST)/../WIN32_D.OBJ/lib/* $(DIST)/lib
  193. +endif
  194. + mv $(DIST)/lib/dbm32.lib $(DIST)/lib/dbm.lib
  195. +else
  196. +ifeq ($(OS_TARGET),OS2)
  197. + cp -rf $(DIST)/../include $(DIST)
  198. + cp -rf $(DIST)/../lib $(DIST)
  199. + cp -f $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
  200. +else
  201. + $(NSINSTALL) -L ../../dist include $(DIST)
  202. + $(NSINSTALL) -L ../../dist lib $(DIST)
  203. + cp $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
  204. +endif
  205. +endif
  206. +
  207. +nss_RelEng_bld: build_coreconf import build_dbm all
  208. +
  209. +package:
  210. + $(MAKE) -C pkg publish
  211. diff -Nur nss-3.13.6.orig/mozilla/security/nss/config/Makefile nss-3.13.6/mozilla/security/nss/config/Makefile
  212. --- nss-3.13.6.orig/mozilla/security/nss/config/Makefile 1970-01-01 01:00:00.000000000 +0100
  213. +++ nss-3.13.6/mozilla/security/nss/config/Makefile 2012-10-01 12:58:43.000000000 +0200
  214. @@ -0,0 +1,41 @@
  215. +CORE_DEPTH = ../..
  216. +DEPTH = ../..
  217. +
  218. +include $(CORE_DEPTH)/coreconf/config.mk
  219. +
  220. +NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
  221. +NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
  222. +NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
  223. +PREFIX = /usr
  224. +
  225. +all: install libs
  226. +
  227. +export:
  228. +install:
  229. + # Create the nss.pc file
  230. + mkdir -p $(DIST)/lib/pkgconfig
  231. + sed -e "s,@prefix@,$(PREFIX)," \
  232. + -e "s,@exec_prefix@,\$${prefix}," \
  233. + -e "s,@libdir@,\$${prefix}/lib," \
  234. + -e "s,@includedir@,\$${prefix}/include/nss," \
  235. + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
  236. + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
  237. + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
  238. + nss.pc.in > nss.pc
  239. + chmod 0644 nss.pc
  240. + cp nss.pc $(DIST)/lib/pkgconfig
  241. +
  242. + # Create the nss-config script
  243. + mkdir -p $(DIST)/bin
  244. + sed -e "s,@prefix@,$(PREFIX)," \
  245. + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
  246. + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
  247. + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
  248. + nss-config.in > nss-config
  249. + chmod 0755 nss-config
  250. + cp nss-config $(DIST)/bin
  251. +
  252. +libs:
  253. +
  254. +dummy: all export install libs
  255. +
  256. diff -Nur nss-3.13.6.orig/mozilla/security/nss/config/nss-config.in nss-3.13.6/mozilla/security/nss/config/nss-config.in
  257. --- nss-3.13.6.orig/mozilla/security/nss/config/nss-config.in 1970-01-01 01:00:00.000000000 +0100
  258. +++ nss-3.13.6/mozilla/security/nss/config/nss-config.in 2012-10-01 12:37:24.000000000 +0200
  259. @@ -0,0 +1,153 @@
  260. +#!/bin/sh
  261. +
  262. +prefix=@prefix@
  263. +
  264. +major_version=@NSS_MAJOR_VERSION@
  265. +minor_version=@NSS_MINOR_VERSION@
  266. +patch_version=@NSS_PATCH_VERSION@
  267. +
  268. +usage()
  269. +{
  270. + cat <<EOF
  271. +Usage: nss-config [OPTIONS] [LIBRARIES]
  272. +Options:
  273. + [--prefix[=DIR]]
  274. + [--exec-prefix[=DIR]]
  275. + [--includedir[=DIR]]
  276. + [--libdir[=DIR]]
  277. + [--version]
  278. + [--libs]
  279. + [--cflags]
  280. +Dynamic Libraries:
  281. + nss
  282. + nssutil
  283. + smime
  284. + ssl
  285. + softokn
  286. +EOF
  287. + exit $1
  288. +}
  289. +
  290. +if test $# -eq 0; then
  291. + usage 1 1>&2
  292. +fi
  293. +
  294. +lib_nss=yes
  295. +lib_nssutil=yes
  296. +lib_smime=yes
  297. +lib_ssl=yes
  298. +lib_softokn=yes
  299. +
  300. +while test $# -gt 0; do
  301. + case "$1" in
  302. + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  303. + *) optarg= ;;
  304. + esac
  305. +
  306. + case $1 in
  307. + --prefix=*)
  308. + prefix=$optarg
  309. + ;;
  310. + --prefix)
  311. + echo_prefix=yes
  312. + ;;
  313. + --exec-prefix=*)
  314. + exec_prefix=$optarg
  315. + ;;
  316. + --exec-prefix)
  317. + echo_exec_prefix=yes
  318. + ;;
  319. + --includedir=*)
  320. + includedir=$optarg
  321. + ;;
  322. + --includedir)
  323. + echo_includedir=yes
  324. + ;;
  325. + --libdir=*)
  326. + libdir=$optarg
  327. + ;;
  328. + --libdir)
  329. + echo_libdir=yes
  330. + ;;
  331. + --version)
  332. + echo ${major_version}.${minor_version}.${patch_version}
  333. + ;;
  334. + --cflags)
  335. + echo_cflags=yes
  336. + ;;
  337. + --libs)
  338. + echo_libs=yes
  339. + ;;
  340. + nss)
  341. + lib_nss=yes
  342. + ;;
  343. + nssutil)
  344. + lib_nssutil=yes
  345. + ;;
  346. + smime)
  347. + lib_smime=yes
  348. + ;;
  349. + ssl)
  350. + lib_ssl=yes
  351. + ;;
  352. + softokn)
  353. + lib_softokn=yes
  354. + ;;
  355. + *)
  356. + usage 1 1>&2
  357. + ;;
  358. + esac
  359. + shift
  360. +done
  361. +
  362. +# Set variables that may be dependent upon other variables
  363. +if test -z "$exec_prefix"; then
  364. + exec_prefix=`pkg-config --variable=exec_prefix nss`
  365. +fi
  366. +if test -z "$includedir"; then
  367. + includedir=`pkg-config --variable=includedir nss`
  368. +fi
  369. +if test -z "$libdir"; then
  370. + libdir=`pkg-config --variable=libdir nss`
  371. +fi
  372. +
  373. +if test "$echo_prefix" = "yes"; then
  374. + echo $prefix
  375. +fi
  376. +
  377. +if test "$echo_exec_prefix" = "yes"; then
  378. + echo $exec_prefix
  379. +fi
  380. +
  381. +if test "$echo_includedir" = "yes"; then
  382. + echo $includedir
  383. +fi
  384. +
  385. +if test "$echo_libdir" = "yes"; then
  386. + echo $libdir
  387. +fi
  388. +
  389. +if test "$echo_cflags" = "yes"; then
  390. + echo -I$includedir
  391. +fi
  392. +
  393. +if test "$echo_libs" = "yes"; then
  394. + libdirs="-L$libdir"
  395. + if test -n "$lib_nss"; then
  396. + libdirs="$libdirs -lnss${major_version}"
  397. + fi
  398. + if test -n "$lib_nssutil"; then
  399. + libdirs="$libdirs -lnssutil${major_version}"
  400. + fi
  401. + if test -n "$lib_smime"; then
  402. + libdirs="$libdirs -lsmime${major_version}"
  403. + fi
  404. + if test -n "$lib_ssl"; then
  405. + libdirs="$libdirs -lssl${major_version}"
  406. + fi
  407. + if test -n "$lib_softokn"; then
  408. + libdirs="$libdirs -lsoftokn${major_version}"
  409. + fi
  410. + echo $libdirs
  411. +fi
  412. +
  413. diff -Nur nss-3.13.6.orig/mozilla/security/nss/config/nss.pc.in nss-3.13.6/mozilla/security/nss/config/nss.pc.in
  414. --- nss-3.13.6.orig/mozilla/security/nss/config/nss.pc.in 1970-01-01 01:00:00.000000000 +0100
  415. +++ nss-3.13.6/mozilla/security/nss/config/nss.pc.in 2012-10-01 12:37:24.000000000 +0200
  416. @@ -0,0 +1,12 @@
  417. +prefix=@prefix@
  418. +exec_prefix=@exec_prefix@
  419. +libdir=@libdir@
  420. +includedir=@includedir@
  421. +
  422. +Name: NSS
  423. +Description: Network Security Services
  424. +Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
  425. +Requires: nspr >= 4.8
  426. +Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
  427. +Cflags: -I${includedir}
  428. +
  429. diff -Nur nss-3.13.6.orig/mozilla/security/nss/manifest.mn nss-3.13.6/mozilla/security/nss/manifest.mn
  430. --- nss-3.13.6.orig/mozilla/security/nss/manifest.mn 2010-03-26 23:31:18.000000000 +0100
  431. +++ nss-3.13.6/mozilla/security/nss/manifest.mn 2012-10-01 12:37:24.000000000 +0200
  432. @@ -42,6 +42,6 @@
  433. RELEASE = nss
  434. -DIRS = lib cmd
  435. +DIRS = lib cmd config