diff --git a/gjs.changes b/gjs.changes index 9acf77d..2eaa2d4 100644 --- a/gjs.changes +++ b/gjs.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Jun 17 09:49:37 CEST 2011 - vuntz@opensuse.org + +- Make it possible to build against js instead of xulrunner. This + is controlled by a build_with_xulrunner define: + + if it's set to a value other than 0, we keep the previous + behavior. + + if it's set to 0, we ignore all the xulrunner-related + BuildRequires and Requires, and instead use a + pkgconfig(mozjs185) BuildRequires. +- Stop pretending we build against xulrunner from old openSUSE. + ------------------------------------------------------------------- Wed Jun 15 12:31:48 CEST 2011 - dimstar@opensuse.org diff --git a/gjs.spec b/gjs.spec index 1d72ffb..7fb598d 100644 --- a/gjs.spec +++ b/gjs.spec @@ -15,16 +15,10 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +# Set to 1 to build with xulrunner, else we build with js +%define build_with_xulrunner 0 -%if 0%{suse_version} > 1130 %define xulrunner_ver 20 -%else -%if 0%{suse_version} > 1120 -%define xulrunner_ver 192 -%else -%define xulrunner_ver 191 -%endif -%endif Name: gjs Version: 1.29.0 @@ -36,13 +30,18 @@ Group: Development/Libraries/GNOME Url: http://live.gnome.org/Gjs Source: %{name}-%{version}.tar.bz2 BuildRequires: gcc-c++ +%if %{build_with_xulrunner} BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel +%endif BuildRequires: python BuildRequires: readline-devel BuildRequires: systemtap-sdt-devel BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(gobject-introspection-1.0) +%if ! %{build_with_xulrunner} +BuildRequires: pkgconfig(mozjs185) +%endif Requires: libgjs0 = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -54,9 +53,11 @@ Mozilla SpiderMonkey JavaScript engine. License: MIT License (or similar) Summary: JavaScript bindings based on gobject-introspection and Mozilla Group: Development/Libraries/GNOME +%if %{build_with_xulrunner} # Explicitly requires the xulrunner version we need, instead of hoping we'll # get the right one with the libmozjs.so Requires. Requires: mozilla-xulrunner%{xulrunner_ver} +%endif Provides: libgjs-0 = %{version} Obsoletes: libgjs-0 < %{version} @@ -69,7 +70,9 @@ License: MIT License (or similar) Summary: JavaScript bindings based on gobject-introspection and Mozilla Group: Development/Libraries/GNOME Requires: libgjs0 = %{version} +%if %{build_with_xulrunner} Requires: mozilla-xulrunner%{xulrunner_ver}-devel +%endif # Just a helper provides Provides: gjs-devel = %{version}