[mingw-gtkhtml3] Added win64 support
Erik van Pienbroek
epienbro at fedoraproject.org
Sun Apr 8 13:55:44 UTC 2012
commit 966568ac8cc4ee824e47f8b850dd3386a2741ef5
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Sun Apr 8 15:55:36 2012 +0200
Added win64 support
mingw-gtkhtml3.spec | 83 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 62 insertions(+), 21 deletions(-)
---
diff --git a/mingw-gtkhtml3.spec b/mingw-gtkhtml3.spec
index c68ad3d..73723f6 100644
--- a/mingw-gtkhtml3.spec
+++ b/mingw-gtkhtml3.spec
@@ -1,6 +1,4 @@
-%global __strip %{mingw32_strip}
-%global __objdump %{mingw32_objdump}
-%define __debug_install_post %{mingw32_debug_install_post}
+%?mingw_package_header
# first two digits of version
%global release_version %(echo %{version} | awk -F. '{print $1"."$2}')
@@ -37,7 +35,7 @@ Patch4: gtkhtml_enable_static_build.patch
BuildArch: noarch
-BuildRequires: mingw32-filesystem >= 68
+BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: mingw32-gtk3
@@ -45,19 +43,27 @@ BuildRequires: mingw32-libgnurx
BuildRequires: mingw32-libsoup
BuildRequires: mingw32-enchant
+BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw64-gcc
+BuildRequires: mingw64-binutils
+BuildRequires: mingw64-gtk3
+BuildRequires: mingw64-libgnurx
+BuildRequires: mingw64-libsoup
+BuildRequires: mingw64-enchant
+
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: intltool
BuildRequires: glib2-devel
-Requires: pkgconfig
%description
GtkHTML is a lightweight HTML rendering/printing/editing engine
This is the MinGW build of GtkHTML
+# Win32
%package -n mingw32-gtkhtml3
Summary: MinGW library for embedding a lightweight web browser in GTK programs
Requires: pkgconfig
@@ -74,8 +80,25 @@ Group: Development/Libraries
%description -n mingw32-gtkhtml3-static
Static version of the MinGW Windows GtkHTML library.
+# Win64
+%package -n mingw64-gtkhtml3
+Summary: MinGW library for embedding a lightweight web browser in GTK programs
+Requires: pkgconfig
-%{?mingw32_debug_package}
+%description -n mingw64-gtkhtml3
+GtkHTML is a lightweight HTML rendering/printing/editing engine
+This is the MinGW build of GtkHTML
+
+%package -n mingw64-gtkhtml3-static
+Summary: Static version of the MinGW Windows GtkHTML library
+Requires: mingw64-gtkhtml3 = %{version}-%{release}
+Group: Development/Libraries
+
+%description -n mingw64-gtkhtml3-static
+Static version of the MinGW Windows GtkHTML library.
+
+
+%?mingw_debug_package
%prep
@@ -92,27 +115,24 @@ autoreconf --install --force
%build
# GtkHTML can't build static and shared libraries in one go, so we
# build GtkHTML twice here
-mkdir build_static
-pushd build_static
- %{mingw32_configure} --disable-deprecated-warning-flags --enable-static --disable-shared CFLAGS="$CFLAGS -DGLIB_STATIC_COMPILATION -DGOBJECT_STATIC_COMPILATION"
- make %{?_smp_mflags}
-popd
+export CFLAGS="$CFLAGS -DGLIB_STATIC_COMPILATION -DGOBJECT_STATIC_COMPILATION"
+MINGW_BUILDDIR_SUFFIX=_static %mingw_configure --disable-deprecated-warning-flags --enable-static --disable-shared
+unset CFLAGS
+MINGW_BUILDDIR_SUFFIX=_shared %mingw_configure --disable-deprecated-warning-flags --disable-static --enable-shared
-mkdir build_shared
-pushd build_shared
- %{mingw32_configure} --disable-deprecated-warning-flags --disable-static --enable-shared
- make %{?_smp_mflags}
-popd
+MINGW_BUILDDIR_SUFFIX=_static %mingw_make %{?_smp_mflags}
+MINGW_BUILDDIR_SUFFIX=_shared %mingw_make %{?_smp_mflags}
%install
# First install all the files belonging to the shared build
-make -C build_shared DESTDIR=$RPM_BUILD_ROOT install
+MINGW_BUILDDIR_SUFFIX=_shared %mingw_make DESTDIR=$RPM_BUILD_ROOT install
# Install all the files from the static build in a seperate folder
# and move the static libraries to the right location
-make -C build_static DESTDIR=$RPM_BUILD_ROOT/build_static install
+MINGW_BUILDDIR_SUFFIX=_static %mingw_make DESTDIR=$RPM_BUILD_ROOT/build_static install
mv $RPM_BUILD_ROOT/build_static%{mingw32_libdir}/*.a $RPM_BUILD_ROOT%{mingw32_libdir}
+mv $RPM_BUILD_ROOT/build_static%{mingw64_libdir}/*.a $RPM_BUILD_ROOT%{mingw64_libdir}
# Drop the folder which was temporary used for installing the static bits
rm -rf $RPM_BUILD_ROOT/build_static
@@ -121,12 +141,14 @@ rm -rf $RPM_BUILD_ROOT/build_static
find $RPM_BUILD_ROOT -name "*.la" -delete
# Install a small test program
-install -m0755 build_shared/gtkhtml/.libs/testgtkhtml.exe $RPM_BUILD_ROOT%{mingw32_bindir}/testgtkhtml.exe
+install -m0755 build_win32_shared/gtkhtml/.libs/testgtkhtml.exe $RPM_BUILD_ROOT%{mingw32_bindir}/testgtkhtml.exe
+install -m0755 build_win64_shared/gtkhtml/.libs/testgtkhtml.exe $RPM_BUILD_ROOT%{mingw64_bindir}/testgtkhtml.exe
-%find_lang gtkhtml-4.0
+%mingw_find_lang gtkhtml-4.0
-%files -n mingw32-gtkhtml3 -f gtkhtml-4.0.lang
+# Win32
+%files -n mingw32-gtkhtml3 -f mingw32-gtkhtml-4.0.lang
%doc COPYING.LIB
%{mingw32_bindir}/gtkhtml-editor-test.exe
%{mingw32_bindir}/libgtkhtml-4.0-0.dll
@@ -143,10 +165,29 @@ install -m0755 build_shared/gtkhtml/.libs/testgtkhtml.exe $RPM_BUILD_ROOT%{mingw
%{mingw32_libdir}/libgtkhtml-4.0.a
%{mingw32_libdir}/libgtkhtml-editor-4.0.a
+# Win64
+%files -n mingw64-gtkhtml3 -f mingw64-gtkhtml-4.0.lang
+%doc COPYING.LIB
+%{mingw64_bindir}/gtkhtml-editor-test.exe
+%{mingw64_bindir}/libgtkhtml-4.0-0.dll
+%{mingw64_bindir}/libgtkhtml-editor-4.0-0.dll
+%{mingw64_bindir}/testgtkhtml.exe
+%{mingw64_includedir}/libgtkhtml-4.0
+%{mingw64_libdir}/libgtkhtml-4.0.dll.a
+%{mingw64_libdir}/libgtkhtml-editor-4.0.dll.a
+%{mingw64_libdir}/pkgconfig/libgtkhtml-4.0.pc
+%{mingw64_libdir}/pkgconfig/gtkhtml-editor-4.0.pc
+%{mingw64_datadir}/gtkhtml-4.0
+
+%files -n mingw64-gtkhtml3-static
+%{mingw64_libdir}/libgtkhtml-4.0.a
+%{mingw64_libdir}/libgtkhtml-editor-4.0.a
+
%changelog
* Sun Apr 8 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 4.4.0-1
- Update to 4.4.0
+- Added win64 support
- Link against gtk3
- Dropped upstreamed GConf patch
- Dropped upstreamed g_thread_init patch
More information about the scm-commits
mailing list