Source

ooo340 / graphite / graphite-2.3.1.patch.mingw

Full commit
kz ad53b89 





























































































































































--- misc/silgraphite-2.3.1/engine/config/ltmain.sh	2009-01-28 11:21:59.000000000 +0900
+++ misc/build/silgraphite-2.3.1/engine/config/ltmain.sh	2009-08-23 20:59:13.180125000 +0900
@@ -3963,7 +3963,7 @@
 	case $dir in
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
 	*)
-	  absdir=`cd "$dir" && pwd`
+	  absdir=`cygpath -m -a "$dir"`
 	  test -z "$absdir" && \
 	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
 	  dir="$absdir"
--- misc/silgraphite-2.3.1/engine/src/Makefile.in	2009-01-28 11:25:00.000000000 +0900
+++ misc/build/silgraphite-2.3.1/engine/src/Makefile.in	2009-08-23 20:59:13.742625000 +0900
@@ -62,7 +62,8 @@
 	GrFSM.lo GrGlyphTable.lo GrPassActionCode.lo GrPass.lo \
 	GrSlotState.lo GrSlotStream.lo GrTableManager.lo \
 	MemoryUsage.lo Platform.lo SegmentAux.lo Segment.lo TestFSM.lo \
-	TestPasses.lo TransductionLog.lo SegmentPainter.lo
+	TestPasses.lo TransductionLog.lo SegmentPainter.lo WinFont.lo \
+	WinSegmentPainter.lo
 libgraphite_la_OBJECTS = $(am_libgraphite_la_OBJECTS)
 libgraphite_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
@@ -257,11 +258,14 @@
 	$(segmentdir)/Platform.cpp $(segmentdir)/SegmentAux.cpp \
 	$(segmentdir)/Segment.cpp $(segmentdir)/TestFSM.cpp \
 	$(segmentdir)/TestPasses.cpp $(segmentdir)/TransductionLog.cpp \
-	$(painterdir)/SegmentPainter.cpp
+	$(painterdir)/SegmentPainter.cpp \
+	$(winwrapperdir)/WinFont.cpp \
+	$(winwrapperdir)/WinSegmentPainter.cpp
 genericdir = $(top_srcdir)/src/generic
 fontdir = $(top_srcdir)/src/font
 segmentdir = $(top_srcdir)/src/segment
 painterdir = $(top_srcdir)/src/painter
+winwrapperdir = $(top_srcdir)/../wrappers/win32
 all: all-am
 
 .SUFFIXES:
@@ -358,6 +362,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TransductionLog.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TtfUtil.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WinFont.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WinSegmentPainter.Plo@am__quote@
 
 .cpp.o:
 @am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -569,6 +575,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SegmentPainter.lo `test -f '$(painterdir)/SegmentPainter.cpp' || echo '$(srcdir)/'`$(painterdir)/SegmentPainter.cpp
 
+WinFont.lo: $(winwrapperdir)/WinFont.cpp
+@am__fastdepCXX_TRUE@	$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT WinFont.lo -MD -MP -MF $(DEPDIR)/WinFont.Tpo -c -o WinFont.lo `test -f '$(winwrapperdir)/WinFont.cpp' || echo '$(srcdir)/'`$(winwrapperdir)/WinFont.cpp
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/WinFont.Tpo $(DEPDIR)/WinFont.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(winwrapperdir)/WinFont.cpp' object='WinFont.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o WinFont.lo `test -f '$(winwrapperdir)/WinFont.cpp' || echo '$(srcdir)/'`$(winwrapperdir)/WinFont.cpp
+
+WinSegmentPainter.lo: $(winwrapperdir)/WinSegmentPainter.cpp
+@am__fastdepCXX_TRUE@	$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT WinSegmentPainter.lo -MD -MP -MF $(DEPDIR)/WinSegmentPainter.Tpo -c -o WinSegmentPainter.lo `test -f '$(winwrapperdir)/WinSegmentPainter.cpp' || echo '$(srcdir)/'`$(winwrapperdir)/WinSegmentPainter.cpp
+@am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/WinSegmentPainter.Tpo $(DEPDIR)/WinSegmentPainter.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(winwrapperdir)/WinSegmentPainter.cpp' object='WinSegmentPainter.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o WinSegmentPainter.lo `test -f '$(winwrapperdir)/WinSegmentPainter.cpp' || echo '$(srcdir)/'`$(winwrapperdir)/WinSegmentPainter.cpp
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
--- misc/silgraphite-2.3.1/engine/src/font/FileFont.cpp	2009-01-22 07:36:42.000000000 +0900
+++ misc/build/silgraphite-2.3.1/engine/src/font/FileFont.cpp	2009-08-23 20:59:14.148875000 +0900
@@ -208,7 +208,11 @@
 			}
 //		}
 #elif 1
+#ifdef __MINGW32__
+		m_stuFaceName.assign(reinterpret_cast<wchar_t*>(rgchwFace));
+#else
 		m_stuFaceName.assign(rgchwFace);
+#endif
 #else	// VS 2005 needs this:
 		for (int cch16 = 0; cch16 < cchw; cch16++)
 			m_stuFaceName.push_back(rgchwFace[cch16]);
--- misc/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp	2009-01-22 07:36:42.000000000 +0900
+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp	2009-08-23 20:59:15.445750000 +0900
@@ -375,7 +375,7 @@
 		_itow(dxDesiredWidth, rgchw, 10);
 		strTmp += rgchw;
 		strTmp += L")\n";
-		OutputDebugString(strTmp.c_str());
+		OutputDebugStringW(strTmp.c_str());
 #else
 		Assert(fprintf(stderr,
 			   "justification failed by %d units (width needed = %d)\n",
--- misc/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp	2009-01-22 07:36:42.000000000 +0900
+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp	2009-08-23 20:59:15.711375000 +0900
@@ -56,7 +56,7 @@
 
 int main(int argc, char* argv[])
 {
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32__)
 	_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
 #endif // WIN32
 
--- misc/silgraphite-2.3.1/engine/test/RegressionTest/main.h	2009-01-29 17:33:19.000000000 +0900
+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/main.h	2009-08-23 20:59:15.945750000 +0900
@@ -36,7 +36,7 @@
 ////#include <algorithm>
 #include <string>
 #include <cstring>
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32__)
 #include <crtdbg.h>
 #endif // _WIN32
 #include <assert.h>
--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.cpp	2009-01-29 17:33:19.000000000 +0900
+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.cpp	2009-08-23 20:59:16.211375000 +0900
@@ -846,7 +846,7 @@
 
 } // namespace gr
 
-template stdext::hash_map<
+template class stdext::hash_map<
 	gr::WinFont::LogFontWrapper,
 	gr::WinFont::FontHandleCache::FontCacheValue,
 	gr::WinFont::LogFontHashFuncs>;
--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.h	2009-01-29 17:33:19.000000000 +0900
+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.h	2009-08-23 20:59:16.367625000 +0900
@@ -17,6 +17,9 @@
 #endif
 #ifndef WINFONT_INCLUDED
 #define WINFONT_INCLUDED
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
 
 //:End Ignore
 
@@ -27,6 +30,8 @@
 #include "GrClient.h"
 #include "Font.h"
 
+namespace stdext = std;
+
 #ifdef _STLPORT_VERSION
 namespace stdext = _STLP_STD;
 #endif
--- misc/silgraphite-2.3.1/wrappers/win32/WinSegmentPainter.h	2008-05-09 20:10:30.000000000 +0900
+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinSegmentPainter.h	2009-08-23 21:14:38.961375000 +0900
@@ -82,7 +82,7 @@
 	//	return ::SetBkColor(hdc, PALETTERGB(GetRValue(clr), GetGValue(clr), GetBValue(clr)));
 	//}
 
-	void WinSegmentPainter::paintAux();
+	void paintAux();
 
 protected:
 	// member variables: