[vcpkg baseline][simage] Update to 1.8.1 (#18645)

* [simage] Update to 1.8.1

* Format manifest and update version files

* Revert the changes for arm and uwp in ci.baseline.txt

* Update versions/s-/simage.json

* Update ports/simage/portfile.cmake

* Update ports/simage/portfile.cmake

* Update ports/simage/portfile.cmake

* Update versions/s-/simage.json

* Add options to packages

* Update versions/s-/simage.json

* Update portfile.cmake

* Update versions/s-/simage.json

* Update portfile.cmake

* Update versions/s-/simage.json

* [simage] Reorganize all features, add features

* Install tool simage-config on non-Windows

* fix typo

* Add supports field and update ci.baseline.txt

* Update versions/s-/simage.json

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
This commit is contained in:
NancyLi1013 2021-07-01 22:14:24 +08:00 committed by GitHub
parent 640c439df7
commit 8e6f6a382e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 220 additions and 274 deletions

View File

@ -1,6 +0,0 @@
Source: simage
Version: 1.8.0
Port-Version: 1
Description: Image file format library abstraction layer
Build-Depends: giflib (!windows&!osx), libjpeg-turbo (!windows&!osx), libpng (!windows&!osx), libsndfile, tiff (!windows&!osx), libvorbis, zlib (!windows&!osx)
Homepage: https://github.com/coin3d/simage

View File

@ -1,10 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 775037a..e3deb01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -627,4 +627,4 @@ install(EXPORT ${PROJECT_NAME}
# ############################################################################
# New CPACK section, please see the README file inside cpack.d directory.
-add_subdirectory(cpack.d)
+#add_subdirectory(cpack.d)

View File

@ -1,44 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 775037a..fbd81b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -482,23 +489,23 @@ endif()
# Build examples
# ############################################################################
-set(SIMAGE_EXAMPLE_SOURCE
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/audio2raw.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/img2avi.c
+#set(SIMAGE_EXAMPLE_SOURCE
+# ${CMAKE_CURRENT_SOURCE_DIR}/examples/audio2raw.c
+# ${CMAKE_CURRENT_SOURCE_DIR}/examples/img2avi.c
# ${CMAKE_CURRENT_SOURCE_DIR}/examples/mpeg2enc.cpp # requires Coin to build
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-convert.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-read-line-test.c
-)
-
-foreach(_source ${SIMAGE_EXAMPLE_SOURCE})
- get_filename_component(_example ${_source} NAME_WE)
- add_executable(${_example} ${_source})
- target_compile_definitions(${_example} PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
- target_link_libraries(${_example} simage)
- if(UNIX)
- target_link_libraries(${_example} m)
- endif()
-endforeach()
+# ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-convert.c
+# ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-read-line-test.c
+#)
+
+#foreach(_source ${SIMAGE_EXAMPLE_SOURCE})
+# get_filename_component(_example ${_source} NAME_WE)
+# add_executable(${_example} ${_source})
+# target_compile_definitions(${_example} PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
+# target_link_libraries(${_example} simage)
+# if(UNIX)
+# target_link_libraries(${_example} m)
+# endif()
+#endforeach()
# ############################################################################
# Build tests

View File

@ -1,49 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 775037a..b82734a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -504,25 +511,25 @@ endforeach()
# Build tests
# ############################################################################
-enable_testing()
-
-add_executable(loaders tests/loaders.c)
-target_link_libraries(loaders simage)
-target_compile_definitions(loaders PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
-if(UNIX)
- target_link_libraries(loaders m)
-endif()
-
-add_test(
- loaders
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/loaders
- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.gif
- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.jpg
- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.png
- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.rgb
- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tga
- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tif
-)
+#enable_testing()
+
+#add_executable(loaders tests/loaders.c)
+#target_link_libraries(loaders simage)
+#target_compile_definitions(loaders PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
+#if(UNIX)
+# target_link_libraries(loaders m)
+#endif()
+
+#add_test(
+# loaders
+# ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/loaders
+# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.gif
+# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.jpg
+# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.png
+# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.rgb
+# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tga
+# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tif
+#)
# Add a target to generate API documentation with Doxygen
if(SIMAGE_BUILD_DOCUMENTATION)

View File

@ -1,60 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 775037a..2de9b9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,6 +108,10 @@ find_package(Jasper)
find_package(OggVorbis)
find_package(Sndfile)
+if(SNDFILE_FOUND)
+ find_package(FLAC)
+endif()
+
if(APPLE AND SIMAGE_USE_CGIMAGE)
check_cxx_source_compiles("
#include <CoreFoundation/CoreFoundation.h>
@@ -467,6 +471,9 @@ endif()
if(SNDFILE_FOUND)
target_include_directories(simage PRIVATE ${SNDFILE_INCLUDE_DIRS})
target_link_libraries(simage PRIVATE ${SNDFILE_LIBRARIES})
+ if(FLAC_FOUND)
+ target_link_libraries(simage PRIVATE ${FLAC_LIBRARIES})
+ endif()
endif()
if(TIFF_FOUND)
diff --git a/FindFLAC.cmake b/FindFLAC.cmake
new file mode 100644
index 0000000..ce40a11
--- /dev/null
+++ b/FindFLAC.cmake
@@ -0,0 +1,29 @@
+include(FindPackageHandleStandardArgs)
+
+find_path(FLAC_INCLUDE_DIR FLAC/all.h)
+
+mark_as_advanced(FLAC_INCLUDE_DIR)
+
+set(FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR})
+
+find_library(FLAC_LIBRARY NAMES FLAC)
+
+mark_as_advanced(
+ FLAC_INCLUDE_DIR
+ FLAC_LIBRARY
+)
+
+set(FLAC_LIBRARIES ${FLAC_LIBRARY})
+
+find_package_handle_standard_args(
+ FLAC
+ DEFAULT_MSG
+ FLAC_INCLUDE_DIRS
+ FLAC_LIBRARIES
+)
+
+if(FLAC_FOUND AND NOT TARGET FLAC::FLAC)
+ add_library(FLAC::FLAC UNKNOWN IMPORTED)
+ set_target_properties(FLAC::FLAC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}")
+ set_property(TARGET FLAC::FLAC APPEND PROPERTY IMPORTED_LOCATION "${FLAC_LIBRARY}")
+endif()

View File

@ -1,14 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a978dd..e7abd57 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -454,6 +454,9 @@ endif()
if(PNG_FOUND)
target_include_directories(simage PRIVATE ${PNG_INCLUDE_DIR})
target_link_libraries(simage PRIVATE ${PNG_LIBRARIES})
+ if(UNIX)
+ target_link_libraries(simage PRIVATE m)
+ endif()
endif()
if(SIMAGE_QIMAGE_SUPPORT)

View File

@ -1,16 +0,0 @@
diff --git a/FindOggVorbis.cmake b/FindOggVorbis.cmake
index a33e63e..7e2708b 100644
--- a/FindOggVorbis.cmake
+++ b/FindOggVorbis.cmake
@@ -28,10 +28,10 @@ mark_as_advanced(
set(
OGGVORBIS_LIBRARIES
- ${OGG_LIBRARY}
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
${VORBISENC_LIBRARY}
+ ${OGG_LIBRARY}
)
find_package_handle_standard_args(

View File

@ -1,64 +1,79 @@
vcpkg_fail_port_install(ON_TARGET "uwp")
set(SIMAGE_VERSION 1.8.1)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Coin3D/simage
REF simage-1.8.0
SHA512 7070c845fc72094a97b1253d23a5f60f90e71dc6ed968c9c7da67e05660b05245a807fbdf0f592a1d459c7c3b725783c55f59f867182b11cb9ec40741d7ad58c
REF 72bdc2fddb171ab08325ced9c4e04b27bbd2da6c #v1.8.1
SHA512 8e0d4b246318e9a08d9a17e0550fae4e3902e5d14ff9d7e43569624d1ceb9308c1cbc2401cedc4bff4da8b136fc57fc6b11c6800f1db15914b13186b0d5dc8f1
HEAD_REF master
PATCHES
disable-cpackd.patch
disable-examples.patch
disable-tests.patch
link-flac-library.patch
link-math-library.patch
link-ogg-library.patch
potentially-uninitialized-local-pointer-variable.patch
PATCHES requies-all-dependencies.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(SIMAGE_BUILD_SHARED_LIBS OFF)
else()
set(SIMAGE_BUILD_SHARED_LIBS ON)
endif()
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SIMAGE_BUILD_SHARED_LIBS)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMAGE_USE_STATIC_LIBS)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" SIMAGE_USE_MSVC_STATIC_RUNTIME)
set(OSX_OR_WINDOWS OFF)
if((VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP) OR VCPKG_TARGET_IS_OSX)
set(OSX_OR_WINDOWS ON)
endif()
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
set(SIMAGE_USE_AVIENC ON)
set(SIMAGE_USE_GDIPLUS ON)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
oggvorbis SIMAGE_OGGVORBIS_SUPPORT
sndfile SIMAGE_LIBSNDFILE_SUPPORT
)
# Depends on the platform
if(VCPKG_TARGET_IS_WINDOWS)
set(SIMAGE_ON_WIN ON)
set(SIMAGE_ON_NON_WIN OFF)
else()
set(SIMAGE_USE_AVIENC OFF)
set(SIMAGE_USE_GDIPLUS OFF)
set(SIMAGE_ON_WIN OFF)
set(SIMAGE_ON_NON_WIN ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DSIMAGE_BUILD_SHARED_LIBS=${SIMAGE_BUILD_SHARED_LIBS}
-DSIMAGE_USE_AVIENC=${SIMAGE_USE_AVIENC}
-DSIMAGE_USE_GDIPLUS=${SIMAGE_USE_GDIPLUS}
-DCMAKE_DISABLE_FIND_PACKAGE_FLAC=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Jasper=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${OSX_OR_WINDOWS}
-DCMAKE_DISABLE_FIND_PACKAGE_GIF=${OSX_OR_WINDOWS}
-DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${OSX_OR_WINDOWS}
-DCMAKE_DISABLE_FIND_PACKAGE_PNG=${OSX_OR_WINDOWS}
-DCMAKE_DISABLE_FIND_PACKAGE_TIFF=${OSX_OR_WINDOWS}
OPTIONS ${FEATURE_OPTIONS}
-DSIMAGE_BUILD_SHARED_LIBS:BOOL=${SIMAGE_BUILD_SHARED_LIBS}
-DSIMAGE_USE_STATIC_LIBS:BOOL=${SIMAGE_USE_STATIC_LIBS}
-DSIMAGE_USE_MSVC_STATIC_RUNTIME:BOOL=${SIMAGE_USE_MSVC_STATIC_RUNTIME}
-DSIMAGE_USE_AVIENC=${SIMAGE_ON_WIN}
-DSIMAGE_USE_GDIPLUS=${SIMAGE_ON_WIN}
# Available on Linux, OSX and Windows without gdiplus
-DSIMAGE_ZLIB_SUPPORT=${SIMAGE_ON_NON_WIN}
-DSIMAGE_GIF_SUPPORT=${SIMAGE_ON_NON_WIN}
-DSIMAGE_JPEG_SUPPORT=${SIMAGE_ON_NON_WIN}
-DSIMAGE_PNG_SUPPORT=${SIMAGE_ON_NON_WIN}
-DSIMAGE_TIFF_SUPPORT=${SIMAGE_ON_NON_WIN}
#
-DSIMAGE_USE_CGIMAGE=OFF
-DSIMAGE_USE_QIMAGE=OFF
-DSIMAGE_USE_QT6=OFF
-DSIMAGE_USE_QT5=OFF
-DSIMAGE_USE_CPACK=OFF
-DSIMAGE_LIBJASPER_SUPPORT=OFF
-DSIMAGE_EPS_SUPPORT=OFF
-DSIMAGE_MPEG2ENC_SUPPORT=OFF
-DSIMAGE_PIC_SUPPORT=OFF
-DSIMAGE_RGB_SUPPORT=OFF
-DSIMAGE_XWD_SUPPORT=OFF
-DSIMAGE_TGA_SUPPORT=OFF
-DSIMAGE_BUILD_MSVC_MP=OFF
-DSIMAGE_BUILD_EXAMPLES=OFF
-DSIMAGE_BUILD_TESTS=OFF
-DSIMAGE_BUILD_DOCUMENTATION=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/simage-1.8.0)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/simage-${SIMAGE_VERSION})
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
if (NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
vcpkg_copy_tools(TOOL_NAMES simage-config AUTO_CLEAN)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,26 +0,0 @@
diff --git a/examples/img2avi.c b/examples/img2avi.c
index 7a5ca96..d0ee057 100644
--- a/examples/img2avi.c
+++ b/examples/img2avi.c
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
int first;
int width;
int height;
- s_movie * movie;
+ s_movie * movie = NULL;
s_params * params;
s_image *image;
char formatbuf[20];
diff --git a/mpeg2enc/putvlc.c b/mpeg2enc/putvlc.c
index 6a84fbd..b373fea 100644
--- a/mpeg2enc/putvlc.c
+++ b/mpeg2enc/putvlc.c
@@ -103,7 +103,7 @@ void
simpeg_encode_putAC(simpeg_encode_context * context,int run, int signed_level, int vlcformat)
{
int level, len;
- VLCtable *ptab;
+ VLCtable *ptab = NULL;
level = (signed_level<0) ? -signed_level : signed_level; /* abs(signed_level) */

View File

@ -0,0 +1,37 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d869715..073a73f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,10 +117,10 @@ endif()
# On Windows GDI+ supports GIF, JPEG, EXIF, PNG, and TIFF.
# see https://docs.microsoft.com/en-us/windows/desktop/gdiplus/-gdiplus-types-of-bitmaps-about
if(SIMAGE_USE_GDIPLUS)
- find_package(GdiPlus)
+ find_package(GdiPlus REQUIRED)
endif()
if(SIMAGE_USE_AVIENC)
- find_package(Vfw)
+ find_package(Vfw REQUIRED)
endif()
# On macOS QuickTime supports BMP, GIF, JPEG, JPEG 2000, PNG, TIFF, and TGA.
@@ -267,7 +267,7 @@ if(SIMAGE_OGGVORBIS_SUPPORT)
find_package(Ogg REQUIRED)
find_package(Vorbis REQUIRED)
if(OGG_FOUND)
- find_package(Opus)
+ find_package(Opus REQUIRED)
endif()
endif()
@@ -287,8 +287,8 @@ if(NOT SIMAGE_QUICKTIME_SUPPORT AND NOT SIMAGE_CGIMAGE_SUPPORT AND NOT SIMAGE_GD
if(SIMAGE_TIFF_SUPPORT)
find_package(TIFF REQUIRED)
if(TIFF_FOUND)
- find_package(LibLZMA)
- find_package(Zstd)
+ find_package(LibLZMA REQUIRED)
+ find_package(Zstd REQUIRED)
endif()
endif()

118
ports/simage/vcpkg.json Normal file
View File

@ -0,0 +1,118 @@
{
"name": "simage",
"version-semver": "1.8.1",
"description": "Image file format library abstraction layer",
"homepage": "https://github.com/coin3d/simage",
"supports": "!uwp",
"default-features": [
"all"
],
"features": {
"all": {
"description": "Enable all features",
"dependencies": [
{
"name": "simage",
"default-features": false,
"features": [
"oggvorbis"
]
},
{
"name": "simage",
"default-features": false,
"features": [
"sndfile"
]
},
{
"name": "simage",
"default-features": false,
"features": [
"giflib"
],
"platform": "!windows"
},
{
"name": "simage",
"default-features": false,
"features": [
"jpeg"
],
"platform": "!windows"
},
{
"name": "simage",
"default-features": false,
"features": [
"png"
],
"platform": "!windows"
},
{
"name": "simage",
"default-features": false,
"features": [
"tiff"
],
"platform": "!windows"
},
{
"name": "simage",
"default-features": false,
"features": [
"zlib"
],
"platform": "!windows"
}
]
},
"giflib": {
"description": "Enable support for GIF images",
"dependencies": [
"giflib"
]
},
"jpeg": {
"description": "Enable support for JPEG images",
"dependencies": [
"libjpeg-turbo"
]
},
"oggvorbis": {
"description": "Enable support for ogg/vorbis extensions",
"dependencies": [
"libogg",
"libvorbis",
"opus"
]
},
"png": {
"description": "Enable support for PNG images",
"dependencies": [
"libpng"
]
},
"sndfile": {
"description": "Use libsndfile to load/save sampled sound",
"dependencies": [
"libflac",
"libsndfile"
]
},
"tiff": {
"description": "Enable support for TIFF images",
"dependencies": [
"liblzma",
"tiff",
"zstd"
]
},
"zlib": {
"description": "Enable support for zlib library",
"dependencies": [
"zlib"
]
}
}
}

View File

@ -1796,9 +1796,5 @@ dimcli:x64-windows-static=fail
# cppgraphqlgen triggers an ICE on Apple Clang that comes with MacOS 11.
cppgraphqlgen:x64-osx=fail
# Visual Studio 2019 version 16.10's XAML compiler seems to be crashing processing this port
simage:x64-uwp=fail
simage:arm-uwp=fail
# Changes in Python have broken tensorflow on our osx hardware
tensorflow-cc:x64-osx=fail

View File

@ -3539,8 +3539,8 @@
"libsigcpp-3": {
"baseline": "3.0.3",
"port-version": 1
},
"libsmb2": {
},
"libsmb2": {
"baseline": "2021-04-29",
"port-version": 0
},
@ -5769,8 +5769,8 @@
"port-version": 0
},
"simage": {
"baseline": "1.8.0",
"port-version": 1
"baseline": "1.8.1",
"port-version": 0
},
"simde": {
"baseline": "0.7.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "429f5758def1d9514aa6f3f2bbcb98d8a3f19cd1",
"version-semver": "1.8.1",
"port-version": 0
},
{
"git-tree": "7efea762708b2fa21ac7919656bfcdfccbd84339",
"version-string": "1.8.0",