[Lsb-messages] /var/www/bzr/lsb/devel/build_env r1951: Add nss-config, nspr-config. Move nss.pc, nspr.pc to build-base (bug 3258)

Stew Benedict stewb at linux-foundation.org
Fri May 11 13:04:14 UTC 2012


------------------------------------------------------------
revno: 1951
committer: Stew Benedict <stewb at linux-foundation.org>
branch nick: build_env
timestamp: Fri 2012-05-11 09:04:14 -0400
message:
  Add nss-config, nspr-config. Move nss.pc, nspr.pc to build-base (bug 3258)
added:
  stub_libs/bin/nspr-config.in
  stub_libs/bin/nss-config.in
modified:
  package/Makefile
  package/lsb-build.spec.sed
  stub_libs/Makefile.all-arch
-------------- next part --------------
=== modified file 'package/Makefile'
--- a/package/Makefile	2012-05-10 10:30:41 +0000
+++ b/package/Makefile	2012-05-11 13:04:14 +0000
@@ -42,11 +42,11 @@
 # Should have leading "."
 # a big number (80-99) is leading up to the next minor spec
 # build_env is version-independent so can wait till late to bump this
-SUB_VERSION=.11
+SUB_VERSION=.12
 
 # We define this here instead of directly in the spec file as
 # we need to be able to work out what the produced rpm files will be called
-RPM_PACKAGE_RELEASE=8
+RPM_PACKAGE_RELEASE=1
 
 # Initialize LIB64 to proper value for 64-bit architectures
 export LIB64:=$(shell case `uname -m` in (ppc64 | s390x | x86_64) echo 64 ;; esac)

=== modified file 'package/lsb-build.spec.sed'
--- a/package/lsb-build.spec.sed	2012-05-03 13:04:31 +0000
+++ b/package/lsb-build.spec.sed	2012-05-11 13:04:14 +0000
@@ -29,7 +29,7 @@
 Summary: LSB Build environment base package
 Group: Development/Tools
 Obsoletes: lsbdev-base < 3.0
-Conflicts: lsbdev-base, lsb-build-libbat < 1.4.1
+Conflicts: lsbdev-base, lsb-build-libbat < 1.4.1, lsb-build-desktop < 4.1.12 
 Requires: lsb-setup >= 4.0.1
 AutoReqProv: no
 %description base
@@ -41,7 +41,7 @@
 Group: Development/Tools
 Requires: lsb-build-base
 Obsoletes: lsbdev-desktop < 3.0
-Conflicts: lsbdev-desktop
+Conflicts: lsbdev-desktop, lsb-build-base < 4.1.12
 AutoReqProv: no
 %description desktop
 The LSB Build Environment desktop package adds stub libraries and headers
@@ -148,8 +148,21 @@
 
 # extra files
 /opt/lsb/bin/cups-config
+/opt/lsb/bin/nspr-config
+/opt/lsb/bin/nss-config
 /opt/lsb/doc/lsb-build-base/Licence
 /opt/lsb/doc/lsb-build-base/README
+%dir /opt/lsb/%xlib-3.1/pkgconfig
+%dir /opt/lsb/%xlib-3.2/pkgconfig
+%dir /opt/lsb/%xlib-4.1/pkgconfig
+%dir /opt/lsb/%xlib-5.0/pkgconfig
+%dir /opt/lsb/%xlib-4.0/pkgconfig
+/opt/lsb/%xlib-4.0/pkgconfig/nss.pc
+/opt/lsb/%xlib-4.0/pkgconfig/nspr.pc
+/opt/lsb/%xlib-4.1/pkgconfig/nss.pc
+/opt/lsb/%xlib-4.1/pkgconfig/nspr.pc
+/opt/lsb/%xlib-5.0/pkgconfig/nss.pc
+/opt/lsb/%xlib-5.0/pkgconfig/nspr.pc
 
 # locally created symlinks
 /opt/lsb/include/ncurses.h
@@ -218,11 +231,6 @@
 %dir /opt/lsb/include/X11
 %dir /opt/lsb/include/X11/extensions
 %dir /opt/lsb/include/X11/Xft
