[mingw-gtk-vnc] Support mingw64 builds too (rhbz #814997)

Daniel P. Berrange berrange at fedoraproject.org
Thu Apr 26 09:04:51 UTC 2012


commit 387a98bf75b380fd698f8b31b8eacd6b7f7967fe
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Thu Apr 26 10:04:15 2012 +0100

    Support mingw64 builds too (rhbz #814997)

 gtk-vnc-fix-out-of-tree-build.patch |   52 +++++++++++++++
 mingw-gtk-vnc.spec                  |  118 ++++++++++++++++++++++++++++++-----
 2 files changed, 155 insertions(+), 15 deletions(-)
---
diff --git a/gtk-vnc-fix-out-of-tree-build.patch b/gtk-vnc-fix-out-of-tree-build.patch
new file mode 100644
index 0000000..13e14b3
--- /dev/null
+++ b/gtk-vnc-fix-out-of-tree-build.patch
@@ -0,0 +1,52 @@
+From 6553f4999d2bfa13c8e7f5076a604598c28c812e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau at gmail.com>
+Date: Sun, 22 Jan 2012 18:57:28 +0100
+Subject: [PATCH] build: fix make distcheck
+
+https://bugzilla.gnome.org/show_bug.cgi?id=668442
+---
+ Makefile.am     |    5 ++++-
+ src/Makefile.am |    4 ++--
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 2baa5b3..469d0a5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -19,7 +19,10 @@ EXTRA_DIST =                                \
+ 	intltool-extract.in		\
+ 	intltool-merge.in		\
+ 	intltool-update.in		\
+-	ChangeLog-old
++	ChangeLog-old			\
++	GNUmakefile			\
++	maint.mk			\
++	cfg.mk
+ 
+ DISTCLEANFILES =			\
+ 	intltool-extract		\
+diff --git a/src/Makefile.am b/src/Makefile.am
+index df93cef..f9521a9 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -331,7 +331,7 @@ GVNC_INTROSPECTION_SRCS = \
+ 			$(srcdir)/vnccolormap.h $(srcdir)/vnccolormap.c \
+ 			$(srcdir)/vnccursor.h $(srcdir)/vnccursor.c \
+ 			$(srcdir)/vncconnection.h $(srcdir)/vncconnection.c \
+-			$(builddir)/vncconnectionenums.h $(builddir)/vncconnectionenums.c \
++			$(srcdir)/vncconnectionenums.h $(srcdir)/vncconnectionenums.c \
+ 			$(srcdir)/vncutil.h $(srcdir)/vncutil.c
+ 
+ GVNCPULSE_INTROSPECTION_SRCS = \
+@@ -341,7 +341,7 @@ GTK_VNC_INTROSPECTION_SRCS = \
+ 			$(srcdir)/vnccairoframebuffer.h $(srcdir)/vnccairoframebuffer.c \
+ 			$(srcdir)/vncdisplay.h $(srcdir)/vncdisplay.c \
+ 			$(srcdir)/vncgrabsequence.h $(srcdir)/vncgrabsequence.c \
+-			$(builddir)/vncdisplayenums.h $(builddir)/vncdisplayenums.c
++			$(srcdir)/vncdisplayenums.h $(srcdir)/vncdisplayenums.c
+ 
+ if HAVE_GTK_2
+ GTK_VNC_INTROSPECTION_SRCS += \
+-- 
+1.7.7.5
+
diff --git a/mingw-gtk-vnc.spec b/mingw-gtk-vnc.spec
index a71d9cc..23bf425 100644
--- a/mingw-gtk-vnc.spec
+++ b/mingw-gtk-vnc.spec
@@ -1,33 +1,42 @@
-%global __strip %{mingw32_strip}
-%global __objdump %{mingw32_objdump}
-%define __debug_install_post %{mingw32_debug_install_post}
+%{?mingw_package_header}
 
 Name: mingw-gtk-vnc
 Version: 0.5.0
-Release: 6%{?dist}
+Release: 7%{?dist}
 Summary: MinGW Windows port of VNC client GTK widget
 
 License: LGPLv2+
 Group: Development/Libraries
 Source: http://ftp.gnome.org/pub/GNOME/sources/gtk-vnc/0.5/gtk-vnc-%{version}.tar.xz
+Patch1: gtk-vnc-fix-out-of-tree-build.patch
 URL: http://live.gnome.org/gtk-vnc
 
 BuildArch: noarch
 
-BuildRequires: mingw32-filesystem >= 68
+BuildRequires: mingw32-filesystem >= 95
+BuildRequires: mingw64-filesystem >= 95
 BuildRequires: mingw32-gcc
+BuildRequires: mingw64-gcc
 BuildRequires: mingw32-binutils
+BuildRequires: mingw64-binutils
 
 BuildRequires: mingw32-cairo
+BuildRequires: mingw64-cairo
 BuildRequires: mingw32-gettext
+BuildRequires: mingw64-gettext
 BuildRequires: mingw32-win-iconv
+BuildRequires: mingw64-win-iconv
 BuildRequires: mingw32-gnutls
+BuildRequires: mingw64-gnutls
 BuildRequires: mingw32-gtk2
-BuildRequires: pkgconfig
-BuildRequires: intltool
+BuildRequires: mingw64-gtk2
 BuildRequires: mingw32-gtk3
+BuildRequires: mingw64-gtk3
 
+BuildRequires: pkgconfig
+BuildRequires: intltool
 
+# Mingw32
 %package -n mingw32-gtk-vnc
 Summary:        MinGW Windows zlib compression library for the win32 target
 Requires:       pkgconfig
@@ -42,7 +51,6 @@ Group: Applications/Internet
 %package -n mingw32-gtk-vnc2
 Summary: A GTK3 widget for VNC clients
 Group: Development/Libraries
-
 Requires: pkgconfig
 
 %description
@@ -67,32 +75,74 @@ screenshots of a VNC desktop
 gtk-vnc is a VNC viewer widget for GTK. It is built using coroutines
 allowing it to be completely asynchronous while remaining single threaded.
 
-%{?mingw32_debug_package}
+# Mingw64
+%package -n mingw64-gtk-vnc
+Summary:        MinGW Windows zlib compression library for the win64 target
+Requires:       pkgconfig
+
+%package -n mingw64-gvnc
+Summary: MinGW Windows port of VNC GObject
+
+%package -n mingw64-gvnc-tools
+Summary: Command line VNC tools
+Group: Applications/Internet
+
+%package -n mingw64-gtk-vnc2
+Summary: A GTK3 widget for VNC clients
+Group: Development/Libraries
+Requires: pkgconfig
+
+%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.
+
+%description -n mingw64-gtk-vnc
+gtk-vnc is a VNC viewer widget for GTK. It is built using coroutines
+allowing it to be completely asynchronous while remaining single threaded.
+
+%description -n mingw64-gvnc
+gvnc is a GObject for managing a VNC connection. It provides all the
+infrastructure required to build a VNC client without having to deal
+with the raw protocol itself.
+
+%description -n mingw64-gvnc-tools
+Provides useful command line utilities for interacting with
+VNC servers. Includes the gvnccapture program for capturing
+screenshots of a VNC desktop
+
+%description -n mingw64-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.
+
+%{?mingw_debug_package}
 
 
 %prep
 %setup -q -n gtk-vnc-%{version} -c
+touch gtk-vnc-%{version}/GNUmakefile
 cp -a gtk-vnc-%{version} gtk-vnc2-%{version}
 
 
 %build
 cd gtk-vnc-%{version}
-%{mingw32_configure} --without-python --with-examples --without-sasl --with-gtk=2.0
-%__make %{?_smp_mflags} V=1
+%mingw_configure --without-python --with-examples --without-sasl --with-gtk=2.0
+rm build_win{32,64}/GNUmakefile
+%mingw_make %{?_smp_mflags} V=1
 cd ..
 
 cd gtk-vnc2-%{version}
-%{mingw32_configure} --without-python --without-examples --without-sasl --with-gtk=3.0
-%__make %{?_smp_mflags} V=1
+%mingw_configure --without-python --without-examples --without-sasl --with-gtk=3.0
+rm build_win{32,64}/GNUmakefile
+%mingw_make %{?_smp_mflags} V=1
 cd ..
 
 
 %install
 cd gtk-vnc-%{version}
-make DESTDIR=$RPM_BUILD_ROOT install
+%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
 cd ..
 cd gtk-vnc2-%{version}
-make DESTDIR=$RPM_BUILD_ROOT install
+%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
 cd ..
 
 # Remove static libraries but DON'T remove *.dll.a files.
@@ -100,6 +150,10 @@ 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*
+rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/libgtk-vnc-1.0.a
+rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/libgtk-vnc-2.0.a
+rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/libgvnc-1.0.a
+rm -f $RPM_BUILD_ROOT%{mingw64_mandir}/man1/gvnccapture.1*
 
 # Drop all .la files
 find $RPM_BUILD_ROOT -name "*.la" -delete
@@ -107,6 +161,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
 %find_lang gtk-vnc
 
 
+# Mingw32
 %files -n mingw32-gtk-vnc -f gtk-vnc.lang
 %{mingw32_bindir}/gvncviewer.exe
 %{mingw32_bindir}/libgtk-vnc-1.0-0.dll
@@ -135,8 +190,41 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
 %files -n mingw32-gvnc-tools
 %{mingw32_bindir}/gvnccapture.exe
 
+# Mingw64
+%files -n mingw64-gtk-vnc -f gtk-vnc.lang
+%{mingw64_bindir}/gvncviewer.exe
+%{mingw64_bindir}/libgtk-vnc-1.0-0.dll
+%{mingw64_libdir}/libgtk-vnc-1.0.dll.a
+%{mingw64_libdir}/pkgconfig/gtk-vnc-1.0.pc
+%{mingw64_includedir}/gtk-vnc-1.0
+
+%files -n mingw64-gvnc
+%doc gtk-vnc-%{version}/AUTHORS
+%doc gtk-vnc-%{version}/ChangeLog
+%doc gtk-vnc-%{version}/ChangeLog-old
+%doc gtk-vnc-%{version}/NEWS
+%doc gtk-vnc-%{version}/README
+%doc gtk-vnc-%{version}/COPYING.LIB
+%{mingw64_bindir}/libgvnc-1.0-0.dll
+%{mingw64_libdir}/libgvnc-1.0.dll.a
+%{mingw64_libdir}/pkgconfig/gvnc-1.0.pc
+%{mingw64_includedir}/gvnc-1.0
+
+%files -n mingw64-gtk-vnc2
+%{mingw64_bindir}/libgtk-vnc-2.0-0.dll
+%{mingw64_libdir}/libgtk-vnc-2.0.dll.a
+%{mingw64_libdir}/pkgconfig/gtk-vnc-2.0.pc
+%{mingw64_includedir}/gtk-vnc-2.0
+
+%files -n mingw64-gvnc-tools
+%{mingw64_bindir}/gvnccapture.exe
+
 
 %changelog
+* Sun Apr 22 2012 Marc-André Lureau <marcandre.lureau at redhat.com> - 0.5.0-7
+- Ported to the mingw-w64 based packaging guidelines (rhbz #814997)
+- Workaround out-of-tree build issue already fixed upstream
+
 * Wed Mar 07 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 0.5.0-6
 - Renamed the source package to mingw-gtk-vnc (RHBZ #800881)
 - Use mingw macros without leading underscore


More information about the scm-commits mailing list