public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
@ 2011-03-17  3:49 Nirbheek Chauhan
  0 siblings, 0 replies; 7+ messages in thread
From: Nirbheek Chauhan @ 2011-03-17  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     f9d267a212328149be1e2894bfbce02dbe27d9b1
Author:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 02:39:41 2011 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Thu Mar 17 02:42:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=f9d267a2

dev-libs/gjs: fix bug 353941

---
 dev-libs/gjs/files/gjs-drop-js-config.patch |  183 +++++++++++++++++++++++++++
 dev-libs/gjs/gjs-0.7.13.ebuild              |   33 +++---
 dev-libs/gjs/gjs-9999.ebuild                |   33 +++---
 3 files changed, 213 insertions(+), 36 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-drop-js-config.patch b/dev-libs/gjs/files/gjs-drop-js-config.patch
new file mode 100644
index 0000000..0a8609a
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-drop-js-config.patch
@@ -0,0 +1,183 @@
+From 4de63456b411ae2b16cdb813cf021e3f2e19e5f3 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@gentoo.org>
+Date: Thu, 17 Mar 2011 05:07:06 +0530
+Subject: [PATCH] build: drop js-config support and xulrunner-1.8/1.9 cruft
+
+In addition, add JS_LIBS to gjs_console_LDADD so that the
+mozjs library in libdir from pkg-config is picked up first instead of
+the library in /usr/lib which may be from a system install of spidermonkey
+---
+ Makefile.am             |    1 +
+ configure.ac            |  114 +++++++---------------------------------------
+ gjs-internals-1.0.pc.in |    2 +-
+ 3 files changed, 20 insertions(+), 97 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b4814d6..3363ff5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -121,6 +121,7 @@ gjs_console_CFLAGS = 		\
+ 	$(AM_CFLAGS)		\
+         $(GOBJECT_CFLAGS)
+ gjs_console_LDADD =		\
++         $(JS_LIBS)		\
+          $(GOBJECT_LIBS)           \
+          libgjs.la
+ gjs_console_LDFLAGS = -R $(FIREFOX_JS_LIBDIR) -rdynamic
+diff --git a/configure.ac b/configure.ac
+index 715f2c3..1903cc6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -91,54 +91,26 @@ m4_define(gobject_required_version, 2.18.0)
+ AC_CHECK_HEADERS([malloc.h])
+ AC_CHECK_FUNCS(mallinfo)
+ 
+-# Look for Spidermonkey. If js-config exists, use that;
+-# otherwise we try some pkgconfig files from various distributions.
++## mozilla-js: Gecko 1.9 and 2.0, all distributions
++PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],)
++PKG_CHECK_MODULES(JS, $JS_PACKAGE)
+ 
+-AC_ARG_VAR([JS_CONFIG], [The js-config program to use])
+-if test "$ac_cv_env_JS_CONFIG_set" != "set"; then
+-    AC_PATH_PROG([JS_CONFIG], [js-config], [])
+-fi
+-
+-if test -n "$JS_CONFIG"; then
+-    JS_CFLAGS="$($JS_CONFIG --cflags)"
+-    JS_LIBS="$($JS_CONFIG --libs)"
+-    FIREFOX_JS_LIBDIR="$($JS_CONFIG --libdir)"
+-    JS_PACKAGE=
++## some flavors of Firefox .pc only set sdkdir, not libdir
++FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
++FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
+ 
+-    # js-config gives almost usable CFLAGS, we must define one of XP_BEOS,
+-    # XP_OS2, XP_WIN or XP_UNIX
+-    JS_CFLAGS="$JS_CFLAGS -DXP_UNIX"
+-else
+-    ## spidermonkey .pc file name varies across distributions and Gecko version
+-    ##
+-    ## mozilla-js: Gecko 1.9, all distributions
+-    ## xulrunner-js: Gecko 1.8 (and earlier?) Debian/Ubuntu
+-    ## firefox-js: ???
+-    ##
+-    ## Checking for mozilla-js first will hopefully get us the newest version
+-    ## of spidermonkey.
+-    PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],
+-                     [PKG_CHECK_EXISTS([xulrunner-js], [JS_PACKAGE=xulrunner-js], [JS_PACKAGE=firefox-js])])
+-
+-    PKG_CHECK_MODULES(JS, $JS_PACKAGE)
+-
+-    ## some flavors of Firefox .pc only set sdkdir, not libdir
+-    FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
+-    FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
+-
+-    ## Ubuntu does not set libdir in mozilla-js.pc
+-    if test x"$FIREFOX_JS_LIBDIR" = x ; then
+-       ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
+-       ## libdir we want the runtime location on the target system,
+-       ## so can't use -devel.
+-       ## The library is in the non-devel directory also.
+-       ## Don't ask me why it's in two places.
+-       FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
+-
+-       if ! test -d "$FIREFOX_JS_LIBDIR" ; then
+-           FIREFOX_JS_LIBDIR=
+-       fi
+-    fi
++## Ubuntu does not set libdir in mozilla-js.pc
++if test x"$FIREFOX_JS_LIBDIR" = x ; then
++   ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
++   ## libdir we want the runtime location on the target system,
++   ## so can't use -devel.
++   ## The library is in the non-devel directory also.
++   ## Don't ask me why it's in two places.
++   FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
++
++   if ! test -d "$FIREFOX_JS_LIBDIR" ; then
++       FIREFOX_JS_LIBDIR=
++   fi
+ fi
+ 
+ if test x"$FIREFOX_JS_LIBDIR" = x ; then
+@@ -179,35 +151,6 @@ else
+   AC_MSG_RESULT([no])
+ fi
+ 
+-## workaround for Ubuntu Hardy bug where mozilla-js.pc gives CFLAGS
+-## -I.../stable while jsapi.h is in .../unstable
+-AC_MSG_CHECKING([if SpiderMonkey needs extra compiler flags])
+-save_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS $JS_CFLAGS"
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
+-    [js_extra_cflags_needed=no],
+-    [js_extra_cflags_needed=yes])
+-CFLAGS="$save_CFLAGS"
+-AC_MSG_RESULT([$js_extra_cflags_needed])
+-
+-JS_EXTRA_CFLAGS=
+-if test "$js_extra_cflags_needed" = yes; then
+-    try_cflags="-I`$PKG_CONFIG --variable=includedir $JS_PACKAGE`/unstable"
+-    AC_MSG_CHECKING([if $try_cflags works])
+-    save_CFLAGS="$CFLAGS"
+-    CFLAGS="$CFLAGS $JS_CFLAGS $try_cflags"
+-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
+-        [AC_MSG_RESULT([yes])
+-         JS_EXTRA_CFLAGS="$try_cflags"],
+-        [AC_MSG_RESULT([no])])
+-    CFLAGS="$save_CFLAGS"
+-
+-    if test x"$JS_EXTRA_CFLAGS" = x; then
+-        AC_MSG_ERROR([Unable to determine extra compiler flags needed])
+-    fi
+-fi
+-AC_SUBST([JS_EXTRA_CFLAGS])
+-
+ AC_MSG_CHECKING([whether JSLocaleToUnicode takes a const char*])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
+@@ -258,27 +201,6 @@ PKG_CHECK_MODULES([GJSTESTS], [$gjstests_packages])
+ GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+ AC_SUBST(GI_DATADIR)
+ 
+-if test x"$JS_PACKAGE" = x; then
+-    # if JS_PACKAGE is undefined, pkg-config modules don't include
+-    # SpiderMonkey and we need to deal with it ourselves
+-    GJS_CFLAGS="$GJS_CFLAGS $JS_CFLAGS"
+-    GJS_LIBS="$GJS_LIBS $JS_LIBS"
+-    GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_CFLAGS"
+-    GJS_GI_LIBS="$GJS_GI_LIBS $JS_LIBS"
+-    GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_CFLAGS"
+-    GJS_CAIRO_LIBS="$GJS_CAIRO_LIBS $JS_LIBS"
+-    GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_CFLAGS"
+-    GJS_DBUS_LIBS="$GJS_DBUS_LIBS $JS_LIBS"
+-    GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_CFLAGS"
+-    GJSTESTS_LIBS="$GJSTEST_LIBS $JS_LIBS"
+-fi
+-
+-GJS_CFLAGS="$GJS_CFLAGS $JS_EXTRA_CFLAGS"
+-GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_EXTRA_CFLAGS"
+-GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_EXTRA_CFLAGS"
+-GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_EXTRA_CFLAGS"
+-GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_EXTRA_CFLAGS"
+-
+ # readline
+ LIBS_no_readline=$LIBS
+ 
+diff --git a/gjs-internals-1.0.pc.in b/gjs-internals-1.0.pc.in
+index 701dd42..e4517cb 100644
+--- a/gjs-internals-1.0.pc.in
++++ b/gjs-internals-1.0.pc.in
+@@ -10,7 +10,7 @@ jsdir=@gjsjsdir@
+ jsnativedir=@gjsnativedir@
+ mozjslibdir=@FIREFOX_JS_LIBDIR@
+ 
+-Cflags: -I${includedir}/gjs-1.0 @JS_EXTRA_CFLAGS@
++Cflags: -I${includedir}/gjs-1.0
+ Libs: -Wl,--rpath=${mozjslibdir}
+ Requires: gjs-1.0 gobject-introspection-1.0 @JS_PACKAGE@
+ 
+-- 
+1.7.3.4
+

diff --git a/dev-libs/gjs/gjs-0.7.13.ebuild b/dev-libs/gjs/gjs-0.7.13.ebuild
index 6a2e15a..530dfb5 100644
--- a/dev-libs/gjs/gjs-0.7.13.ebuild
+++ b/dev-libs/gjs/gjs-0.7.13.ebuild
@@ -7,14 +7,14 @@ GCONF_DEBUG="no"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="2"
 
-inherit gnome2 python
+inherit autotools eutils gnome2 python virtualx
 
 DESCRIPTION="Javascript bindings for GNOME"
 HOMEPAGE="http://live.gnome.org/Gjs"
 
 LICENSE="MIT MPL-1.1 LGPL-2 GPL-2"
 SLOT="0"
-IUSE="coverage examples"
+IUSE="coverage examples test"
 
 if [[ ${PV} == 9999 ]]; then
 	inherit gnome2-live
@@ -23,22 +23,20 @@ else
 	KEYWORDS="~amd64 ~x86"
 fi
 
-# || ( xulrunner spidermonkey ): configure prefers spidermonkey over xulrunner
-# Hence, having older spidermonkey installed will result in bug 353941
 RDEPEND=">=dev-libs/glib-2.18:2
 	>=dev-libs/gobject-introspection-0.10.1
 
 	dev-libs/dbus-glib
 	x11-libs/cairo
