Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openjpeg] Update version to 2.4.0 #20021

Merged
merged 3 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 25 additions & 31 deletions ports/openjpeg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO uclouvain/openjpeg
REF v2.3.1
SHA512 339fbc899bddf2393d214df71ed5d6070a3a76b933b1e75576c8a0ae9dfcc4adec40bdc544f599e4b8d0bc173e4e9e7352408497b5b3c9356985605830c26c03
REF 37ac30ceff6640bbab502388c5e0fa0bff23f505 #v2.4.0
SHA512 7554d64701f1b51501a977bc165e61e4696d97f1f40e4c784c729824878a716c13ac378c6b2dd0d23a11d9e3fa316ff6fc817ca5a614ef4d6530db06a8f83971
HEAD_REF master
PATCHES
dll.location.patch
Expand All @@ -18,27 +18,29 @@ else()
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"jpwl" BUILD_JPWL
"mj2" BUILD_MJ2
"jpip" BUILD_JPIP
"jp3d" BUILD_JP3D
)
FEATURES
"jpwl" BUILD_JPWL
"mj2" BUILD_MJ2
"jpip" BUILD_JPIP
"jp3d" BUILD_JP3D
)

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DBUILD_CODEC:BOOL=OFF
-DBUILD_DOC:BOOL=OFF
-DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg
-DOPENJPEG_INSTALL_INCLUDE_DIR=include
-DEXECUTABLE_OUTPUT_PATH=tools/${PORT}
-DBUILD_PKGCONFIG_FILES=ON
${FEATURE_OPTIONS}
${OPTIONS}
OPTIONS
-DBUILD_CODEC:BOOL=OFF
-DBUILD_DOC:BOOL=OFF
-DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg
-DOPENJPEG_INSTALL_INCLUDE_DIR=include
-DEXECUTABLE_OUTPUT_PATH=tools/${PORT}
-DBUILD_PKGCONFIG_FILES=ON
${FEATURE_OPTIONS}
${OPTIONS}
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()

if(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL MinGW))
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libopenjp2.pc" "-lm" "")
Expand All @@ -52,32 +54,24 @@ else()
endif()
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

set(TOOL_NAMES)
if("jpwl" IN_LIST FEATURES)
list(APPEND TOOL_NAMES opj_dec_server opj_jpwl_compress opj_jpwl_decompress)
endif()
if("mj2" IN_LIST FEATURES)
list(APPEND TOOL_NAMES opj_compress opj_decompress opj_dump opj_mj2_compress opj_mj2_decompress opj_mj2_extract opj_mj2_wrap)
endif()
if("jpip" IN_LIST FEATURES)
list(APPEND TOOL_NAMES opj_jpip_addxml opj_jpip_test opj_jpip_transcode)
endif()
if("jp3d" IN_LIST FEATURES)
list(APPEND TOOL_NAMES opj_jp3d_compress opj_jp3d_decompress)
endif()
if(TOOL_NAMES)
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
endif()
file(READ ${CURRENT_PACKAGES_DIR}/include/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.h "${OPENJPEG_H}")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/openjpeg.h" "${OPENJPEG_H}")

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
Expand Down
13 changes: 11 additions & 2 deletions ports/openjpeg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"name": "openjpeg",
"version-semver": "2.3.1",
"port-version": 4,
"version-semver": "2.4.0",
"description": "OpenJPEG is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, a still-image compression standard from the Joint Photographic Experts Group (JPEG). Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a JPEG 2000 Reference Software.",
"homepage": "https://github.com/uclouvain/openjpeg",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"jp3d": {
"description": "Build optional component jp3d"
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4709,8 +4709,8 @@
"port-version": 1
},
"openjpeg": {
"baseline": "2.3.1",
"port-version": 4
"baseline": "2.4.0",
"port-version": 0
},
"openmama": {
"baseline": "6.3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openjpeg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "383b12405beaa82435609863d2765ff654d8bc0b",
"version-semver": "2.4.0",
"port-version": 0
},
{
"git-tree": "a11a593758d57ee96493bd2cb667ac1aa88e972c",
"version-semver": "2.3.1",
Expand Down