diff options
author | Tony Theodore <tonyt@logyst.com> | 2012-02-04 05:45:32 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2012-02-04 05:45:32 (GMT) |
commit | a9d4374151d0ba5f5e8a8e6e805597ffcc7a06bc (patch) | |
tree | c097858031da84e067290ae270a37f1e33474cab | |
parent | 7f0254849ce4c4037cbc2e3e3f58f8d8b1fffda8 (diff) | |
parent | 13f574cce4700f26cf29091767b2875c504959cb (diff) | |
download | mxe-a9d4374151d0ba5f5e8a8e6e805597ffcc7a06bc.zip mxe-a9d4374151d0ba5f5e8a8e6e805597ffcc7a06bc.tar.gz mxe-a9d4374151d0ba5f5e8a8e6e805597ffcc7a06bc.tar.bz2 |
merge
-rw-r--r-- | src/dbus.mk | 2 | ||||
-rw-r--r-- | src/libharu-1-fixes.patch | 356 | ||||
-rw-r--r-- | src/libharu.mk | 30 | ||||
-rw-r--r-- | src/wt-1-fixes.patch | 129 | ||||
-rw-r--r-- | src/wt.mk | 34 |
5 files changed, 550 insertions, 1 deletions
diff --git a/src/dbus.mk b/src/dbus.mk index ed2836a..8b52ba0 100644 --- a/src/dbus.mk +++ b/src/dbus.mk @@ -20,7 +20,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && automake && ./configure \ + cd '$(1)' && ./configure \ --host='$(TARGET)' \ --prefix='$(PREFIX)/$(TARGET)' \ --with-xml=expat \ diff --git a/src/libharu-1-fixes.patch b/src/libharu-1-fixes.patch new file mode 100644 index 0000000..65a17f7 --- /dev/null +++ b/src/libharu-1-fixes.patch @@ -0,0 +1,356 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +From 531d2a9af8c51ad8badc32bc9ba43bb3b87b0e9f Mon Sep 17 00:00:00 2001 +From: Antony Dovgal <tony@daylessday.org> +Date: Mon, 10 Jan 2011 01:22:14 +0300 +Subject: [PATCH] fix build with libpng 1.5.0 (reported by Tamas Tevesz) + (cherry picked from commit + e5bf8b01f6c3d5e3fe0e26ac5345e0da10c03934) + +Conflicts: + + CHANGES +--- + src/hpdf_image_png.c | 109 +++++++++++++++++++++++++++----------------------- + 1 files changed, 59 insertions(+), 50 deletions(-) + +diff --git a/src/hpdf_image_png.c b/src/hpdf_image_png.c +index b8f831e..6057424 100644 +--- a/src/hpdf_image_png.c ++++ b/src/hpdf_image_png.c +@@ -109,14 +109,15 @@ ReadPngData_Interlaced (HPDF_Dict image, + png_infop info_ptr) + { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); ++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr); + png_bytep* row_pointers = HPDF_GetMem (image->mmgr, +- info_ptr->height * sizeof (png_bytep)); ++ height * sizeof (png_bytep)); + + if (row_pointers) { + HPDF_UINT i; + +- HPDF_MemSet (row_pointers, 0, info_ptr->height * sizeof (png_bytep)); +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ HPDF_MemSet (row_pointers, 0, height * sizeof (png_bytep)); ++ for (i = 0; i < (HPDF_UINT)height; i++) { + row_pointers[i] = HPDF_GetMem (image->mmgr, len); + + if (image->error->error_no != HPDF_OK) +@@ -126,7 +127,7 @@ ReadPngData_Interlaced (HPDF_Dict image, + if (image->error->error_no == HPDF_OK) { + png_read_image(png_ptr, row_pointers); + if (image->error->error_no == HPDF_OK) { /* add this line */ +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)height; i++) { + if (HPDF_Stream_Write (image->stream, row_pointers[i], len) != + HPDF_OK) + break; +@@ -135,7 +136,7 @@ ReadPngData_Interlaced (HPDF_Dict image, + } + + /* clean up */ +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)height; i++) { + HPDF_FreeMem (image->mmgr, row_pointers[i]); + } + +@@ -151,12 +152,13 @@ ReadPngData (HPDF_Dict image, + png_infop info_ptr) + { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); ++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr); + png_bytep buf_ptr = HPDF_GetMem (image->mmgr, len); + + if (buf_ptr) { + HPDF_UINT i; + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)height; i++) { + png_read_rows(png_ptr, (png_byte**)&buf_ptr, NULL, 1); + if (image->error->error_no != HPDF_OK) + break; +@@ -182,14 +184,16 @@ ReadTransparentPaletteData (HPDF_Dict image, + HPDF_STATUS ret = HPDF_OK; + HPDF_UINT i, j; + png_bytep *row_ptr; ++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr); ++ png_uint_32 width = png_get_image_width(png_ptr, info_ptr); + +- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); ++ row_ptr = HPDF_GetMem (image->mmgr, height * sizeof(png_bytep)); + if (!row_ptr) { + return HPDF_FAILD_TO_ALLOC_MEM; + } else { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)height; i++) { + row_ptr[i] = HPDF_GetMem(image->mmgr, len); + if (!row_ptr[i]) { + for (; i >= 0; i--) { +@@ -207,19 +211,19 @@ ReadTransparentPaletteData (HPDF_Dict image, + goto Error; + } + +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { +- smask_data[info_ptr->width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; ++ for (j = 0; j < height; j++) { ++ for (i = 0; i < width; i++) { ++ smask_data[width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; + } + +- if (HPDF_Stream_Write (image->stream, row_ptr[j], info_ptr->width) != HPDF_OK) { ++ if (HPDF_Stream_Write (image->stream, row_ptr[j], width) != HPDF_OK) { + ret = HPDF_FILE_IO_ERROR; + goto Error; + } + } + + Error: +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)height; i++) { + HPDF_FreeMem (image->mmgr, row_ptr[i]); + } + +@@ -238,6 +242,8 @@ ReadTransparentPngData (HPDF_Dict image, + HPDF_UINT i, j; + png_bytep *row_ptr, row; + png_byte color_type; ++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr); ++ png_uint_32 width = png_get_image_width(png_ptr, info_ptr); + + color_type = png_get_color_type(png_ptr, info_ptr); + +@@ -245,13 +251,13 @@ ReadTransparentPngData (HPDF_Dict image, + return HPDF_INVALID_PNG_IMAGE; + } + +- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); ++ row_ptr = HPDF_GetMem (image->mmgr, height * sizeof(png_bytep)); + if (!row_ptr) { + return HPDF_FAILD_TO_ALLOC_MEM; + } else { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)height; i++) { + row_ptr[i] = HPDF_GetMem(image->mmgr, len); + if (!row_ptr[i]) { + for (; i >= 0; i--) { +@@ -271,12 +277,12 @@ ReadTransparentPngData (HPDF_Dict image, + + switch (color_type) { + case PNG_COLOR_TYPE_RGB_ALPHA: +- row_len = 3 * info_ptr->width * sizeof(png_byte); +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { ++ row_len = 3 * width * sizeof(png_byte); ++ for (j = 0; j < height; j++) { ++ for (i = 0; i < width; i++) { + row = row_ptr[j]; + memmove(row + (3 * i), row + (4*i), 3); +- smask_data[info_ptr->width * j + i] = row[4 * i + 3]; ++ smask_data[width * j + i] = row[4 * i + 3]; + } + + if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { +@@ -286,12 +292,12 @@ ReadTransparentPngData (HPDF_Dict image, + } + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: +- row_len = info_ptr->width * sizeof(png_byte); +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { ++ row_len = width * sizeof(png_byte); ++ for (j = 0; j < height; j++) { ++ for (i = 0; i < width; i++) { + row = row_ptr[j]; + row[i] = row[2 * i]; +- smask_data[info_ptr->width * j + i] = row[2 * i + 1]; ++ smask_data[width * j + i] = row[2 * i + 1]; + } + + if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { +@@ -306,7 +312,7 @@ ReadTransparentPngData (HPDF_Dict image, + } + + Error: +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)height; i++) { + HPDF_FreeMem (image->mmgr, row_ptr[i]); + } + +@@ -415,7 +421,8 @@ LoadPngData (HPDF_Dict image, + + { + HPDF_STATUS ret = HPDF_OK; +- ++ png_uint_32 width, height; ++ int bit_depth, color_type; + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; + +@@ -447,8 +454,10 @@ LoadPngData (HPDF_Dict image, + goto Exit; + } + ++ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL); ++ + /* 16bit images are not supported. */ +- if (info_ptr->bit_depth == 16) { ++ if (bit_depth == 16) { + png_set_strip_16(png_ptr); + } + +@@ -458,7 +467,7 @@ LoadPngData (HPDF_Dict image, + } + + /* check palette-based images for transparent areas and load them immediately if found */ +- if (xref && PNG_COLOR_TYPE_PALETTE & info_ptr->color_type) { ++ if (xref && PNG_COLOR_TYPE_PALETTE & color_type) { + png_bytep trans; + int num_trans; + HPDF_Dict smask; +@@ -478,10 +487,10 @@ LoadPngData (HPDF_Dict image, + smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; + ret = HPDF_Dict_AddName (smask, "Type", "XObject"); + ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); +- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); ++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)width); ++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)height); + ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); +- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)bit_depth); + + if (ret != HPDF_OK) { + HPDF_Dict_Free(smask); +@@ -489,7 +498,7 @@ LoadPngData (HPDF_Dict image, + goto Exit; + } + +- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); ++ smask_data = HPDF_GetMem(image->mmgr, width * height); + if (!smask_data) { + HPDF_Dict_Free(smask); + ret = HPDF_FAILD_TO_ALLOC_MEM; +@@ -503,7 +512,7 @@ LoadPngData (HPDF_Dict image, + goto Exit; + } + +- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { ++ if (HPDF_Stream_Write(smask->stream, smask_data, width * height) != HPDF_OK) { + HPDF_FreeMem(image->mmgr, smask_data); + HPDF_Dict_Free(smask); + ret = HPDF_FILE_IO_ERROR; +@@ -513,9 +522,9 @@ LoadPngData (HPDF_Dict image, + + + ret += CreatePallet(image, png_ptr, info_ptr); +- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); +- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width); ++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height); ++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)bit_depth); + ret += HPDF_Dict_Add (image, "SMask", smask); + + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +@@ -526,7 +535,7 @@ no_transparent_color_in_palette: + + /* read images with alpha channel right away + we have to do this because image transparent mask must be added to the Xref */ +- if (xref && PNG_COLOR_MASK_ALPHA & info_ptr->color_type) { ++ if (xref && PNG_COLOR_MASK_ALPHA & color_type) { + HPDF_Dict smask; + png_bytep smask_data; + +@@ -539,10 +548,10 @@ no_transparent_color_in_palette: + smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; + ret = HPDF_Dict_AddName (smask, "Type", "XObject"); + ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); +- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); ++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)width); ++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)height); + ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); +- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)bit_depth); + + if (ret != HPDF_OK) { + HPDF_Dict_Free(smask); +@@ -550,7 +559,7 @@ no_transparent_color_in_palette: + goto Exit; + } + +- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); ++ smask_data = HPDF_GetMem(image->mmgr, width * height); + if (!smask_data) { + HPDF_Dict_Free(smask); + ret = HPDF_FAILD_TO_ALLOC_MEM; +@@ -564,7 +573,7 @@ no_transparent_color_in_palette: + goto Exit; + } + +- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { ++ if (HPDF_Stream_Write(smask->stream, smask_data, width * height) != HPDF_OK) { + HPDF_FreeMem(image->mmgr, smask_data); + HPDF_Dict_Free(smask); + ret = HPDF_FILE_IO_ERROR; +@@ -572,14 +581,14 @@ no_transparent_color_in_palette: + } + HPDF_FreeMem(image->mmgr, smask_data); + +- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { ++ if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { + ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); + } else { + ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); + } +- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); +- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width); ++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height); ++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)bit_depth); + ret += HPDF_Dict_Add (image, "SMask", smask); + + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +@@ -589,9 +598,9 @@ no_transparent_color_in_palette: + /* if the image has color palette, copy the pallet of the image to + * create color map. + */ +- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ++ if (color_type == PNG_COLOR_TYPE_PALETTE) + ret = CreatePallet(image, png_ptr, info_ptr); +- else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) ++ else if (color_type == PNG_COLOR_TYPE_GRAY) + ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); + else + ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); +@@ -617,16 +626,16 @@ no_transparent_color_in_palette: + } + + /* setting the info of the image. */ +- if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width) ++ if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width) + != HPDF_OK) + goto Exit; + +- if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height) ++ if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height) + != HPDF_OK) + goto Exit; + + if (HPDF_Dict_AddNumber (image, "BitsPerComponent", +- (HPDF_UINT)info_ptr->bit_depth) != HPDF_OK) ++ (HPDF_UINT)bit_depth) != HPDF_OK) + goto Exit; + + /* clean up */ +-- +1.7.8.3 + diff --git a/src/libharu.mk b/src/libharu.mk new file mode 100644 index 0000000..8f82be2 --- /dev/null +++ b/src/libharu.mk @@ -0,0 +1,30 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# libharu +PKG := libharu +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.2.1 +$(PKG)_CHECKSUM := b75ec6052b8d72aa7f23d67adcdf9df4847b64ca +$(PKG)_SUBDIR := libharu-$($(PKG)_VERSION) +$(PKG)_FILE := libharu-$($(PKG)_VERSION).tar.gz +$(PKG)_WEBSITE := http://libharu.org +$(PKG)_URL := http://libharu.org/files/$($(PKG)_FILE) +$(PKG)_DEPS := gcc zlib libpng + +define $(PKG)_UPDATE + wget -q -O- 'http://libharu.org/files/' | \ + grep 'libharu-' | \ + $(SED) -n 's,.*libharu-\([0-9][^>]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --host='$(TARGET)' \ + --prefix='$(PREFIX)/$(TARGET)' \ + --disable-shared \ + --with-zlib \ + --with-png + $(MAKE) -C '$(1)' -j '$(JOBS)' install +endef diff --git a/src/wt-1-fixes.patch b/src/wt-1-fixes.patch new file mode 100644 index 0000000..53d6c6a --- /dev/null +++ b/src/wt-1-fixes.patch @@ -0,0 +1,129 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +diff -ur a/cmake/WtFindBoost-vintage.txt b/cmake/WtFindBoost-vintage.txt +--- a/cmake/WtFindBoost-vintage.txt 2011-11-15 04:49:29.000000000 -0300 ++++ b/cmake/WtFindBoost-vintage.txt 2012-02-02 19:21:07.108060403 -0300 +@@ -70,6 +70,7 @@ + boost_thread-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION} + boost_thread-${BOOST_COMPILER}-mt-${BOOST_VERSION} + boost_thread-${BOOST_COMPILER}-mt ++ boost_thread${BOOST_COMPILER}-mt + boost_thread-mt-${BOOST_VERSION} + boost_thread-mt + boost_thread-${BOOST_COMPILER}-${BOOST_VERSION} +diff -ur a/cmake/WtFindGm.txt b/cmake/WtFindGm.txt +--- a/cmake/WtFindGm.txt 2011-04-01 07:35:50.000000000 -0300 ++++ b/cmake/WtFindGm.txt 2012-02-02 21:31:04.157439938 -0300 +@@ -59,6 +59,12 @@ + ELSE(GM_LIB AND GMPP_LIB AND GM_LIB_DEBUG AND GMPP_LIB_DEBUG AND GM_INCLUDE_DIR) + SET(GM_FOUND FALSE) + ENDIF(GM_LIB AND GMPP_LIB AND GM_LIB_DEBUG AND GMPP_LIB_DEBUG AND GM_INCLUDE_DIR) ++ ++ IF(GM_INCLUDE_DIR AND GM_LIBS) ++ SET(GM_FOUND TRUE) ++ SET(GM_INCLUDE_DIRS ${GM_INCLUDE_DIR}) ++ SET(GM_LIBRARIES optimized ${GM_LIBS}) ++ ENDIF(GM_INCLUDE_DIR AND GM_LIBS) + ELSE(WIN32) + FIND_LIBRARY(GM_LIB + NAMES +diff -ur a/cmake/WtFindHaru.txt b/cmake/WtFindHaru.txt +--- a/cmake/WtFindHaru.txt 2011-01-10 05:50:55.000000000 -0300 ++++ b/cmake/WtFindHaru.txt 2012-02-02 21:32:08.165440382 -0300 +@@ -44,6 +44,7 @@ + FIND_LIBRARY(Z_LIB + NAMES + zlib ++ libz + PATHS + ${HARU_PREFIX}/lib + ${USERLIB_PREFIX}/lib +@@ -58,6 +59,17 @@ + SET(HARU_SUPPORT_LIBS ${HARU_SUPPORT_LIBS} ${Z_LIB}) + ENDIF(Z_LIB) + ENDIF(HARU_LIB_RELEASE AND HARU_LIB_DEBUG) ++ ++ IF(HARU_LIB_RELEASE) ++ SET(HARU_LIB optimized ${HARU_LIB_RELEASE}) ++ IF(PNG_LIB_RELEASE) ++ SET(HARU_SUPPORT_LIBS ${HARU_SUPPORT_LIBS} optimized ${PNG_LIB_RELEASE}) ++ ENDIF(PNG_LIB_RELEASE) ++ IF(Z_LIB) ++ SET(HARU_SUPPORT_LIBS ${HARU_SUPPORT_LIBS} optimized ${Z_LIB}) ++ ENDIF(Z_LIB) ++ ENDIF(HARU_LIB_RELEASE) ++ + SET(HARU_SUPPORT_LIBS_FOUND TRUE) + ELSE(WIN32) + FIND_LIBRARY(HARU_LIB +diff -ur a/cmake/WtFindPangoFt2.txt b/cmake/WtFindPangoFt2.txt +--- a/cmake/WtFindPangoFt2.txt 2011-11-28 06:26:54.000000000 -0300 ++++ b/cmake/WtFindPangoFt2.txt 2012-02-02 21:17:14.341434198 -0300 +@@ -36,11 +36,15 @@ + ${GLIB2_INCLUDE_DIR} + ${GLIB2_CONFIG_INCLUDE_DIR}) + +-SET(PANGO_FT2_LIBRARIES +- ${PANGO_FT2_LIBRARY} +- ${PANGO_LIBRARY} +- ${GOBJECT2_LIBRARY} +- ${GLIB2_LIBRARY}) ++IF(PANGO_FT2_LIBS) ++ SET(PANGO_FT2_LIBRARIES optimized ${PANGO_FT2_LIBS}) ++ELSE(PANGO_FT2_LIBS) ++ SET(PANGO_FT2_LIBRARIES ++ ${PANGO_FT2_LIBRARY} ++ ${PANGO_LIBRARY} ++ ${GOBJECT2_LIBRARY} ++ ${GLIB2_LIBRARY}) ++ENDIF(PANGO_FT2_LIBS) + + IF (PANGO_INCLUDE_DIR + AND FT2_INCLUDE_DIR +diff -ur a/cmake/WtFindSsl.txt b/cmake/WtFindSsl.txt +--- a/cmake/WtFindSsl.txt 2011-09-19 09:34:19.000000000 -0300 ++++ b/cmake/WtFindSsl.txt 2012-02-02 21:17:53.033434468 -0300 +@@ -81,6 +81,11 @@ + AND SSL_LIB_DEBUG + AND SSL_TOO_LIB_RELEASE + AND SSL_TOO_LIB_DEBUG) ++ ++ IF(SSL_INCLUDE_DIRS AND OPENSSL_LIBS) ++ SET(SSL_FOUND true) ++ SET(SSL_LIBRARIES optimized ${OPENSSL_LIBS}) ++ ENDIF(SSL_INCLUDE_DIRS AND OPENSSL_LIBS) + ELSE (WIN32) + FIND_LIBRARY(SSL_LIB + NAMES +diff -ur a/src/http/Configuration.C b/src/http/Configuration.C +--- a/src/http/Configuration.C 2011-11-24 13:17:42.000000000 -0300 ++++ b/src/http/Configuration.C 2012-02-02 19:21:07.112060403 -0300 +@@ -18,7 +18,7 @@ + #endif + #ifdef WIN32 + #include <process.h> // for getpid() +-#include <Winsock2.h> // for gethostname() ++#include <winsock2.h> // for gethostname() + #endif + #include <iostream> + #include <fstream> +diff -ur a/src/Wt/WRasterImage.C b/src/Wt/WRasterImage.C +--- a/src/Wt/WRasterImage.C 2011-11-24 13:17:42.000000000 -0300 ++++ b/src/Wt/WRasterImage.C 2012-02-02 19:21:07.112060403 -0300 +@@ -38,15 +38,6 @@ + #define M_PI 3.14159265358979323846 + #endif + +-#ifdef WIN32 +-namespace { +- double round(double x) +- { +- return floor(x + 0.5); +- } +-} +-#endif +- + namespace { + static const double EPSILON = 1E-5; + diff --git a/src/wt.mk b/src/wt.mk new file mode 100644 index 0000000..604eaaa --- /dev/null +++ b/src/wt.mk @@ -0,0 +1,34 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# Wt +PKG := wt +$(PKG)_IGNORE := +$(PKG)_VERSION := 3.2.0 +$(PKG)_CHECKSUM := 38cf20980f16b0970c42ace45fd62edb28b6358b +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_WEBSITE := http://witty.sourceforge.net/ +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/witty/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc boost openssl libharu graphicsmagick pango postgresql sqlite qt + +define $(PKG)_UPDATE + wget -q -O- 'http://sourceforge.net/projects/witty/files/witty/' | \ + $(SED) -n 's,.*wt-\([0-9][^>]*\)\.tar.*,\1,p' | \ + tail -1 +endef + +define $(PKG)_BUILD + mkdir '$(1)/build' + cd '$(1)/build' && cmake .. \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DCMAKE_BUILD_TYPE:STRING="Release" \ + -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 +endef |