[arch-commits] Commit in totem/trunk (30_totem_xulrunner19.patch PKGBUILD)

Jan de Groot jgc at archlinux.org
Sat Jun 21 23:37:43 UTC 2008


    Date: Saturday, June 21, 2008 @ 19:37:43
  Author: jgc
Revision: 3310

upgpkg: totem 2.22.2-1
    Fix configure options, compile against xulrunner 1.9

Added:
  totem/trunk/30_totem_xulrunner19.patch
Modified:
  totem/trunk/PKGBUILD

----------------------------+
 30_totem_xulrunner19.patch |  164 +++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD                   |   19 +++-
 2 files changed, 176 insertions(+), 7 deletions(-)

Added: 30_totem_xulrunner19.patch
===================================================================
--- 30_totem_xulrunner19.patch	                        (rev 0)
+++ 30_totem_xulrunner19.patch	2008-06-21 23:37:43 UTC (rev 3310)
@@ -0,0 +1,164 @@
+Summary:
+
+Fix configure.in to detect xulrunner-1.9 as gecko=mozilla 1.9
+  - update configure.in:
+
+Instructions:
+
+1. Drop this into debian/patches directory of totem package and add the filename
+used into the debian/patches/series file such that it gets applied _before_ the
+autoconf patch.
+2. Update autoconf patch by: QUILT_PATCHES=debian/patches quilt push -a; autoconf; quilt refresh --diffstat -U --no-timestamps
+3. Build as usually (e.g. dpkg-buildpackage -rfakeroot -b)
+
+Tested Package Versions:
+ + totem >= 2.21.2-0ubuntu2, build: OK, works: OK (asac)
+
+---
+ configure.in |   77 ++++++++++++++++++++++++++++++++++++++++++++---------------
+ 1 file changed, 58 insertions(+), 19 deletions(-)
+
+--- a/configure.in	2008-02-27 12:24:51.000000000 +0100
++++ b/configure.in	2008-02-27 12:25:05.000000000 +0100
+@@ -590,13 +590,19 @@
+ 	if test -z "$with_gecko"; then
+ 		dnl Autodetect gecko
+ 		for g in $GECKOS; do
++			if $PKG_CONFIG --exists $g-plugin; then
++				gecko=$g
++				break;
++			fi
+ 			if $PKG_CONFIG --exists $g-xpcom; then
+ 				gecko=$g
+ 				break;
+ 			fi
+ 		done
+ 	elif ! $PKG_CONFIG --exists $gecko-xpcom; then
+-		AC_MSG_ERROR([Gecko "$gecko" not found])
++		if ! $PKG_CONFIG --exists $gecko-plugin; then
++			AC_MSG_ERROR([Gecko "$gecko" not found])
++		fi
+ 	fi
+ 
+ 	if test -z "$gecko" -a "$enable_browser_plugins" = "autodetect"; then
+@@ -634,24 +640,35 @@
+ # Check for mozilla modules, but keep the CFLAGS and LIBS in
+ # separate vars
+ if test "$enable_browser_plugins" = "yes" ; then
+-	PKG_CHECK_MODULES([MOZILLA_NOT_LINKED],
+-		[$MOZILLA-xpcom >= $MOZILLA_VERSION_MIN \
+-		 $MOZILLA-plugin],,
+-                [enable_browser_plugins=no])
++	if $PKG_CONFIG --exists $MOZILLA-plugin; then
++		MOZILLA_VERSION_MIN=1.9
++		PKG_CHECK_MODULES([MOZILLA_NOT_LINKED],
++			[libxul $MOZILLA-plugin >= $MOZILLA_VERSION_MIN],,
++        	         [enable_browser_plugins=no])
++ 	else
++		PKG_CHECK_MODULES([MOZILLA_NOT_LINKED],
++			[$MOZILLA-xpcom >= $MOZILLA_VERSION_MIN \
++			$MOZILLA-plugin],,
++			[enable_browser_plugins=no])
++	fi
+ fi
+ # Check for other required modules, and merge CFLAGS, but not link
+ # flags to avoid linking against -lxpcom -lplds4 -lplc4 -lnspr4
+ if test "$enable_browser_plugins" = "yes" ; then
+ 	PKG_CHECK_MODULES([BROWSER_PLUGIN],
+ 		[glib-2.0
+-		 gnome-vfs-2.0 >= $GNOMEVFS_REQS
+-		 gnome-vfs-module-2.0 >= $GNOMEVFS_REQS
+-		 gthread-2.0
+-		 totem-plparser-mini >= $TOTEM_PLPARSER_REQS],
++		gnome-vfs-2.0 >= $GNOMEVFS_REQS
++		gnome-vfs-module-2.0 >= $GNOMEVFS_REQS
++		gthread-2.0
++		totem-plparser-mini >= $TOTEM_PLPARSER_REQS],
+ 		[],[enable_browser_plugins=no])
+ 
+ 	BROWSER_PLUGIN_CFLAGS="$MOZILLA_NOT_LINKED_CFLAGS $BROWSER_PLUGIN_CFLAGS"
+ 	AC_SUBST([BROWSER_PLUGIN_CFLAGS])
++	# for xul 1.9 we have to link anyway
++	if test "$MOZILLA_VERSION_MIN" = 1.9; then
++		BROWSER_PLUGIN_LIBS="$MOZILLA_NOT_LINKED_LIBS $BROWSER_PLUGIN_LIBS"
++	fi
+ 	AC_SUBST([BROWSER_PLUGIN_LIBS])
+ 
+ 	# Earlier versions misdetect playlists
+@@ -683,10 +700,18 @@
+ 
+ # Sets some variables, and check for xpidl
+ if test "$enable_browser_plugins" = "yes" ; then
+-	MOZILLA_PREFIX="`$PKG_CONFIG $MOZILLA-xpcom --variable=prefix`"
+-	MOZILLA_LIBDIR="`$PKG_CONFIG $MOZILLA-xpcom --variable=libdir`"
+-	MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
+-	MOZILLA_XPCOM_CFLAGS="-I`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
++	if $PKG_CONFIG --exists $MOZILLA-plugin; then
++		MOZILLA_PREFIX="`$PKG_CONFIG $MOZILLA-plugin --variable=prefix`"
++		MOZILLA_LIBDIR="`$PKG_CONFIG $MOZILLA-plugin --variable=sdkdir`/bin"
++		MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-plugin`"
++		MOZILLA_XPCOM_CFLAGS="`$PKG_CONFIG --cflags $MOZILLA-plugin` `$PKG_CONFIG --cflags libxul-unstable`"
++	else
++		MOZILLA_PREFIX="`$PKG_CONFIG $MOZILLA-plugin --variable=prefix`"
++		MOZILLA_LIBDIR="`$PKG_CONFIG $MOZILLA-plugin --variable=libdir`"
++		MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
++		MOZILLA_XPCOM_CFLAGS="`$PKG_CONFIG --cflags $MOZILLA-xpcom`"
++	fi
++
+ 	MOZILLA_PLUGINDIR="${MOZILLA_PLUGINDIR:-"\${libdir}/mozilla/plugins"}"
+ 
+ 	AC_PATH_PROG([MOZILLA_XPIDL], [xpidl], [no], [$MOZILLA_LIBDIR:$PATH])
+@@ -708,8 +733,12 @@
+ 
+ # Search for the idl include directory
+ if test "$enable_browser_plugins" = "yes" ; then
+-	dnl This only works on gecko 1.8
+-	MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir $MOZILLA-xpcom`"
++	dnl This only works on gecko 1.9 and 1.8
++	if $PKG_CONFIG --exists libxul; then
++		MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir libxul`/unstable"
++	else
++		MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir $MOZILLA-xpcom`"
++	fi
+ 	dnl Fallback for older versions
+ 	if test "x$MOZILLA_IDLDIR" = "x"; then
+ 		MOZILLA_IDLDIR="`echo $MOZILLA_LIBDIR | sed -e s!lib!share/idl!`"
+@@ -741,8 +770,14 @@
+ 
+ 	CPPFLAGS="$CPPFLAGS -I$MOZILLA_INCLUDE_ROOT"
+ 	CXXFLAGS="$CXXFLAGS $MOZILLA_NOT_LINKED_CFLAGS"
+-	LIBS="$LIBS -L$MOZILLA_LIBDIR -lxpcom -lxpcomglue_s"
+-	LDFLAGS="$LDFLAGS -Wl,--rpath -Wl,$MOZILLA_LIBDIR"
++	if test $MOZILLA_VERSION_MIN = 1.9; then
++		CPPFLAGS="$CPPFLAGS -I$MOZILLA_INCLUDE_ROOT/unstable"
++		LIBS="$LIBS $MOZILLA_NOT_LINKED_LIBS"
++		LDFLAGS="$LDFLAGS -Wl,--rpath -Wl,$MOZILLA_LIBDIR"
++        else 
++		LIBS="$LIBS -L$MOZILLA_LIBDIR -lxpcom -lxpcomglue_s"
++		LDFLAGS="$LDFLAGS -Wl,--rpath -Wl,$MOZILLA_LIBDIR"
++	fi
+ 
+ 	AC_MSG_CHECKING([for libxpcomglue_s])
+ 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+@@ -763,7 +798,11 @@
+ 	AC_LANG_POP([C++])
+ 
+ 	if test "$have_libxpcomglue_s" = "yes"; then
+-		LIBXPCOMGLUE_S="-L$MOZILLA_LIBDIR -lxpcomglue_s"
++		if test $MOZILLA_VERSION_MIN = 1.9; then
++			LIBXPCOMGLUE_S="$MOZILLA_NOT_LINKED_LIBS"
++		else
++			LIBXPCOMGLUE_S="-L$MOZILLA_LIBDIR -lxpcomglue_s"
++		fi
+ 	else
+ 		AC_MSG_WARN([libxpcomglue_s not available; plugins may not be portable])
+ 	fi
+@@ -795,7 +834,7 @@
+ if test "$enable_browser_plugins" = "yes"; then
+ 	AC_LANG_PUSH([C++])
+ 	__SAVE_CPPFLAGS=$CPPFLAGS
+-	CPPFLAGS="$CPPFLAGS $MOZILLA_NOT_LINKED_CFLAGS -I$MOZILLA_INCLUDE_ROOT -I$MOZILLA_INCLUDE_ROOT/xpcom"
++	CPPFLAGS="$CPPFLAGS $MOZILLA_NOT_LINKED_CFLAGS -I$MOZILLA_INCLUDE_ROOT/xpcom -I$MOZILLA_INCLUDE_ROOT/unstable -I$MOZILLA_INCLUDE_ROOT/stable"
+ 
+ 	AC_CHECK_HEADERS([nsTArray.h])
+ 

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-06-21 23:25:50 UTC (rev 3309)
+++ PKGBUILD	2008-06-21 23:37:43 UTC (rev 3310)
@@ -8,24 +8,29 @@
 pkgdesc="A GNOME2 integrated movie player based on Gstreamer."
 arch=(i686 x86_64)
 license=('GPL')
