File project.diff of Package mingw64-poppler

--- mingw64-poppler.spec.orig
+++ mingw64-poppler.spec
@@ -15,11 +15,24 @@ License:        GPL-2.0
 Group:          Development/Libraries
 Url:            http://poppler.freedesktop.org/
 Source:         http://poppler.freedesktop.org/poppler-%{version}.tar.gz
+
+# Wixlibs, MSI's
+Patch1000:      poppler-0.22.0-wix.patch
+
+# https://bugs.freedesktop.org/show_bug.cgi?id=28897
+# (upstream has reject this patch claiming it does not fix, but only hides the issue)
+Patch1001:      0001-qt4-Prevent-warnings-on-not-handled-enumeration-valu.patch
+
+# https://bugs.freedesktop.org/show_bug.cgi?id=57807
+# (upstream prefers another solution, but has not fixed it yet)
+Patch1002:      0001-Fix-warning-on-deprecated-Poppler-Annotation-window.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 BuildArch:      noarch
 #!BuildIgnore: post-build-checks
 
+BuildRequires:  wixwine uuid-runtime mingw64-gcc-wixlibs
 BuildRequires:  mingw64-filesystem
 BuildRequires:  mingw64-cross-gcc
 BuildRequires:  mingw64-cross-gcc-c++
@@ -40,6 +53,7 @@ BuildRequires:  mingw64-gtk3-devel
 BuildRequires:  mingw64-gdk-pixbuf-devel
 BuildRequires:  mingw64-libxml2-devel
 BuildRequires:  mingw64-liblcms2-devel
+BuildRequires:  automake autoconf libtool
 
 # To prevent libtool warning "Could not determine the host path..."
 BuildRequires:  wine
@@ -150,6 +164,37 @@ is cairo, which provides high quality 2D
 for a list of planned changes.
 
 
+%package msi
+Summary:        Poppler Windows Installer
+Group:          Development/Libraries
+
+%description msi
+Poppler is a fork of the xpdf PDF viewer developed by Derek Noonburg of
+Glyph and Cog, LLC.  The purpose of forking xpdf is twofold. First, we
+want to provide PDF rendering functionality as a shared library, to
+centralize the maintenence effort. Today a number of applications
+incorporate the xpdf code base, and whenever a security issue is
+discovered, all these applications exchange patches and put out new
+releases.  In turn, all distributions must package and release new
+version of these xpdf based viewers.  It's safe to say that there's a
+lot of duplicated effort with the current situation.  Even if poppler
+in the short term introduces yet another xpdf derived code base to the
+world, we hope that over time these applications will adopt poppler.
+After all, we only need one application to use poppler to break even.
+
+Second, we would like to move libpoppler forward in a number of areas
+that doesn't fit within the goals of xpdf.  By design, xpdf depends on
+very few libraries and runs a wide range of X based platforms. This is
+a strong feature and reasonable design goal.  However, with poppler we
+would like to replace parts of xpdf that are now available as standard
+components of modern Unix desktop environments.  One such example is
+fontconfig, which solves the problem of matching and locating fonts on
+the system, in a standardized and well understood way. Another example
+is cairo, which provides high quality 2D rendering.  See the file TODO
+for a list of planned changes.
+
+
+
 %{_mingw64_debug_package}
 
 
@@ -157,7 +202,12 @@ for a list of planned changes.
 %setup -q -n poppler-%{version}
 
 
+%patch1000 -p1
+%patch1001 -p1
+%patch1002 -p1
 %build
+autoreconf -f -i
+
 echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
 
 # We always do this in the windows:mingw project
@@ -173,13 +223,16 @@ configure_args+=" GLIB_MKENUMS=%{_mingw3
 # Configure
 %{_mingw64_configure} ${configure_args}
 
-# Build
 make %{?_smp_mflags} || make
 
 
 %install
 make DESTDIR=$RPM_BUILD_ROOT install
 
+mkdir -p $RPM_BUILD_ROOT%{_mingw64_datadir}/msi
+mingw_arch=`echo %{_mingw64_target} | sed 's/\([^-]*\)-.*$/\1/g'`
+cp poppler.msi $RPM_BUILD_ROOT%{_mingw64_datadir}/msi/poppler-%{version}-${mingw_arch}.msi
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -228,6 +281,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw64_libdir}/pkgconfig/poppler.pc
 %{_mingw64_libdir}/pkgconfig/poppler-cpp.pc
 %{_mingw64_datadir}/gtk-doc/html/poppler
+%{_mingw64_datadir}/wixlib/poppler.wixlib
 
 %files -n mingw64-libpoppler-glib
 %defattr(-,root,root)
@@ -238,6 +292,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw64_includedir}/poppler/glib
 %{_mingw64_libdir}/libpoppler-glib.dll.a
 %{_mingw64_libdir}/pkgconfig/poppler-glib.pc
+%{_mingw64_datadir}/wixlib/poppler-glib.wixlib
 
 
 %files -n mingw64-libpoppler-qt4
@@ -250,6 +305,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw64_includedir}/poppler/qt4
 %{_mingw64_libdir}/libpoppler-qt4.dll.a
 %{_mingw64_libdir}/pkgconfig/poppler-qt4.pc
+%{_mingw64_datadir}/wixlib/poppler-qt4.wixlib
+
+
+%files msi
+%defattr(-,root,root)
+%{_mingw64_datadir}/msi/poppler-%{version}-*.msi
 
 
 %changelog
openSUSE Build Service is sponsored by