-%dir /opt/lsb/%xlib-3.1/pkgconfig
-%dir /opt/lsb/%xlib-3.2/pkgconfig
-%dir /opt/lsb/%xlib-4.1/pkgconfig
-%dir /opt/lsb/%xlib-5.0/pkgconfig
-%dir /opt/lsb/%xlib-4.0/pkgconfig
 
 # extra files
 /opt/lsb/bin/freetype-config
@@ -331,8 +339,6 @@
 /opt/lsb/%xlib-4.1/pkgconfig/xrender.pc
 /opt/lsb/%xlib-4.1/pkgconfig/xt.pc
 /opt/lsb/%xlib-4.1/pkgconfig/xtst.pc
-/opt/lsb/%xlib-4.1/pkgconfig/nss.pc
-/opt/lsb/%xlib-4.1/pkgconfig/nspr.pc
 /opt/lsb/%xlib-5.0/pkgconfig/atk.pc
 /opt/lsb/%xlib-5.0/pkgconfig/cairo-ft.pc
 /opt/lsb/%xlib-5.0/pkgconfig/cairo.pc
@@ -382,8 +388,6 @@
 /opt/lsb/%xlib-5.0/pkgconfig/xrender.pc
 /opt/lsb/%xlib-5.0/pkgconfig/xt.pc
 /opt/lsb/%xlib-5.0/pkgconfig/xtst.pc
-/opt/lsb/%xlib-5.0/pkgconfig/nss.pc
-/opt/lsb/%xlib-5.0/pkgconfig/nspr.pc
 /opt/lsb/%xlib-4.0/pkgconfig/atk.pc
 /opt/lsb/%xlib-4.0/pkgconfig/cairo-ft.pc
 /opt/lsb/%xlib-4.0/pkgconfig/cairo.pc
@@ -418,8 +422,6 @@
 /opt/lsb/%xlib-4.0/pkgconfig/QtSql.pc
 /opt/lsb/%xlib-4.0/pkgconfig/QtSvg.pc
 /opt/lsb/%xlib-4.0/pkgconfig/QtXml.pc
-/opt/lsb/%xlib-4.0/pkgconfig/nss.pc
-/opt/lsb/%xlib-4.0/pkgconfig/nspr.pc
 
 # locally created symlinks
 #/opt/lsb/%xlib-4.0         # covered in lsb-build-base, don't duplicate

=== modified file 'stub_libs/Makefile.all-arch'
--- a/stub_libs/Makefile.all-arch	2012-02-21 17:19:10 +0000
+++ b/stub_libs/Makefile.all-arch	2012-05-11 13:04:14 +0000
@@ -66,18 +66,31 @@
 install-core: core-libs
 	install -d $(DESTDIR)/$(INSTALL_DIR)
 	install -d $(DESTDIR)/$(INSTALL_ROOT)/bin
+	install -d $(DESTDIR)/$(INSTALL_DIR)/pkgconfig
 	install $(CORE_SOFILES) $(DESTDIR)/$(INSTALL_DIR)
 	mv $(DESTDIR)/$(INSTALL_DIR)/libstdcxx.so $(DESTDIR)/$(INSTALL_DIR)/libstdc++.so
 	cp -P *.so.* $(DESTDIR)/$(INSTALL_DIR)/
 	# these get copied over again in install-desktop, and break symlinks
 	rm -f libstdc*.so.*
 	cd $(DESTDIR)/$(INSTALL_DIR) && rm -f libstdc++.so.6 && ln -s libstdc++.so libstdc++.so.6