-depends=('gstreamer0.10-good-plugins' 'totem-plparser>=2.22.2' 'libxxf86vm' 'libxtst' 'desktop-file-utils' 'iso-codes' 'libepc>=0.3.5' 'python>=2.5' 'startup-notification' 'libgnomeui>=2.22.1' 'python-gdata' 'gnome-vfs>=2.22.0-2')
-makedepends=('perlxml' 'nautilus>=2.22.2' 'xulrunner>=1.8.1.12' 'pkgconfig' 'bluez-libs' 'lirc-utils' 'gnome-doc-utils>=0.12.2' 'gnome-control-center>=2.22.1' 'libtracker')
+depends=('gstreamer0.10-good-plugins' 'totem-plparser>=2.22.3' 'libxxf86vm' 'libxtst' 'desktop-file-utils' 'iso-codes>=2.0' 'libepc>=0.3.5' 'python>=2.5.2' 'startup-notification' 'libgnomeui>=2.22.1' 'python-gdata' 'gnome-vfs>=2.22.0-2')
+makedepends=('perlxml' 'nautilus>=2.22.2' 'xulrunner>=1.9' 'pkgconfig' 'bluez-libs' 'lirc-utils' 'gnome-doc-utils>=0.12.2' 'gnome-control-center>=2.22.1' 'libtracker')
 options=('!libtool' '!emptydirs')
 conflicts=('totem-xine')
 groups=('gnome-extra')
 install=totem.install
