mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 03:34:26 +08:00
Merge pull request #1634 from codicodi/openjpeg-2.2.0
[openjpeg] update to 2.2.0
This commit is contained in:
commit
f3f3c71709
19
ports/gdal/0004-Fix-openjpeg-include.patch
Normal file
19
ports/gdal/0004-Fix-openjpeg-include.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp
|
||||
index 1fd4f4f..417f7a8 100644
|
||||
--- a/frmts/openjpeg/openjpegdataset.cpp
|
||||
+++ b/frmts/openjpeg/openjpegdataset.cpp
|
||||
@@ -29,12 +29,8 @@
|
||||
|
||||
/* This file is to be used with openjpeg 2.0 */
|
||||
|
||||
-#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100
|
||||
-#include <openjpeg-2.1/openjpeg.h>
|
||||
-#else
|
||||
-#include <stdio.h> /* openjpeg.h needs FILE* */
|
||||
-#include <openjpeg-2.0/openjpeg.h>
|
||||
-#endif
|
||||
+#include <stdio.h>
|
||||
+#include <openjpeg.h>
|
||||
#include <vector>
|
||||
|
||||
#include "gdaljp2abstractdataset.h"
|
@ -1,4 +1,4 @@
|
||||
Source: gdal
|
||||
Version: 1.11.3-3
|
||||
Version: 1.11.3-4
|
||||
Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data.
|
||||
Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma
|
||||
|
@ -23,6 +23,7 @@ foreach(BUILD_TYPE debug release)
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0004-Fix-openjpeg-include.patch
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: openjpeg
|
||||
Version: 2.1.2-2
|
||||
Version: 2.2.0
|
||||
Description: JPEG 2000 image library
|
||||
|
@ -1,17 +1,18 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openjpeg-2.1.2)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/uclouvain/openjpeg/archive/v2.1.2.zip"
|
||||
FILENAME "openjpeg-2.1.2.zip"
|
||||
SHA512 45518b92b2a8e7218ab3efdebe1acf0437c01ab2e4d5769da17103a76ba38a7305fb36d0ceeca0576d53c071a3482d2d3f01d6e48a569191290bfba9274ef7b4
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO uclouvain/openjpeg
|
||||
REF v2.2.0
|
||||
SHA512 20651c380bee582ab1950994c424cc00061ad852e9c5438fb32a9809e3f275571a4cc7e92589add0d91debf2394262e58f441c2dd918809fc1c602ed68396a3a
|
||||
HEAD_REF master
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DBUILD_CODEC:BOOL=OFF
|
||||
-DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg
|
||||
-DOPENJPEG_INSTALL_INCLUDE_DIR=include
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
@ -20,14 +21,14 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/openjpeg-2.1/openjpeg.h OPENJPEG_H)
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/openjpeg.h OPENJPEG_H)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
string(REPLACE "defined(OPJ_STATIC)" "1" OPENJPEG_H "${OPENJPEG_H}")
|
||||
else()
|
||||
string(REPLACE "defined(OPJ_STATIC)" "0" OPENJPEG_H "${OPENJPEG_H}")
|
||||
endif()
|
||||
string(REPLACE "defined(DLL_EXPORT)" "0" OPENJPEG_H "${OPENJPEG_H}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/openjpeg-2.1/openjpeg.h "${OPENJPEG_H}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/openjpeg.h "${OPENJPEG_H}")
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openjpeg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user