-	|| ( >=net-libs/xulrunner-1.9.2:1.9
-		 >=dev-lang/spidermonkey-1.9.2 )
-	!<dev-lang/spidermonkey-1.9.2"
+	>=net-libs/xulrunner-1.9.2:1.9"
 DEPEND="${RDEPEND}
 	sys-devel/gettext
 	>=dev-util/pkgconfig-0.9
 	coverage? (
 		sys-devel/gcc
-		dev-util/lcov )"
+		dev-util/lcov )
+	test? ( !dev-lang/spidermonkey )"
+# HACK HACK: gjs-tests picks up /usr/lib/libmozjs.so with spidermonkey installed
 
 src_prepare() {
 	# AUTHORS, ChangeLog are empty
@@ -46,21 +44,20 @@ src_prepare() {
 	G2CONF="${G2CONF}
 		$(use_enable coverage)"
 
-	# If spidermonkey & xulrunner are installed configure prefers spidermonkey.
-	# This will break gnome-shell if the user removes spidermonkey.
-	# Mozilla wants to move to a split spidermonkey, so this problem should
-	# solve itself in the future. For now, we add an ewarn.
-	if has_version dev-lang/spidermonkey && has_version net-libs/xulrunner; then
-		ewarn "You have both spidermonkey and xulrunner installed,"
-		ewarn "hence gnome-shell will be linked with spidermonkey."
-		ewarn "If you remove spidermonkey, you will need to recompile"
-		ewarn "gnome-shell so that it links with xulrunner."
-	fi
+	# https://bugs.gentoo.org/353941
+	epatch "${FILESDIR}/${PN}-drop-js-config.patch"
+
+	[[ ${PV} != 9999 ]] && eautoreconf
 
 	gnome2_src_prepare
 	python_convert_shebangs 2 "${S}"/scripts/make-tests
 }
 
+src_test() {
+	# Tests need dbus
+	Xemake check || die
+}
+
 src_install() {
 	# installation sometimes fails in parallel
 	gnome2_src_install -j1

diff --git a/dev-libs/gjs/gjs-9999.ebuild b/dev-libs/gjs/gjs-9999.ebuild
index 6a2e15a..530dfb5 100644
--- a/dev-libs/gjs/gjs-9999.ebuild
+++ b/dev-libs/gjs/gjs-9999.ebuild
@@ -7,14 +7,14 @@ GCONF_DEBUG="no"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="2"
 
-inherit gnome2 python
+inherit autotools eutils gnome2 python virtualx
 
 DESCRIPTION="Javascript bindings for GNOME"
 HOMEPAGE="http://live.gnome.org/Gjs"
 
 LICENSE="MIT MPL-1.1 LGPL-2 GPL-2"
 SLOT="0"
-IUSE="coverage examples"
+IUSE="coverage examples test"
 
 if [[ ${PV} == 9999 ]]; then
 	inherit gnome2-live
@@ -23,22 +23,20 @@ else
 	KEYWORDS="~amd64 ~x86"
 fi
 
-# || ( xulrunner spidermonkey ): configure prefers spidermonkey over xulrunner
-# Hence, having older spidermonkey installed will result in bug 353941
 RDEPEND=">=dev-libs/glib-2.18:2
 	>=dev-libs/gobject-introspection-0.10.1
 
 	dev-libs/dbus-glib
 	x11-libs/cairo
-	|| ( >=net-libs/xulrunner-1.9.2:1.9
-		 >=dev-lang/spidermonkey-1.9.2 )
-	!<dev-lang/spidermonkey-1.9.2"
+	>=net-libs/xulrunner-1.9.2:1.9"
 DEPEND="${RDEPEND}
 	sys-devel/gettext
 	>=dev-util/pkgconfig-0.9
 	coverage? (
 		sys-devel/gcc
-		dev-util/lcov )"
+		dev-util/lcov )
+	test? ( !dev-lang/spidermonkey )"
+# HACK HACK: gjs-tests picks up /usr/lib/libmozjs.so with spidermonkey installed
 
 src_prepare() {
 	# AUTHORS, ChangeLog are empty
@@ -46,21 +44,20 @@ src_prepare() {
 	G2CONF="${G2CONF}
 		$(use_enable coverage)"
 
-	# If spidermonkey & xulrunner are installed configure prefers spidermonkey.
-	# This will break gnome-shell if the user removes spidermonkey.
-	# Mozilla wants to move to a split spidermonkey, so this problem should
-	# solve itself in the future. For now, we add an ewarn.
-	if has_version dev-lang/spidermonkey && has_version net-libs/xulrunner; then
-		ewarn "You have both spidermonkey and xulrunner installed,"
-		ewarn "hence gnome-shell will be linked with spidermonkey."
-		ewarn "If you remove spidermonkey, you will need to recompile"
-		ewarn "gnome-shell so that it links with xulrunner."
-	fi
+	# https://bugs.gentoo.org/353941
+	epatch "${FILESDIR}/${PN}-drop-js-config.patch"
+
+	[[ ${PV} != 9999 ]] && eautoreconf
 
 	gnome2_src_prepare
 	python_convert_shebangs 2 "${S}"/scripts/make-tests
 }
 
+src_test() {
+	# Tests need dbus
+	Xemake check || die
+}
+
 src_install() {
 	# installation sometimes fails in parallel
 	gnome2_src_install -j1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
@ 2011-05-18 15:36 Nirbheek Chauhan
  0 siblings, 0 replies; 7+ messages in thread
From: Nirbheek Chauhan @ 2011-05-18 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     18044249ac78e67377192f70e7b46bd86255ac22
Author:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Tue May 17 22:22:40 2011 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Tue May 17 22:22:40 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=18044249

dev-libs/gjs: js-config patch was merged upstream

https://bugzilla.gnome.org/show_bug.cgi?id=644971

---
 dev-libs/gjs/files/gjs-drop-js-config.patch |  183 ---------------------------
 dev-libs/gjs/gjs-9999.ebuild                |    3 -
 2 files changed, 0 insertions(+), 186 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-drop-js-config.patch b/dev-libs/gjs/files/gjs-drop-js-config.patch
deleted file mode 100644
index 0a8609a..0000000
--- a/dev-libs/gjs/files/gjs-drop-js-config.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From 4de63456b411ae2b16cdb813cf021e3f2e19e5f3 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@gentoo.org>
-Date: Thu, 17 Mar 2011 05:07:06 +0530
-Subject: [PATCH] build: drop js-config support and xulrunner-1.8/1.9 cruft
-
-In addition, add JS_LIBS to gjs_console_LDADD so that the
-mozjs library in libdir from pkg-config is picked up first instead of
-the library in /usr/lib which may be from a system install of spidermonkey
----
- Makefile.am             |    1 +
- configure.ac            |  114 +++++++---------------------------------------
- gjs-internals-1.0.pc.in |    2 +-
- 3 files changed, 20 insertions(+), 97 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index b4814d6..3363ff5 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -121,6 +121,7 @@ gjs_console_CFLAGS = 		\
- 	$(AM_CFLAGS)		\
-         $(GOBJECT_CFLAGS)
- gjs_console_LDADD =		\
-+         $(JS_LIBS)		\
-          $(GOBJECT_LIBS)           \
-          libgjs.la
- gjs_console_LDFLAGS = -R $(FIREFOX_JS_LIBDIR) -rdynamic
-diff --git a/configure.ac b/configure.ac
-index 715f2c3..1903cc6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -91,54 +91,26 @@ m4_define(gobject_required_version, 2.18.0)
- AC_CHECK_HEADERS([malloc.h])
- AC_CHECK_FUNCS(mallinfo)
- 
--# Look for Spidermonkey. If js-config exists, use that;
--# otherwise we try some pkgconfig files from various distributions.
-+## mozilla-js: Gecko 1.9 and 2.0, all distributions
-+PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],)
-+PKG_CHECK_MODULES(JS, $JS_PACKAGE)
- 
--AC_ARG_VAR([JS_CONFIG], [The js-config program to use])
--if test "$ac_cv_env_JS_CONFIG_set" != "set"; then
--    AC_PATH_PROG([JS_CONFIG], [js-config], [])
--fi
--
--if test -n "$JS_CONFIG"; then
--    JS_CFLAGS="$($JS_CONFIG --cflags)"
--    JS_LIBS="$($JS_CONFIG --libs)"
--    FIREFOX_JS_LIBDIR="$($JS_CONFIG --libdir)"
--    JS_PACKAGE=
-+## some flavors of Firefox .pc only set sdkdir, not libdir
-+FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
-+FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
- 
--    # js-config gives almost usable CFLAGS, we must define one of XP_BEOS,
--    # XP_OS2, XP_WIN or XP_UNIX
--    JS_CFLAGS="$JS_CFLAGS -DXP_UNIX"
--else
--    ## spidermonkey .pc file name varies across distributions and Gecko version
--    ##
--    ## mozilla-js: Gecko 1.9, all distributions
--    ## xulrunner-js: Gecko 1.8 (and earlier?) Debian/Ubuntu
--    ## firefox-js: ???
--    ##
--    ## Checking for mozilla-js first will hopefully get us the newest version
--    ## of spidermonkey.
--    PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],
--                     [PKG_CHECK_EXISTS([xulrunner-js], [JS_PACKAGE=xulrunner-js], [JS_PACKAGE=firefox-js])])
--
--    PKG_CHECK_MODULES(JS, $JS_PACKAGE)
--
--    ## some flavors of Firefox .pc only set sdkdir, not libdir
--    FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
--    FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
--
--    ## Ubuntu does not set libdir in mozilla-js.pc
--    if test x"$FIREFOX_JS_LIBDIR" = x ; then
--       ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
--       ## libdir we want the runtime location on the target system,
--       ## so can't use -devel.
--       ## The library is in the non-devel directory also.
--       ## Don't ask me why it's in two places.
--       FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
--
--       if ! test -d "$FIREFOX_JS_LIBDIR" ; then
--           FIREFOX_JS_LIBDIR=
--       fi
--    fi
-+## Ubuntu does not set libdir in mozilla-js.pc
-+if test x"$FIREFOX_JS_LIBDIR" = x ; then
-+   ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
-+   ## libdir we want the runtime location on the target system,
-+   ## so can't use -devel.
-+   ## The library is in the non-devel directory also.
-+   ## Don't ask me why it's in two places.
-+   FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
-+
-+   if ! test -d "$FIREFOX_JS_LIBDIR" ; then
-+       FIREFOX_JS_LIBDIR=
-+   fi
- fi
- 
- if test x"$FIREFOX_JS_LIBDIR" = x ; then
-@@ -179,35 +151,6 @@ else
-   AC_MSG_RESULT([no])
- fi
- 
--## workaround for Ubuntu Hardy bug where mozilla-js.pc gives CFLAGS
--## -I.../stable while jsapi.h is in .../unstable
--AC_MSG_CHECKING([if SpiderMonkey needs extra compiler flags])
--save_CFLAGS="$CFLAGS"
--CFLAGS="$CFLAGS $JS_CFLAGS"
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
--    [js_extra_cflags_needed=no],
--    [js_extra_cflags_needed=yes])
--CFLAGS="$save_CFLAGS"
--AC_MSG_RESULT([$js_extra_cflags_needed])
--
--JS_EXTRA_CFLAGS=
--if test "$js_extra_cflags_needed" = yes; then
--    try_cflags="-I`$PKG_CONFIG --variable=includedir $JS_PACKAGE`/unstable"
--    AC_MSG_CHECKING([if $try_cflags works])
--    save_CFLAGS="$CFLAGS"
--    CFLAGS="$CFLAGS $JS_CFLAGS $try_cflags"
--    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
--        [AC_MSG_RESULT([yes])
--         JS_EXTRA_CFLAGS="$try_cflags"],
--        [AC_MSG_RESULT([no])])
--    CFLAGS="$save_CFLAGS"
--
--    if test x"$JS_EXTRA_CFLAGS" = x; then
--        AC_MSG_ERROR([Unable to determine extra compiler flags needed])
--    fi
--fi
--AC_SUBST([JS_EXTRA_CFLAGS])
--
- AC_MSG_CHECKING([whether JSLocaleToUnicode takes a const char*])
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
-@@ -258,27 +201,6 @@ PKG_CHECK_MODULES([GJSTESTS], [$gjstests_packages])
- GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
- AC_SUBST(GI_DATADIR)
- 
--if test x"$JS_PACKAGE" = x; then
--    # if JS_PACKAGE is undefined, pkg-config modules don't include
--    # SpiderMonkey and we need to deal with it ourselves
--    GJS_CFLAGS="$GJS_CFLAGS $JS_CFLAGS"
--    GJS_LIBS="$GJS_LIBS $JS_LIBS"
--    GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_CFLAGS"
--    GJS_GI_LIBS="$GJS_GI_LIBS $JS_LIBS"
--    GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_CFLAGS"
--    GJS_CAIRO_LIBS="$GJS_CAIRO_LIBS $JS_LIBS"
--    GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_CFLAGS"
--    GJS_DBUS_LIBS="$GJS_DBUS_LIBS $JS_LIBS"
--    GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_CFLAGS"
--    GJSTESTS_LIBS="$GJSTEST_LIBS $JS_LIBS"
--fi
--
--GJS_CFLAGS="$GJS_CFLAGS $JS_EXTRA_CFLAGS"
--GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_EXTRA_CFLAGS"
--GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_EXTRA_CFLAGS"
--GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_EXTRA_CFLAGS"
--GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_EXTRA_CFLAGS"
--
- # readline
- LIBS_no_readline=$LIBS
- 
-diff --git a/gjs-internals-1.0.pc.in b/gjs-internals-1.0.pc.in
-index 701dd42..e4517cb 100644
---- a/gjs-internals-1.0.pc.in
-+++ b/gjs-internals-1.0.pc.in
-@@ -10,7 +10,7 @@ jsdir=@gjsjsdir@
- jsnativedir=@gjsnativedir@
- mozjslibdir=@FIREFOX_JS_LIBDIR@
- 
--Cflags: -I${includedir}/gjs-1.0 @JS_EXTRA_CFLAGS@
-+Cflags: -I${includedir}/gjs-1.0
- Libs: -Wl,--rpath=${mozjslibdir}
- Requires: gjs-1.0 gobject-introspection-1.0 @JS_PACKAGE@
- 
--- 
-1.7.3.4
-

