[libchamplain] patch configure* to look for clutter-gtk-1.0, update to 0.8.0, conditionalize python-bindings

Tom Callaway spot at fedoraproject.org
Thu Sep 30 19:48:03 UTC 2010


commit 2dbad7db9e0a7af24f894f2ee6df596079ac3b29
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Thu Sep 30 15:48:01 2010 -0400

    patch configure* to look for clutter-gtk-1.0, update to 0.8.0, conditionalize python-bindings

 libchamplain-0.8.0-clutter-gtk-1.0.patch |   92 ++++++++++++++++++++++++++++++
 libchamplain.spec                        |   67 ++++++++++++++--------
 2 files changed, 136 insertions(+), 23 deletions(-)
---
diff --git a/libchamplain-0.8.0-clutter-gtk-1.0.patch b/libchamplain-0.8.0-clutter-gtk-1.0.patch
new file mode 100644
index 0000000..06fff3e
--- /dev/null
+++ b/libchamplain-0.8.0-clutter-gtk-1.0.patch
@@ -0,0 +1,92 @@
+diff -up libchamplain-0.8.0/champlain-gtk.pc.in.clutter-gtk-1.0 libchamplain-0.8.0/champlain-gtk.pc.in
+--- libchamplain-0.8.0/champlain-gtk.pc.in.clutter-gtk-1.0	2010-09-29 13:03:47.276924166 -0400
++++ libchamplain-0.8.0/champlain-gtk.pc.in	2010-09-29 13:03:58.400924012 -0400
+@@ -8,4 +8,4 @@ Description: Gtk+ Widget wrapper for lib
+ Version: @VERSION@
+ Libs: -L${libdir} -lchamplain-gtk- at CHAMPLAIN_API_VERSION@
+ Cflags: -I${includedir}/libchamplain-gtk- at CHAMPLAIN_API_VERSION@
+-Requires: champlain- at CHAMPLAIN_API_VERSION@ clutter-gtk-0.10 gtk+-2.0
++Requires: champlain- at CHAMPLAIN_API_VERSION@ clutter-gtk-1.0 gtk+-2.0
+diff -up libchamplain-0.8.0/configure.ac.clutter-gtk-1.0 libchamplain-0.8.0/configure.ac
+--- libchamplain-0.8.0/configure.ac.clutter-gtk-1.0	2010-09-27 11:36:39.000000000 -0400
++++ libchamplain-0.8.0/configure.ac	2010-09-29 13:03:02.048924000 -0400
+@@ -133,7 +133,7 @@ AC_ARG_ENABLE(gtk,
+ if test x$enable_gtk = xyes; then
+   PKG_CHECK_MODULES(GTK,
+     [   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+     ]
+   )
+   AC_SUBST(GTK_CFLAGS)
+diff -up libchamplain-0.8.0/configure.clutter-gtk-1.0 libchamplain-0.8.0/configure
+--- libchamplain-0.8.0/configure.clutter-gtk-1.0	2010-09-27 11:48:42.000000000 -0400
++++ libchamplain-0.8.0/configure	2010-09-29 13:03:02.054924000 -0400
+@@ -12619,18 +12619,18 @@ if test -n "$GTK_CFLAGS"; then
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   \""; } >&5
+   ($PKG_CONFIG --exists --print-errors "   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   ") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+   pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   " 2>/dev/null`
+ else
+@@ -12644,18 +12644,18 @@ if test -n "$GTK_LIBS"; then
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   \""; } >&5
+   ($PKG_CONFIG --exists --print-errors "   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   ") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+   pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   " 2>/dev/null`
+ else
+@@ -12678,12 +12678,12 @@ else
+ fi
+         if test $_pkg_short_errors_supported = yes; then
+ 	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   " 2>&1`
+         else
+ 	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   " 2>&1`
+         fi
+@@ -12691,7 +12691,7 @@ fi
+ 	echo "$GTK_PKG_ERRORS" >&5
+ 
+ 	as_fn_error $? "Package requirements (   gtk+-2.0 >= 2.12
+-        clutter-gtk-0.10 >= 0.10
++        clutter-gtk-1.0 >= 0.10
+ 
+   ) were not met:
+ 
diff --git a/libchamplain.spec b/libchamplain.spec
index a7b357b..56ac61e 100644
--- a/libchamplain.spec
+++ b/libchamplain.spec
@@ -1,14 +1,18 @@
 # sitelib for noarch packages, sitearch for others (remove the unneeded one)
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
+# Are there python bindings?
+%global python_bindings 0
+
 Summary:	Map view for Clutter
 Name:		libchamplain
-Version:	0.6.1
-Release:	5%{?dist}
+Version:	0.8.0
+Release:	1%{?dist}
 License:	LGPLv2+
 Group:		System Environment/Libraries
 URL:		http://projects.gnome.org/libchamplain/
-Source0:	http://download.gnome.org/sources/libchamplain/0.6/%{name}-%{version}.tar.bz2
+Source0:	http://download.gnome.org/sources/libchamplain/0.8/%{name}-%{version}.tar.bz2
+Patch0:		libchamplain-0.8.0-clutter-gtk-1.0.patch
 
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
@@ -18,10 +22,12 @@ BuildRequires:	chrpath
 BuildRequires:	clutter-devel
 BuildRequires:	clutter-gtk-devel
 BuildRequires:	libsoup-devel
+%if 0%{python_bindings}
 BuildRequires:	pyclutter-devel
 BuildRequires:	pyclutter-gtk-devel
 BuildRequires:	pygobject2-devel
 BuildRequires:	pygtk2-devel
+%endif
 BuildRequires:	sqlite-devel
 
 %description
@@ -66,6 +72,7 @@ Requires:	%{name}-devel = %{version}-%{release}
 %description vala
 This package contains vala bindings for development %{name}.
 
+%if 0%{python_bindings}
 %package python
 Summary:	Python bindings for %{name}
 Group:		Development/Libraries
@@ -73,13 +80,18 @@ Requires:	%{name}-devel = %{version}-%{release}
 
 %description python
 This package contains python bindings for development %{name}.
+%endif
 
 %prep
 %setup -q
+%patch0 -p1 -b .clutter-gtk-1.0
 
 %build
 %configure --disable-debug --disable-silent-rules --disable-static \
-  --enable-gtk --enable-gtk-doc --enable-introspection=yes --enable-python
+%if 0%{python_bindings}
+  --enable-python \
+%endif
+  --enable-gtk --enable-gtk-doc --enable-introspection=yes
 
 # Omit unused direct shared library dependencies.
 sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool
@@ -93,9 +105,11 @@ make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
 find $RPM_BUILD_ROOT -type f -name "*.la" -delete
 
 # Remove rpaths.
-chrpath --delete $RPM_BUILD_ROOT%{_libdir}/%{name}-gtk-0.6.so.0.0.1
+chrpath --delete $RPM_BUILD_ROOT%{_libdir}/%{name}-gtk-*.so.*
+%if 0%{python_bindings}
 chrpath --delete $RPM_BUILD_ROOT%{python_sitearch}/champlaingtk.so
 chrpath --delete $RPM_BUILD_ROOT%{python_sitearch}/champlain.so
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -111,8 +125,8 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS ChangeLog COPYING README NEWS
-%{_libdir}/girepository-1.0/Champlain-0.6.typelib
-%{_libdir}/%{name}-0.6.so.*
+%{_libdir}/girepository-1.0/Champlain-0.8.typelib
+%{_libdir}/%{name}-0.8.so.*
 
 %files devel
 %defattr(-,root,root,-)
@@ -122,49 +136,56 @@ rm -rf $RPM_BUILD_ROOT
 %doc demos/markers.h
 %doc demos/polygons.c
 %doc demos/url-marker.c
-%{_datadir}/gir-1.0/Champlain-0.6.gir
-%{_libdir}/%{name}-0.6.so
-%{_libdir}/pkgconfig/champlain-0.6.pc
+%{_datadir}/gir-1.0/Champlain-0.8.gir
+%{_libdir}/%{name}-0.8.so
+%{_libdir}/pkgconfig/champlain-0.8.pc
 
 %dir %{_datadir}/gtk-doc/html/libchamplain
 %doc %{_datadir}/gtk-doc/html/libchamplain/*
 
-%dir %{_includedir}/%{name}-0.6
-%{_includedir}/%{name}-0.6/champlain
+%dir %{_includedir}/%{name}-0.8
+%{_includedir}/%{name}-0.8/champlain
 
 %files gtk
 %defattr(-,root,root,-)
-%{_libdir}/girepository-1.0/GtkChamplain-0.6.typelib
-%{_libdir}/%{name}-gtk-0.6.so.*
+%{_libdir}/girepository-1.0/GtkChamplain-0.8.typelib
+%{_libdir}/%{name}-gtk-0.8.so.*
 
 %files gtk-devel
 %defattr(-,root,root,-)
 %doc demos/launcher-gtk.c
 %doc demos/markers.c
 %doc demos/markers.h
-%{_datadir}/gir-1.0/GtkChamplain-0.6.gir
-%{_libdir}/%{name}-gtk-0.6.so
-%{_libdir}/pkgconfig/champlain-gtk-0.6.pc
+%{_datadir}/gir-1.0/GtkChamplain-0.8.gir
+%{_libdir}/%{name}-gtk-0.8.so
+%{_libdir}/pkgconfig/champlain-gtk-0.8.pc
 
 %dir %{_datadir}/gtk-doc/html/libchamplain-gtk
 %doc %{_datadir}/gtk-doc/html/libchamplain-gtk/*
 
-%dir %{_includedir}/%{name}-gtk-0.6
-%{_includedir}/%{name}-gtk-0.6/champlain-gtk
+%dir %{_includedir}/%{name}-gtk-0.8
+%{_includedir}/%{name}-gtk-0.8/champlain-gtk
 
+%if 0%{python_bindings}
 %files python
 %defattr(-,root,root,-)
 %{python_sitearch}/champlaingtk.so
 %{python_sitearch}/champlain.so
+%endif
 
 %files vala
 %defattr(-,root,root,-)
-%{_datadir}/vala/vapi/champlain-0.6.deps
-%{_datadir}/vala/vapi/champlain-0.6.vapi
-%{_datadir}/vala/vapi/champlain-gtk-0.6.deps
-%{_datadir}/vala/vapi/champlain-gtk-0.6.vapi
+%{_datadir}/vala/vapi/champlain-0.8.deps
+%{_datadir}/vala/vapi/champlain-0.8.vapi
+%{_datadir}/vala/vapi/champlain-gtk-0.8.deps
+%{_datadir}/vala/vapi/champlain-gtk-0.8.vapi
 
 %changelog
+* Wed Sep 29 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 0.8.0-1
+- update to 0.8.0
+- patch configure* to look for clutter-gtk-1.0
+- conditionalize python bindings
+
 * Tue Sep 21 2010 Matthias Clasen <mclasen at redhat.com> - 0.6.1-5
 - Rebuild against newer gobject-introspection
 


More information about the scm-commits mailing list