early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

83
externals/vcpkg/ports/libqcow/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 3.12)
project(libqcow C)
find_package(OpenSSL)
find_package(ZLIB REQUIRED)
if(MSVC)
add_compile_definitions(_CRT_SECURE_NO_DEPRECATE)
add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE)
endif()
add_compile_definitions(HAVE_LOCAL_LIBCAES)
add_compile_definitions(HAVE_LOCAL_LIBCERROR)
add_compile_definitions(HAVE_LOCAL_LIBCTHREADS)
add_compile_definitions(HAVE_LOCAL_LIBCDATA)
add_compile_definitions(HAVE_LOCAL_LIBCLOCALE)
add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY)
add_compile_definitions(HAVE_LOCAL_LIBCSPLIT)
add_compile_definitions(HAVE_LOCAL_LIBCFILE)
add_compile_definitions(HAVE_LOCAL_LIBCPATH)
add_compile_definitions(HAVE_LOCAL_LIBUNA)
add_compile_definitions(HAVE_LOCAL_LIBBFIO)
add_compile_definitions(HAVE_LOCAL_LIBFCACHE)
add_compile_definitions(HAVE_LOCAL_LIBFDATA)
add_compile_definitions(ZLIB_DLL)
if(UNIX)
configure_file(common/config.h.in common/config.h)
add_compile_definitions(HAVE_CONFIG_H)
add_compile_definitions(LOCALEDIR="/usr/share/locale")
endif()
if(MSVC)
add_compile_definitions(LIBQCOW_DLL_EXPORT)
set(LIB_RC libqcow/libqcow.rc)
endif()
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
# Add CMake find_package() integration
set(PROJECT_TARGET_NAME "${PROJECT_NAME}")
set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake")
set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets")
set(NAMESPACE "libqcow::")
# Source files
file(GLOB LIB_SRC lib*/*.c)
# Headers
file(GLOB LIB_INST_HEADERS include/libqcow/*.h)
add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC})
target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common)
target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcaes ./libcdata ./libcerror ./libcfile ./libclocale)
target_include_directories(${PROJECT_NAME} PRIVATE ./libcnotify ./libcpath ./libcsplit ./libcthreads)
target_include_directories(${PROJECT_NAME} PRIVATE ./libfcache ./libfdata ./libuna)
target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB OpenSSL::Crypto)
install(TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION include)
install(FILES ${LIB_INST_HEADERS} DESTINATION include/libqcow)
install(FILES include/libqcow.h DESTINATION include)
# Generate and install libqcowConfig.cmake
configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}")
install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}")
# Generate and install libqcowTargets*.cmake
install(EXPORT ${TARGETS_EXPORT_NAME}
NAMESPACE ${NAMESPACE}
DESTINATION "${CONFIG_INSTALL_DIR}")

View File

@@ -0,0 +1,4 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")

View File

@@ -0,0 +1,38 @@
diff --git a/libcfile/libcfile_file.c b/libcfile/libcfile_file.c
index a618083..5299c77 100644
--- a/libcfile/libcfile_file.c
+++ b/libcfile/libcfile_file.c
@@ -56,7 +56,7 @@
#elif defined( HAVE_CYGWIN_FS_H )
#include <cygwin/fs.h>
-#elif defined( HAVE_LINUX_FS_H )
+#elif defined( __linux__ ) && defined( HAVE_LINUX_FS_H )
/* Required for Linux platforms that use a sizeof( u64 )
* in linux/fs.h but have no typedef of it
*/
@@ -4128,6 +4128,11 @@ ssize_t libcfile_internal_file_io_control_read_with_error_code(
#error Missing file IO control with data function
#endif
+// Force disable on Darwin, it can be erroneously defined
+#if defined ( __APPLE__ )
+#undef HAVE_POSIX_FADVISE
+#endif
+
/* Read data from a device file using IO control
* Returns the number of bytes read if successful or -1 on error
*/
diff --git a/libqcow/libqcow_i18n.c b/libqcow/libqcow_i18n.c
index 96d1a31..621e748 100644
--- a/libqcow/libqcow_i18n.c
+++ b/libqcow/libqcow_i18n.c
@@ -40,7 +40,7 @@ int libqcow_i18n_initialize(
if( libqcow_i18n_initialized == 0 )
{
-#if defined( HAVE_BINDTEXTDOMAIN )
+#if !defined( __APPLE__ ) && defined( HAVE_BINDTEXTDOMAIN )
if( bindtextdomain(
"libqcow",
LOCALEDIR ) == NULL )

36
externals/vcpkg/ports/libqcow/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,36 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
set(LIB_VERSION 20210419)
set(LIB_FILENAME libqcow-alpha-${LIB_VERSION}.tar.gz)
# Release distribution file contains configured sources, while the source code in the repository does not.
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/libyal/libqcow/releases/download/${LIB_VERSION}/${LIB_FILENAME}"
FILENAME "${LIB_FILENAME}"
SHA512 911d29bd880df95288e552356d128d18c924fcd0d61d166fbeaf09936f11bf27b984d8ffd4cdc4bc285e7df295a1fe64ff595b0dfdd10b6fcfbdc6586d6bd3b0
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${LIB_VERSION}
PATCHES macos_fixes.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}")
vcpkg_configure_cmake(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libqcow")
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# License and man
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

13
externals/vcpkg/ports/libqcow/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,13 @@
{
"name": "libqcow",
"version-string": "20210419",
"port-version": 2,
"description": "Library and tools to access the QEMU Copy-On-Write (QCOW) image format.",
"homepage": "https://github.com/libyal/libqcow",
"supports": "!uwp",
"dependencies": [
"gettext",
"openssl",
"zlib"
]
}