]> granicus.if.org Git - graphviz/commitdiff
try a different technique for getting and patching gdiplus headers
authorellson <devnull@localhost>
Mon, 3 Mar 2008 16:10:47 +0000 (16:10 +0000)
committerellson <devnull@localhost>
Mon, 3 Mar 2008 16:10:47 +0000 (16:10 +0000)
plugin/gdiplus/GdiPlusEnums.h.patch [deleted file]
plugin/gdiplus/GdiPlusHeaders.h.patch [deleted file]
plugin/gdiplus/GdiPlusImaging.h.patch [deleted file]
plugin/gdiplus/GdiPlusimageAttributes.h.patch [deleted file]
plugin/gdiplus/Makefile.am
plugin/gdiplus/gdiplus.diff [new file with mode: 0755]

diff --git a/plugin/gdiplus/GdiPlusEnums.h.patch b/plugin/gdiplus/GdiPlusEnums.h.patch
deleted file mode 100644 (file)
index 68bd589..0000000
+++ /dev/null
@@ -1,15 +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
diff --git a/plugin/gdiplus/GdiPlusHeaders.h.patch b/plugin/gdiplus/GdiPlusHeaders.h.patch
deleted file mode 100644 (file)
index fa7784e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- /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
deleted file mode 100644 (file)
index 56448f5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- /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
deleted file mode 100644 (file)
index 6515d6c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- /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 071fc710cd488149dbe942817a26a0fcb593162d..19c0bfa7328673bedb7cc1bb0efbe78407bf1c04 100644 (file)
@@ -18,11 +18,6 @@ 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
@@ -36,20 +31,12 @@ if WITH_WIN32
 libgvplugin_gdiplus_la_LDFLAGS += -no-undefined
 endif
 
-# 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
+libgvplugin_gdiplus.la libgvplugin_gdiplus_C.la: GdiPlusHeaders
 
-GdiPlusHeaders.h : $(GDIPLUS_PLATFORMSDK)/include/GdiPlusHeaders.h GdiPlusHeaders.h.patch
-       cp $(GDIPLUS_PLATFORMSDK)/include/GdiPlusHeaders.h .
-       patch -p0 < GdiPlusHeaders.h.patch
+# these targets are created on the build platform, not on the dist platform
+.PHONY: GdiPlusHeaders
+GdiPlusHeaders: gdiplus.diff
+       cp $(GDIPLUS_PLATFORMSDK)/include/*.h .
+       patch -p0 < gdiplus.diff
 
-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
+EXTRA_DIST = gdiplus.diff
diff --git a/plugin/gdiplus/gdiplus.diff b/plugin/gdiplus/gdiplus.diff
new file mode 100755 (executable)
index 0000000..2ce5655
--- /dev/null
@@ -0,0 +1,50 @@
+--- /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