From 0783596ed6d2d9cd523736530d47a4d7837cd28c Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Thu, 10 Sep 2009 22:38:33 +0000 Subject: CWS-TOOLING: integrate CWS mingwport23 2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite 2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix --- graphite/graphite-2.3.1.patch.mingw | 168 ++++++++++++++++++++++++++++++++++++ graphite/makefile.mk | 11 ++- 2 files changed, 178 insertions(+), 1 deletion(-) create mode 100755 graphite/graphite-2.3.1.patch.mingw (limited to 'graphite') diff --git a/graphite/graphite-2.3.1.patch.mingw b/graphite/graphite-2.3.1.patch.mingw new file mode 100755 index 000000000000..ecec00da7c6e --- /dev/null +++ b/graphite/graphite-2.3.1.patch.mingw @@ -0,0 +1,168 @@ +--- 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(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 + #include + #include +-#ifdef _WIN32 ++#if defined(_WIN32) && !defined(__MINGW32__) + #include + #endif // _WIN32 + #include +--- 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 +@@ -408,7 +408,7 @@ + if (pPolyCurve->wType == TT_PRIM_QSPLINE && + // test if this is the last curve + pPolyHdr->cb - (int)((byte *)(&pPolyCurve->apfx[j]) - (byte *)(pPolyHdr)) +- == sizeof POINTFX && ++ == sizeof(POINTFX) && + // and the two points are identical + CompareFixed(pPolyCurve->apfx[j].x, pPolyHdr->pfxStart.x) && + CompareFixed(pPolyCurve->apfx[j].y, pPolyHdr->pfxStart.y)) +@@ -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: diff --git a/graphite/makefile.mk b/graphite/makefile.mk index 8b673709a971..5faa9054f98a 100644 --- a/graphite/makefile.mk +++ b/graphite/makefile.mk @@ -123,6 +123,15 @@ GR_LIB_PATH=LD_LIBRARY_PATH=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT) GR_LIB_PATH= .ENDIF +.IF "$(OS)"=="WNT" +PATCH_FILES+=graphite-2.3.1.patch.mingw +EXTRA_GR_CXX_FLAGS=-nostdinc +.IF "$(MINGW_SHARED_GCCLIB)"=="YES" +EXTRA_GR_CXX_FLAGS+=-shared-libgcc +.ENDIF +EXTRA_GR_LD_FLAGS+=-no-undefined +.ENDIF + # don't use SOLARLIB for LDFLAGS because it pulls in system graphite so build will fail # CONFIGURE_ACTION=bash -c 'CXXFLAGS="$(INCLUDE) $(CFLAGSCXX) $(CFLAGSCOBJ) $(CDEFS) $(CDEFSOBJ) $(SOLARINC) $(LFS_CFLAGS) $(EXTRA_GR_CXX_FLAGS)" $(GR_LIB_PATH) LDFLAGS="-L$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT) $(EXTRA_GR_LD_FLAGS)" ./configure $(GR_CONFIGURE_FLAGS)' @@ -148,7 +157,7 @@ BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) .IF "$(OS)"=="MACOSX" OUT2LIB+=src$/.libs$/libgraphite.*.dylib .ELSE -.IF "$(OS)"=="WNT" +.IF "$(OS)"=="WNT" && "$(COM)"!="GCC" #OUT2LIB+=engine$/src$/.libs$/libgraphite*.dll .IF "$(debug)"=="true" OUT2BIN= \ -- cgit