public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-libs/libproxy/files: libproxy-0.2.3-fix-automagic-mozjs.patch
@ 2009-06-29 19:26 Mart Raudsepp (leio)
  0 siblings, 0 replies; only message in thread
From: Mart Raudsepp (leio) @ 2009-06-29 19:26 UTC (permalink / raw
  To: gentoo-commits

leio        09/06/29 19:26:14

  Added:                libproxy-0.2.3-fix-automagic-mozjs.patch
  Log:
  Fix automagic mozilla-js provider picking, so that with USE=xulrunner xulrunner-1.9 is always picked, and with USE="seamonkey -xulrunner" seamonkey-js is always picked. Depend on a xulrunner:1.9 that has its mozilla-js pkgconfig file usable for us while building to fix bug 275318 once and for all
  (Portage version: 2.2_rc22/cvs/Linux 2.6.30-gentoo-r1 x86_64, RepoMan options: --force)

Revision  Changes    Path
1.1                  net-libs/libproxy/files/libproxy-0.2.3-fix-automagic-mozjs.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/libproxy/files/libproxy-0.2.3-fix-automagic-mozjs.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/libproxy/files/libproxy-0.2.3-fix-automagic-mozjs.patch?rev=1.1&content-type=text/plain

Index: libproxy-0.2.3-fix-automagic-mozjs.patch
===================================================================
--- configure.ac.orig	2009-06-29 11:15:29.169464423 +0300
+++ configure.ac	2009-06-29 11:16:03.963593002 +0300
@@ -17,9 +17,6 @@
 PKG_CHECK_MODULES(xmu, xmu, have_xmu=yes, have_xmu=no)
 PKG_CHECK_MODULES(gconf, gconf-2.0, have_gconf=yes, have_gconf=no)
 PKG_CHECK_MODULES(webkit, webkit-1.0, have_webkit=yes, have_webkit=no)
-PKG_CHECK_MODULES(mozjs, xulrunner-js, have_mozjs=yes, 
-		[PKG_CHECK_MODULES(mozjs, firefox-js, have_mozjs=yes,
-		[PKG_CHECK_MODULES(mozjs, mozilla-js, have_mozjs=yes, have_mozjs=no)])])
 PKG_CHECK_MODULES(NetworkManager, NetworkManager, 
 					have_networkmanager=yes, have_networkmanager=no)
 PKG_CHECK_MODULES(dbus, dbus-1, have_dbus=yes, have_dbus=no)
@@ -111,24 +108,32 @@
 
 # Mozilla Javascript
 AC_ARG_WITH([mozjs],
-            [AS_HELP_STRING([--with-mozjs],
-            [build Mozilla JavaScript PAC runner plugin @<:@automatic@:>@])],
+            [AS_HELP_STRING([--with-mozjs@<:@=xulrunner|firefox|mozilla|seamonkey|no@:>@],
+            [build Mozilla JavaScript PAC runner plugin (autodetected by default)])],
             [],
-            [test x$have_mozjs == xyes && with_mozjs=yes])
-if test x$with_mozjs = xyes; then
-	if test x$have_mozjs == xyes; then
-		MOZJS_CFLAGS="$mozjs_CFLAGS"
-		MOZJS_LIBS="$mozjs_LIBS"
-		AC_SUBST(MOZJS_CFLAGS)
-		AC_SUBST(MOZJS_LIBS)
-	else
-		echo "Mozilla JavaScript plugin requires: mozjs!"
-		exit 1
-	fi
+            [with_mozjs=auto])
+
+if (test x$with_mozjs = xauto || test x$with_mozjs = xyes); then
+	PKG_CHECK_MODULES(mozjs, xulrunner-js, with_mozjs=xulrunner, 
+			[PKG_CHECK_MODULES(mozjs, firefox-js, with_mozjs=firefox,
+			[PKG_CHECK_MODULES(mozjs, mozilla-js, with_mozjs=mozilla,
+			[PKG_CHECK_MODULES(mozjs, seamonkey-js, with_mozjs=seamonkey,
+				[test x$with_mozjs = xauto && with_mozjs = no || with_mozjs = error])])])])
+elif test x$with_mozjs != xno; then
+	PKG_CHECK_MODULES(mozjs, [$with_mozjs[]-js])
+fi
+
+if test x$with_mozjs = xerror; then
+	AC_MSG_ERROR([cannot find any mozjs provider])
 else
-	with_mozjs=no
+	AC_MSG_RESULT([$with_mozjs])
+	MOZJS_CFLAGS="$mozjs_CFLAGS"
+	MOZJS_LIBS="$mozjs_LIBS"
+	AC_SUBST(MOZJS_CFLAGS)
+	AC_SUBST(MOZJS_LIBS)
 fi
-AM_CONDITIONAL([WITH_MOZJS], [test x$with_mozjs = xyes])
+
+AM_CONDITIONAL([WITH_MOZJS], [test x$with_mozjs != xno])
 
 # NetworkManager
 AC_ARG_WITH([networkmanager],






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-29 19:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-29 19:26 [gentoo-commits] gentoo-x86 commit in net-libs/libproxy/files: libproxy-0.2.3-fix-automagic-mozjs.patch Mart Raudsepp (leio)

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