-	# relocate cups-config
-	sed 's|@ROOTDIR@|$(INSTALL_ROOT)|g' ../../bin/cups-config.in | \
-	  sed 's|@LIB64@|$(LIB64)|g' | \
-	  sed 's|@DEFAULT_LSB_VERSION@|$(DEFAULT_VERSION)|g' > \
-	  $(DESTDIR)/$(INSTALL_ROOT)/bin/cups-config
-	chmod +x $(DESTDIR)/$(INSTALL_ROOT)/bin/cups-config
+	# relocate pkgconfig files
+	for pcin in ../../$(LSB_VERSION)/pkgconfig/ns*.pc.in; do \
+	  pc=$$(basename $$pcin | sed 's|.in$$||'); \
+	  echo "$$pcin:$$pc"; \
+	  if [ -f "$$pcin" ]; then \
+	    sed 's|@INCLUDEDIR@|$(INSTALL_ROOT)$(INCLUDEDIR)/$(SUBDIR)|g' < $$pcin | \
+	    sed 's|@LIBDIR@|$(INSTALL_DIR)|g' | \
+	    sed 's|@ROOTDIR@|$(INSTALL_ROOT)|g' > $(DESTDIR)/$(INSTALL_DIR)/pkgconfig/$$pc; \
+	  fi; \
+	done
+	# relocate cups-config, nspr-config, nss-config
+	for f in cups-config nspr-config nss-config; do \
+	  sed 's|@ROOTDIR@|$(INSTALL_ROOT)|g' ../../bin/$$f.in | \
+	    sed 's|@LIB64@|$(LIB64)|g' | \
+	    sed 's|@DEFAULT_LSB_VERSION@|$(DEFAULT_VERSION)|g' > \
+	    $(DESTDIR)/$(INSTALL_ROOT)/bin/$$f; \
+	  chmod +x $(DESTDIR)/$(INSTALL_ROOT)/bin/$$f; \
+	done
 	# Create symlink to libs in the default LSB version.
 ifeq ($(DEFAULT_VERSION),$(LSB_VERSION))
 	cd $(DESTDIR)/$(INSTALL_ROOT) && rm -fr ./$(LIBDIR) && ln -s ./$(LIBDIR)-$(LSB_VERSION) ./$(LIBDIR)
@@ -92,11 +105,13 @@
 	# relocate pkgconfig files
 	for pcin in ../../$(LSB_VERSION)/pkgconfig/*.pc.in; do \
 	  pc=$$(basename $$pcin | sed 's|.in$$||'); \
-	  echo "$$pcin:$$pc"; \
-	  sed 's|@INCLUDEDIR@|$(INSTALL_ROOT)$(INCLUDEDIR)/$(SUBDIR)|g' < $$pcin | \
-	  sed 's|@LIBDIR@|$(INSTALL_DIR)|g' | \
-	  sed 's|@ROOTDIR@|$(INSTALL_ROOT)|g' > $(DESTDIR)/$(INSTALL_DIR)/pkgconfig/$$pc; \
-	done
+	  if [ "$$pc" != 'nspr.pc' -a "$$pc" != 'nss.pc' ]; then \
+	    echo "$$pcin:$$pc"; \
+	    sed 's|@INCLUDEDIR@|$(INSTALL_ROOT)$(INCLUDEDIR)/$(SUBDIR)|g' < $$pcin | \
+	    sed 's|@LIBDIR@|$(INSTALL_DIR)|g' | \
+	    sed 's|@ROOTDIR@|$(INSTALL_ROOT)|g' > $(DESTDIR)/$(INSTALL_DIR)/pkgconfig/$$pc; \
+	  fi; \
+	done;
 ifeq ($(DEFAULT_VERSION),$(LSB_VERSION))
 	# relocate freetype-config, xft-config, xml2-config
 	for f in freetype-config xft-config xml2-config; do \

=== added file 'stub_libs/bin/nspr-config.in'
--- a/stub_libs/bin/nspr-config.in	1970-01-01 00:00:00 +0000
+++ b/stub_libs/bin/nspr-config.in	2012-05-11 13:04:14 +0000
@@ -0,0 +1,137 @@
+#!/bin/sh
+
+deflsbversion="@DEFAULT_LSB_VERSION@"
+if [ "$LSBCC_LSBVERSION" != "" ]; then
+    lsbversion="$LSBCC_LSBVERSION"
+else
+    lsbversion="$deflsbversion"
+fi
+
+prefix=@ROOTDIR@
+export PKG_CONFIG_PATH=/opt/lsb/lib at LIB64@-${lsbversion}/pkgconfig
+
+major_version=4
+minor_version=9
+patch_version=0
+
+usage()
+{
+	cat <<EOF
+Usage: nspr-config [OPTIONS] [LIBRARIES]
+Options:
+	[--prefix[=DIR]]
+	[--exec-prefix[=DIR]]
+	[--includedir[=DIR]]
+	[--libdir[=DIR]]
+	[--version]
+	[--libs]
+	[--cflags]
+Libraries:
+	nspr
+EOF
+	exit $1
+}
+
+if test $# -eq 0; then
+	usage 1 1>&2
+fi
+
+lib_nspr=yes
+lib_plc=yes
+lib_plds=yes
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      ;;
+    --prefix)
+      echo_prefix=yes
+      ;;
+    --exec-prefix=*)
+      exec_prefix=$optarg
+      ;;
+    --exec-prefix)
+      echo_exec_prefix=yes
+      ;;
+    --includedir=*)
+      includedir=$optarg
+      ;;
+    --includedir)
+      echo_includedir=yes
+      ;;
+    --libdir=*)
+      libdir=$optarg
+      ;;
+    --libdir)
+      echo_libdir=yes
+      ;;
+    --version)
+      echo ${major_version}.${minor_version}.${patch_version}
+      ;;
+    --cflags)
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    nspr)
+      lib_nspr=yes
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+    exec_prefix=${prefix}
+fi
+if test -z "$includedir"; then
+    includedir=/usr/include/nspr4
+fi
+if test -z "$libdir"; then
+    libdir=`pkg-config --variable=libdir nspr`
+fi
+
+if test "$echo_prefix" = "yes"; then
+    echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+    echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+    echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+    echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+    echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+      libdirs=-L$libdir
+      if test -n "$lib_nspr"; then
+	libdirs="$libdirs -lnspr${major_version}"
+      fi
+      os_ldflags=`pkg-config --variable=ldflags nspr`
+      for i in $os_ldflags ; do
+	if echo $i | grep \^-L >/dev/null; then
+	  libdirs="$libdirs $i"
+        fi
+      done
+      echo $libdirs `pkg-config --variable=os_libs nspr`
+fi      
+

=== added file 'stub_libs/bin/nss-config.in'
--- a/stub_libs/bin/nss-config.in	1970-01-01 00:00:00 +0000
+++ b/stub_libs/bin/nss-config.in	2012-05-11 13:04:14 +0000
@@ -0,0 +1,137 @@
+#!/bin/sh
+
+deflsbversion="@DEFAULT_LSB_VERSION@"
+if [ "$LSBCC_LSBVERSION" != "" ]; then
+    lsbversion="$LSBCC_LSBVERSION"
+else
+    lsbversion="$deflsbversion"
+fi
+
+prefix=@ROOTDIR@
+export PKG_CONFIG_PATH=/opt/lsb/lib at LIB64@-${lsbversion}/pkgconfig
+
+major_version=3
+minor_version=13
+patch_version=4
+
+usage()
+{
+	cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+	[--prefix[=DIR]]
+	[--exec-prefix[=DIR]]
+	[--includedir[=DIR]]
+	[--libdir[=DIR]]
+	[--version]
+	[--libs]
+	[--cflags]
+Dynamic Libraries:
+	nss
+	ssl
+EOF
+	exit $1
+}
+
+if test $# -eq 0; then
+	usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_nss=yes
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      ;;
+    --prefix)
+      echo_prefix=yes
+      ;;
+    --exec-prefix=*)
+      exec_prefix=$optarg
+      ;;
+    --exec-prefix)
+      echo_exec_prefix=yes
+      ;;
+    --includedir=*)
+      includedir=$optarg
+      ;;
+    --includedir)
+      echo_includedir=yes
+      ;;
+    --libdir=*)
+      libdir=$optarg
+      ;;
+    --libdir)
+      echo_libdir=yes
+      ;;
+    --version)
+      echo ${major_version}.${minor_version}.${patch_version}
+      ;;
+    --cflags)
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    ssl)
+      lib_ssl=yes
+      ;;
+    nss)
+      lib_nss=yes
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+    exec_prefix=`pkg-config --variable=exec_prefix nss`
+fi
+if test -z "$includedir"; then
+    includedir=`pkg-config --variable=includedir nss`
+fi
+if test -z "$libdir"; then
+    libdir=`pkg-config --variable=libdir nss`
+fi
+
+if test "$echo_prefix" = "yes"; then
+    echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+    echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+    echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+    echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+    echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+      libdirs="-Wl,-rpath-link,$libdir -L$libdir"
+      if test -n "$lib_ssl"; then
+	libdirs="$libdirs -lssl${major_version}"
+      fi
+      if test -n "$lib_nss"; then
+	libdirs="$libdirs -lnss${major_version}"
+      fi
+      echo $libdirs
+fi      
+



More information about the lsb-messages mailing list