File evince-2.32.0-README.patch of Package mingw32-evince
diff -Naur evince-2.32.0/README.Windows evince-2.32.0.new/README.Windows
--- evince-2.32.0/README.Windows 1970-01-01 01:00:00.000000000 +0100
+++ evince-2.32.0.new/README.Windows 2011-10-06 13:29:48.504242834 +0200
@@ -0,0 +1,125 @@
+== Build Evince for Windows ==
+
+The Evince for Windows installers are built by cross compiling Evince on
+Linux using the [[http://build.opensuse.org|Open Build Service]].
+Every specific installer is built in a separate subproject of the
+[[https://build.opensuse.org/project/show?project=GNOME%3AApps%3AEvince%3AWindows|GNOME:Apps:Evince:Windows]] project. All the packages and sources needed
+to build an Evince installer are part of its subproject.
+
+Cross compiling an Evince installer yourself on any Linux distribution is quite easy when you reuse the packages from its subproject. To do this,
+
+1.
+[[https://secure-www.novell.com/selfreg/jsp/createOpenSuseAccount.jsp?target=https://opensusestage.provo.novell.com|Create a Novell account]] to access
+the Open Build Service.
+
+2.
+Install the Open Build Service command line client ''osc''.
+
+ * The most up to date ''osc'' packages for various Linux distributions can
+ be found in the
+ [[http://download.opensuse.org/repositories/openSUSE:/Tools/|openSUSE-Tools software download repository]].
+ To use these,
+
+ <<BR>>
+ * on openSUSE 11.4 you do:
+ {{{
+sudo zypper ar f r \
+ 'http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.4/openSUSE:Tools.repo'
+sudo zypper in osc oscsource_validator
+ }}}
+ * on Ubuntu you do:
+ {{{
+# Add openSUSE:Tools repository key for APT.
+sudo sh -c "wget -O - 'http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_11.04/Release.key' | apt-key add - "
+
+# Add openSUSE:Tools to APT repositories.
+sudo sh -c "echo 'deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_11.04 ./' > /etc/apt/sources.list.d/openSUSE_Tools.list"
+
+# Resynchronize your APT index.
+sudo apt-get update
+
+# Install osc, build, python-rpm.
+sudo apt-get install osc build python-rpm
+
+ }}}
+
+
+3.
+Checkout the latest stable mingw32-evince package from the
+GNOME:Apps:Evince:Windows:STABLE subproject. If you need a specific version,
+checkout the GNOME:Apps:Evince:Windows:$VERSION subproject.
+
+ {{{
+osc co -c GNOME:Apps:Evince:Windows:STABLE mingw32-evince
+ }}}
+or
+ {{{
+osc co -c GNOME:Apps:Evince:Windows:$VERSION mingw32-evince
+ }}}
+ (You'll be prompted for your Novell account username and password)
+
+4.
+Change into the mingw32-evince directory:
+
+ {{{
+cd mingw32-evince
+ }}}
+
+5.
+Build the package in an openSUSE_11.4 build environment:
+
+ {{{
+osc build openSUSE_11.4
+ }}}
+ (You'll be prompted for your root password)
+ <<BR>> {i} Even when you run a Linux distribution other then openSUSE 11.4,
+ you should NOT change the ''openSUSE_11.4'' part here.
+
+ <<BR>>This will
+ * create an chroot in /var/tmp/buildroot,
+ * download and install an openSUSE 11.4 build environment into the chroot,
+ * download and install all build dependencies of mingw32-evince into
+ the chroot,
+ * cross compile Evince
+ * and create rpm packages for it in /var/tmp/buildroot/usr/src/packages/RPMS.
+
+ <<BR>>You can find the resulting Windows installer in the
+ mingw32-evince-msi-X.X.X-Y.Z.noarch.rpm package.
+
+ <<BR>> {i} When you try to build the installer on a computer with less
+ then 2 GB memory, you might encounter this error:
+
+ {{{
+/usr/bin/candle -o evince.msi.wixobj -nologo -dwixdistdir=/tmp/wixdistdir-hack-evince evince.msi.wxs
+preloader: Warning: failed to reserve range 00110000-68000000
+wine: failed to initialize: /usr/lib/wine/ntdll.dll.so: failed to map segment from shared object: Cannot allocate memory
+make: *** [evince.msi.wixobj] Error 1
+error: Bad exit status from /var/tmp/rpm-tmp.yY8TrU (%build)
+
+
+RPM build errors:
+ Bad exit status from /var/tmp/rpm-tmp.yY8TrU (%build)
+
+The buildroot was: /var/tmp/build-root
+ }}}
+
+ In this case it might help to apply a patch to /usr/bin/build:
+ {{{
+sudo patch /usr/bin/build << EOF
+--- build.orig 2011-04-15 16:39:45.523966001 +0200
++++ build 2011-04-15 16:40:00.163966000 +0200
+@@ -1238,7 +1238,7 @@
+ fi
+ fi
+
+-setmemorylimit
++#setmemorylimit
+
+ #
+ # say hello
+EOF
+ }}}
+
+<<BR>> {i} For more information on using the Open Build Service, read the
+[[http://en.opensuse.org/openSUSE:Build_Service_Tutorial|tutorial]].
+