Gentoo Archives: gentoo-commits

From: "Mounir Lamouri (volkmar)" <volkmar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-plugins/mozilla-weave/files: mozilla-weave-0.5.1-pkgconfig.patch mozilla-weave-use-pkgconfig.patch
Date: Sun, 23 Aug 2009 22:25:44
Message-Id: E1MfLVO-00084a-NV@stork.gentoo.org
1 volkmar 09/08/23 22:25:42
2
3 Added: mozilla-weave-0.5.1-pkgconfig.patch
4 Removed: mozilla-weave-use-pkgconfig.patch
5 Log:
6 Version bump to 0.5.1
7 (Portage version: 14103-svn/cvs/Linux ppc)
8
9 Revision Changes Path
10 1.1 www-plugins/mozilla-weave/files/mozilla-weave-0.5.1-pkgconfig.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-plugins/mozilla-weave/files/mozilla-weave-0.5.1-pkgconfig.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-plugins/mozilla-weave/files/mozilla-weave-0.5.1-pkgconfig.patch?rev=1.1&content-type=text/plain
14
15 Index: mozilla-weave-0.5.1-pkgconfig.patch
16 ===================================================================
17 diff -r adb27ed2f421 crypto/Makefile
18 --- a/crypto/Makefile Fri Aug 21 17:32:41 2009 -0700
19 +++ b/crypto/Makefile Mon Aug 24 00:09:43 2009 +0200
20 @@ -39,12 +39,23 @@
21 stage_dir=../dist/stage
22
23 sdkdir ?= ${MOZSDKDIR}
24 +
25 +# If blank, try to use pkg-config
26 +# To add a path to pkg-config search path, use PKG_CONFIG_PATH
27 +# (see man pkg-config)
28 +ifeq ($(sdkdir),)
29 + sdkdir = $(shell pkg-config --variable sdkdir libxul-unstable)
30 +endif
31 +
32 ifeq ($(sdkdir),)
33 $(warning No 'sdkdir' variable given)
34 $(warning It should point to the location of the Gecko SDK)
35 $(warning For example: "make sdkdir=/foo/bar/baz")
36 $(warning Or set the MOZSDKDIR environment variable to point to it)
37 + $(warning Or fix your xulrunner pkg-config files)
38 $(error)
39 +else
40 + $(info Using Mozilla SDKDIR as: ${sdkdir})
41 endif
42
43 all: build
44 diff -r adb27ed2f421 crypto/src/Makefile
45 --- a/crypto/src/Makefile Fri Aug 21 17:32:41 2009 -0700
46 +++ b/crypto/src/Makefile Mon Aug 24 00:09:43 2009 +0200
47 @@ -37,9 +37,17 @@
48 #
49 # ***** END LICENSE BLOCK *****
50
51 +# Define some custom pkg-config functions
52 +pkg-config-var = $(shell pkg-config --variable $(1) $(2))
53 +pkg-config-I = $(shell pkg-config --cflags-only-I $(1) $(2))
54 +pkg-config-l = $(patsubst -l%,%,$(shell pkg-config --libs-only-l $(1)))
55 +pkg-config-L = $(patsubst -L%,%,$(shell pkg-config --libs-only-L $(1)))
56 +
57 +# Actually use pkg-config?
58 +pkgconfig = "no"
59 +
60 # OS detection
61
62 -xpidl = $(sdkdir)/bin/xpidl
63 link = link
64
65 sys := $(shell uname -s)
66 @@ -48,7 +56,6 @@
67 ifeq ($(wince), 1)
68 os = WINNT
69 cxx = $(sdkdir)/sdk/bin/arm-wince-gcc
70 - xpidl = $(sdkdir)/host/bin/host_xpidl
71 link = $(sdkdir)/sdk/bin/arm-wince-link
72 so = dll
73 else
74 @@ -165,13 +172,24 @@
75 destdir = ..
76 platformdir = $(destdir)/platform/$(platform)
77
78 +# If blank, try to use pkg-config
79 +# To add a path to pkg-config search path, use PKG_CONFIG_PATH
80 +# (see man pkg-config)
81 +ifeq ($(sdkdir),)
82 + pkgconfig="yes"
83 + sdkdir = $(call pkg-config-var,sdkdir,libxul-unstable)
84 +endif
85 +
86 # FIXME: we don't actually require this for e.g. clean
87 ifeq ($(sdkdir),)
88 $(warning No 'sdkdir' variable given)
89 $(warning It should point to the location of the Gecko SDK)
90 $(warning For example: "make sdkdir=/foo/bar/baz")
91 $(warning Or set the MOZSDKDIR environment variable to point to it)
92 + $(warning Or fix your xulrunner pkg-config files)
93 $(error )
94 +else
95 + $(info Using Mozilla SDKDIR as: ${sdkdir})
96 endif
97
98 idl_headers = $(idl:.idl=.h)
99 @@ -179,30 +197,75 @@
100 cpp_objects = $(cpp_sources:.cpp=.o)
101 so_target = $(target:=.$(so))
102
103 -headers = -I$(sdkdir)/include \
104 - -I$(sdkdir)/include/system_wrappers \
105 - -I$(sdkdir)/include/nss \
106 - -I$(sdkdir)/include/xpcom \
107 - -I$(sdkdir)/include/string \
108 - -I$(sdkdir)/include/pipnss \
109 - -I$(sdkdir)/include/nspr \
110 - -I$(sdkdir)/sdk/include
111 +xpidl = $(sdkdir)/bin/xpidl
112 +ifeq ($(wince), 1)
113 + xpidl = $(sdkdir)/host/bin/host_xpidl
114 +endif
115 +
116 +ifeq ($(pkgconfig),"yes")
117 + # Include dirs
118 + nss_includes = $(call pkg-config-I,mozilla-nss)
119 + nspr_includes = $(call pkg-config-I,mozilla-nspr)
120 + libxul_includes = $(call pkg-config-I,libxul-unstable)
121 +
122 + # Library dirs
123 + nss_libdirs = $(call pkg-config-L,mozilla-nss)
124 + nspr_libdirs = $(call pkg-config-L,mozilla-nspr)
125 + libxul_libdirs = $(call pkg-config-L,libxul-unstable)
126 +
127 + # Libs
128 + nss_libs = $(call pkg-config-l,mozilla-nss)
129 + nspr_libs = $(call pkg-config-l,mozilla-nspr)
130 + libxul_libs = $(call pkg-config-l,libxul-unstable)
131 +
132 + idl_dir = $(call pkg-config-var,idldir,libxul-unstable)/unstable
133 +
134 +# Fallback to Hard-coded
135 +else
136 + # Include dirs
137 + nss_includes = -I$(sdkdir)/include/nss
138 + nspr_includes = -I$(sdkdir)/include/nspr
139 + libxul_includes = -I$(sdkdir)/include \
140 + -I$(sdkdir)/include/system_wrappers \
141 + -I$(sdkdir)/include/xpcom \
142 + -I$(sdkdir)/include/string \
143 + -I$(sdkdir)/include/pipnss \
144 + -I$(sdkdir)/sdk/include
145 +
146 + # Library dirs
147 + libxul_libdirs = $(sdkdir)/lib $(sdkdir)/bin
148 + nss_libdirs = $(libxul_libdirs)
149 + nspr_libdirs = $(libxul_libdirs)
150 +
151 + # Libs
152 + nss_libs = ssl3 smime3 nss3 nssutil3
153 + nspr_libs = nspr4 plds4 plc4
154 + libxul_libs = xpcomglue_s
155 + ifeq ($(wince),1)
156 + libxul_libs = $(libxul_libs) xpcom
157 + else
158 + libxul_libs = $(libxul_libs) xpcomglue
159 + endif
160 +
161 + ifeq ($(os), linux)
162 + libxul_libs = $(libxul_libs) xpcom_core
163 + endif
164 +
165 + idl_dir = $(sdkdir)/idl
166 +endif
167 +
168 +headers = $(nss_includes) \
169 + $(nspr_includes) \
170 + $(libxul_includes)
171
172 # libraries
173 -libdirs := $(sdkdir)/lib $(sdkdir)/bin
174 -ifeq ($(wince),1)
175 -libs := xpcomglue_s xpcom nspr4 \
176 - crmf smime3 ssl3 nss3 nssutil3 \
177 - plds4 plc4
178 -else
179 -libs := xpcomglue xpcomglue_s nspr4 \
180 - crmf smime3 ssl3 nss3 nssutil3 \
181 - plds4 plc4
182 -endif
183 +libdirs = $(nss_libdirs) \
184 + $(nspr_libdirs) \
185 + $(libxul_libdirs)
186
187 -ifeq ($(os), Linux)
188 - libs := xpcom_core $(libs)
189 -endif
190 +libs = $(nss_libs) \
191 + $(nspr_libs) \
192 + $(libxul_libs)
193
194 # compiler and Linker Flags
195
196 @@ -328,10 +391,10 @@
197
198 # rules to build the c headers and .xpt from idl
199 $(idl_headers): $(idl)
200 - $(xpidl) -m header -I$(sdkdir)/idl $(@:.h=.idl)
201 + $(xpidl) -m header -I$(idl_dir) $(@:.h=.idl)
202
203 $(idl_typelib): $(idl)
204 - $(xpidl) -m typelib -I$(sdkdir)/idl $(@:.xpt=.idl)
205 + $(xpidl) -m typelib -I$(idl_dir) $(@:.xpt=.idl)
206
207 # build and link rules
208 ifeq ($(os), Darwin)