]> granicus.if.org Git - graphviz/commitdiff
attempting to fix Makefile.am for Geln's gdiplus plugin
authorellson <devnull@localhost>
Thu, 28 Feb 2008 17:26:03 +0000 (17:26 +0000)
committerellson <devnull@localhost>
Thu, 28 Feb 2008 17:26:03 +0000 (17:26 +0000)
configure.ac
plugin/Makefile.am
plugin/gdiplus/GdiPlusEnums.h.patch [new file with mode: 0644]
plugin/gdiplus/GdiPlusHeaders.h.patch [new file with mode: 0644]
plugin/gdiplus/GdiPlusImaging.h.patch [new file with mode: 0644]
plugin/gdiplus/GdiPlusimageAttributes.h.patch [new file with mode: 0644]
plugin/gdiplus/Makefile.am
plugin/gdiplus/gdiplus.diff [deleted file]

index 13604242774a20eebae3502348f7c97746327b77..c48767122ac7dc26334891a0b84b97686f502869 100644 (file)
@@ -1925,6 +1925,30 @@ AC_SUBST(QUARTZ_CFLAGS)
 AC_SUBST(QUARTZ_LIBS)
 AM_CONDITIONAL(WITH_QUARTZ, [test "x$HAVE_QUARTZ" != "x"])
 
+dnl -----------------------------------
+dnl INCLUDES and LIBS for GDIPLUS 
+
+AC_ARG_WITH(gdiplus,
+  [AC_HELP_STRING([--with-gdiplus=no], [GDIPLUS framework (Windows)])],
+  [], [with_gdiplus=no])
+
+if test "x$with_gdiplus" = "xyes"; then
+
+GDIPLUS_PLATFORMSDK="$VS80COMNTOOLS/../../VC/PlatformSDK"
+
+if test -d "$GDIPLUS_PLATFORMSDK"; then
+HAVE_GDIPLUS=1
+AC_DEFINE_UNQUOTED(HAVE_GDIPLUS,1,[Define if you have the GdiPlus framework for Windows])
+GDIPLUS_CFLAGS=''
+GDIPLUS_LIBS=''
+fi
+
+fi
+AC_SUBST(GDIPLUS_PLATFORMSDK)
+AC_SUBST(GDIPLUS_CFLAGS)
+AC_SUBST(GDIPLUS_LIBS)
+AM_CONDITIONAL(WITH_GDIPLUS, [test "x$HAVE_GDIPLUS" != "x"])
+
 dnl -----------------------------------
 dnl INCLUDES and LIBS for GD
                                                                                 
