summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Daniel Mierswa <impulze@impulze.org> 2009-09-29 07:39:18 +0200
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-09-29 18:10:11 +0200
commit9b8842e8382bca2cb737dce23527c48c0ae43ce2 (patch)
tree98d54e12dcee75649cda28e7fec78e7a4258e5b6
parent9603038b270e03ce7b04703150633de25d958fd1 (diff)
downloadmozilla-9b8842e8382bca2cb737dce23527c48c0ae43ce2.tar.gz
mozilla-9b8842e8382bca2cb737dce23527c48c0ae43ce2.tar.xz
Provide proper nss-config script.
The previous script always used pkg-config, so when nss-config --version was invoked it actually reported the pkg-config version which is much lower than the nss versions. This would immediately cause every bigger project that could use nss to build it's internal libnss. Minor readability thing: No need to dodir, doins does that automatically. Signed-off-by: Daniel Mierswa <impulze@impulze.org>
-rw-r--r--packages/dev-libs/nss/files/nss-config48
-rw-r--r--packages/dev-libs/nss/nss-3.12.3.1-r1.exheres-0 (renamed from packages/dev-libs/nss/nss-3.12.3.1.exheres-0)1
2 files changed, 47 insertions, 2 deletions
diff --git a/packages/dev-libs/nss/files/nss-config b/packages/dev-libs/nss/files/nss-config
index 24160b7..89aadd3 100644
--- a/packages/dev-libs/nss/files/nss-config
+++ b/packages/dev-libs/nss/files/nss-config
@@ -1,4 +1,50 @@
#!/bin/sh
-pkg-config $* nss
+nss_pc() {
+ pkg-config $@ nss
+}
+
+nss_pc_variable() {
+ nss_pc --variable=$1
+}
+
+usage()
+{
+ cat <<EOF
+Usage: nss-config [OPTIONS]
+Options:
+ [--prefix]
+ [--exec-prefix]
+ [--includedir]
+ [--libdir]
+ [--version]
+ [--libs]
+ [--cflags]
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix) nss_pc_variable prefix ;;
+ --exec-prefix) nss_pc_variable exec_prefix ;;
+ --includedir) nss_pc_variable includedir ;;
+ --libdir) nss_pc_variable libdir ;;
+ --version) nss_pc --modversion ;;
+ --cflags) nss_pc --cflags ;;
+ --libs) nss_pc --libs ;;
+ *) usage 1 1>&2 ;;
+ esac
+
+ shift
+done
diff --git a/packages/dev-libs/nss/nss-3.12.3.1.exheres-0 b/packages/dev-libs/nss/nss-3.12.3.1-r1.exheres-0
index 60834f6..7a2af2a 100644
--- a/packages/dev-libs/nss/nss-3.12.3.1.exheres-0
+++ b/packages/dev-libs/nss/nss-3.12.3.1-r1.exheres-0
@@ -68,7 +68,6 @@ src_install() {
-e "s|@VERSION@|${MAJOR}.${MINOR}.${PATCH}|" \
"${FILES}"/nss.pc.in > "${WORK}"/nss.pc
- dodir /usr/lib/pkgconfig
insinto /usr/lib/pkgconfig
doins "${WORK}"/nss.pc