Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 3d7384bc96f728feb01b167b16b35869 > files > 7

mingw32-gtkhtml3-3.32.2-1.fc15.src.rpm

%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
%define __debug_install_post %{_mingw32_debug_install_post}

Name:           mingw32-gtkhtml3
Version:        3.32.2
Release:        1%{?dist}
Summary:        MinGW library for embedding a lightweight web browser in GTK programs

License:        LGPLv2+
Group:          Development/Libraries
URL:            http://projects.gnome.org/evolution/
Source:         http://download.gnome.org/sources/gtkhtml/3.32/gtkhtml-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# GConf doesn't work well on Win32 and it's only used by GtkHTML
# to figure out font-related settings like antialiasing. Even if
# we enable GConf support it doesn't make any sense as Windows maintains
# such settings in the Win32 registry and there isn't a relation between
# the GConf registry and the Win32 registry. This patch makes the
# GConf dependency optional and makes GtkHTML use the default font settings
Patch0:         gtkhtml-make-gconf-optional.patch

# The configure script searches for the presence of the pkgconfig file for
# gnome-icon-theme which we don't have for Fedora-MinGW (as it only contains
# a collection of icons and no source code). This patch strips out the
# dependency for gnome-icon-theme and shouldn't cause any side-effects
Patch1:         gtkhtml-dont-search-for-gnome-icon-theme.patch

# The same situation as with Patch1 also applies to the iso-codes dependency 
Patch2:         gtkhtml-make-iso-codes-optional.patch

# Normally GtkHTML always exports a function named 'DllMain' on
# Win32 environments. When GtkHTML is built as a static library, this
# function doesn't serve any purpose and it can introduce potential
# conflicts with other static libraries which may export a 'DllMain' function
# This patch causes the DllMain function to be ignore when GtkHTML is
# being built as a static library
Patch3:         gtkhtml_enable_static_build.patch

# When executing the testgtkhtml.exe program an error occurs mentioning
# that the GLib threads system wasn't initialized yet. This patch
# adds that initialisation
Patch4:         gtkhtml-perform-g-thread-init-in-test-program.patch

BuildArch:      noarch

BuildRequires:  mingw32-filesystem >= 53
BuildRequires:  mingw32-gcc
BuildRequires:  mingw32-binutils
BuildRequires:  mingw32-gtk2
BuildRequires:  mingw32-libgnurx
BuildRequires:  mingw32-libsoup
BuildRequires:  mingw32-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


%package static
Summary:        Static version of the MinGW Windows GtkHTML library
Requires:       %{name} = %{version}-%{release}
Group:          Development/Libraries

%description static
Static version of the MinGW Windows GtkHTML library.


%{_mingw32_debug_package}


%prep
%setup -q -n gtkhtml-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0
%patch4 -p0

libtoolize --copy --force
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

mkdir build_shared
pushd build_shared
    %{_mingw32_configure} --disable-deprecated-warning-flags --disable-static --enable-shared
    make %{?_smp_mflags}
popd


%install
rm -rf $RPM_BUILD_ROOT

# First install all the files belonging to the shared build
make -C build_shared 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
mv $RPM_BUILD_ROOT/build_static%{_mingw32_libdir}/*.a $RPM_BUILD_ROOT%{_mingw32_libdir}

# Manually merge the libtool files
sed -i s/"old_library=''"/"old_library='libgtkhtml-3.14.a'"/ $RPM_BUILD_ROOT%{_mingw32_libdir}/libgtkhtml-3.14.la
sed -i s/"old_library=''"/"old_library='libgtkhtml-editor-3.14.a'"/ $RPM_BUILD_ROOT%{_mingw32_libdir}/libgtkhtml-editor-3.14.la

# Drop the folder which was temporary used for installing the static bits
rm -rf $RPM_BUILD_ROOT/build_static

# Install a small test program
install -m0755 build_shared/gtkhtml/.libs/testgtkhtml.exe $RPM_BUILD_ROOT%{_mingw32_bindir}/testgtkhtml.exe

%find_lang gtkhtml-3.14


%clean
rm -rf $RPM_BUILD_ROOT


%files -f gtkhtml-3.14.lang
%defattr(-,root,root,-)
%doc COPYING.LIB
%{_mingw32_bindir}/gtkhtml-editor-test.exe
%{_mingw32_bindir}/libgtkhtml-3.14-19.dll
%{_mingw32_bindir}/libgtkhtml-editor-3.14-0.dll
%{_mingw32_bindir}/testgtkhtml.exe
%{_mingw32_includedir}/libgtkhtml-3.14
%{_mingw32_libdir}/libgtkhtml-3.14.dll.a
%{_mingw32_libdir}/libgtkhtml-3.14.la
%{_mingw32_libdir}/libgtkhtml-editor-3.14.dll.a
%{_mingw32_libdir}/libgtkhtml-editor-3.14.la
%{_mingw32_libdir}/pkgconfig/libgtkhtml-3.14.pc
%{_mingw32_libdir}/pkgconfig/gtkhtml-editor-3.14.pc
%{_mingw32_datadir}/gtkhtml-3.14

%files static
%defattr(-,root,root,-)
%{_mingw32_libdir}/libgtkhtml-3.14.a
%{_mingw32_libdir}/libgtkhtml-editor-3.14.a


%changelog
* Wed Apr 27 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.32.2-1
- Update to 3.32.2
- Dropped the proxy-libintl pieces

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.32.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Nov  8 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.32.0-2
- Rebuild in order to have soft dependency on libintl

* Mon Oct 11 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.32.0-1
- Update to 3.32.0
- Build with the configure argument --disable-deprecated-warning-flags
  for now due to upstream breakage (GNOME BZ #630875)

* Fri Sep 24 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.31.92-1
- Update to 3.31.92

* Tue Jul  6 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.30.2-1
- Update to 3.30.2

* Fri Jun 11 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.30.1-1
- Update to 3.30.1 (Fixes RHBZ #599778 and #564909)

* Fri Dec 11 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.29.3-2
- Looks like the original license tag was correct: LGPLv2+
- Bundle COPYING.LIB instead of COPYING

* Fri Dec 11 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.29.3-1
- Update to 3.29.3
- Renamed 'webbrowser' in the summary to 'web browser' to keep rpmlint happy
- Fixed the license tag

* Thu Sep 24 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.28.0-1
- Update to 3.28.0
- Use %%global instead of %%define
- Automatically generate debuginfo subpackage
- Simplified the original patch to strip unnecessary deps
- Added translations

* Fri Apr  3 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.25.90-2
- Added -static subpackage

* Fri Feb 13 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.25.90-1
- Initial release