[gtk-vnc] Switch to use mingw64 toolchain for cross-compiles
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Switch to use mingw64 toolchain for cross-compiles
- Date: Fri, 4 May 2012 14:23:07 +0000 (UTC)
commit f7ce23553d1ce64888b1cd2d45f98c33b3301d6a
Author: Daniel P. Berrange <berrange redhat com>
Date: Fri May 4 15:21:36 2012 +0100
Switch to use mingw64 toolchain for cross-compiles
Makefile.am | 2 +-
autobuild.sh | 68 +++++++++++----
configure.ac | 2 +-
gtk-vnc.spec.in | 2 +-
mingw-gtk-vnc.spec.in | 221 +++++++++++++++++++++++++++++++++++++++++++++++
mingw32-gtk-vnc.spec.in | 157 ---------------------------------
6 files changed, 276 insertions(+), 176 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 604fcf8..2696cec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@ EXTRA_DIST = \
$(PACKAGE)-2.0.pc.in \
$(PACKAGE).spec.in \
$(PACKAGE).spec \
- mingw32-$(PACKAGE).spec.in \
+ mingw-$(PACKAGE).spec.in \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
diff --git a/autobuild.sh b/autobuild.sh
index 51daaf9..4605d1b 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -59,17 +59,17 @@ if [ -f /usr/bin/rpmbuild ]; then
-ba --clean gtk-vnc.spec
fi
-if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
+if [ -x /usr/bin/i686-w64-mingw32-gcc ]; then
make distclean
- PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig" \
- CC="i686-pc-mingw32-gcc" \
+ PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
+ CC="i686-w64-mingw32-gcc" \
../configure \
- --build=$(uname -m)-pc-linux \
- --host=i686-pc-mingw32 \
+ --build=$(uname -m)-w64-linux \
+ --host=i686-w64-mingw32 \
--without-python \
--without-sasl \
- --prefix="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw" \
+ --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
--enable-werror \
--with-gtk=2.0
@@ -77,30 +77,66 @@ if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
make install
# Test GTK3 build too if available
- PKG_CONFIG_LIBDIR=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig pkg-config gtk+-3.0 1>/dev/null 2>&1
+ PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig pkg-config gtk+-3.0 1>/dev/null 2>&1
if test $? = 0 ; then
make distclean
- PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig" \
- CC="i686-pc-mingw32-gcc" \
+ PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
+ CC="i686-w64-mingw32-gcc" \
../configure --prefix=$AUTOBUILD_INSTALL_ROOT \
- --build=$(uname -m)-pc-linux \
- --host=i686-pc-mingw32 \
+ --build=$(uname -m)-w64-linux \
+ --host=i686-w64-mingw32 \
+ --without-python \
+ --without-sasl \
+ --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
+ --enable-werror \
+ --with-gtk=3.0
+ make
+ make install
+ fi
+fi
+
+
+if [ -x /usr/bin/i686-w64-mingw64-gcc ]; then
+ make distclean
+
+ PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw64/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw64/sys-root/mingw/lib/pkgconfig" \
+ CC="i686-w64-mingw64-gcc" \
+ ../configure \
+ --build=$(uname -m)-w64-linux \
+ --host=i686-w64-mingw64 \
--without-python \
--without-sasl \
- --prefix="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw" \
+ --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw64/sys-root/mingw" \
+ --enable-werror \
+ --with-gtk=2.0
+
+ make
+ make install
+
+ # Test GTK3 build too if available
+ PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw64/sys-root/mingw/lib/pkgconfig pkg-config gtk+-3.0 1>/dev/null 2>&1
+ if test $? = 0 ; then
+ make distclean
+ PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw64/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw64/sys-root/mingw/lib/pkgconfig" \
+ CC="i686-w64-mingw64-gcc" \
+ ../configure --prefix=$AUTOBUILD_INSTALL_ROOT \
+ --build=$(uname -m)-w64-linux \
+ --host=i686-w64-mingw64 \
+ --without-python \
+ --without-sasl \
+ --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw64/sys-root/mingw" \
--enable-werror \
--with-gtk=3.0
make
make install
fi
+fi
- #set -o pipefail
- #make check 2>&1 | tee "$RESULTS"
-
+if test -x /usr/bin/i686-w64-mingw32-gcc && test -x /usr/bin/i686-w64-mingw64-gcc ; then
if [ -f /usr/bin/rpmbuild ]; then
rpmbuild --nodeps \
--define "extra_release $EXTRA_RELEASE" \
--define "_sourcedir `pwd`" \
- -ba --clean mingw32-gtk-vnc.spec
+ -ba --clean mingw-gtk-vnc.spec
fi
fi
diff --git a/configure.ac b/configure.ac
index 1e0447a..4d1283c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -479,7 +479,7 @@ AC_CONFIG_FILES(
gtk-vnc-1.0.pc
gtk-vnc-2.0.pc
gtk-vnc.spec
- mingw32-gtk-vnc.spec
+ mingw-gtk-vnc.spec
)
AC_OUTPUT
diff --git a/gtk-vnc.spec.in b/gtk-vnc.spec.in
index 928edd9..509dd5c 100644
--- a/gtk-vnc.spec.in
+++ b/gtk-vnc.spec.in
@@ -27,7 +27,7 @@ Version: @VERSION@
Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
-Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.tar.xz
+Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
URL: http://live.gnome.org/gtk-vnc
BuildRequires: gtk2-devel >= 2.14
diff --git a/mingw-gtk-vnc.spec.in b/mingw-gtk-vnc.spec.in
new file mode 100644
index 0000000..9afcaa0
--- /dev/null
+++ b/mingw-gtk-vnc.spec.in
@@ -0,0 +1,221 @@
+%{?mingw_package_header}
+
+Name: mingw-gtk-vnc
+Version: @VERSION@
+Release: 1%{?dist}%{?extra_release}
+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.gz
+URL: http://live.gnome.org/gtk-vnc
+
+BuildArch: noarch
+
+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: 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
+
+%package -n mingw32-gvnc
+Summary: MinGW Windows port of VNC GObject
+
+%package -n mingw32-gvnc-tools
+Summary: Command line VNC tools
+Group: Applications/Internet
+
+%package -n mingw32-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 mingw32-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 mingw32-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 mingw32-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 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.
+
+# 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}
+%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}
+%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}
+%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
+cd ..
+cd gtk-vnc2-%{version}
+%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
+cd ..
+
+# 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*
+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
+
+%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
+%{mingw32_libdir}/libgtk-vnc-1.0.dll.a
+%{mingw32_libdir}/pkgconfig/gtk-vnc-1.0.pc
+%{mingw32_includedir}/gtk-vnc-1.0
+
+%files -n mingw32-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
+%{mingw32_bindir}/libgvnc-1.0-0.dll
+%{mingw32_libdir}/libgvnc-1.0.dll.a
+%{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}/pkgconfig/gtk-vnc-2.0.pc
+%{mingw32_includedir}/gtk-vnc-2.0
+
+%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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]