aboutsummaryrefslogtreecommitdiff
blob: f2e512ecc83db1adaeda3bee257973e1d45e3bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
diff -r 40ebe6af8a66 nsprpub/config/Makefile.in
--- a/nsprpub/config/Makefile.in	Sat Apr 16 17:57:51 2011 +0200
+++ b/nsprpub/config/Makefile.in	Sat Apr 16 19:03:01 2011 +0200
@@ -52,9 +52,10 @@
 
 # autoconf.mk must be deleted last (from the top-level directory)
 # because it is included by every makefile.
-DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config
+DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config nspr.pc
 
 RELEASE_BINS	= nspr-config
+RELEASE_PC	= nspr.pc
 
 include $(topsrcdir)/config/config.mk
 
diff -r 40ebe6af8a66 nsprpub/config/config.mk
--- a/nsprpub/config/config.mk	Sat Apr 16 17:57:51 2011 +0200
+++ b/nsprpub/config/config.mk	Sat Apr 16 19:03:01 2011 +0200
@@ -175,6 +175,7 @@
 RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
 RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
 RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
+RELEASE_PC_DIR = $(RELEASE_LIB_DIR)/pkgconfig

 # autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
 # this file
diff -r 40ebe6af8a66 nsprpub/config/nspr-config.in
--- a/nsprpub/config/nspr-config.in	Sat Apr 16 17:57:51 2011 +0200
+++ b/nsprpub/config/nspr-config.in	Sat Apr 16 19:03:01 2011 +0200
@@ -92,13 +92,13 @@
 
 # Set variables that may be dependent upon other variables
 if test -z "$exec_prefix"; then
-    exec_prefix=@exec_prefix@
+    exec_prefix=`pkg-config --variable=exec_prefix nspr`
 fi
 if test -z "$includedir"; then
-    includedir=@includedir@
+    includedir=`pkg-config --variable=includedir nspr`
 fi
 if test -z "$libdir"; then
-    libdir=@libdir@
+    libdir=`pkg-config --variable=libdir nspr`
 fi
 
 if test "$echo_prefix" = "yes"; then
diff -r 40ebe6af8a66 nsprpub/config/nspr.pc.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nsprpub/config/nspr.pc.in	Sat Apr 16 19:03:01 2011 +0200
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@
+Libs: -L${libdir} -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ -lpthread -Wl,-R${libdir}
+Cflags: -I${includedir}
+
diff -r 40ebe6af8a66 nsprpub/config/rules.mk
--- a/nsprpub/config/rules.mk	Sat Apr 16 17:57:51 2011 +0200
+++ b/nsprpub/config/rules.mk	Sat Apr 16 19:03:01 2011 +0200
@@ -206,7 +206,7 @@
 	rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH) $(DIST_GARBAGE)
 	+$(LOOP_OVER_DIRS)
 
-install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS)
+install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS) $(RELEASE_PC)
 ifdef RELEASE_BINS
 	$(NSINSTALL) -t -m 0755 $(RELEASE_BINS) $(DESTDIR)$(bindir)
 endif
@@ -216,6 +216,9 @@
 ifdef RELEASE_LIBS
 	$(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(libdir)/$(lib_subdir)
 endif
+ifdef RELEASE_PC
+	$(NSINSTALL) -t -m 0644 $(RELEASE_PC) $(DESTDIR)$(libdir)/pkgconfig/
+endif
 	+$(LOOP_OVER_DIRS)
 
 release:: export
@@ -267,6 +270,23 @@
 	fi
 	cp $(RELEASE_HEADERS) $(RELEASE_HEADERS_DEST)
 endif
+ifdef RELEASE_PC
+	@echo "Copying pkg-config files to release directory"
+	@if test -z "$(BUILD_NUMBER)"; then \
+		echo "BUILD_NUMBER must be defined"; \
+		false; \
+	else \
+		true; \
+	fi
+	@if test ! -d $(RELEASE_PC_DEST); then \
+		rm -rf $(RELEASE_PC_DEST); \
+		$(NSINSTALL) -D $(RELEASE_PC_DEST);\
+	else \
+		true; \
+	fi
+	cp $(RELEASE_PC) $(RELEASE_PC_DEST)
+endif
+
 	+$(LOOP_OVER_DIRS)
 
 alltags:
diff -r 40ebe6af8a66 nsprpub/configure
--- a/nsprpub/configure	Sat Apr 16 17:57:51 2011 +0200
+++ b/nsprpub/configure	Sat Apr 16 19:03:01 2011 +0200
@@ -6362,6 +6362,7 @@
 config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
+config/nspr.pc
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile 
diff -r 40ebe6af8a66 nsprpub/configure.in
--- a/nsprpub/configure.in	Sat Apr 16 17:57:51 2011 +0200
+++ b/nsprpub/configure.in	Sat Apr 16 19:03:01 2011 +0200
@@ -3123,6 +3123,7 @@
 config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
+config/nspr.pc
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile