--- /dev/null
+--- gegl-qt-0.0.7/pygegl-qt/pygegl-qt.pro.orig 2013-07-12 19:13:36.533142354 +0200
++++ gegl-qt-0.0.7/pygegl-qt/pygegl-qt.pro 2013-07-12 20:19:08.606310673 +0200
+@@ -33,7 +33,7 @@
+ -I$$[QT_INSTALL_HEADERS]/QtNetwork
+ }
+
+-INCLUDES += $$system(pkg-config --cflags gegl pygobject-2.0 gobject-2.0 pyside)
++INCLUDES += $$system(pkg-config --cflags gegl-0.2 pygobject-2.0 gobject-2.0 pyside shiboken QtCore)
+
+ # pkg-config --libs pyside is buggy for pyside<1.0.5 due
+ # http://bugs.pyside.org/show_bug.cgi?id=929
+@@ -50,7 +50,7 @@
+ # Generate
+ QMAKE_EXTRA_TARGETS += generate
+ generate.target = generate
+-generate.commands += generatorrunner --generatorSet=shiboken \
++generate.commands += shiboken \
+ global.h \
+ --include-paths=$$GEN_INCLUDE_PATHS \
+ --typesystem-paths=$$OUT_PWD:$$IN_PWD:$$TYPESYSTEM_DIR \
# TODO:
-# - python support (PySide)
# - qt5
+#
+# Conditional build:
+%bcond_without python # Python (PySide) binding
+#
Summary: Qt utility library for GEGL
Summary(pl.UTF-8): Biblioteka narzędziowa Qt dla biblioteki GEGL
Name: gegl-qt
# git diff 0.0.7 4f46898e7dfaade23553f167bb03caf95171c0e7 (before switch to gegl 0.3)
# (then adjusted to apply on dist tarball)
Patch0: %{name}-git.patch
+Patch1: %{name}-shiboken.patch
URL: http://www.gegl.org/
BuildRequires: QtCore-devel
BuildRequires: QtDeclarative-devel
BuildRequires: gegl-devel >= 0.2.0
BuildRequires: pkgconfig
BuildRequires: qt4-qmake
+BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: texlive-format-pdflatex
BuildRequires: texlive-latex-extend
+%if %{with python}
+BuildRequires: python-PySide-devel
+BuildRequires: shiboken
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%description -n gegl-qt4-devel -l pl.UTF-8
Pliki nagłówkowe biblioteki gegl-qt4.
+%package -n python-gegl-qt4
+Summary: Python (PySide) binding for gegl-qt4 library
+Summary(pl.UTF-8): Wiązania Pythona (PySide) do biblioteki gegl-qt4
+Group: Libraries/Python
+Requires: gegl-qt4 = %{version}-%{release}
+Requires: python-PySide
+
+%description -n python-gegl-qt4
+Python (PySide) binding for gegl-qt4 library.
+
+%description -n python-gegl-qt4 -l pl.UTF-8
+Wiązania Pythona (PySide) do biblioteki gegl-qt4.
+
%package apidocs
Summary: gegl library API documentation
Summary(pl.UTF-8): Dokumentacja API biblioteki gegl
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
qmake-qt4 \
QMAKE_CXX="%{__cxx}" \
QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
- QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
+ QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \
+ %{!?with_python:HAVE_PYSIDE=no}
%{__make}
%{__make} install \
INSTALL_ROOT=$RPM_BUILD_ROOT
+# extraneous symlink
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libgegl-qt4-0.1.so.0.0
+
+%if %{with python}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
%{_includedir}/gegl-qt4-0.1
%{_pkgconfigdir}/gegl-qt4-0.1.pc
+%if %{with python}
+%files -n python-gegl-qt4
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/gegl-qt4-0.1/geglqt.so
+%{py_sitedir}/pygeglqt4.py[co]
+%endif
+
%files apidocs
%defattr(644,root,root,755)
%doc doc/html/*