[libexif] Change to the official build system (#32114)

* [vtk] Fix the dependency curl of proj

* version

* [libexif] Change to the official build system

* add port-version

* version

* revert

* libexif

* version

* default feature nls

* version

* update

* format

* version

* revert

* vdb

* version
This commit is contained in:
Frank 2023-12-01 17:57:19 +08:00 committed by GitHub
parent e85cafa30d
commit 24ae27eb23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 91 additions and 409 deletions

View File

@ -1,158 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(libexif LANGUAGES C)
set(PACKAGE "libexif")
option(ENABLE_NLS "Enable NLS" OFF)
set(HEADERS
libexif/_stdint.h
libexif/exif.h
libexif/exif-byte-order.h
libexif/exif-content.h
libexif/exif-data.h
libexif/exif-data-type.h
libexif/exif-entry.h
libexif/exif-format.h
libexif/exif-gps-ifd.h
libexif/exif-ifd.h
libexif/exif-loader.h
libexif/exif-log.h
libexif/exif-mem.h
libexif/exif-mnote-data.h
libexif/exif-mnote-data-priv.h
libexif/exif-system.h
libexif/exif-tag.h
libexif/exif-utils.h
)
set(SOURCES
libexif/exif-byte-order.c
libexif/exif-content.c
libexif/exif-data.c
libexif/exif-entry.c
libexif/exif-format.c
libexif/exif-gps-ifd.c
libexif/exif-ifd.c
libexif/exif-loader.c
libexif/exif-log.c
libexif/exif-mem.c
libexif/exif-mnote-data.c
libexif/exif-tag.c
libexif/exif-utils.c
)
set(HEADERS_APPLE
libexif/apple/exif-mnote-data-apple.h
libexif/apple/mnote-apple-entry.h
libexif/apple/mnote-apple-tag.h
)
set(SOURCES_APPLE
libexif/apple/exif-mnote-data-apple.c
libexif/apple/mnote-apple-entry.c
libexif/apple/mnote-apple-tag.c
)
set(HEADERS_CANON
libexif/canon/exif-mnote-data-canon.h
libexif/canon/mnote-canon-entry.h
libexif/canon/mnote-canon-tag.h
)
set(SOURCES_CANON
libexif/canon/exif-mnote-data-canon.c
libexif/canon/mnote-canon-entry.c
libexif/canon/mnote-canon-tag.c
)
set(HEADERS_FUJI
libexif/fuji/exif-mnote-data-fuji.h
libexif/fuji/mnote-fuji-entry.h
libexif/fuji/mnote-fuji-tag.h
)
set(SOURCES_FUJI
libexif/fuji/exif-mnote-data-fuji.c
libexif/fuji/mnote-fuji-entry.c
libexif/fuji/mnote-fuji-tag.c
)
set(HEADERS_OLYMPUS
libexif/olympus/exif-mnote-data-olympus.h
libexif/olympus/mnote-olympus-entry.h
libexif/olympus/mnote-olympus-tag.h
)
set(SOURCES_OLYMPUS
libexif/olympus/exif-mnote-data-olympus.c
libexif/olympus/mnote-olympus-entry.c
libexif/olympus/mnote-olympus-tag.c
)
set(HEADERS_PENTAX
libexif/pentax/exif-mnote-data-pentax.h
libexif/pentax/mnote-pentax-entry.h
libexif/pentax/mnote-pentax-tag.h
)
set(SOURCES_PENTAX
libexif/pentax/exif-mnote-data-pentax.c
libexif/pentax/mnote-pentax-entry.c
libexif/pentax/mnote-pentax-tag.c
)
if(MSVC)
set(SOURCES_MSVC "libexif.def")
endif()
add_library(libexif
${SOURCES}
${SOURCES_APPLE}
${SOURCES_CANON}
${SOURCES_FUJI}
${SOURCES_OLYMPUS}
${SOURCES_PENTAX}
${SOURCES_MSVC}
)
target_include_directories(libexif PRIVATE .)
target_include_directories(libexif PRIVATE ${CMAKE_BINARY_DIR})
target_compile_definitions(libexif PRIVATE -D_CRT_SECURE_NO_WARNINGS)
target_compile_definitions(libexif PRIVATE -DGETTEXT_PACKAGE="${PACKAGE}")
include(CheckFunctionExists)
include(CheckIncludeFile)
check_function_exists(dcgettext HAVE_DCGETTEXT)
check_function_exists(gettext HAVE_DCGETTEXT)
check_function_exists(iconv HAVE_DCGETTEXT)
check_function_exists(localtime_r HAVE_DCGETTEXT)
check_include_file(dlfcn.h HAVE_DLFCN_H)
check_include_file(inttypes.h HAVE_INTTYPES_H)
check_include_file(memory.h HAVE_MEMORY_H)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdlib.h HAVE_STDLIB_H)
check_include_file(strings.h HAVE_STRINGS_H)
check_include_file(string.h HAVE_STRING_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(unistd.h HAVE_UNISTD_H)
configure_file(config.h.cmake config.h)
install(
TARGETS libexif
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(FILES ${HEADERS} DESTINATION include/libexif)
install(FILES ${HEADERS_APPLE} DESTINATION include/libexif/apple)
install(FILES ${HEADERS_CANON} DESTINATION include/libexif/canon)
install(FILES ${HEADERS_FUJI} DESTINATION include/libexif/fuji)
install(FILES ${HEADERS_OLYMPUS} DESTINATION include/libexif/olympus)
install(FILES ${HEADERS_PENTAX} DESTINATION include/libexif/pentax)

View File

@ -1,7 +0,0 @@
diff --git a/libexif/_stdint.h b/libexif/_stdint.h
new file mode 100644
index 0000000..9a6118b
--- /dev/null
+++ b/libexif/_stdint.h
@@ -0,0 +1 @@
+#include <stdint.h>

View File

@ -1,96 +0,0 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#cmakedefine ENABLE_NLS
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#cmakedefine HAVE_DCGETTEXT
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define if the GNU gettext() function is already present or preinstalled. */
#cmakedefine HAVE_GETTEXT
/* Define if you have the iconv() function. */
#cmakedefine HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `localtime_r' function. */
#cmakedefine HAVE_LOCALTIME_R
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Define as const if the declaration of iconv() needs const. */
#cmakedefine ICONV_CONST
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#cmakedefine LT_OBJDIR
/* Name of package */
#cmakedefine PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME
/* Define to the home page for this package. */
#cmakedefine PACKAGE_URL
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS
/* Version number of package */
#cmakedefine VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#cmakedefine inline
#endif
#ifdef _MSC_VER
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif

View File

@ -0,0 +1,16 @@
diff --git a/libexif/exif-loader.c b/libexif/exif-loader.c
index ad4ae96..8a24ef6 100644
--- a/libexif/exif-loader.c
+++ b/libexif/exif-loader.c
@@ -19,6 +19,11 @@
*/
#include <config.h>
+#ifdef _WIN32
+#include <stddef.h>
+#define ssize_t ptrdiff_t
+#endif
+
#include <libexif/exif-loader.h>
#include <libexif/exif-utils.h>

View File

@ -1,136 +0,0 @@
EXPORTS
exif_array_set_byte_order
exif_byte_order_get_name
exif_content_add_entry
exif_content_dump
exif_content_fix
exif_content_foreach_entry
exif_content_free
exif_content_get_entry
exif_content_get_ifd
exif_content_log
exif_content_new
exif_content_new_mem
exif_content_ref
exif_content_remove_entry
exif_content_unref
exif_data_dump
exif_data_fix
exif_data_foreach_content
exif_data_free
exif_data_get_byte_order
exif_data_get_data_type
exif_data_get_log
exif_data_get_mnote_data
exif_data_load_data
exif_data_log
exif_data_new
exif_data_new_from_data
exif_data_new_from_file
exif_data_new_mem
exif_data_option_get_description
exif_data_option_get_name
exif_data_ref
exif_data_save_data
exif_data_set_byte_order
exif_data_set_data_type
exif_data_set_option
exif_data_unref
exif_data_unset_option
exif_entry_dump
exif_entry_fix
exif_entry_free
exif_entry_get_value
exif_entry_initialize
exif_entry_new
exif_entry_new_mem
exif_entry_ref
exif_entry_unref
exif_format_get_name
exif_format_get_size
exif_get_gps_tag_info
exif_get_long
exif_get_rational
exif_get_short
exif_get_slong
exif_get_srational
exif_get_sshort
exif_ifd_get_name
exif_loader_get_buf
exif_loader_get_data
exif_loader_log
exif_loader_new
exif_loader_new_mem
exif_loader_ref
exif_loader_reset
exif_loader_unref
exif_loader_write
exif_loader_write_file
exif_log
exif_log_code_get_message
exif_log_code_get_title
exif_log_free
exif_log_new
exif_log_new_mem
exif_log_ref
exif_log_set_func
exif_log_unref
exif_logv
exif_mem_alloc
exif_mem_free
exif_mem_new
exif_mem_new_default
exif_mem_realloc
exif_mem_ref
exif_mem_unref
exif_mnote_data_apple_new
exif_mnote_data_canon_new
exif_mnote_data_construct
exif_mnote_data_count
exif_mnote_data_get_description
exif_mnote_data_get_id
exif_mnote_data_get_name
exif_mnote_data_get_title
exif_mnote_data_get_value
exif_mnote_data_load
exif_mnote_data_log
exif_mnote_data_olympus_new
exif_mnote_data_pentax_new
exif_mnote_data_ref
exif_mnote_data_save
exif_mnote_data_set_byte_order
exif_mnote_data_set_offset
exif_mnote_data_unref
exif_set_long
exif_set_rational
exif_set_short
exif_set_slong
exif_set_srational
exif_set_sshort
exif_tag_from_name
exif_tag_get_description
exif_tag_get_description_in_ifd
exif_tag_get_name
exif_tag_get_name_in_ifd
exif_tag_get_support_level_in_ifd
exif_tag_get_title
exif_tag_get_title_in_ifd
exif_tag_table_count
exif_tag_table_get_name
exif_tag_table_get_tag
mnote_apple_entry_get_value
mnote_apple_tag_get_description
mnote_apple_tag_get_name
mnote_apple_tag_get_title
mnote_canon_entry_get_value
mnote_canon_tag_get_description
mnote_canon_tag_get_name
mnote_canon_tag_get_title
mnote_olympus_entry_get_value
mnote_olympus_tag_get_description
mnote_olympus_tag_get_name
mnote_olympus_tag_get_title
mnote_pentax_entry_get_value
mnote_pentax_tag_get_description
mnote_pentax_tag_get_name
mnote_pentax_tag_get_title

View File

@ -1,24 +1,35 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libexif/libexif
REF v0.6.24
REF "v${VERSION}"
SHA512 eac1b5220ca0e02370837a0d78a6d38e91c5afa0956d4196b26a8d2a8a2c5dea18d58c0e473285f278653c3863923241651b7dff4d007cc46385eb29ea188330
HEAD_REF master
PATCHES
add-missing-_stdint-h.patch
fix-ssize.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h.cmake" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/libexif.def" DESTINATION "${SOURCE_PATH}")
vcpkg_list(SET options)
if("nls" IN_LIST FEATURES)
vcpkg_list(APPEND options "--enable-nls")
else()
set(ENV{AUTOPOINT} true) # true, the program
vcpkg_list(APPEND options "--disable-nls")
endif()
vcpkg_cmake_configure(
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
${options}
--enable-internal-docs=no
--enable-ship-binaries=no
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-libexif-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -0,0 +1,28 @@
if(NOT TARGET unofficial::libexif::libexif)
add_library(unofficial::libexif::libexif UNKNOWN IMPORTED)
get_filename_component(z_vcpkg_LIBEXIF_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(z_vcpkg_LIBEXIF_root "${z_vcpkg_libexif_root}" PATH)
get_filename_component(z_vcpkg_LIBEXIF_root "${z_vcpkg_libexif_root}" PATH)
set_target_properties(unofficial::libexif::libexif PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${z_vcpkg_libexif_root}/include"
)
find_library(Z_VCPKG_LIBEXIF_LIBRARY_RELEASE NAMES libexif PATHS "${z_vcpkg_LIBEXIF_root }/lib" NO_DEFAULT_PATH REQUIRED)
find_library(Z_VCPKG_LIBEXIF_LIBRARY_DEBUG NAMES libexif PATHS "${z_vcpkg_LIBEXIF_root }/debug/lib" NO_DEFAULT_PATH)
if(EXISTS "${Z_VCPKG_LIBEXIF_LIBRARY_RELEASE}")
set_property(TARGET unofficial::libexif::libexif APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release")
set_target_properties(unofficial::libexif::libexif PROPERTIES
IMPORTED_LOCATION_RELEASE "${Z_VCPKG_LIBEXIF_LIBRARY_RELEASE}"
)
endif()
if(EXISTS "${Z_VCPKG_LIBEXIF_LIBRARY_DEBUG}")
set_property(TARGET unofficial::libexif::libexif APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug")
set_target_properties(unofficial::libexif::libexif PROPERTIES
IMPORTED_LOCATION_DEBUG "${Z_VCPKG_LIBEXIF_LIBRARY_DEBUG}"
)
endif()
unset(z_vcpkg_LIBEXIF_root)
endif()

View File

@ -1,6 +1,7 @@
{
"name": "libexif",
"version": "0.6.24",
"port-version": 1,
"description": "a library for parsing, editing, and saving EXIF data",
"homepage": "https://libexif.github.io/",
"license": "LGPL-2.1-or-later",
@ -10,5 +11,23 @@
"name": "vcpkg-cmake",
"host": true
}
],
"default-features": [
"nls"
],
"features": {
"nls": {
"description": "Enable native language support.",
"dependencies": [
{
"name": "gettext",
"host": true,
"features": [
"tools"
]
},
"gettext-libintl"
]
}
}
}

View File

@ -4262,7 +4262,7 @@
},
"libexif": {
"baseline": "0.6.24",
"port-version": 0
"port-version": 1
},
"libfabric": {
"baseline": "1.13.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "40f7058e18a937bab35b7213595fc4eef5de7dec",
"version": "0.6.24",
"port-version": 1
},
{
"git-tree": "7194d724b7e14c0d3661153bc81f614a86276c6a",
"version": "0.6.24",