diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libharu-1-fixes.patch | 51 | ||||
-rw-r--r-- | src/wt.mk | 16 |
2 files changed, 61 insertions, 6 deletions
diff --git a/src/libharu-1-fixes.patch b/src/libharu-1-fixes.patch index 65a17f7..fc12fdb 100644 --- a/src/libharu-1-fixes.patch +++ b/src/libharu-1-fixes.patch @@ -354,3 +354,54 @@ index b8f831e..6057424 100644 -- 1.7.8.3 +Wt requires the following patch for libHaru to render arcs correctly. +This patch has been tested against libhar 2.1.0 and 2.2.0. +(see http://redmine.webtoolkit.eu/projects/wt/wiki/LibHaru) + +diff -ur a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c +--- a/src/hpdf_page_operator.c 2010-02-01 07:26:13.000000000 -0300 ++++ b/src/hpdf_page_operator.c 2012-03-10 18:12:41.347028623 -0300 +@@ -2192,7 +2192,7 @@ + + HPDF_PTRACE ((" HPDF_Page_Arc\n")); + +- if (ang1 >= ang2 || (ang2 - ang1) >= 360) ++ if (fabs(ang2 - ang1) >= 360) + HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); + + if (ret != HPDF_OK) +@@ -2205,10 +2205,10 @@ + + + for (;;) { +- if (ang2 - ang1 <= 90) ++ if (fabs(ang2 - ang1) <= 90) + return InternalArc (page, x, y, ray, ang1, ang2, cont_flg); + else { +- HPDF_REAL tmp_ang = ang1 + 90; ++ HPDF_REAL tmp_ang = (ang2 > ang1 ? ang1 + 90 : ang1 - 90); + + if ((ret = InternalArc (page, x, y, ray, ang1, tmp_ang, cont_flg)) + != HPDF_OK) +@@ -2217,7 +2217,7 @@ + ang1 = tmp_ang; + } + +- if (ang1 >= ang2) ++ if (fabs(ang1 - ang2) < 0.1) + break; + + cont_flg = HPDF_TRUE; +@@ -2280,7 +2280,11 @@ + pbuf = HPDF_FToA (pbuf, (HPDF_REAL)x0, eptr); + *pbuf++ = ' '; + pbuf = HPDF_FToA (pbuf, (HPDF_REAL)y0, eptr); +- pbuf = (char *)HPDF_StrCpy (pbuf, " m\012", eptr); ++ ++ if (attr->gmode == HPDF_GMODE_PATH_OBJECT) ++ pbuf = (char *)HPDF_StrCpy (pbuf, " l\012", eptr); ++ else ++ pbuf = (char *)HPDF_StrCpy (pbuf, " m\012", eptr); + } + + pbuf = HPDF_FToA (pbuf, (HPDF_REAL)x1, eptr); @@ -19,19 +19,23 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DCMAKE_BUILD_TYPE:STRING="Release" \ + # build wt libraries + mkdir '$(1).build' + cd '$(1).build' && cmake \ + -DCONFIGDIR='$(PREFIX)/$(TARGET)/etc/wt' \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TESTS=OFF \ -DSHARED_LIBS=OFF \ + -DBOOST_DYNAMIC=OFF \ -DBOOST_PREFIX='$(PREFIX)/$(TARGET)' \ -DBOOST_COMPILER=_win32 \ -DSSL_PREFIX='$(PREFIX)/$(TARGET)' \ -DOPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \ -DGM_PREFIX='$(PREFIX)/$(TARGET)' \ -DGM_LIBS="`'$(TARGET)-pkg-config' --libs-only-l GraphicsMagick++`" \ - -DPANGO_FT2_LIBS="`'$(TARGET)-pkg-config' --libs-only-l pangoft2`" - $(MAKE) -C '$(1)/build' -j '$(JOBS)' install VERBOSE=1 + -DPANGO_FT2_LIBS="`'$(TARGET)-pkg-config' --libs-only-l pangoft2`" \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DCMAKE_BUILD_TYPE:STRING="Release" \ + '$(1)' + $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 endef |