diff --git a/dev-libs/gjs/gjs-9999.ebuild b/dev-libs/gjs/gjs-9999.ebuild
index 33e99d4..184e21c 100644
--- a/dev-libs/gjs/gjs-9999.ebuild
+++ b/dev-libs/gjs/gjs-9999.ebuild
@@ -49,9 +49,6 @@ src_prepare() {
 		--disable-dtrace
 		--disable-coverage"
 
-	# https://bugs.gentoo.org/353941
-	epatch "${FILESDIR}/${PN}-drop-js-config.patch"
-
 	[[ ${PV} != 9999 ]] && eautoreconf
 
 	gnome2_src_prepare



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
@ 2011-07-30  4:21 Alexandre Restovtsev
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Restovtsev @ 2011-07-30  4:21 UTC (permalink / raw
  To: gentoo-commits

commit:     ef78f21676c04c5d86b962071eba1f84b0a30883
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sat Jul 30 01:04:32 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Sat Jul 30 04:13:45 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=ef78f216

dev-libs/gjs: add gjs-0.7.14-r1 with optional spidermonkey support

Port the changes from gnome-next branch to enable gjs to build with
either xulrunner-2 or spidermonkey-1.8.5. Required creating a patch
that backports the relevant improvements that exist in upstream git
master's configure. Builds and passes tests with either choice of
javascript engine.

Note: the commits taken from upstream git keep on rewriting the same
region of configure script, removing or altering the effect of previous
changes. Therefore, the patch is provided in squashed form, both to use
less space, and to make it much easier for an outsider to see what it
has actually changed in the 0.7.14 code.

---
 dev-libs/gjs/files/gjs-0.7.14-sanity.patch |  485 ++++++++++++++++++++++++++++
 dev-libs/gjs/gjs-0.7.14-r1.ebuild          |   77 +++++
 2 files changed, 562 insertions(+), 0 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-0.7.14-sanity.patch b/dev-libs/gjs/files/gjs-0.7.14-sanity.patch
new file mode 100644
index 0000000..7b37d64
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-0.7.14-sanity.patch
@@ -0,0 +1,485 @@
+This is a combination of 9 squashed commits (squashed to save space, since
+the patches keep on modifying the same region of code) and a bit of manual
+backporting work, bringing sanity wrt xulrunner and spidermonkey handling to
+gjs-0.7.14's configure, and allowing gjs-0.7.14 to correctly build against
+spidermonkey-1.8.5.
+
+The patches squashed (along with their commit messages) are the following:
+
+1. Marc-Antoine Perennou <Marc-Antoine@Perennou.com>  2011-04-01 14:55:43
+Conditionally adapt to JS_CLASS_TRACE removal
+
+Upstream removed it in http://hg.mozilla.org/mozilla-central/rev/a7784d11c59b
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646471
+
+2. Marc-Antoine Perennou <Marc-Antoine@Perennou.com>  2011-04-01 15:04:57
+Conditionally adapt to JS_DestroyScript removal
+
+Upstream changed the behaviour of several things about JSScripts in
+http://hg.mozilla.org/mozilla-central/rev/c919a7271ac1
+
+We now have to use a JSObject instead of a JSScript in certain circumstances,
+and we no longer have to call JS_DestroyScript which no longer exists
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646471
+
+3. Marc-Antoine Perennou <Marc-Antoine@Perennou.com>  2011-04-28 19:01:03
+conditonally adapt to JS_BufferIsCompilableUnit changes
+
+Upstream added an argument to JS_BufferIsCompilableUnit in commit
+http://hg.mozilla.org/mozilla-central/rev/a773890b676f
+We now have to tell if the bytes are utf8 or not.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646471
+
+4. Colin Walters <walters@verbum.org>  2011-05-04 14:14:18
+Support compilation with standalone mozjs185 release
+
+Adjust the detection logic so that we look for mozjs-185.pc first.  If
+we have this, we can skip all kinds of insanity.
+
+See https://bugzilla.mozilla.org/show_bug.cgi?id=628723
+for the discussion about creating this release.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646369
+
+5. Colin Walters <walters@verbum.org>  2011-05-05 12:49:09
+JS_CLASS_TRACE is a preprocessor macro, can't use AC_CHECK_LIB
+
+6. Nirbheek Chauhan <nirbheek@gentoo.org>  2011-05-05 19:23:27
+build: drop js-config support, xulrunner-1.8/1.9 cruft, etc
+
+* The last working version of mozjs/xulrunner is 1.9.2.x, so drop support for
+  everything before that.
+* Spidermonkey got a pkg-config file (gnome bug 646369), so we can get rid of
+  js-config script support.
+* Use AC_CHECK_FUNC instead of AC_CHECK_LIB, which avoids having to guess the
+  spidermonkey library name, and is the "preferred" way according to
+  gnome bug 646369#c3.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=644971
+
+7. Nirbheek Chauhan <nirbheek@gentoo.org>  2011-05-16 17:44:30
+build: pick up the JS library from pkg-config instead of the system one
+
+Add JS_LIBS to gjs_console_LDADD so that the JS library in libdir from
+pkg-config is picked up first instead of the library in /usr/lib which may be
+from a system install of an older spidermonkey.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=644971
+
+8. Colin Walters <walters@verbum.org>  2011-06-09 13:41:14
+Don't set rpath if we're using the standalone libmozjs185
+
+If we set an rpath to $prefix/lib, this causes us to prefer installed
+libraries over the just-built ones, effectively subverting the ability
+to run uninstalled.
+
+9. Alexandre Rostovtsev <tetromino@gmail.com>  2011-07-28 03:40:49
+Make choice of javascript package non-automagic
+
+Add a --with-js-package configure flag to allow selecting which
+javascript package to build against, e.g. to force building against
+xulrunner on a system that happens to have spidermonkey installed.
+
+By default, the behavior is the same as before (first check for
+mozjs185, then for mozilla-js).
+
+https://bugzilla.gnome.org/show_bug.cgi?id=655479
+---
+ Makefile.am             |   15 +++-
+ configure.ac            |  228 +++++++++++++++++++++-------------------------
+ gi/keep-alive.c         |   10 ++-
+ gjs-internals-1.0.pc.in |    5 +-
+ modules/console.c       |   10 ++
+ 5 files changed, 135 insertions(+), 133 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a7ecd84..5d340dd 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -69,7 +69,10 @@ libgjs_la_CFLAGS = 		\
+ libgjs_la_LDFLAGS = 		\
+ 	-export-symbols-regex "^[^_]" -version-info 0:0:0	\
+ 	-no-undefined \
+-	-R $(FIREFOX_JS_LIBDIR) -rdynamic
++	-rdynamic
++if HAVE_FIREFOX_JS_LIBDIR
++libgjs_la_LDFLAGS += -R $(FIREFOX_JS_LIBDIR) 
++endif
+ libgjs_la_LIBADD = 		\
+ 	$(GJS_LIBS)
+ 
+@@ -121,9 +124,13 @@ gjs_console_CFLAGS = 		\
+ 	$(AM_CFLAGS)		\
+         $(GOBJECT_CFLAGS)
+ gjs_console_LDADD =		\
+-         $(GOBJECT_LIBS)           \
+-         libgjs.la
+-gjs_console_LDFLAGS = -R $(FIREFOX_JS_LIBDIR) -rdynamic
++	$(JS_LIBS)		\
++	$(GOBJECT_LIBS)		\
++	libgjs.la
++gjs_console_LDFLAGS = -rdynamic
++if HAVE_FIREFOX_JS_LIBDIR
++gjs_console_LDFLAGS += -R $(FIREFOX_JS_LIBDIR)
++endif
+ gjs_console_SOURCES = gjs/console.c
+ 
+ install-exec-hook:
+diff --git a/configure.ac b/configure.ac
+index d185ba1..3d41ecd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -91,123 +91,100 @@ m4_define(gobject_required_version, 2.18.0)
+ AC_CHECK_HEADERS([malloc.h])
+ AC_CHECK_FUNCS(mallinfo)
+ 
+-# Look for Spidermonkey. If js-config exists, use that;
+-# otherwise we try some pkgconfig files from various distributions.
+-
+-AC_ARG_VAR([JS_CONFIG], [The js-config program to use])
+-if test "$ac_cv_env_JS_CONFIG_set" != "set"; then
+-    AC_PATH_PROG([JS_CONFIG], [js-config], [])
++AC_ARG_WITH([js-package],
++    AS_HELP_STRING([--with-js-package[=@<:@auto/mozjs185/mozilla-js@:>@]],
++                   [Choose JavaScript package: 'mozjs185' (i.e. spidermonkey), 'mozilla-js' (i.e. xulrunner or firefox), or 'auto' (detect automatically)]),
++    [with_js_package=$withval],
++    [with_js_package="auto"])
++
++# First, try separate mozjs185 release
++if test $with_js_package = mozjs185 -o $with_js_package = auto; then
++    AC_MSG_CHECKING([for standalone mozjs185])
++    PKG_CHECK_EXISTS([mozjs185], JS_PACKAGE=mozjs185,)
++    if test x$JS_PACKAGE != x; then
++        FIREFOX_JS_LIBDIR=
++        MOZJS_IS_STANDALONE=yes
++        AC_MSG_RESULT([yes])
++        PKG_CHECK_MODULES(JS, $JS_PACKAGE)
++    else
++        AC_MSG_RESULT([no])
++    fi
+ fi
+ 
+-if test -n "$JS_CONFIG"; then
+-    JS_CFLAGS="$($JS_CONFIG --cflags)"
+-    JS_LIBS="$($JS_CONFIG --libs)"
+-    FIREFOX_JS_LIBDIR="$($JS_CONFIG --libdir)"
+-    JS_PACKAGE=
+-
+-    # js-config gives almost usable CFLAGS, we must define one of XP_BEOS,
+-    # XP_OS2, XP_WIN or XP_UNIX
+-    JS_CFLAGS="$JS_CFLAGS -DXP_UNIX"
+-else
+-    ## spidermonkey .pc file name varies across distributions and Gecko version
+-    ##
+-    ## mozilla-js: Gecko 1.9, all distributions
+-    ## xulrunner-js: Gecko 1.8 (and earlier?) Debian/Ubuntu
+-    ## firefox-js: ???
+-    ##
+-    ## Checking for mozilla-js first will hopefully get us the newest version
+-    ## of spidermonkey.
+-    PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],
+-                     [PKG_CHECK_EXISTS([xulrunner-js], [JS_PACKAGE=xulrunner-js], [JS_PACKAGE=firefox-js])])
+-
+-    PKG_CHECK_MODULES(JS, $JS_PACKAGE)
+-
+-    ## some flavors of Firefox .pc only set sdkdir, not libdir
+-    FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
+-    FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
+-
+-    ## Ubuntu does not set libdir in mozilla-js.pc
+-    if test x"$FIREFOX_JS_LIBDIR" = x ; then
+-       ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
+-       ## libdir we want the runtime location on the target system,
+-       ## so can't use -devel.
+-       ## The library is in the non-devel directory also.
+-       ## Don't ask me why it's in two places.
+-       FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
+-
+-       if ! test -d "$FIREFOX_JS_LIBDIR" ; then
+-           FIREFOX_JS_LIBDIR=
+-       fi
++if test $with_js_package = mozilla-js -o $with_js_package = auto; then
++    # If we didn't find mozjs185 (the standalone spidermonkey), look for mozilla-js
++    if test x$JS_PACKAGE = x; then
++        AC_MSG_CHECKING([for mozilla-js 1.9.2])
++        PKG_CHECK_EXISTS([mozilla-js >= 1.9.2], JS_PACKAGE=mozilla-js,)
++        if test x$JS_PACKAGE != x; then
++            AC_MSG_RESULT([yes])
++        else
++            AC_MSG_ERROR([Could not find mozilla-js 1.9.2])
++        fi
++
++        PKG_CHECK_MODULES(JS, $JS_PACKAGE)
++
++        ## some flavors of Firefox .pc only set sdkdir, not libdir
++        FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
++        FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
++
++        ## Ubuntu does not set libdir in mozilla-js.pc
++        if test x"$FIREFOX_JS_LIBDIR" = x; then
++            ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
++            ## libdir we want the runtime location on the target system,
++            ## so can't use -devel.
++            ## The library is in the non-devel directory also.
++            ## Don't ask me why it's in two places.
++            FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
++            if ! test -d "$FIREFOX_JS_LIBDIR"; then
++                FIREFOX_JS_LIBDIR=
++            fi
++        fi
++
++        if test x"$FIREFOX_JS_LIBDIR" = x; then
++            AC_MSG_ERROR([Could not figure out where the Firefox JavaScript library lives])
++        fi
+     fi
+ fi
+ 
+-if test x"$FIREFOX_JS_LIBDIR" = x ; then
+-   AC_MSG_ERROR([Could not figure out where Firefox JavaScript library lives])
++if test x$JS_PACKAGE = x; then
++    AC_MSG_ERROR([No appropriate JavaScript package found])
+ fi
+ 
+-AC_SUBST(JS_PACKAGE)
+-AC_SUBST(FIREFOX_JS_LIBDIR)
++echo "Using JS_PACKAGE: $JS_PACKAGE"
++echo "Using JS_CFLAGS: $JS_CFLAGS"
++echo "Using JS_LIBS: $JS_LIBS"
+ 
+-AC_MSG_CHECKING([for mozilla-js >= 1.9.2 ])
+-if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 1.9.2`; then
+-  AC_MSG_RESULT([yes])
+-else
+-  AC_MSG_ERROR([$JS_PACKAGE >= 1.9.2 is required])
++AC_SUBST(JS_PACKAGE)
++AM_CONDITIONAL(HAVE_FIREFOX_JS_LIBDIR, test x$FIREFOX_JS_LIBDIR != x)
++if test x$FIREFOX_JS_LIBDIR != x; then
++   GJS_INTERNALS_LIBS="-Wl,--rpath=$FIREFOX_JS_LIBDIR"
+ fi
++AC_SUBST(GJS_INTERNALS_LIBS)
++AC_SUBST(FIREFOX_JS_LIBDIR)
+ 
+-AC_CHECK_LIB([mozjs], [JS_GetStringBytes], AC_DEFINE([HAVE_JS_GETSTRINGBYTES], [1], [Define if we still have JS_GetStringBytes]),, [$JS_LIBS])
+-AC_CHECK_LIB([mozjs], [JS_GetFunctionName], AC_DEFINE([HAVE_JS_GETFUNCTIONNAME], [1], [Define if we still have JS_GetFunctionName]),, [$JS_LIBS])
+-AC_CHECK_LIB([mozjs], [JS_GetStringChars], AC_DEFINE([HAVE_JS_GETSTRINGCHARS], [1], [Define if we still have JS_GetStringChars]),, [$JS_LIBS])
+-AC_CHECK_LIB([mozjs], [JS_StrictPropertyStub], AC_DEFINE([HAVE_JS_STRICTPROPERTYSTUB], [1], [Define if we have JS_StrictPropertyStub]),, [$JS_LIBS])
+-AC_CHECK_LIB([mozjs], [JS_GetGlobalForScopeChain], AC_DEFINE([HAVE_JS_GETGLOBALFORSCOPECHAIN], [1], [Define if we have JS_GetGlobalForScopeChain]),, [$JS_LIBS])
++saved_CFLAGS=$CFLAGS
++saved_LIBS=$LIBS
++CFLAGS=$JS_CFLAGS
++LIBS=$JS_LIBS
++AC_CHECK_FUNC([JS_GetStringBytes], AC_DEFINE([HAVE_JS_GETSTRINGBYTES], [1], [Define if we still have JS_GetStringBytes]),)
++AC_CHECK_FUNC([JS_GetFunctionName], AC_DEFINE([HAVE_JS_GETFUNCTIONNAME], [1], [Define if we still have JS_GetFunctionName]),)
++AC_CHECK_FUNC([JS_GetStringChars], AC_DEFINE([HAVE_JS_GETSTRINGCHARS], [1], [Define if we still have JS_GetStringChars]),)
++AC_CHECK_FUNC([JS_StrictPropertyStub], AC_DEFINE([HAVE_JS_STRICTPROPERTYSTUB], [1], [Define if we have JS_StrictPropertyStub]),)
++AC_CHECK_FUNC([JS_GetGlobalForScopeChain], AC_DEFINE([HAVE_JS_GETGLOBALFORSCOPECHAIN], [1], [Define if we have JS_GetGlobalForScopeChain]),)
++AC_CHECK_FUNC([JS_DestroyScript], AC_DEFINE([HAVE_JS_DESTROYSCRIPT], [1], [Define if we still have JS_DestroyScript]),)
++AC_CHECK_FUNC([JS_DecodeUTF8], AC_DEFINE([HAVE_JS_DECODEUTF8], [1], [Define if we have JS_DecodeUTF8]),)
++AC_CHECK_FUNC([JS_FreezeObject], AC_DEFINE([HAVE_JS_FREEZEOBJECT], [1], [Define if we have JS_FreezeObject]),)
++AC_CHECK_FUNC([JS_IsScriptFrame], AC_DEFINE([HAVE_JS_ISSCRIPTFRAME], [1], [Define if we have JS_IsScriptFrame]),)
++AC_CHECK_FUNC([JS_EndPC], AC_DEFINE([HAVE_JS_ENDPC], [1], [Define if we have JS_EndPC]),)
++AC_CHECK_FUNC([JS_NewCompartmentAndGlobalObject], AC_DEFINE([HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT], [1], [Define if we have JS_NewCompartmentAndGlobalObject]),)
++CFLAGS=$saved_CFLAGS
++LIBS=$saved_LIBS
+ 
+-AC_MSG_CHECKING([for mozilla-js >= 2 ])
+-if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
+-  AC_MSG_RESULT([yes])
++if test x$MOZJS_IS_STANDALONE = xyes || `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
+   AC_DEFINE(HAVE_MOZJS_2, [1], [Define if mozilla-js is at least 2])
+-  AC_CHECK_LIB([mozjs], [JS_FreezeObject], AC_DEFINE([HAVE_JS_FREEZEOBJECT], [1], [Define if we have JS_FreezeObject]),
+-              , [$JS_LIBS])
+-  AC_CHECK_LIB([mozjs], [JS_IsScriptFrame], AC_DEFINE([HAVE_JS_ISSCRIPTFRAME], [1], [Define if we have JS_IsScriptFrame]),
+-              , [$JS_LIBS])
+-  AC_CHECK_LIB([mozjs], [JS_EndPC], AC_DEFINE([HAVE_JS_ENDPC], [1], [Define if we have JS_EndPC]),
+-              , [$JS_LIBS])
+-  AC_CHECK_LIB([mozjs], [JS_NewCompartmentAndGlobalObject],
+-              AC_DEFINE([HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT], [1], [Define if we have JS_NewCompartmentAndGlobalObject]),
+-              , [$JS_LIBS])
+-
+-else
+-  AC_MSG_RESULT([no])
+ fi
+ 
+-## workaround for Ubuntu Hardy bug where mozilla-js.pc gives CFLAGS
+-## -I.../stable while jsapi.h is in .../unstable
+-AC_MSG_CHECKING([if SpiderMonkey needs extra compiler flags])
+-save_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS $JS_CFLAGS"
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
+-    [js_extra_cflags_needed=no],
+-    [js_extra_cflags_needed=yes])
+-CFLAGS="$save_CFLAGS"
+-AC_MSG_RESULT([$js_extra_cflags_needed])
+-
+-JS_EXTRA_CFLAGS=
+-if test "$js_extra_cflags_needed" = yes; then
+-    try_cflags="-I`$PKG_CONFIG --variable=includedir $JS_PACKAGE`/unstable"
+-    AC_MSG_CHECKING([if $try_cflags works])
+-    save_CFLAGS="$CFLAGS"
+-    CFLAGS="$CFLAGS $JS_CFLAGS $try_cflags"
+-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
+-        [AC_MSG_RESULT([yes])
+-         JS_EXTRA_CFLAGS="$try_cflags"],
+-        [AC_MSG_RESULT([no])])
+-    CFLAGS="$save_CFLAGS"
+-
+-    if test x"$JS_EXTRA_CFLAGS" = x; then
+-        AC_MSG_ERROR([Unable to determine extra compiler flags needed])
+-    fi
+-fi
+-AC_SUBST([JS_EXTRA_CFLAGS])
+-
+ AC_MSG_CHECKING([whether JSLocaleToUnicode takes a const char*])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
+@@ -228,6 +205,30 @@ if test "$have_jslocale_to_unicode_const" = yes; then
+      AC_DEFINE([JS_LOCALETOUNICODE_NEEDS_CONST_CHAR], [1], [Define if JSLocaleToUnicode takes a const char* for its src])
+ fi
+ 
++save_CFLAGS="$CFLAGS"
++CFLAGS="$CFLAGS $JS_CFLAGS"
++AC_MSG_CHECKING([for JS_CLASS_TRACE macro])
++AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM(
++        [[
++            #include <jsapi.h>
++	    #ifndef JS_CLASS_TRACE
++	    #error "No JS_CLASS_TRACE"
++	    #endif
++        ]],
++        [[(void) 0;]]
++    )],
++    [have_js_class_trace=yes],
++    [have_js_class_trace=no])
++
++if test "x$have_js_class_trace" = xyes; then
++    AC_MSG_RESULT([yes])
++    AC_DEFINE([HAVE_JS_CLASS_TRACE], [1], [Define if we still have JS_CLASS_TRACE])
++else
++    AC_MSG_RESULT([no])
++fi
++CFLAGS="$save_CFLAGS"
++
+ common_packages="gobject-2.0 >= gobject_required_version $JS_PACKAGE"
+ gjs_packages="gmodule-2.0 gthread-2.0 $common_packages"
+ gjs_gi_packages="gobject-introspection-1.0 >= 0.10.1 $common_packages"
+@@ -258,27 +259,6 @@ PKG_CHECK_MODULES([GJSTESTS], [$gjstests_packages])
+ GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+ AC_SUBST(GI_DATADIR)
+ 
+-if test x"$JS_PACKAGE" = x; then
+-    # if JS_PACKAGE is undefined, pkg-config modules don't include
+-    # SpiderMonkey and we need to deal with it ourselves
+-    GJS_CFLAGS="$GJS_CFLAGS $JS_CFLAGS"
+-    GJS_LIBS="$GJS_LIBS $JS_LIBS"
+-    GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_CFLAGS"
+-    GJS_GI_LIBS="$GJS_GI_LIBS $JS_LIBS"
+-    GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_CFLAGS"
+-    GJS_CAIRO_LIBS="$GJS_CAIRO_LIBS $JS_LIBS"
+-    GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_CFLAGS"
+-    GJS_DBUS_LIBS="$GJS_DBUS_LIBS $JS_LIBS"
+-    GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_CFLAGS"
+-    GJSTESTS_LIBS="$GJSTEST_LIBS $JS_LIBS"
+-fi
+-
+-GJS_CFLAGS="$GJS_CFLAGS $JS_EXTRA_CFLAGS"
+-GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_EXTRA_CFLAGS"
+-GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_EXTRA_CFLAGS"
+-GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_EXTRA_CFLAGS"
+-GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_EXTRA_CFLAGS"
+-
+ # readline
+ LIBS_no_readline=$LIBS
+ 
+diff --git a/gi/keep-alive.c b/gi/keep-alive.c
+index c7149ac..e268eaf 100644
+--- a/gi/keep-alive.c
++++ b/gi/keep-alive.c
+@@ -184,8 +184,10 @@ keep_alive_trace(JSTracer *tracer,
+  */
+ static struct JSClass gjs_keep_alive_class = {
+     "__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
+-    JSCLASS_HAS_PRIVATE |
+-    JSCLASS_MARK_IS_TRACE, /* TraceOp not MarkOp */
++#ifdef HAVE_JS_CLASS_TRACE
++    JSCLASS_MARK_IS_TRACE | /* TraceOp not MarkOp */
++#endif
++    JSCLASS_HAS_PRIVATE,
+     JS_PropertyStub,
+     JS_PropertyStub,
+     JS_PropertyStub,
+@@ -200,7 +202,11 @@ static struct JSClass gjs_keep_alive_class = {
+     NULL,
+     NULL,
+     NULL,
++#ifdef HAVE_JS_CLASS_TRACE
+     JS_CLASS_TRACE(keep_alive_trace),
++#else
++    keep_alive_trace,
++#endif
+     NULL
+ };
+ 
+diff --git a/gjs-internals-1.0.pc.in b/gjs-internals-1.0.pc.in
+index 701dd42..f4feb19 100644
+--- a/gjs-internals-1.0.pc.in
++++ b/gjs-internals-1.0.pc.in
+@@ -8,10 +8,9 @@ datadir=@datadir@
+ 
+ jsdir=@gjsjsdir@
+ jsnativedir=@gjsnativedir@
+-mozjslibdir=@FIREFOX_JS_LIBDIR@
+ 
+-Cflags: -I${includedir}/gjs-1.0 @JS_EXTRA_CFLAGS@
+-Libs: -Wl,--rpath=${mozjslibdir}
++Cflags: -I${includedir}/gjs-1.0
++Libs: @GJS_INTERNALS_LIBS@
+ Requires: gjs-1.0 gobject-introspection-1.0 @JS_PACKAGE@
+ 
+ Name: gjs-internals-1.0
+diff --git a/modules/console.c b/modules/console.c
+index 49f891b..8e20db3 100644
+--- a/modules/console.c
++++ b/modules/console.c
+@@ -161,7 +161,11 @@ gjs_console_interact(JSContext *context,
+ {
+     JSObject *object = JS_THIS_OBJECT(context, vp);
+     gboolean eof = FALSE;
++#ifdef HAVE_JS_DESTROYSCRIPT
+     JSScript *script = NULL;
++#else
++    JSObject *script = NULL;
++#endif
+     jsval result;
+     JSString *str;
+     GString *buffer = NULL;
+@@ -192,7 +196,11 @@ gjs_console_interact(JSContext *context,
+             g_string_append(buffer, temp_buf);
+             g_free(temp_buf);
+             lineno++;
++#ifdef HAVE_JS_DECODEUTF8
++        } while (!JS_BufferIsCompilableUnit(context, JS_TRUE, object, buffer->str, buffer->len));
++#else
+         } while (!JS_BufferIsCompilableUnit(context, object, buffer->str, buffer->len));
++#endif
+ 
+         script = JS_CompileScript(context, object, buffer->str, buffer->len, "typein",
+                                   startline);
+@@ -219,8 +227,10 @@ gjs_console_interact(JSContext *context,
+         }
+ 
+  next:
++#ifdef HAVE_JS_DESTROYSCRIPT
+         if (script)
+             JS_DestroyScript(context, script);
++#endif
+         g_string_free(buffer, TRUE);
+     } while (!eof);
+ 
+-- 
+1.7.6
+

diff --git a/dev-libs/gjs/gjs-0.7.14-r1.ebuild b/dev-libs/gjs/gjs-0.7.14-r1.ebuild
new file mode 100644
index 0000000..75c4e04
--- /dev/null
+++ b/dev-libs/gjs/gjs-0.7.14-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gjs/gjs-0.7.14.ebuild,v 1.2 2011/05/01 15:42:03 nirbheek Exp $
+
+EAPI="3"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_DEPEND="2"
+
+inherit autotools eutils gnome2 python virtualx
+
+DESCRIPTION="Javascript bindings for GNOME"
+HOMEPAGE="http://live.gnome.org/Gjs"
+
+LICENSE="MIT MPL-1.1 LGPL-2 GPL-2"
+SLOT="0"
+IUSE="examples test +xulrunner"
+KEYWORDS="~amd64 ~x86"
+
+# Things are untested and broken with anything other than xulrunner-2.0
+# FIXME: https://bugzilla.mozilla.org/show_bug.cgi?id=628723 instead of libxul
+RDEPEND=">=dev-libs/glib-2.18:2
+	>=dev-libs/gobject-introspection-0.10.1
+	>=net-libs/xulrunner-2.0:1.9
+
+	dev-libs/dbus-glib
+	sys-libs/readline
+	x11-libs/cairo
+	xulrunner? (
+		>=net-libs/xulrunner-2.0:1.9
+		!=dev-lang/spidermonkey-1.8.2* )
+	!xulrunner? ( =dev-lang/spidermonkey-1.8.5* )"
+DEPEND="${RDEPEND}
+	sys-devel/gettext
+	>=dev-util/pkgconfig-0.9"
+# HACK HACK: gjs-tests picks up /usr/lib/libmozjs.so with spidermonkey installed
+
+src_prepare() {
+	# AUTHORS, ChangeLog are empty
+	DOCS="NEWS README"
+	# FIXME: add systemtap/dtrace support, like in glib:2
+	# XXX: Do NOT enable coverage, completely useless for portage installs
+	G2CONF="${G2CONF}
+		--disable-systemtap
+		--disable-dtrace
+		--disable-coverage"
+	if use xulrunner; then
+		G2CONF="${G2CONF} --with-js-package=mozilla-js"
+	else
+		G2CONF="${G2CONF} --with-js-package=mozjs185"
+	fi
+
+	# https://bugzilla.gnome.org/show_bug.cgi?id=646369
+	# https://bugs.gentoo.org/353941
+	# https://bugzilla.gnome.org/show_bug.cgi?id=655479
+	epatch "${FILESDIR}/${P}-sanity.patch"
+
+	eautoreconf
+
+	gnome2_src_prepare
+	python_convert_shebangs 2 "${S}"/scripts/make-tests
+}
+
+src_test() {
+	# Tests need dbus
+	Xemake check || die
+}
+
+src_install() {
+	# installation sometimes fails in parallel
+	gnome2_src_install -j1
+
+	if use examples; then
+		insinto /usr/share/doc/${PF}/examples
+		doins "${S}"/examples/* || die "doins examples failed!"
+	fi
+}



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
@ 2012-08-27 10:41 Priit Laes
  0 siblings, 0 replies; 7+ messages in thread
From: Priit Laes @ 2012-08-27 10:41 UTC (permalink / raw
  To: gentoo-commits

commit:     ed26e0e38ac8e8c507c58e002d08339fc48bd2e6
Author:     Priit Laes <plaes <AT> plaes <DOT> org>
AuthorDate: Mon Aug 27 07:36:35 2012 +0000
Commit:     Priit Laes <plaes <AT> plaes <DOT> org>
CommitDate: Mon Aug 27 07:36:35 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=ed26e0e3

dev-libs/gjs: 1.33.3 → 1.33.9

---
 dev-libs/gjs/files/gjs-0.7.14-sanity.patch         |  485 --------------------
 .../gjs/{gjs-1.33.4.ebuild => gjs-1.33.9.ebuild}   |    3 +-
 dev-libs/gjs/gjs-9999.ebuild                       |    3 +-
 3 files changed, 2 insertions(+), 489 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-0.7.14-sanity.patch b/dev-libs/gjs/files/gjs-0.7.14-sanity.patch
deleted file mode 100644
index 7b37d64..0000000
--- a/dev-libs/gjs/files/gjs-0.7.14-sanity.patch
+++ /dev/null
@@ -1,485 +0,0 @@
-This is a combination of 9 squashed commits (squashed to save space, since
-the patches keep on modifying the same region of code) and a bit of manual
-backporting work, bringing sanity wrt xulrunner and spidermonkey handling to
-gjs-0.7.14's configure, and allowing gjs-0.7.14 to correctly build against
-spidermonkey-1.8.5.
-
-The patches squashed (along with their commit messages) are the following:
-
-1. Marc-Antoine Perennou <Marc-Antoine@Perennou.com>  2011-04-01 14:55:43
-Conditionally adapt to JS_CLASS_TRACE removal
-
-Upstream removed it in http://hg.mozilla.org/mozilla-central/rev/a7784d11c59b
-
-https://bugzilla.gnome.org/show_bug.cgi?id=646471
-
-2. Marc-Antoine Perennou <Marc-Antoine@Perennou.com>  2011-04-01 15:04:57
-Conditionally adapt to JS_DestroyScript removal
-
-Upstream changed the behaviour of several things about JSScripts in
-http://hg.mozilla.org/mozilla-central/rev/c919a7271ac1
-
-We now have to use a JSObject instead of a JSScript in certain circumstances,
-and we no longer have to call JS_DestroyScript which no longer exists
-
-https://bugzilla.gnome.org/show_bug.cgi?id=646471
-
-3. Marc-Antoine Perennou <Marc-Antoine@Perennou.com>  2011-04-28 19:01:03
-conditonally adapt to JS_BufferIsCompilableUnit changes
-
-Upstream added an argument to JS_BufferIsCompilableUnit in commit
-http://hg.mozilla.org/mozilla-central/rev/a773890b676f
-We now have to tell if the bytes are utf8 or not.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=646471
-
-4. Colin Walters <walters@verbum.org>  2011-05-04 14:14:18
-Support compilation with standalone mozjs185 release
-
-Adjust the detection logic so that we look for mozjs-185.pc first.  If
-we have this, we can skip all kinds of insanity.
-
-See https://bugzilla.mozilla.org/show_bug.cgi?id=628723
-for the discussion about creating this release.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=646369
-
-5. Colin Walters <walters@verbum.org>  2011-05-05 12:49:09
-JS_CLASS_TRACE is a preprocessor macro, can't use AC_CHECK_LIB
-
-6. Nirbheek Chauhan <nirbheek@gentoo.org>  2011-05-05 19:23:27
-build: drop js-config support, xulrunner-1.8/1.9 cruft, etc
-
-* The last working version of mozjs/xulrunner is 1.9.2.x, so drop support for
-  everything before that.
-* Spidermonkey got a pkg-config file (gnome bug 646369), so we can get rid of
-  js-config script support.
-* Use AC_CHECK_FUNC instead of AC_CHECK_LIB, which avoids having to guess the
-  spidermonkey library name, and is the "preferred" way according to
-  gnome bug 646369#c3.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=644971
-
-7. Nirbheek Chauhan <nirbheek@gentoo.org>  2011-05-16 17:44:30
-build: pick up the JS library from pkg-config instead of the system one
-
-Add JS_LIBS to gjs_console_LDADD so that the JS library in libdir from
-pkg-config is picked up first instead of the library in /usr/lib which may be
-from a system install of an older spidermonkey.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=644971
-
-8. Colin Walters <walters@verbum.org>  2011-06-09 13:41:14
-Don't set rpath if we're using the standalone libmozjs185
-
-If we set an rpath to $prefix/lib, this causes us to prefer installed
-libraries over the just-built ones, effectively subverting the ability
-to run uninstalled.
-
-9. Alexandre Rostovtsev <tetromino@gmail.com>  2011-07-28 03:40:49
-Make choice of javascript package non-automagic
-
-Add a --with-js-package configure flag to allow selecting which
-javascript package to build against, e.g. to force building against
-xulrunner on a system that happens to have spidermonkey installed.
-
-By default, the behavior is the same as before (first check for
-mozjs185, then for mozilla-js).
-
-https://bugzilla.gnome.org/show_bug.cgi?id=655479
----
- Makefile.am             |   15 +++-
- configure.ac            |  228 +++++++++++++++++++++-------------------------
- gi/keep-alive.c         |   10 ++-
- gjs-internals-1.0.pc.in |    5 +-
- modules/console.c       |   10 ++
- 5 files changed, 135 insertions(+), 133 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index a7ecd84..5d340dd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -69,7 +69,10 @@ libgjs_la_CFLAGS = 		\
- libgjs_la_LDFLAGS = 		\
- 	-export-symbols-regex "^[^_]" -version-info 0:0:0	\
- 	-no-undefined \
--	-R $(FIREFOX_JS_LIBDIR) -rdynamic
-+	-rdynamic
-+if HAVE_FIREFOX_JS_LIBDIR
-+libgjs_la_LDFLAGS += -R $(FIREFOX_JS_LIBDIR) 
-+endif
- libgjs_la_LIBADD = 		\
- 	$(GJS_LIBS)
- 
-@@ -121,9 +124,13 @@ gjs_console_CFLAGS = 		\
- 	$(AM_CFLAGS)		\
-         $(GOBJECT_CFLAGS)
- gjs_console_LDADD =		\
--         $(GOBJECT_LIBS)           \
--         libgjs.la
--gjs_console_LDFLAGS = -R $(FIREFOX_JS_LIBDIR) -rdynamic
-+	$(JS_LIBS)		\
-+	$(GOBJECT_LIBS)		\
-+	libgjs.la
-+gjs_console_LDFLAGS = -rdynamic
-+if HAVE_FIREFOX_JS_LIBDIR
-+gjs_console_LDFLAGS += -R $(FIREFOX_JS_LIBDIR)
-+endif
- gjs_console_SOURCES = gjs/console.c
- 
- install-exec-hook:
-diff --git a/configure.ac b/configure.ac
-index d185ba1..3d41ecd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -91,123 +91,100 @@ m4_define(gobject_required_version, 2.18.0)
- AC_CHECK_HEADERS([malloc.h])
- AC_CHECK_FUNCS(mallinfo)
- 
--# Look for Spidermonkey. If js-config exists, use that;
--# otherwise we try some pkgconfig files from various distributions.
--
--AC_ARG_VAR([JS_CONFIG], [The js-config program to use])
--if test "$ac_cv_env_JS_CONFIG_set" != "set"; then
--    AC_PATH_PROG([JS_CONFIG], [js-config], [])
-+AC_ARG_WITH([js-package],
-+    AS_HELP_STRING([--with-js-package[=@<:@auto/mozjs185/mozilla-js@:>@]],
-+                   [Choose JavaScript package: 'mozjs185' (i.e. spidermonkey), 'mozilla-js' (i.e. xulrunner or firefox), or 'auto' (detect automatically)]),
-+    [with_js_package=$withval],
-+    [with_js_package="auto"])
-+
-+# First, try separate mozjs185 release
-+if test $with_js_package = mozjs185 -o $with_js_package = auto; then
-+    AC_MSG_CHECKING([for standalone mozjs185])
-+    PKG_CHECK_EXISTS([mozjs185], JS_PACKAGE=mozjs185,)
-+    if test x$JS_PACKAGE != x; then
-+        FIREFOX_JS_LIBDIR=
-+        MOZJS_IS_STANDALONE=yes
-+        AC_MSG_RESULT([yes])
-+        PKG_CHECK_MODULES(JS, $JS_PACKAGE)
-+    else
-+        AC_MSG_RESULT([no])
-+    fi
- fi
- 
--if test -n "$JS_CONFIG"; then
--    JS_CFLAGS="$($JS_CONFIG --cflags)"
--    JS_LIBS="$($JS_CONFIG --libs)"
--    FIREFOX_JS_LIBDIR="$($JS_CONFIG --libdir)"
--    JS_PACKAGE=
--
--    # js-config gives almost usable CFLAGS, we must define one of XP_BEOS,
--    # XP_OS2, XP_WIN or XP_UNIX
--    JS_CFLAGS="$JS_CFLAGS -DXP_UNIX"
--else
--    ## spidermonkey .pc file name varies across distributions and Gecko version
--    ##
--    ## mozilla-js: Gecko 1.9, all distributions
--    ## xulrunner-js: Gecko 1.8 (and earlier?) Debian/Ubuntu
--    ## firefox-js: ???
--    ##
--    ## Checking for mozilla-js first will hopefully get us the newest version
--    ## of spidermonkey.
--    PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],
--                     [PKG_CHECK_EXISTS([xulrunner-js], [JS_PACKAGE=xulrunner-js], [JS_PACKAGE=firefox-js])])
--
--    PKG_CHECK_MODULES(JS, $JS_PACKAGE)
--
--    ## some flavors of Firefox .pc only set sdkdir, not libdir
--    FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
--    FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
--
--    ## Ubuntu does not set libdir in mozilla-js.pc
--    if test x"$FIREFOX_JS_LIBDIR" = x ; then
--       ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
--       ## libdir we want the runtime location on the target system,
--       ## so can't use -devel.
--       ## The library is in the non-devel directory also.
--       ## Don't ask me why it's in two places.
--       FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
--
--       if ! test -d "$FIREFOX_JS_LIBDIR" ; then
--           FIREFOX_JS_LIBDIR=
--       fi
-+if test $with_js_package = mozilla-js -o $with_js_package = auto; then
-+    # If we didn't find mozjs185 (the standalone spidermonkey), look for mozilla-js
-+    if test x$JS_PACKAGE = x; then
-+        AC_MSG_CHECKING([for mozilla-js 1.9.2])
-+        PKG_CHECK_EXISTS([mozilla-js >= 1.9.2], JS_PACKAGE=mozilla-js,)
-+        if test x$JS_PACKAGE != x; then
-+            AC_MSG_RESULT([yes])
-+        else
-+            AC_MSG_ERROR([Could not find mozilla-js 1.9.2])
-+        fi
-+
-+        PKG_CHECK_MODULES(JS, $JS_PACKAGE)
-+
-+        ## some flavors of Firefox .pc only set sdkdir, not libdir
-+        FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
-+        FIREFOX_JS_LIBDIR=`$PKG_CONFIG --variable=libdir $JS_PACKAGE`
-+
-+        ## Ubuntu does not set libdir in mozilla-js.pc
-+        if test x"$FIREFOX_JS_LIBDIR" = x; then
-+            ## Ubuntu returns xulrunner-devel as the sdkdir, but for the
-+            ## libdir we want the runtime location on the target system,
-+            ## so can't use -devel.
-+            ## The library is in the non-devel directory also.
-+            ## Don't ask me why it's in two places.
-+            FIREFOX_JS_LIBDIR=`echo "$FIREFOX_JS_SDKDIR" | sed -e 's/-devel//g'`
-+            if ! test -d "$FIREFOX_JS_LIBDIR"; then
-+                FIREFOX_JS_LIBDIR=
-+            fi
-+        fi
-+
-+        if test x"$FIREFOX_JS_LIBDIR" = x; then
-+            AC_MSG_ERROR([Could not figure out where the Firefox JavaScript library lives])
-+        fi
-     fi
- fi
- 
--if test x"$FIREFOX_JS_LIBDIR" = x ; then
--   AC_MSG_ERROR([Could not figure out where Firefox JavaScript library lives])
-+if test x$JS_PACKAGE = x; then
-+    AC_MSG_ERROR([No appropriate JavaScript package found])
- fi
- 
--AC_SUBST(JS_PACKAGE)
--AC_SUBST(FIREFOX_JS_LIBDIR)
-+echo "Using JS_PACKAGE: $JS_PACKAGE"
-+echo "Using JS_CFLAGS: $JS_CFLAGS"
-+echo "Using JS_LIBS: $JS_LIBS"
- 
--AC_MSG_CHECKING([for mozilla-js >= 1.9.2 ])
--if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 1.9.2`; then
--  AC_MSG_RESULT([yes])
--else
--  AC_MSG_ERROR([$JS_PACKAGE >= 1.9.2 is required])
-+AC_SUBST(JS_PACKAGE)
-+AM_CONDITIONAL(HAVE_FIREFOX_JS_LIBDIR, test x$FIREFOX_JS_LIBDIR != x)
-+if test x$FIREFOX_JS_LIBDIR != x; then
-+   GJS_INTERNALS_LIBS="-Wl,--rpath=$FIREFOX_JS_LIBDIR"
- fi
-+AC_SUBST(GJS_INTERNALS_LIBS)
-+AC_SUBST(FIREFOX_JS_LIBDIR)
- 
--AC_CHECK_LIB([mozjs], [JS_GetStringBytes], AC_DEFINE([HAVE_JS_GETSTRINGBYTES], [1], [Define if we still have JS_GetStringBytes]),, [$JS_LIBS])
--AC_CHECK_LIB([mozjs], [JS_GetFunctionName], AC_DEFINE([HAVE_JS_GETFUNCTIONNAME], [1], [Define if we still have JS_GetFunctionName]),, [$JS_LIBS])
--AC_CHECK_LIB([mozjs], [JS_GetStringChars], AC_DEFINE([HAVE_JS_GETSTRINGCHARS], [1], [Define if we still have JS_GetStringChars]),, [$JS_LIBS])
--AC_CHECK_LIB([mozjs], [JS_StrictPropertyStub], AC_DEFINE([HAVE_JS_STRICTPROPERTYSTUB], [1], [Define if we have JS_StrictPropertyStub]),, [$JS_LIBS])
--AC_CHECK_LIB([mozjs], [JS_GetGlobalForScopeChain], AC_DEFINE([HAVE_JS_GETGLOBALFORSCOPECHAIN], [1], [Define if we have JS_GetGlobalForScopeChain]),, [$JS_LIBS])
-+saved_CFLAGS=$CFLAGS
-+saved_LIBS=$LIBS
-+CFLAGS=$JS_CFLAGS
-+LIBS=$JS_LIBS
-+AC_CHECK_FUNC([JS_GetStringBytes], AC_DEFINE([HAVE_JS_GETSTRINGBYTES], [1], [Define if we still have JS_GetStringBytes]),)
-+AC_CHECK_FUNC([JS_GetFunctionName], AC_DEFINE([HAVE_JS_GETFUNCTIONNAME], [1], [Define if we still have JS_GetFunctionName]),)
-+AC_CHECK_FUNC([JS_GetStringChars], AC_DEFINE([HAVE_JS_GETSTRINGCHARS], [1], [Define if we still have JS_GetStringChars]),)
-+AC_CHECK_FUNC([JS_StrictPropertyStub], AC_DEFINE([HAVE_JS_STRICTPROPERTYSTUB], [1], [Define if we have JS_StrictPropertyStub]),)
-+AC_CHECK_FUNC([JS_GetGlobalForScopeChain], AC_DEFINE([HAVE_JS_GETGLOBALFORSCOPECHAIN], [1], [Define if we have JS_GetGlobalForScopeChain]),)
-+AC_CHECK_FUNC([JS_DestroyScript], AC_DEFINE([HAVE_JS_DESTROYSCRIPT], [1], [Define if we still have JS_DestroyScript]),)
-+AC_CHECK_FUNC([JS_DecodeUTF8], AC_DEFINE([HAVE_JS_DECODEUTF8], [1], [Define if we have JS_DecodeUTF8]),)
-+AC_CHECK_FUNC([JS_FreezeObject], AC_DEFINE([HAVE_JS_FREEZEOBJECT], [1], [Define if we have JS_FreezeObject]),)
-+AC_CHECK_FUNC([JS_IsScriptFrame], AC_DEFINE([HAVE_JS_ISSCRIPTFRAME], [1], [Define if we have JS_IsScriptFrame]),)
-+AC_CHECK_FUNC([JS_EndPC], AC_DEFINE([HAVE_JS_ENDPC], [1], [Define if we have JS_EndPC]),)
-+AC_CHECK_FUNC([JS_NewCompartmentAndGlobalObject], AC_DEFINE([HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT], [1], [Define if we have JS_NewCompartmentAndGlobalObject]),)
-+CFLAGS=$saved_CFLAGS
-+LIBS=$saved_LIBS
- 
--AC_MSG_CHECKING([for mozilla-js >= 2 ])
--if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
--  AC_MSG_RESULT([yes])
-+if test x$MOZJS_IS_STANDALONE = xyes || `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
-   AC_DEFINE(HAVE_MOZJS_2, [1], [Define if mozilla-js is at least 2])
--  AC_CHECK_LIB([mozjs], [JS_FreezeObject], AC_DEFINE([HAVE_JS_FREEZEOBJECT], [1], [Define if we have JS_FreezeObject]),
--              , [$JS_LIBS])
--  AC_CHECK_LIB([mozjs], [JS_IsScriptFrame], AC_DEFINE([HAVE_JS_ISSCRIPTFRAME], [1], [Define if we have JS_IsScriptFrame]),
--              , [$JS_LIBS])
--  AC_CHECK_LIB([mozjs], [JS_EndPC], AC_DEFINE([HAVE_JS_ENDPC], [1], [Define if we have JS_EndPC]),
--              , [$JS_LIBS])
--  AC_CHECK_LIB([mozjs], [JS_NewCompartmentAndGlobalObject],
--              AC_DEFINE([HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT], [1], [Define if we have JS_NewCompartmentAndGlobalObject]),
--              , [$JS_LIBS])
--
--else
--  AC_MSG_RESULT([no])
- fi
- 
--## workaround for Ubuntu Hardy bug where mozilla-js.pc gives CFLAGS
--## -I.../stable while jsapi.h is in .../unstable
--AC_MSG_CHECKING([if SpiderMonkey needs extra compiler flags])
--save_CFLAGS="$CFLAGS"
--CFLAGS="$CFLAGS $JS_CFLAGS"
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
--    [js_extra_cflags_needed=no],
--    [js_extra_cflags_needed=yes])
--CFLAGS="$save_CFLAGS"
--AC_MSG_RESULT([$js_extra_cflags_needed])
--
--JS_EXTRA_CFLAGS=
--if test "$js_extra_cflags_needed" = yes; then
--    try_cflags="-I`$PKG_CONFIG --variable=includedir $JS_PACKAGE`/unstable"
--    AC_MSG_CHECKING([if $try_cflags works])
--    save_CFLAGS="$CFLAGS"
--    CFLAGS="$CFLAGS $JS_CFLAGS $try_cflags"
--    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jsapi.h>]])],
--        [AC_MSG_RESULT([yes])
--         JS_EXTRA_CFLAGS="$try_cflags"],
--        [AC_MSG_RESULT([no])])
--    CFLAGS="$save_CFLAGS"
--
--    if test x"$JS_EXTRA_CFLAGS" = x; then
--        AC_MSG_ERROR([Unable to determine extra compiler flags needed])
--    fi
--fi
--AC_SUBST([JS_EXTRA_CFLAGS])
--
- AC_MSG_CHECKING([whether JSLocaleToUnicode takes a const char*])
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
-@@ -228,6 +205,30 @@ if test "$have_jslocale_to_unicode_const" = yes; then
-      AC_DEFINE([JS_LOCALETOUNICODE_NEEDS_CONST_CHAR], [1], [Define if JSLocaleToUnicode takes a const char* for its src])
- fi
- 
-+save_CFLAGS="$CFLAGS"
-+CFLAGS="$CFLAGS $JS_CFLAGS"
-+AC_MSG_CHECKING([for JS_CLASS_TRACE macro])
-+AC_COMPILE_IFELSE(
-+    [AC_LANG_PROGRAM(
-+        [[
-+            #include <jsapi.h>
-+	    #ifndef JS_CLASS_TRACE
-+	    #error "No JS_CLASS_TRACE"
-+	    #endif
-+        ]],
-+        [[(void) 0;]]
-+    )],
-+    [have_js_class_trace=yes],
-+    [have_js_class_trace=no])
-+
-+if test "x$have_js_class_trace" = xyes; then
-+    AC_MSG_RESULT([yes])
-+    AC_DEFINE([HAVE_JS_CLASS_TRACE], [1], [Define if we still have JS_CLASS_TRACE])
-+else
-+    AC_MSG_RESULT([no])
-+fi
-+CFLAGS="$save_CFLAGS"
-+
- common_packages="gobject-2.0 >= gobject_required_version $JS_PACKAGE"
- gjs_packages="gmodule-2.0 gthread-2.0 $common_packages"
- gjs_gi_packages="gobject-introspection-1.0 >= 0.10.1 $common_packages"
-@@ -258,27 +259,6 @@ PKG_CHECK_MODULES([GJSTESTS], [$gjstests_packages])
- GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
- AC_SUBST(GI_DATADIR)
- 
--if test x"$JS_PACKAGE" = x; then
--    # if JS_PACKAGE is undefined, pkg-config modules don't include
--    # SpiderMonkey and we need to deal with it ourselves
--    GJS_CFLAGS="$GJS_CFLAGS $JS_CFLAGS"
--    GJS_LIBS="$GJS_LIBS $JS_LIBS"
--    GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_CFLAGS"
--    GJS_GI_LIBS="$GJS_GI_LIBS $JS_LIBS"
--    GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_CFLAGS"
--    GJS_CAIRO_LIBS="$GJS_CAIRO_LIBS $JS_LIBS"
--    GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_CFLAGS"
--    GJS_DBUS_LIBS="$GJS_DBUS_LIBS $JS_LIBS"
--    GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_CFLAGS"
--    GJSTESTS_LIBS="$GJSTEST_LIBS $JS_LIBS"
--fi
--
--GJS_CFLAGS="$GJS_CFLAGS $JS_EXTRA_CFLAGS"
--GJS_GI_CFLAGS="$GJS_GI_CFLAGS $JS_EXTRA_CFLAGS"
--GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS $JS_EXTRA_CFLAGS"
--GJS_DBUS_CFLAGS="$GJS_DBUS_CFLAGS $JS_EXTRA_CFLAGS"
--GJSTESTS_CFLAGS="$GJSTESTS_CFLAGS $JS_EXTRA_CFLAGS"
--
- # readline
- LIBS_no_readline=$LIBS
- 
-diff --git a/gi/keep-alive.c b/gi/keep-alive.c
-index c7149ac..e268eaf 100644
---- a/gi/keep-alive.c
-+++ b/gi/keep-alive.c
-@@ -184,8 +184,10 @@ keep_alive_trace(JSTracer *tracer,
-  */
- static struct JSClass gjs_keep_alive_class = {
-     "__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
--    JSCLASS_HAS_PRIVATE |
--    JSCLASS_MARK_IS_TRACE, /* TraceOp not MarkOp */
-+#ifdef HAVE_JS_CLASS_TRACE
-+    JSCLASS_MARK_IS_TRACE | /* TraceOp not MarkOp */
-+#endif
-+    JSCLASS_HAS_PRIVATE,
-     JS_PropertyStub,
-     JS_PropertyStub,
-     JS_PropertyStub,
-@@ -200,7 +202,11 @@ static struct JSClass gjs_keep_alive_class = {
-     NULL,
-     NULL,
-     NULL,
-+#ifdef HAVE_JS_CLASS_TRACE
-     JS_CLASS_TRACE(keep_alive_trace),
-+#else
-+    keep_alive_trace,
-+#endif
-     NULL
- };
- 
-diff --git a/gjs-internals-1.0.pc.in b/gjs-internals-1.0.pc.in
-index 701dd42..f4feb19 100644
---- a/gjs-internals-1.0.pc.in
-+++ b/gjs-internals-1.0.pc.in
-@@ -8,10 +8,9 @@ datadir=@datadir@
- 
- jsdir=@gjsjsdir@
- jsnativedir=@gjsnativedir@
--mozjslibdir=@FIREFOX_JS_LIBDIR@
- 
--Cflags: -I${includedir}/gjs-1.0 @JS_EXTRA_CFLAGS@
--Libs: -Wl,--rpath=${mozjslibdir}
-+Cflags: -I${includedir}/gjs-1.0
-+Libs: @GJS_INTERNALS_LIBS@
- Requires: gjs-1.0 gobject-introspection-1.0 @JS_PACKAGE@
- 
- Name: gjs-internals-1.0
-diff --git a/modules/console.c b/modules/console.c
-index 49f891b..8e20db3 100644
---- a/modules/console.c
-+++ b/modules/console.c
-@@ -161,7 +161,11 @@ gjs_console_interact(JSContext *context,
- {
-     JSObject *object = JS_THIS_OBJECT(context, vp);
-     gboolean eof = FALSE;
-+#ifdef HAVE_JS_DESTROYSCRIPT
-     JSScript *script = NULL;
-+#else
-+    JSObject *script = NULL;
-+#endif
-     jsval result;
-     JSString *str;
-     GString *buffer = NULL;
-@@ -192,7 +196,11 @@ gjs_console_interact(JSContext *context,
-             g_string_append(buffer, temp_buf);
-             g_free(temp_buf);
-             lineno++;
-+#ifdef HAVE_JS_DECODEUTF8
-+        } while (!JS_BufferIsCompilableUnit(context, JS_TRUE, object, buffer->str, buffer->len));
-+#else
-         } while (!JS_BufferIsCompilableUnit(context, object, buffer->str, buffer->len));
-+#endif
- 
-         script = JS_CompileScript(context, object, buffer->str, buffer->len, "typein",
-                                   startline);
-@@ -219,8 +227,10 @@ gjs_console_interact(JSContext *context,
-         }
- 
-  next:
-+#ifdef HAVE_JS_DESTROYSCRIPT
-         if (script)
-             JS_DestroyScript(context, script);
-+#endif
-         g_string_free(buffer, TRUE);
-     } while (!eof);
- 
--- 
-1.7.6
-

diff --git a/dev-libs/gjs/gjs-1.33.4.ebuild b/dev-libs/gjs/gjs-1.33.9.ebuild
similarity index 96%
rename from dev-libs/gjs/gjs-1.33.4.ebuild
rename to dev-libs/gjs/gjs-1.33.9.ebuild
index a4b4d6f..767438d 100644
--- a/dev-libs/gjs/gjs-1.33.4.ebuild
+++ b/dev-libs/gjs/gjs-1.33.9.ebuild
@@ -45,9 +45,8 @@ pkg_setup() {
 		--disable-systemtap
 		--disable-dtrace
 		--disable-coverage
+		$(use_enable test tests)
 		"
-	# TODO: figure out how to use the `--disable-test`
-
 	python_set_active_version 2
 	python_pkg_setup
 }

diff --git a/dev-libs/gjs/gjs-9999.ebuild b/dev-libs/gjs/gjs-9999.ebuild
index a4b4d6f..767438d 100644
--- a/dev-libs/gjs/gjs-9999.ebuild
+++ b/dev-libs/gjs/gjs-9999.ebuild
@@ -45,9 +45,8 @@ pkg_setup() {
 		--disable-systemtap
 		--disable-dtrace
 		--disable-coverage
+		$(use_enable test tests)
 		"
-	# TODO: figure out how to use the `--disable-test`
-
 	python_set_active_version 2
 	python_pkg_setup
 }


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
@ 2012-09-15  5:08 Alexandre Rostovtsev
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Rostovtsev @ 2012-09-15  5:08 UTC (permalink / raw
  To: gentoo-commits

commit:     7babffb45dd196c25ecff31da4a5a1cb1d17a3dd
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 15 05:07:29 2012 +0000
Commit:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Sat Sep 15 05:07:29 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=7babffb4

dev-libs/gjs: fix linking with gold

Patch submitted upstream at https://bugzilla.gnome.org/show_bug.cgi?id=684064

---
 dev-libs/gjs/files/gjs-1.33.10-gold.patch |   31 +++++++++++++++++++++++++++++
 dev-libs/gjs/gjs-1.33.10.ebuild           |    5 +++-
 2 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-1.33.10-gold.patch b/dev-libs/gjs/files/gjs-1.33.10-gold.patch
new file mode 100644
index 0000000..a2da173
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-1.33.10-gold.patch
@@ -0,0 +1,31 @@
+From 27969620b7c357bbe7db76a0582638723e417ca7 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sat, 15 Sep 2012 00:56:14 -0400
+Subject: [PATCH] build: Explicitly require libffi
+
+In >=gobject-introspection-1.33.2, libffi was moved from Requires to
+Requires.private. Since gjs directly uses ffi functions, a missing
+PKG_CHECK_MODULES for libffi results in build failure when using GNU
+gold as the linker.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=684064
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5c13722..9564a33 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -121,7 +121,7 @@ CFLAGS="$save_CFLAGS"
+ GOBJECT_INTROSPECTION_REQUIRE([1.33.10])
+ 
+ common_packages="gmodule-2.0 gthread-2.0 gio-2.0 >= glib_required_version mozjs185"
+-gjs_packages="gobject-introspection-1.0 $common_packages"
++gjs_packages="gobject-introspection-1.0 libffi $common_packages"
+ gjs_cairo_gobject_packages="cairo-gobject $common_packages"
+ gjs_cairo_packages="cairo $common_packages"
+ gjs_dbus_packages="dbus-glib-1 $common_packages"
+-- 
+1.7.12
+

diff --git a/dev-libs/gjs/gjs-1.33.10.ebuild b/dev-libs/gjs/gjs-1.33.10.ebuild
index 2c0e6cd..45ba3fd 100644
--- a/dev-libs/gjs/gjs-1.33.10.ebuild
+++ b/dev-libs/gjs/gjs-1.33.10.ebuild
@@ -7,7 +7,7 @@ GCONF_DEBUG="no"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="2"
 
-inherit gnome2 pax-utils python virtualx
+inherit autotools eutils gnome2 pax-utils python virtualx
 if [[ ${PV} = 9999 ]]; then
 	inherit gnome2-live
 fi
@@ -51,6 +51,9 @@ pkg_setup() {
 }
 
 src_prepare() {
+	# https://bugzilla.gnome.org/show_bug.cgi?id=684064
+	epatch "${FILESDIR}/${PN}-1.33.10-gold.patch"
+	eautoreconf
 	gnome2_src_prepare
 	python_convert_shebangs 2 "${S}"/scripts/make-tests
 }


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
@ 2013-11-24 21:38 Gilles Dartiguelongue
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Dartiguelongue @ 2013-11-24 21:38 UTC (permalink / raw
  To: gentoo-commits

commit:     65099a09cf7c4cfd7d81b74e5ba4ec0e6cef67f8
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 24 21:37:05 2013 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sun Nov 24 21:38:09 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=65099a09

dev-libs/gjs: 1.36.1 → 1.38.1

---
 dev-libs/gjs/files/gjs-1.38.1-fix-unittests.patch | 50 +++++++++++++++++
 dev-libs/gjs/gjs-1.38.1.ebuild                    | 68 +++++++++++++++++++++++
 dev-libs/gjs/gjs-9999.ebuild                      | 53 ++++++++----------
 dev-libs/gjs/metadata.xml                         |  5 ++
 4 files changed, 145 insertions(+), 31 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-1.38.1-fix-unittests.patch b/dev-libs/gjs/files/gjs-1.38.1-fix-unittests.patch
new file mode 100644
index 0000000..3a34301
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-1.38.1-fix-unittests.patch
@@ -0,0 +1,50 @@
+From f87c38787640f639da5ebf73014bbcf3b98cd9fc Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters@verbum.org>
+Date: Fri, 25 Oct 2013 16:56:37 +0100
+Subject: [PATCH] tests: Force generation of shared libraries
+
+If installed tests are disabled, we need to force libtool
+to generate .so files that can be dlopened by introspection.
+
+https://bugzilla.gnome.org/710697
+---
+ Makefile-insttest.am | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile-insttest.am b/Makefile-insttest.am
+index 2ebdc77..e63709f 100644
+--- a/Makefile-insttest.am
++++ b/Makefile-insttest.am
+@@ -37,10 +37,15 @@ else
+ check_LTLIBRARIES += libregress.la libwarnlib.la libgimarshallingtests.la
+ endif
+ 
++# This rpath /nowhere thing is the libtool upstream recommended way to
++# force generation of shared libraries, which we need in order for the
++# tests to work uninstalled.
++common_test_ldflags = -avoid-version -rpath /nowhere $(GJS_LIBS)
++
+ nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
+ libregress_la_CPPFLAGS = $(AM_CPPFLAGS)
+ libregress_la_CFLAGS = $(GJS_CFLAGS)
+-libregress_la_LDFLAGS = -avoid-version $(GJS_LIBS)
++libregress_la_LDFLAGS = $(common_test_ldflags)
+ libregress_scannerflags_includes = --include=Gio-2.0
+ if ENABLE_CAIRO
+ libregress_la_CFLAGS += $(GJS_CAIRO_CFLAGS)
+@@ -51,10 +56,10 @@ libregress_la_CPPFLAGS += -D_GI_DISABLE_CAIRO
+ endif
+ nodist_libwarnlib_la_SOURCES = $(GI_DATADIR)/tests/warnlib.c $(GI_DATADIR)/tests/warnlib.h
+ libwarnlib_la_CFLAGS = $(GJS_CFLAGS)
+-libwarnlib_la_LDFLAGS = -avoid-version $(GJS_LIBS)
++libwarnlib_la_LDFLAGS = $(common_test_ldflags)
+ nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
+ libgimarshallingtests_la_CFLAGS = $(GJS_CFLAGS)
+-libgimarshallingtests_la_LDFLAGS = -avoid-version $(GJS_LIBS)
++libgimarshallingtests_la_LDFLAGS = $(common_test_ldflags)
+ 
+ Regress-1.0.gir: libregress.la
+ Regress_1_0_gir_LIBS = libregress.la
+-- 
+1.8.3.2
+

diff --git a/dev-libs/gjs/gjs-1.38.1.ebuild b/dev-libs/gjs/gjs-1.38.1.ebuild
new file mode 100644
index 0000000..2d53fea
--- /dev/null
+++ b/dev-libs/gjs/gjs-1.38.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit autotools eutils gnome2 pax-utils virtualx
+
+DESCRIPTION="Javascript bindings for GNOME"
+HOMEPAGE="http://live.gnome.org/Gjs"
+
+LICENSE="MIT || ( MPL-1.1 LGPL-2+ GPL-2+ )"
+SLOT="0"
+IUSE="+cairo examples"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+
+RDEPEND="
+	>=dev-libs/glib-2.36:2
+	>=dev-libs/gobject-introspection-1.38
+
+	sys-libs/readline
+	dev-lang/spidermonkey:17
+	virtual/libffi
+	cairo? ( x11-libs/cairo )
+"
+DEPEND="${RDEPEND}
+	sys-devel/gettext
+	virtual/pkgconfig
+"
+
+src_prepare() {
+	# From master/1.39
+	epatch "${FILESDIR}/${PN}-1.38.1-fix-unittests.patch"
+	eautoreconf
+
+	gnome2_src_prepare
+}
+
+src_configure() {
+	# FIXME: add systemtap/dtrace support, like in glib:2
+	# FIXME: --enable-systemtap installs files in ${D}/${D} for some reason
+	# XXX: Do NOT enable coverage, completely useless for portage installs
+	gnome2_src_configure \
+		--disable-systemtap \
+		--disable-dtrace \
+		--disable-coverage \
+		$(use_with cairo cairo)
+}
+
+src_test() {
+	# Tests need dbus
+	#Xemake check
+	dbus-launch emake check
+}
+
+src_install() {
+	# installation sometimes fails in parallel
+	gnome2_src_install -j1
+
+	if use examples; then
+		insinto /usr/share/doc/"${PF}"/examples
+		doins "${S}"/examples/*
+	fi
+
+	# Required for gjs-console to run correctly on PaX systems
+	pax-mark mr "${ED}/usr/bin/gjs-console"
+}

diff --git a/dev-libs/gjs/gjs-9999.ebuild b/dev-libs/gjs/gjs-9999.ebuild
index ecd05a0..1390fe0 100644
--- a/dev-libs/gjs/gjs-9999.ebuild
+++ b/dev-libs/gjs/gjs-9999.ebuild
@@ -1,13 +1,11 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-EAPI="4"
+EAPI="5"
 GCONF_DEBUG="no"
-GNOME2_LA_PUNT="yes"
-PYTHON_DEPEND="2"
 
-inherit gnome2 pax-utils python virtualx
+inherit gnome2 pax-utils virtualx
 if [[ ${PV} = 9999 ]]; then
 	inherit gnome2-live
 fi
@@ -17,43 +15,36 @@ HOMEPAGE="http://live.gnome.org/Gjs"
 
 LICENSE="MIT || ( MPL-1.1 LGPL-2+ GPL-2+ )"
 SLOT="0"
-IUSE="examples test"
+IUSE="cairo examples"
 if [[ ${PV} = 9999 ]]; then
 	KEYWORDS=""
 else
-	KEYWORDS="~amd64 ~x86"
+	KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
 fi
 
-RDEPEND=">=dev-libs/glib-2.32:2
-	>=dev-libs/gobject-introspection-1.33.10
+RDEPEND="
+	>=dev-libs/glib-2.36:2
+	>=dev-libs/gobject-introspection-1.38
 
-	dev-libs/dbus-glib
 	sys-libs/readline
-	x11-libs/cairo
-	>=dev-lang/spidermonkey-1.8.5
-	virtual/libffi"
+	dev-lang/spidermonkey:17
+	virtual/libffi
+	cairo? ( x11-libs/cairo )
+"
 DEPEND="${RDEPEND}
 	sys-devel/gettext
-	virtual/pkgconfig"
+	virtual/pkgconfig
+"
 
-pkg_setup() {
-	# AUTHORS, ChangeLog are empty
-	DOCS="NEWS README"
+src_configure() {
 	# FIXME: add systemtap/dtrace support, like in glib:2
 	# FIXME: --enable-systemtap installs files in ${D}/${D} for some reason
 	# XXX: Do NOT enable coverage, completely useless for portage installs
-	G2CONF="${G2CONF}
-		--disable-systemtap
-		--disable-dtrace
-		--disable-coverage
-		$(use_enable test tests)"
-	python_set_active_version 2
-	python_pkg_setup
-}
-
-src_prepare() {
-	gnome2_src_prepare
-	python_convert_shebangs 2 "${S}"/scripts/make-tests
+	gnome2_src_configure \
+		--disable-systemtap \
+		--disable-dtrace \
+		--disable-coverage \
+		$(use_with cairo cairo)
 }
 
 src_test() {
@@ -66,8 +57,8 @@ src_install() {
 	gnome2_src_install -j1
 
 	if use examples; then
-		insinto /usr/share/doc/${PF}/examples
-		doins ${S}/examples/*
+		insinto /usr/share/doc/"${PF}"/examples
+		doins "${S}"/examples/*
 	fi
 
 	# Required for gjs-console to run correctly on PaX systems

diff --git a/dev-libs/gjs/metadata.xml b/dev-libs/gjs/metadata.xml
new file mode 100644
index 0000000..6e0e2ec
--- /dev/null
+++ b/dev-libs/gjs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <herd>gnome</herd>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/
@ 2015-05-10 17:20 Gilles Dartiguelongue
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Dartiguelongue @ 2015-05-10 17:20 UTC (permalink / raw
  To: gentoo-commits

commit:     a0de9f2b43147040db95775dff754daaa608c84e
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Sun May 10 17:13:54 2015 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sun May 10 17:19:46 2015 +0000
URL:        https://gitweb.gentoo.org/proj/gnome.git/commit/?id=a0de9f2b

dev-libs/gjs: 1.42.0 → 1.43.3

 .../gjs/files/gjs-1.42.0-disable-unittest-1.patch  | 48 ----------------------
 ...2.patch => gjs-1.43.3-disable-unittest-1.patch} |  4 +-
 ...3.patch => gjs-1.43.3-disable-unittest-2.patch} |  4 +-
 .../gjs/{gjs-9999.ebuild => gjs-1.43.3.ebuild}     | 22 +++++-----
 dev-libs/gjs/gjs-9999.ebuild                       |  2 +-
 5 files changed, 15 insertions(+), 65 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-1.patch b/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-1.patch
deleted file mode 100644
index 2ec481b..0000000
--- a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-1.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 554c220e78172213e9637f9a901009b4bc964e3a Mon Sep 17 00:00:00 2001
-From: "Jasper St. Pierre" <jstpierre@mecheye.net>
-Date: Wed, 15 Jan 2014 17:00:22 -0500
-Subject: [PATCH] gjs-tests: Remove dumpstack test
-
-OK, I lied. This is the most useless test ever.
----
- test/gjs-tests.cpp | 17 -----------------
- 1 file changed, 17 deletions(-)
-
-diff --git a/test/gjs-tests.cpp b/test/gjs-tests.cpp
-index b79b616..6cade7b 100644
---- a/test/gjs-tests.cpp
-+++ b/test/gjs-tests.cpp
-@@ -163,22 +163,6 @@ gjstest_test_func_gjs_jsapi_util_string_js_string_utf8(void)
- }
- 
- static void
--gjstest_test_func_gjs_stack_dump(void)
--{
--  GjsContext *context;
--
--  /* TODO this test could be better - maybe expose dumpstack as a JS API
--   * so that we have a JS stack to dump?  At least here we're getting some
--   * coverage.
--   */
--  context = gjs_context_new();
--
--  gjs_dumpstack();
--  g_object_unref(context);
--  gjs_dumpstack();
--}
--
--static void
- gjstest_test_func_gjs_jsapi_util_error_throw(void)
- {
-     GjsUnitTestFixture fixture;
-@@ -348,7 +332,6 @@ main(int    argc,
-     g_test_add_func("/gjs/jsutil/strip_shebang/no_shebang", gjstest_test_strip_shebang_no_advance_for_no_shebang);
-     g_test_add_func("/gjs/jsutil/strip_shebang/have_shebang", gjstest_test_strip_shebang_advance_for_shebang);
-     g_test_add_func("/gjs/jsutil/strip_shebang/only_shebang", gjstest_test_strip_shebang_return_null_for_just_shebang);
--    g_test_add_func("/gjs/stack/dump", gjstest_test_func_gjs_stack_dump);
-     g_test_add_func("/util/glib/strv/concat/null", gjstest_test_func_util_glib_strv_concat_null);
-     g_test_add_func("/util/glib/strv/concat/pointers", gjstest_test_func_util_glib_strv_concat_pointers);
- 
--- 
-2.1.2
-

diff --git a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-2.patch b/dev-libs/gjs/files/gjs-1.43.3-disable-unittest-1.patch
similarity index 96%
rename from dev-libs/gjs/files/gjs-1.42.0-disable-unittest-2.patch
rename to dev-libs/gjs/files/gjs-1.43.3-disable-unittest-1.patch
index 2490a63..c6d740a 100644
--- a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-2.patch
+++ b/dev-libs/gjs/files/gjs-1.43.3-disable-unittest-1.patch
@@ -1,4 +1,4 @@
-From 4ea9fda3f323355d10e946d19d817fe8c4e6b533 Mon Sep 17 00:00:00 2001
+From 115c97bb07f71ac91e20b84f9da6389434d31999 Mon Sep 17 00:00:00 2001
 From: Gilles Dartiguelongue <eva@gentoo.org>
 Date: Sun, 12 Oct 2014 21:57:11 +0200
 Subject: [PATCH 1/2] Comment broken unittests
@@ -36,5 +36,5 @@ index 6cade7b..4d6c61e 100644
      g_test_run();
  
 -- 
-2.1.2
+2.3.6
 

diff --git a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-3.patch b/dev-libs/gjs/files/gjs-1.43.3-disable-unittest-2.patch
similarity index 93%
rename from dev-libs/gjs/files/gjs-1.42.0-disable-unittest-3.patch
rename to dev-libs/gjs/files/gjs-1.43.3-disable-unittest-2.patch
index 7b2898b..fe21f92 100644
--- a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-3.patch
+++ b/dev-libs/gjs/files/gjs-1.43.3-disable-unittest-2.patch
@@ -1,4 +1,4 @@
-From da18a2676477138693e893d3245316f987d74497 Mon Sep 17 00:00:00 2001
+From c9d63c7531a29418c64dc44556519d7bd1664ce4 Mon Sep 17 00:00:00 2001
 From: Gilles Dartiguelongue <eva@gentoo.org>
 Date: Sun, 12 Oct 2014 21:57:45 +0200
 Subject: [PATCH 2/2] Comment broken JS unittest
@@ -31,5 +31,5 @@ index b086a66..0c5abb1 100644
  function testToLocaleLowerCase() {
      JSUnit.assertEquals("aaa", "AAA".toLocaleLowerCase());
 -- 
-2.1.2
+2.3.6
 

diff --git a/dev-libs/gjs/gjs-9999.ebuild b/dev-libs/gjs/gjs-1.43.3.ebuild
similarity index 80%
copy from dev-libs/gjs/gjs-9999.ebuild
copy to dev-libs/gjs/gjs-1.43.3.ebuild
index f73a8c3..6ba4ddb 100644
--- a/dev-libs/gjs/gjs-9999.ebuild
+++ b/dev-libs/gjs/gjs-1.43.3.ebuild
@@ -1,14 +1,11 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
 EAPI="5"
 GCONF_DEBUG="no"
 
-inherit gnome2 pax-utils virtualx
-if [[ ${PV} = 9999 ]]; then
-	inherit gnome2-live
-fi
+inherit eutils gnome2 pax-utils virtualx
 
 DESCRIPTION="Javascript bindings for GNOME"
 HOMEPAGE="https://wiki.gnome.org/Projects/Gjs"
@@ -16,11 +13,7 @@ HOMEPAGE="https://wiki.gnome.org/Projects/Gjs"
 LICENSE="MIT || ( MPL-1.1 LGPL-2+ GPL-2+ )"
 SLOT="0"
 IUSE="+cairo examples gtk test"
-if [[ ${PV} = 9999 ]]; then
-	KEYWORDS=""
-else
-	KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-fi
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 
 RDEPEND="
 	>=dev-libs/glib-2.36:2
@@ -33,13 +26,18 @@ RDEPEND="
 	gtk? ( x11-libs/gtk+:3 )
 "
 DEPEND="${RDEPEND}
+	gnome-base/gnome-common
 	sys-devel/gettext
 	virtual/pkgconfig
 	test? ( sys-apps/dbus )
 "
 
-# Large amount of tests are broken even in master.
-#RESTRICT="test"
+src_prepare() {
+	# Disable broken unittests
+	epatch "${FILESDIR}"/${PN}-1.43.3-disable-unittest-*.patch
+
+	gnome2_src_prepare
+}
 
 src_configure() {
 	# FIXME: add systemtap/dtrace support, like in glib:2

diff --git a/dev-libs/gjs/gjs-9999.ebuild b/dev-libs/gjs/gjs-9999.ebuild
index f73a8c3..e31ed96 100644
--- a/dev-libs/gjs/gjs-9999.ebuild
+++ b/dev-libs/gjs/gjs-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-10 17:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-27 10:41 [gentoo-commits] proj/gnome:master commit in: dev-libs/gjs/, dev-libs/gjs/files/ Priit Laes
  -- strict thread matches above, loose matches on Subject: below --
2015-05-10 17:20 Gilles Dartiguelongue
2013-11-24 21:38 Gilles Dartiguelongue
2012-09-15  5:08 Alexandre Rostovtsev
2011-07-30  4:21 Alexandre Restovtsev
2011-05-18 15:36 Nirbheek Chauhan
2011-03-17  3:49 Nirbheek Chauhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox