Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
Date: Wed, 18 May 2011 15:36:38
Message-Id: 18044249ac78e67377192f70e7b46bd86255ac22.nirbheek@gentoo
1 commit: 18044249ac78e67377192f70e7b46bd86255ac22
2 Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 17 22:22:40 2011 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Tue May 17 22:22:40 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=18044249
7
8 dev-libs/gjs: js-config patch was merged upstream
9
10 https://bugzilla.gnome.org/show_bug.cgi?id=644971
11
12 ---
13 dev-libs/gjs/files/gjs-drop-js-config.patch | 183 ---------------------------
14 dev-libs/gjs/gjs-9999.ebuild | 3 -
15 2 files changed, 0 insertions(+), 186 deletions(-)
16
17 diff --git a/dev-libs/gjs/files/gjs-drop-js-config.patch b/dev-libs/gjs/files/gjs-drop-js-config.patch
18 deleted file mode 100644
19 index 0a8609a..0000000
20 --- a/dev-libs/gjs/files/gjs-drop-js-config.patch
21 +++ /dev/null
22 @@ -1,183 +0,0 @@
23 -From 4de63456b411ae2b16cdb813cf021e3f2e19e5f3 Mon Sep 17 00:00:00 2001
24 -From: Nirbheek Chauhan <nirbheek@g.o>
25 -Date: Thu, 17 Mar 2011 05:07:06 +0530
26 -Subject: [PATCH] build: drop js-config support and xulrunner-1.8/1.9 cruft
27 -
28 -In addition, add JS_LIBS to gjs_console_LDADD so that the
29 -mozjs library in libdir from pkg-config is picked up first instead of
30 -the library in /usr/lib which may be from a system install of spidermonkey
31 ----
32 - Makefile.am | 1 +
33 - configure.ac | 114 +++++++---------------------------------------
34 - gjs-internals-1.0.pc.in | 2 +-
35 - 3 files changed, 20 insertions(+), 97 deletions(-)
36 -
37 -diff --git a/Makefile.am b/Makefile.am
38 -index b4814d6..3363ff5 100644
39 ---- a/Makefile.am
40 -+++ b/Makefile.am
41 -@@ -121,6 +121,7 @@ gjs_console_CFLAGS = \
42 - $(AM_CFLAGS) \
43 - $(GOBJECT_CFLAGS)
44 - gjs_console_LDADD = \
45 -+ $(JS_LIBS) \
46 - $(GOBJECT_LIBS) \
47 - libgjs.la
48 - gjs_console_LDFLAGS = -R $(FIREFOX_JS_LIBDIR) -rdynamic
49 -diff --git a/configure.ac b/configure.ac
50 -index 715f2c3..1903cc6 100644
51 ---- a/configure.ac
52 -+++ b/configure.ac
53 -@@ -91,54 +91,26 @@ m4_define(gobject_required_version, 2.18.0)
54 - AC_CHECK_HEADERS([malloc.h])
55 - AC_CHECK_FUNCS(mallinfo)
56 -
57 --# Look for Spidermonkey. If js-config exists, use that;
58 --# otherwise we try some pkgconfig files from various distributions.
59 -+## mozilla-js: Gecko 1.9 and 2.0, all distributions
60 -+PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],)
61 -+PKG_CHECK_MODULES(JS, $JS_PACKAGE)
62 -
63 --AC_ARG_VAR([JS_CONFIG], [The js-config program to use])
64 --if test "$ac_cv_env_JS_CONFIG_set" != "set"; then
65 -- AC_PATH_PROG([JS_CONFIG], [js-config], [])
66 --fi
67 --
68 --if test -n "$JS_CONFIG"; then
69 -- JS_CFLAGS="$($JS_CONFIG --cflags)"
70 -- JS_LIBS="$($JS_CONFIG --libs)"
71 -- FIREFOX_JS_LIBDIR="$($JS_CONFIG --libdir)"
72 -- JS_PACKAGE=
73 -+## some flavors of Firefox .pc only set sdkdir, not libdir
74 -+FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
75 -+FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
76 -
77 -- # js-config gives almost usable CFLAGS, we must define one of XP_BEOS,
78 -- # XP_OS2, XP_WIN or XP_UNIX
79 -- JS_CFLAGS="$JS_CFLAGS -DXP_UNIX"
80 --else
81 -- ## spidermonkey .pc file name varies across distributions and Gecko version
82 -- ##
83 -- ## mozilla-js: Gecko 1.9, all distributions
84 -- ## xulrunner-js: Gecko 1.8 (and earlier?) Debian/Ubuntu
85 -- ## firefox-js: ???
86 -- ##
87 -- ## Checking for mozilla-js first will hopefully get us the newest version
88 -- ## of spidermonkey.
89 -- PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],
90 -- [PKG_CHECK_EXISTS([xulrunner-js], [JS_PACKAGE=xulrunner-js], [JS_PACKAGE=firefox-js])])
91 --
92 -- PKG_CHECK_MODULES(JS, $JS_PACKAGE)
93 --
94 -- ## some flavors of Firefox .pc only set sdkdir, not libdir
95 -- FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
96 -- FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
97 --
98 -- ## Ubuntu does not set libdir in mozilla-js.pc
99 -- if test x"$FIREFOX_JS_LIBDIR" = x ; then
100 -- ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
101 -- ## libdir we want the runtime location on the target system,
102 -- ## so can't use -devel.
103 -- ## The library is in the non-devel directory also.
104 -- ## Don't ask me why it's in two places.
105 -- FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
106 --
107 -- if ! test -d "$FIREFOX_JS_LIBDIR" ; then
108 -- FIREFOX_JS_LIBDIR=
109 -- fi
110 -- fi
111 -+## Ubuntu does not set libdir in mozilla-js.pc
112 -+if test x"$FIREFOX_JS_LIBDIR" = x ; then
113 -+ ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
114 -+ ## libdir we want the runtime location on the target system,
115 -+ ## so can't use -devel.
116 -+ ## The library is in the non-devel directory also.
117 -+ ## Don't ask me why it's in two places.
118 -+ FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
119 -+
120 -+ if ! test -d "$FIREFOX_JS_LIBDIR" ; then
121 -+ FIREFOX_JS_LIBDIR=
122 -+ fi
123 - fi
124 -
125 - if test x"$FIREFOX_JS_LIBDIR" = x ; then
126 -@@ -179,35 +151,6 @@ else
127 - AC_MSG_RESULT([no])
128 - fi
129 -
130 --## workaround for Ubuntu Hardy bug where mozilla-js.pc gives CFLAGS
131 --## -I.../stable while jsapi.h is in .../unstable
132 --AC_MSG_CHECKING([if SpiderMonkey needs extra compiler flags])
133 --save_CFLAGS="$CFLAGS"
134 --CFLAGS="$CFLAGS $JS_CFLAGS"
135 --AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
136 -- [js_extra_cflags_needed=no],
137 -- [js_extra_cflags_needed=yes])
138 --CFLAGS="$save_CFLAGS"
139 --AC_MSG_RESULT([$js_extra_cflags_needed])
140 --
141 --JS_EXTRA_CFLAGS=
142 --if test "$js_extra_cflags_needed" = yes; then
143 -- try_cflags="-I`$PKG_CONFIG --variable=includedir $JS_PACKAGE`/unstable"
144 -- AC_MSG_CHECKING([if $try_cflags works])
145 -- save_CFLAGS="$CFLAGS"
146 -- CFLAGS="$CFLAGS $JS_CFLAGS $try_cflags"
147 -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
148 -- [AC_MSG_RESULT([yes])
149 -- JS_EXTRA_CFLAGS="$try_cflags"],
150 -- [AC_MSG_RESULT([no])])
151 -- CFLAGS="$save_CFLAGS"
152 --
153 -- if test x"$JS_EXTRA_CFLAGS" = x; then
154 -- AC_MSG_ERROR([Unable to determine extra compiler flags needed])
155 -- fi
156 --fi
157 --AC_SUBST([JS_EXTRA_CFLAGS])
158 --
159 - AC_MSG_CHECKING([whether JSLocaleToUnicode takes a const char*])
160 - save_CFLAGS="$CFLAGS"
161 - CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
162 -@@ -258,27 +201,6 @@ PKG_CHECK_MODULES([GJSTESTS], [$gjstests_packages])
163 - GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
164 - AC_SUBST(GI_DATADIR)
165 -
166 --if test x"$JS_PACKAGE" = x; then
167 -- # if JS_PACKAGE is undefined, pkg-config modules don't include
168 -- # SpiderMonkey and we need to deal with it ourselves
169 -- GJS_CFLAGS="$GJS_CFLAGS $JS_CFLAGS"
170 -- GJS_LIBS="$GJS_LIBS $JS_LIBS"
171 -- GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_CFLAGS"
172 -- GJS_GI_LIBS="$GJS_GI_LIBS $JS_LIBS"
173 -- GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_CFLAGS"
174 -- GJS_CAIRO_LIBS="$GJS_CAIRO_LIBS $JS_LIBS"
175 -- GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_CFLAGS"
176 -- GJS_DBUS_LIBS="$GJS_DBUS_LIBS $JS_LIBS"
177 -- GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_CFLAGS"
178 -- GJSTESTS_LIBS="$GJSTEST_LIBS $JS_LIBS"
179 --fi
180 --
181 --GJS_CFLAGS="$GJS_CFLAGS $JS_EXTRA_CFLAGS"
182 --GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_EXTRA_CFLAGS"
183 --GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_EXTRA_CFLAGS"
184 --GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_EXTRA_CFLAGS"
185 --GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_EXTRA_CFLAGS"
186 --
187 - # readline
188 - LIBS_no_readline=$LIBS
189 -
190 -diff --git a/gjs-internals-1.0.pc.in b/gjs-internals-1.0.pc.in
191 -index 701dd42..e4517cb 100644
192 ---- a/gjs-internals-1.0.pc.in
193 -+++ b/gjs-internals-1.0.pc.in
194 -@@ -10,7 +10,7 @@ jsdir=@gjsjsdir@
195 - jsnativedir=@gjsnativedir@
196 - mozjslibdir=@FIREFOX_JS_LIBDIR@
197 -
198 --Cflags: -I${includedir}/gjs-1.0 @JS_EXTRA_CFLAGS@
199 -+Cflags: -I${includedir}/gjs-1.0
200 - Libs: -Wl,--rpath=${mozjslibdir}
201 - Requires: gjs-1.0 gobject-introspection-1.0 @JS_PACKAGE@
202 -
203 ---
204 -1.7.3.4
205 -
206
207 diff --git a/dev-libs/gjs/gjs-9999.ebuild b/dev-libs/gjs/gjs-9999.ebuild
208 index 33e99d4..184e21c 100644
209 --- a/dev-libs/gjs/gjs-9999.ebuild
210 +++ b/dev-libs/gjs/gjs-9999.ebuild
211 @@ -49,9 +49,6 @@ src_prepare() {
212 --disable-dtrace
213 --disable-coverage"
214
215 - # https://bugs.gentoo.org/353941
216 - epatch "${FILESDIR}/${PN}-drop-js-config.patch"
217 -
218 [[ ${PV} != 9999 ]] && eautoreconf
219
220 gnome2_src_prepare