-source=(http://ftp.gnome.org/pub/gnome/sources/totem/2.22/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('6062080e81b4859f87fee8a592b92489')
+source=(http://ftp.gnome.org/pub/gnome/sources/totem/2.22/${pkgname}-${pkgver}.tar.bz2
+	30_totem_xulrunner19.patch)
+md5sums=('6062080e81b4859f87fee8a592b92489' '42e3246acb3163bab35fc12816a19419')
 
 build() {
   cd ${startdir}/src/${pkgname}-${pkgver}
+  patch -Np1 -i ${startdir}/src/30_totem_xulrunner19.patch || return 1
+  libtoolize --force --copy || return 1
+  aclocal || return 1
+  autoconf || return 1
+  automake --add-missing || return 1
   ./configure --prefix=/usr --sysconfdir=/etc \
               --libexecdir=/usr/lib/totem \
               --localstatedir=/var --disable-static \
-	      --disable-lirc \
-	      --enable-nautilus --enable-gstreamer \
+	      --enable-nautilus \
 	      --enable-mozilla --with-dbus \
-	      --disable-scrollkeeper --disable-vanity || return 1
+	      --disable-scrollkeeper || return 1
   make || return 1
   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \
        DESTDIR=${startdir}/pkg install || return 1





More information about the arch-commits mailing list