@@ -2461,6 +2485,7 @@ AC_CONFIG_FILES(Makefile
        plugin/pango/Makefile
        plugin/ming/Makefile
        plugin/quartz/Makefile
+       plugin/gdiplus/Makefile
        plugin/dot_layout/Makefile
        plugin/neato_layout/Makefile
        plugin/xlib/Makefile
index ed00511e7ee5aa1bbb5c52b9a1c48f7185977027..4e1b02ae8d49a832e250a6f46b8d82c9143dec23 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$ $Revision$
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = core gd pango dot_layout neato_layout xlib gtk ming devil gdk_pixbuf rsvg quartz
+SUBDIRS = core gd pango dot_layout neato_layout xlib gtk ming devil gdk_pixbuf rsvg quartz gdiplus
 
 EXTRA_DIST = Makefile.old
diff --git a/plugin/gdiplus/GdiPlusEnums.h.patch b/plugin/gdiplus/GdiPlusEnums.h.patch
new file mode 100644 (file)
index 0000000..68bd589
--- /dev/null
@@ -0,0 +1,15 @@
+--- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusEnums.h     Thu Apr 14 16:54:44 2005
++++ ./GdiPlusEnums.h   Mon Feb 25 17:19:13 2008
+@@ -531,11 +531,9 @@
+ // We have to change the WMF record numbers so that they don't conflict with\r
+ // the EMF and EMF+ record numbers.\r
\r
+-enum EmfPlusRecordType;\r
+-\r
+ #define GDIP_EMFPLUS_RECORD_BASE        0x00004000\r
+ #define GDIP_WMF_RECORD_BASE            0x00010000\r
+-#define GDIP_WMF_RECORD_TO_EMFPLUS(n)   ((EmfPlusRecordType)((n) | GDIP_WMF_RECORD_BASE))\r
++#define GDIP_WMF_RECORD_TO_EMFPLUS(n)   ((n) | GDIP_WMF_RECORD_BASE)\r
+ #define GDIP_EMFPLUS_RECORD_TO_WMF(n)   ((n) & (~GDIP_WMF_RECORD_BASE))\r
+ #define GDIP_IS_WMF_RECORDTYPE(n)       (((n) & GDIP_WMF_RECORD_BASE) != 0)\r
\r
diff --git a/plugin/gdiplus/GdiPlusHeaders.h.patch b/plugin/gdiplus/GdiPlusHeaders.h.patch
new file mode 100644 (file)
index 0000000..fa7784e
--- /dev/null
@@ -0,0 +1,11 @@
+--- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusHeaders.h   Thu Apr 14 16:54:44 2005
++++ ./GdiPlusHeaders.h Mon Feb 25 17:20:22 2008
+@@ -650,7 +650,7 @@
\r
+ class CachedBitmap : public GdiplusBase\r
+ {\r
+-    friend Graphics;\r
++    friend class Graphics;\r
\r
+ public:\r
+     CachedBitmap(IN Bitmap *bitmap,\r
diff --git a/plugin/gdiplus/GdiPlusImaging.h.patch b/plugin/gdiplus/GdiPlusImaging.h.patch
new file mode 100644 (file)
index 0000000..56448f5
--- /dev/null
@@ -0,0 +1,11 @@
+--- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusImaging.h   Thu Apr 14 16:54:44 2005
++++ ./GdiPlusImaging.h Mon Feb 25 17:23:08 2008
+@@ -153,7 +153,7 @@
+     UINT Width;\r
+     UINT Height;\r
+     INT Stride;\r
+-    PixelFormat PixelFormat;\r
++    Gdiplus::PixelFormat PixelFormat;\r
+     VOID* Scan0;\r
+     UINT_PTR Reserved;\r
+ };\r
diff --git a/plugin/gdiplus/GdiPlusimageAttributes.h.patch b/plugin/gdiplus/GdiPlusimageAttributes.h.patch
new file mode 100644 (file)
index 0000000..6515d6c
--- /dev/null
@@ -0,0 +1,13 @@
+--- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusimageAttributes.h   Thu Apr 14 16:54:44 2005
++++ ./GdiPlusimageAttributes.h Mon Feb 25 17:21:58 2008
+@@ -231,8 +231,8 @@
+                                             nativeImageAttr,\r
+                                             type,\r
+                                             FALSE,\r
+-                                            NULL,\r
+-                                            NULL));\r
++                                            (ARGB)0,\r
++                                            (ARGB)0));\r
+     }\r
\r
+     Status SetOutputChannel(\r
index 37ad4b5f41c5b4cb33ccc7dce69557684ada943f..071fc710cd488149dbe942817a26a0fcb593162d 100644 (file)
@@ -18,11 +18,17 @@ pkglib_LTLIBRARIES = libgvplugin_gdiplus.la
 endif
 endif
 
+nodist_libgvplugin_gdiplus_C_la_SOURCES = \
+       GdiPlusEnums.h \
+       GdiPlusHeaders.h \
+       GdiPlusImaging.h \
+       GdiPlusimageAttributes.h
 libgvplugin_gdiplus_C_la_SOURCES = \
        gvplugin_gdiplus.cpp \
        gvrender_gdiplus.cpp
 
-libgvplugin_gdiplus_la_LDFLAGS = -version-info @GVPLUGIN_VERSION_INFO -L "$(PLATFORMSDK)/lib"
+libgvplugin_gdiplus_la_LDFLAGS = -version-info @GVPLUGIN_VERSION_INFO -L "$(GDIPLUS_PLATFORMSDK)/lib"
+nodist_libgvplugin_gdiplus_la_SOURCES = $(nodist_libgvplugin_gdiplus_C_la_SOURCES)
 libgvplugin_gdiplus_la_SOURCES = $(libgvplugin_gdiplus_C_la_SOURCES)
 libgvplugin_gdiplus_la_LIBADD = -lgdiplus -lgdi32 -lole32 -lstdc++
 
@@ -30,6 +36,20 @@ if WITH_WIN32
 libgvplugin_gdiplus_la_LDFLAGS += -no-undefined
 endif
 
-GdiPlus.h : $(PLATFORMSDK)/include/GdiPlus*.h gdiplus.diff
-       cp $(PLATFORMSDK)/include/GdiPlus*.h .
-       patch gdiplus.diff
+# these targets are built on the build platform, not on the dist platform,
+#    because they are included in the nodist...SOURCES list above
+GdiPlusEnums.h : $(GDIPLUS_PLATFORMSDK)/include/GdiPlusEnums.h GdiPlusEnums.h.patch
+       cp $(GDIPLUS_PLATFORMSDK)/include/GdiPlusEnums.h .
+       patch -p0 < GdiPlusEnums.h.patch
+
+GdiPlusHeaders.h : $(GDIPLUS_PLATFORMSDK)/include/GdiPlusHeaders.h GdiPlusHeaders.h.patch
+       cp $(GDIPLUS_PLATFORMSDK)/include/GdiPlusHeaders.h .
+       patch -p0 < GdiPlusHeaders.h.patch
+
+GdiPlusImaging.h : $(GDIPLUS_PLATFORMSDK)/include/GdiPlusImaging.h GdiPlusImaging.h.patch
+       cp $(GDIPLUS_PLATFORMSDK)/include/GdiPlusImaging.h .
+       patch -p0 < GdiPlusImaging.h.patch
+
+GdiPlusimageAttributes.h : $(GDIPLUS_PLATFORMSDK)/include/GdiPlusimageAttributes.h GdiPlusimageAttributes.h.patch
+       cp $(GDIPLUS_PLATFORMSDK)/include/GdiPlusimageAttributes.h .
+       patch -p0 < GdiPlusimageAttributes.h.patch
diff --git a/plugin/gdiplus/gdiplus.diff b/plugin/gdiplus/gdiplus.diff
deleted file mode 100755 (executable)
index 2ce5655..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusEnums.h     Thu Apr 14 16:54:44 2005
-+++ ./GdiPlusEnums.h   Mon Feb 25 17:19:13 2008
-@@ -531,11 +531,9 @@
- // We have to change the WMF record numbers so that they don't conflict with\r
- // the EMF and EMF+ record numbers.\r
\r
--enum EmfPlusRecordType;\r
--\r
- #define GDIP_EMFPLUS_RECORD_BASE        0x00004000\r
- #define GDIP_WMF_RECORD_BASE            0x00010000\r
--#define GDIP_WMF_RECORD_TO_EMFPLUS(n)   ((EmfPlusRecordType)((n) | GDIP_WMF_RECORD_BASE))\r
-+#define GDIP_WMF_RECORD_TO_EMFPLUS(n)   ((n) | GDIP_WMF_RECORD_BASE)\r
- #define GDIP_EMFPLUS_RECORD_TO_WMF(n)   ((n) & (~GDIP_WMF_RECORD_BASE))\r
- #define GDIP_IS_WMF_RECORDTYPE(n)       (((n) & GDIP_WMF_RECORD_BASE) != 0)\r
\r
---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusHeaders.h   Thu Apr 14 16:54:44 2005
-+++ ./GdiPlusHeaders.h Mon Feb 25 17:20:22 2008
-@@ -650,7 +650,7 @@
\r
- class CachedBitmap : public GdiplusBase\r
- {\r
--    friend Graphics;\r
-+    friend class Graphics;\r
\r
- public:\r
-     CachedBitmap(IN Bitmap *bitmap,\r
---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusImaging.h   Thu Apr 14 16:54:44 2005
-+++ ./GdiPlusImaging.h Mon Feb 25 17:23:08 2008
-@@ -153,7 +153,7 @@
-     UINT Width;\r
-     UINT Height;\r
-     INT Stride;\r
--    PixelFormat PixelFormat;\r
-+    Gdiplus::PixelFormat PixelFormat;\r
-     VOID* Scan0;\r
-     UINT_PTR Reserved;\r
- };\r
---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusimageAttributes.h   Thu Apr 14 16:54:44 2005
-+++ ./GdiPlusimageAttributes.h Mon Feb 25 17:21:58 2008
-@@ -231,8 +231,8 @@
-                                             nativeImageAttr,\r
-                                             type,\r
-                                             FALSE,\r
--                                            NULL,\r
--                                            NULL));\r
-+                                            (ARGB)0,\r
-+                                            (ARGB)0));\r
-     }\r
\r
-     Status SetOutputChannel(\r