Updated patch.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 27 Oct 2008 17:50:14 +0000 (17:50 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 27 Oct 2008 17:50:14 +0000 (17:50 +0000)
inkscape/mingw32-inkscape-20081027-Makefile.am-cflags.patch [deleted file]
inkscape/mingw32-inkscape-20081027-extra-win32-objects.patch [deleted file]
inkscape/mingw32-inkscape-20081027-no-gc-version-check-when-crosscompiling.patch [deleted file]
inkscape/mingw32-inkscape-20081027-no-is-os-vista.patch [deleted file]
inkscape/mingw32-inkscape-20081027-no-setenv.patch [deleted file]
inkscape/mingw32-inkscape-20081027-pango-enable-engine.patch [deleted file]
inkscape/mingw32-inkscape-20081027.patch [new file with mode: 0644]
inkscape/mingw32-inkscape.spec

diff --git a/inkscape/mingw32-inkscape-20081027-Makefile.am-cflags.patch b/inkscape/mingw32-inkscape-20081027-Makefile.am-cflags.patch
deleted file mode 100644 (file)
index 079e85d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Index: src/Makefile.am
-===================================================================
---- src/Makefile.am    (revision 20065)
-+++ src/Makefile.am    (working copy)
-@@ -27,7 +27,27 @@
-       $(POPPLER_GLIB_CFLAGS)  \
-       -DPOTRACE=\"potrace\"   \
-       $(INKSCAPE_CFLAGS) \
--      -I$(top_srcdir)/cxxtest
-+      -I$(top_srcdir)/cxxtest \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/gtk-2.0 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/glib-2.0 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/glibmm-2.4 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/gdkmm-2.4 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/gtkmm-2.4 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/atkmm-1.6 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/giomm-2.4 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/pangomm-1.4 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/cairomm-1.0 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/sigc++-2.0 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/cairo \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/pango-1.0 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/atk-1.0 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/include/libxml2 \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/lib/gtk-2.0/include \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/lib/glib-2.0/include \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/lib/glibmm-2.4/include \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/lib/gdkmm-2.4/include \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/lib/gtkmm-2.4/include \
-+      -I/usr/i686-pc-mingw32/sys-root/mingw/lib/sigc++-2.0/include
- include Makefile_insert
- include application/Makefile_insert
diff --git a/inkscape/mingw32-inkscape-20081027-extra-win32-objects.patch b/inkscape/mingw32-inkscape-20081027-extra-win32-objects.patch
deleted file mode 100644 (file)
index 6ab3e4f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: src/extension/internal/Makefile_insert
-===================================================================
---- src/extension/internal/Makefile_insert     (revision 20065)
-+++ src/extension/internal/Makefile_insert     (working copy)
-@@ -144,5 +144,10 @@
-       extension/internal/filter/filter-all.cpp \
-       extension/internal/filter/filter-file.cpp \
-       extension/internal/filter/filter.cpp \
--      extension/internal/filter/filter.h
--
-+      extension/internal/filter/filter.h \
-+      extension/internal/win32.h \
-+      extension/internal/win32.cpp \
-+      extension/internal/emf-win32-print.h \
-+      extension/internal/emf-win32-print.cpp \
-+      extension/internal/emf-win32-inout.h \
-+      extension/internal/emf-win32-inout.cpp
-\ No newline at end of file
-Index: src/ui/dialog/Makefile_insert
-===================================================================
---- src/ui/dialog/Makefile_insert      (revision 20065)
-+++ src/ui/dialog/Makefile_insert      (working copy)
-@@ -60,6 +60,8 @@
-       ui/dialog/aboutbox.cpp              \
-       ui/dialog/aboutbox.h            \
-       ui/dialog/ocaldialogs.cpp       \
--      ui/dialog/ocaldialogs.h
-+      ui/dialog/ocaldialogs.h \
-+      ui/dialog/filedialogimpl-win32.h \
-+      ui/dialog/filedialogimpl-win32.cpp
- ui/dialog/aboutbox.$(OBJEXT): inkscape_version.h
diff --git a/inkscape/mingw32-inkscape-20081027-no-gc-version-check-when-crosscompiling.patch b/inkscape/mingw32-inkscape-20081027-no-gc-version-check-when-crosscompiling.patch
deleted file mode 100644 (file)
index 59c912d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: configure.ac
-===================================================================
---- configure.ac       (revision 20065)
-+++ configure.ac       (working copy)
-@@ -192,7 +192,7 @@
-                                 break], [gc_ok=no], [$gc_libs])
-                   break],
-                  [gc_ok=no])
--if test "x$gc_ok" = "xyes"; then
-+if test "x$gc_ok" = "xyes" && "x$cross_compiling" = "xno" ; then
-       AC_MSG_CHECKING([libgc version 6.4+])
-       AC_RUN_IFELSE(
-               [AC_LANG_SOURCE([[
diff --git a/inkscape/mingw32-inkscape-20081027-no-is-os-vista.patch b/inkscape/mingw32-inkscape-20081027-no-is-os-vista.patch
deleted file mode 100644 (file)
index 4782e84..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: src/libgdl/gdl-dock-master.c
-===================================================================
---- src/libgdl/gdl-dock-master.c       (revision 20065)
-+++ src/libgdl/gdl-dock-master.c       (working copy)
-@@ -650,7 +650,11 @@
- #ifdef WIN32    
-     GdkLineStyle lineStyle = GDK_LINE_ON_OFF_DASH;
-+#if 0
-     if (is_os_vista())
-+#else /* RWMJ - missing */
-+    if (0)
-+#endif
-     {
-         // On Vista the dash-line is increadibly slow to draw, it takes several minutes to draw the tracking lines
-         // With GDK_LINE_SOLID it is parts of a second
diff --git a/inkscape/mingw32-inkscape-20081027-no-setenv.patch b/inkscape/mingw32-inkscape-20081027-no-setenv.patch
deleted file mode 100644 (file)
index 4e8fe15..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/main.cpp.orig  2008-10-27 15:17:26.000000000 +0000
-+++ src/main.cpp       2008-10-27 15:18:02.000000000 +0000
-@@ -521,7 +521,9 @@
- #endif
-         tmp += oldenv;
-     }
-+#ifndef WIN32
-     setenv("PYTHONPATH", tmp.c_str(), 1);
-+#endif
-     
-     return 0;
- }
diff --git a/inkscape/mingw32-inkscape-20081027-pango-enable-engine.patch b/inkscape/mingw32-inkscape-20081027-pango-enable-engine.patch
deleted file mode 100644 (file)
index 18afa0e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: src/libnrtype/FontFactory.cpp
-===================================================================
---- src/libnrtype/FontFactory.cpp      (revision 20065)
-+++ src/libnrtype/FontFactory.cpp      (working copy)
-@@ -8,6 +8,8 @@
-  *
-  */
-+#define PANGO_ENABLE_ENGINE
-+
- #include "FontFactory.h"
- #include <libnrtype/font-instance.h>
-Index: src/libnrtype/Layout-TNG-Input.cpp
-===================================================================
---- src/libnrtype/Layout-TNG-Input.cpp (revision 20065)
-+++ src/libnrtype/Layout-TNG-Input.cpp (working copy)
-@@ -9,6 +9,8 @@
-  * Released under GNU GPL, read the file 'COPYING' for more information
-  */
-+#define PANGO_ENABLE_ENGINE
-+
- #include <gtk/gtkversion.h>
- #include "Layout-TNG.h"
- #include "style.h"
-Index: src/libnrtype/FontInstance.cpp
-===================================================================
---- src/libnrtype/FontInstance.cpp     (revision 20065)
-+++ src/libnrtype/FontInstance.cpp     (working copy)
-@@ -8,6 +8,8 @@
-  *
-  */
-+#define PANGO_ENABLE_ENGINE
-+
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
diff --git a/inkscape/mingw32-inkscape-20081027.patch b/inkscape/mingw32-inkscape-20081027.patch
new file mode 100644 (file)
index 0000000..561b9e0
--- /dev/null
@@ -0,0 +1,251 @@
+Index: src/libgdl/gdl-win32.c
+===================================================================
+--- src/libgdl/gdl-win32.c     (revision 20069)
++++ src/libgdl/gdl-win32.c     (working copy)
+@@ -14,6 +14,8 @@
+ #include "gdl-win32.h"
++#ifdef WIN32
++
+ /* Platform detection */
+ gboolean
+ is_os_vista()
+@@ -40,3 +42,5 @@
+       return is_vista;
+ }
++
++#endif
+Index: src/libgdl/gdl-win32.h
+===================================================================
+--- src/libgdl/gdl-win32.h     (revision 20069)
++++ src/libgdl/gdl-win32.h     (working copy)
+@@ -1,6 +1,8 @@
+ #ifndef __INKSCAPE_GDL_WIN32_H__
+ #define __INKSCAPE_GDL_WIN32_H__
++#ifdef WIN32
++
+ /*
+  * Windows stuff
+  *
+@@ -20,11 +22,9 @@
+ #include <windows.h>
+ #include <gdk/gdk.h>
+-#ifndef WIN32
+-#error "This file is only usable for Windows"
+-#endif
+-
+ /* Platform detection */
+ gboolean is_os_vista();
++#endif /* WIN32 */
++
+ #endif /* __INKSCAPE_GDL_WIN32_H__ */
+Index: src/libgdl/Makefile_insert
+===================================================================
+--- src/libgdl/Makefile_insert (revision 20069)
++++ src/libgdl/Makefile_insert (working copy)
+@@ -34,6 +34,8 @@
+       libgdl/gdl-stock.c              \
+       libgdl/gdl-switcher.h           \
+       libgdl/gdl-switcher.c           \
++      libgdl/gdl-win32.c              \
++      libgdl/gdl-win32.h              \
+       libgdl/libgdltypebuiltins.h     \
+       libgdl/libgdltypebuiltins.c     \
+       libgdl/libgdlmarshal.h          \
+Index: src/extension/internal/win32.h
+===================================================================
+--- src/extension/internal/win32.h     (revision 20069)
++++ src/extension/internal/win32.h     (working copy)
+@@ -14,9 +14,7 @@
+ #include <config.h>
+-#ifndef WIN32
+-#error "This file is only usable for Windows"
+-#endif
++#ifdef WIN32
+ #ifdef DATADIR
+ #undef DATADIR
+@@ -84,4 +82,6 @@
+ }  /* namespace Extension */
+ }  /* namespace Inkscape */
++#endif /* WIN32 */
++
+ #endif /* __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__ */
+Index: src/extension/internal/Makefile_insert
+===================================================================
+--- src/extension/internal/Makefile_insert     (revision 20069)
++++ src/extension/internal/Makefile_insert     (working copy)
+@@ -144,5 +144,10 @@
+       extension/internal/filter/filter-all.cpp \
+       extension/internal/filter/filter-file.cpp \
+       extension/internal/filter/filter.cpp \
+-      extension/internal/filter/filter.h
+-
++      extension/internal/filter/filter.h \
++      extension/internal/win32.h \
++      extension/internal/win32.cpp \
++      extension/internal/emf-win32-print.h \
++      extension/internal/emf-win32-print.cpp \
++      extension/internal/emf-win32-inout.h \
++      extension/internal/emf-win32-inout.cpp
+\ No newline at end of file
+Index: src/extension/internal/win32.cpp
+===================================================================
+--- src/extension/internal/win32.cpp   (revision 20069)
++++ src/extension/internal/win32.cpp   (working copy)
+@@ -13,6 +13,8 @@
+ # include "config.h"
+ #endif
++#ifdef WIN32
++
+ #include <glib/gmem.h>
+ #include <libnr/nr-macros.h>
+ #include <libnr/nr-matrix.h>
+@@ -494,3 +496,5 @@
+ }  /* namespace Internal */
+ }  /* namespace Extension */
+ }  /* namespace Inkscape */
++
++#endif /* WIN32 */
+Index: src/Makefile.am
+===================================================================
+--- src/Makefile.am    (revision 20069)
++++ src/Makefile.am    (working copy)
+@@ -27,7 +27,8 @@
+       $(POPPLER_GLIB_CFLAGS)  \
+       -DPOTRACE=\"potrace\"   \
+       $(INKSCAPE_CFLAGS) \
+-      -I$(top_srcdir)/cxxtest
++      -I$(top_srcdir)/cxxtest \
++      $(WIN32_CFLAGS)
+ include Makefile_insert
+ include application/Makefile_insert
+Index: src/libnrtype/FontFactory.cpp
+===================================================================
+--- src/libnrtype/FontFactory.cpp      (revision 20069)
++++ src/libnrtype/FontFactory.cpp      (working copy)
+@@ -8,6 +8,8 @@
+  *
+  */
++#define PANGO_ENABLE_ENGINE
++
+ #include "FontFactory.h"
+ #include <libnrtype/font-instance.h>
+Index: src/libnrtype/Layout-TNG-Input.cpp
+===================================================================
+--- src/libnrtype/Layout-TNG-Input.cpp (revision 20069)
++++ src/libnrtype/Layout-TNG-Input.cpp (working copy)
+@@ -9,6 +9,8 @@
+  * Released under GNU GPL, read the file 'COPYING' for more information
+  */
++#define PANGO_ENABLE_ENGINE
++
+ #include <gtk/gtkversion.h>
+ #include "Layout-TNG.h"
+ #include "style.h"
+Index: src/libnrtype/FontInstance.cpp
+===================================================================
+--- src/libnrtype/FontInstance.cpp     (revision 20069)
++++ src/libnrtype/FontInstance.cpp     (working copy)
+@@ -8,6 +8,8 @@
+  *
+  */
++#define PANGO_ENABLE_ENGINE
++
+ #ifdef HAVE_CONFIG_H
+ # include <config.h>
+ #endif
+Index: src/ui/dialog/Makefile_insert
+===================================================================
+--- src/ui/dialog/Makefile_insert      (revision 20069)
++++ src/ui/dialog/Makefile_insert      (working copy)
+@@ -60,6 +60,8 @@
+       ui/dialog/aboutbox.cpp              \
+       ui/dialog/aboutbox.h            \
+       ui/dialog/ocaldialogs.cpp       \
+-      ui/dialog/ocaldialogs.h
++      ui/dialog/ocaldialogs.h \
++      ui/dialog/filedialogimpl-win32.h \
++      ui/dialog/filedialogimpl-win32.cpp
+ ui/dialog/aboutbox.$(OBJEXT): inkscape_version.h
+Index: src/main.cpp
+===================================================================
+--- src/main.cpp       (revision 20069)
++++ src/main.cpp       (working copy)
+@@ -511,7 +511,7 @@
+  */
+ static int set_extensions_env()
+ {
+-    char *oldenv = getenv("PYTHONPATH");
++    const char *oldenv = g_getenv("PYTHONPATH");
+     Glib::ustring tmp = INKSCAPE_EXTENSIONDIR;
+     if (oldenv != NULL) {
+ #ifdef WIN32
+@@ -521,7 +521,7 @@
+ #endif
+         tmp += oldenv;
+     }
+-    setenv("PYTHONPATH", tmp.c_str(), 1);
++    g_setenv("PYTHONPATH", tmp.c_str(), 1);
+     
+     return 0;
+ }
+Index: configure.ac
+===================================================================
+--- configure.ac       (revision 20069)
++++ configure.ac       (working copy)
+@@ -192,7 +192,7 @@
+                                 break], [gc_ok=no], [$gc_libs])
+                   break],
+                  [gc_ok=no])
+-if test "x$gc_ok" = "xyes"; then
++if test "x$gc_ok" = "xyes" && "x$cross_compiling" = "xno" ; then
+       AC_MSG_CHECKING([libgc version 6.4+])
+       AC_RUN_IFELSE(
+               [AC_LANG_SOURCE([[
+@@ -248,7 +248,7 @@
+ case "$host" in
+   *-*-mingw*)
+     platform_win32=yes
+-    INKSCAPE_CFLAGS="$INKSCAPE_CFLAGS -mms-bitfields -DLIBXML_STATIC"
++    WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
+     ;;
+   *)
+     platform_win32=no
+@@ -257,6 +257,8 @@
+ AC_MSG_RESULT([$platform_win32])
+ AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
++AC_SUBST(WIN32_CFLAGS)
++
+ AC_MSG_CHECKING([for Solaris platform])
+ case "$host" in
+   *-solaris2.*)
+@@ -282,10 +284,10 @@
+ if test "x$with_xft" != "xno" ; then
+       dnl Test fontconfig package
+-      PKG_CHECK_MODULES(XFT, xft, xft_ok=yes, xft_ok=no)
++      PKG_CHECK_MODULES(XFT, fontconfig, xft_ok=yes, xft_ok=no)
+       if test "x$xft_ok" != "xyes"; then
+               dnl test xft package
+-              PKG_CHECK_MODULES(XFT, fontconfig, xft_ok=yes, xft_ok=no)
++              PKG_CHECK_MODULES(XFT, xft, xft_ok=yes, xft_ok=no)
+               if test "x$xft_ok" != "xyes"; then
+                       dnl Have to test xft presence
+                       AC_CHECK_HEADER(X11/Xft/Xft.h, xft_ok=yes, xft_ok=no)
index 312253e..f0c0f9d 100644 (file)
@@ -9,29 +9,23 @@
 
 Name:           mingw32-inkscape
 Version:        20081027
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        MinGW Windows port of Inkscape vector graphics editor
 
 License:        LGPLv2+
 Group:          Development/Libraries
 URL:            http://www.inkscape.org/
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
 # Checked out of SVN on the date shown and then just rolled up into
 # a tarball.
 # svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape
 # tar zcf /tmp/inkscape-%{version}.tar.gz inkscape
 Source0:        inkscape-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-# Source patches needed.
-Patch0:         mingw32-inkscape-20081027-no-gc-version-check-when-crosscompiling.patch
-Patch1:         mingw32-inkscape-20081027-no-is-os-vista.patch
-Patch2:         mingw32-inkscape-20081027-extra-win32-objects.patch
-Patch3:         mingw32-inkscape-20081027-pango-enable-engine.patch
-Patch4:         mingw32-inkscape-20081027-no-setenv.patch
-
-# This is a hack, but for some reason PKG_CHECK_MODULES isn't
-# updating CFLAGS correctly.  This just works around the problem.
-Patch5:         mingw32-inkscape-20081027-Makefile.am-cflags.patch
+# Rolled-up source patch, submitted upstream on 2008-10-27.
+Patch0:         mingw32-inkscape-20081027.patch
 
 BuildArch:      noarch
 
@@ -39,6 +33,7 @@ BuildRequires:  mingw32-filesystem >= 30
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-gcc-c++
 BuildRequires:  mingw32-binutils
+BuildRequires:  mingw32-fontconfig
 BuildRequires:  mingw32-glibmm24
 BuildRequires:  mingw32-cairomm
 BuildRequires:  mingw32-pangomm
@@ -52,7 +47,6 @@ BuildRequires:  mingw32-boost
 BuildRequires:  mingw32-libsigc++20
 
 BuildRequires:  autoconf, automake, libtool
-BuildRequires:  perl
 
 
 %description
@@ -70,13 +64,7 @@ community-oriented development.
 
 %prep
 %setup -q -n inkscape
-
 %patch0 -p0
-%patch1 -p0
-%patch2 -p0
-%patch3 -p0
-%patch4 -p0
-%patch5 -p0
 
 ./autogen.sh
 
@@ -85,11 +73,7 @@ community-oriented development.
 %{_mingw32_configure} \
   --enable-lcms=no \
   --without-gnome-vfs
-
-# Additionally remove -lX* libraries from the Makefile.
-perl -pi.bak -e 's/-lX\w+//g' src/Makefile
-
-make
+make %{?_smp_mflags}
 
 
 %install
@@ -114,5 +98,5 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Mon Oct 27 2008 Richard W.M. Jones <rjones@redhat.com> - 20081027-1
+* Mon Oct 27 2008 Richard W.M. Jones <rjones@redhat.com> - 20081027-2
 - Initial RPM release.