[gtk-vnc] Add rules for building GTK3 library on mingw32



commit 20cd8a0153eb63e2633821312197f20f2b098562
Author: Daniel P. Berrange <berrange redhat com>
Date:   Fri Nov 4 11:46:00 2011 +0000

    Add rules for building GTK3 library on mingw32

 mingw32-gtk-vnc.spec.in |   55 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 52 insertions(+), 3 deletions(-)
---
diff --git a/mingw32-gtk-vnc.spec.in b/mingw32-gtk-vnc.spec.in
index b1020a1..0010009 100644
--- a/mingw32-gtk-vnc.spec.in
+++ b/mingw32-gtk-vnc.spec.in
@@ -4,6 +4,11 @@
 %define __find_requires %{_mingw32_findrequires}
 %define __find_provides %{_mingw32_findprovides}
 
+%define with_gtk3 0
+%if 0%{?fedora} >= 15
+%define with_gtk3 1
+%endif
+
 Name: mingw32-gtk-vnc
 Version: @VERSION@
 Release: 1%{?dist}%{?extra_release}
@@ -30,6 +35,9 @@ BuildRequires: mingw32-gtk2
 BuildRequires: pkgconfig
 BuildRequires: intltool
 BuildRequires: perl(Text::CSV)
+%if %{with_gtk3}
+BuildRequires: mingw32-gtk3
+%endif
 
 Requires: pkgconfig
 
@@ -40,6 +48,14 @@ Summary: MinGW Windows port of VNC GObject
 Summary: Command line VNC tools
 Group: Applications/Internet
 
+%if %{with_gtk3}
+%package -n mingw32-gtk-vnc2
+Summary: A GTK3 widget for VNC clients
+Group: Development/Libraries
+
+Requires: pkgconfig
+%endif
+
 %description
 gtk-vnc is a VNC viewer widget for GTK. It is built using coroutines
 allowing it to be completely asynchronous while remaining single threaded.
@@ -54,20 +70,46 @@ Provides useful command line utilities for interacting with
 VNC servers. Includes the gvnccapture program for capturing
 screenshots of a VNC desktop
 
+%if %{with_gtk3}
+%description -n mingw32-gtk-vnc2
+gtk-vnc is a VNC viewer widget for GTK. It is built using coroutines
+allowing it to be completely asynchronous while remaining single threaded.
+%endif
+
 %prep
-%setup -q -n gtk-vnc-%{version}
+%setup -q -n gtk-vnc-%{version} -c
+%if %{with_gtk3}
+cp -a gtk-vnc-%{version} gtk-vnc2-%{version}
+%endif
 
 %build
-%{_mingw32_configure} --without-python --with-examples --without-sasl
-make
+cd gtk-vnc-%{version}
+%{_mingw32_configure} --without-python --with-examples --without-sasl --with-gtk=2.0
+%__make %{?_smp_mflags} V=1
+cd ..
+
+%if %{with_gtk3}
+cd gtk-vnc2-%{version}
+%{_mingw32_configure} --without-python --without-examples --without-sasl --with-gtk=3.0
+%__make %{?_smp_mflags} V=1
+cd ..
+%endif
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
+cd gtk-vnc-%{version}
 make DESTDIR=$RPM_BUILD_ROOT install
+cd ..
+%if %{with_gtk3}
+cd gtk-vnc2-%{version}
+make DESTDIR=$RPM_BUILD_ROOT install
+cd ..
+%endif
 
 # Remove static libraries but DON'T remove *.dll.a files.
 rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/libgtk-vnc-1.0.a
+rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/libgtk-vnc-2.0.a
 rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/libgvnc-1.0.a
 rm -f $RPM_BUILD_ROOT%{_mingw32_mandir}/man1/gvnccapture.1*
 
@@ -94,6 +136,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw32_libdir}/pkgconfig/gvnc-1.0.pc
 %{_mingw32_includedir}/gvnc-1.0
 
+%files -n mingw32-gtk-vnc2
+%{_mingw32_bindir}/libgtk-vnc-2.0-0.dll
+%{_mingw32_libdir}/libgtk-vnc-2.0.dll.a
+%{_mingw32_libdir}/libgtk-vnc-2.0.la
+%{_mingw32_libdir}/pkgconfig/gtk-vnc-2.0.pc
+%{_mingw32_includedir}/gtk-vnc-2.0
+
 %files -n mingw32-gvnc-tools
 %defattr(-,root,root)
 %{_mingw32_bindir}/gvnccapture.exe



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]