early-access version 2853
This commit is contained in:
12
externals/vcpkg/ports/libharu/add-boolean-typedef.patch
vendored
Executable file
12
externals/vcpkg/ports/libharu/add-boolean-typedef.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/include/hpdf.h b/include/hpdf.h
|
||||
index 1cf0dd9..cce9b59 100644
|
||||
--- a/include/hpdf.h
|
||||
+++ b/include/hpdf.h
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "hpdf_types.h"
|
||||
|
||||
typedef void *HPDF_HANDLE;
|
||||
+typedef HPDF_HANDLE HPDF_Boolean;
|
||||
typedef HPDF_HANDLE HPDF_Doc;
|
||||
typedef HPDF_HANDLE HPDF_Page;
|
||||
typedef HPDF_HANDLE HPDF_Pages;
|
||||
21
externals/vcpkg/ports/libharu/fix-build-fail.patch
vendored
Executable file
21
externals/vcpkg/ports/libharu/fix-build-fail.patch
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 9d2a604..be8e964 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -79,11 +79,11 @@ if(LIBHPDF_STATIC)
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
- if(WIN32 AND NOT CYGWIN)
|
||||
- foreach(addlib ${ADDITIONAL_LIBRARIES})
|
||||
- install(FILES ${addlib} DESTINATION lib)
|
||||
- endforeach(addlib)
|
||||
- endif(WIN32 AND NOT CYGWIN)
|
||||
+ #if(WIN32 AND NOT CYGWIN)
|
||||
+ #foreach(addlib ${ADDITIONAL_LIBRARIES})
|
||||
+ #install(FILES ${addlib} DESTINATION lib)
|
||||
+ #endforeach(addlib)
|
||||
+ #endif(WIN32 AND NOT CYGWIN)
|
||||
endif(LIBHPDF_STATIC)
|
||||
if(LIBHPDF_SHARED)
|
||||
add_library(${LIBHPDF_NAME} SHARED ${LIBHPDF_SRCS})
|
||||
88
externals/vcpkg/ports/libharu/portfile.cmake
vendored
Executable file
88
externals/vcpkg/ports/libharu/portfile.cmake
vendored
Executable file
@@ -0,0 +1,88 @@
|
||||
if("notiffsymbols" IN_LIST FEATURES)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(DISABLETIFF tiff.patch)
|
||||
endif()
|
||||
endif()
|
||||
vcpkg_download_distfile(SHADING_PR
|
||||
URLS "https://github.com/libharu/libharu/pull/157.diff"
|
||||
FILENAME "libharu-shading-pr-157.patch"
|
||||
SHA512 f2ddb22b54b4eccc79400b6a4b2d245a221898f75456a5a559523eab7a523a87dfc5dfd0ec5fb17a771697e03c7ea6ed4c6095eff73e0a4302cd6eb24584c957
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libharu/libharu
|
||||
REF d84867ebf9f3de6afd661d2cdaff102457fbc371
|
||||
SHA512 789579dd52c1056ae90a4ce5360c26ba92cadae5341a3901c4159afe624129a1f628fa6412952a398e048b0e5040c93f7ed5b4e4bc620a22d897098298fe2a99
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-build-fail.patch
|
||||
add-boolean-typedef.patch
|
||||
# This patch adds shading support which is required for VTK. If desired, this could be moved into an on-by-default feature.
|
||||
${SHADING_PR}
|
||||
${DISABLETIFF}
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(VCPKG_BUILD_SHARED_LIBS ON)
|
||||
set(VCPKG_BUILD_STATIC_LIBS OFF)
|
||||
else()
|
||||
set(VCPKG_BUILD_SHARED_LIBS OFF)
|
||||
set(VCPKG_BUILD_STATIC_LIBS ON)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DLIBHPDF_STATIC=${VCPKG_BUILD_STATIC_LIBS}
|
||||
-DLIBHPDF_SHARED=${VCPKG_BUILD_SHARED_LIBS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib" "${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib")
|
||||
endif()
|
||||
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib")
|
||||
endif()
|
||||
else()
|
||||
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libhpdfs.a" "${CURRENT_PACKAGES_DIR}/lib/libhpdf.a")
|
||||
endif()
|
||||
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfs.a" "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.a")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/README"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/CHANGES"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/INSTALL"
|
||||
"${CURRENT_PACKAGES_DIR}/README"
|
||||
"${CURRENT_PACKAGES_DIR}/CHANGES"
|
||||
"${CURRENT_PACKAGES_DIR}/INSTALL"
|
||||
)
|
||||
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}")
|
||||
else()
|
||||
string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf.h" "${_contents}")
|
||||
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" _contents)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}")
|
||||
else()
|
||||
string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
25
externals/vcpkg/ports/libharu/tiff.patch
vendored
Executable file
25
externals/vcpkg/ports/libharu/tiff.patch
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
diff --git a/src/hpdf_image_ccitt.c b/src/hpdf_image_ccitt.c
|
||||
index 2937fc90d..a1a35d0ed 100644
|
||||
--- a/src/hpdf_image_ccitt.c
|
||||
+++ b/src/hpdf_image_ccitt.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <memory.h>
|
||||
#include <assert.h>
|
||||
|
||||
-#define G3CODES
|
||||
#include "t4.h"
|
||||
|
||||
typedef unsigned int uint32;
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 354ca7526..ee301d9af 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -99,6 +99,8 @@ if(PNG_FOUND)
|
||||
set(ADDITIONAL_LIBRARIES ${ADDITIONAL_LIBRARIES} ${PNG_LIBRARIES})
|
||||
endif(PNG_FOUND)
|
||||
|
||||
+find_package(TIFF REQUIRED)
|
||||
+list(APPEND ADDITIONAL_LIBRARIES TIFF::TIFF)
|
||||
|
||||
# =======================================================================
|
||||
# configure header files, add compiler flags
|
||||
26
externals/vcpkg/ports/libharu/vcpkg.json
vendored
Executable file
26
externals/vcpkg/ports/libharu/vcpkg.json
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "libharu",
|
||||
"version-string": "2017-08-15",
|
||||
"port-version": 10,
|
||||
"description": "libharu - free PDF library",
|
||||
"homepage": "https://github.com/libharu/libharu",
|
||||
"dependencies": [
|
||||
"libpng",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
"notiffsymbols"
|
||||
],
|
||||
"features": {
|
||||
"notiffsymbols": {
|
||||
"description": "disable symbols also defined by the tiff port",
|
||||
"dependencies": [
|
||||
"tiff"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user