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

45
externals/vcpkg/ports/bzip2/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,45 @@
cmake_minimum_required(VERSION 3.0)
project(bzip2 C)
if(CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-DBZ_DEBUG) # enable extra assertions
endif()
set(BZ2_SOURCES
blocksort.c
huffman.c
crctable.c
randtable.c
compress.c
decompress.c
bzlib.c)
add_library(bz2 ${BZ2_SOURCES})
set_target_properties(bz2 PROPERTIES
DEBUG_POSTFIX d
VERSION 1.0.6
SOVERSION 1.0)
if(BUILD_SHARED_LIBS)
target_compile_definitions(bz2 PRIVATE -DBZ_BUILD_DLL)
endif()
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
endif()
install(TARGETS bz2
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)
if(NOT BZIP2_SKIP_TOOLS)
add_executable(bzip2 bzip2.c ${BZ2_SOURCES})
add_executable(bzip2recover bzip2recover.c ${BZ2_SOURCES})
install(TARGETS bzip2 bzip2recover DESTINATION tools/bzip2)
endif()
if(NOT BZIP2_SKIP_HEADERS)
install(FILES bzlib.h DESTINATION include)
endif()

11
externals/vcpkg/ports/bzip2/bzip2.pc.in vendored Executable file
View File

@@ -0,0 +1,11 @@
prefix=@BZIP2_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: bzip2
Description: bzip2
Version: 1.0.6
Requires:
Libs: -L${libdir} -l@bzname@
Cflags: -I${includedir}

View File

@@ -0,0 +1,40 @@
diff --git a/bzlib.h b/bzlib.h
index 8277123..84fbd0a 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -65,29 +65,23 @@ typedef
}
bz_stream;
-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
#ifndef BZ_NO_STDIO
/* Need a definitition for FILE */
#include <stdio.h>
#endif
#ifdef _WIN32
-# include <windows.h>
# ifdef small
/* windows.h define small to char */
# undef small
# endif
-# ifdef BZ_EXPORT
-# define BZ_API(func) WINAPI func
-# define BZ_EXTERN extern
+# define BZ_API(func) func
+# if defined(BZ_BUILD_DLL)
+# define BZ_EXTERN __declspec(dllexport)
+# elif defined(BZ_IMPORT)
+# define BZ_EXTERN __declspec(dllimport)
# else
- /* import windows dll dynamically */
-# define BZ_API(func) (WINAPI * func)
-# define BZ_EXTERN
+# define BZ_EXTERN
# endif
#else
# define BZ_API(func) func

50
externals/vcpkg/ports/bzip2/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,50 @@
set(BZIP2_VERSION 1.0.8)
vcpkg_download_distfile(ARCHIVE
URLS "https://sourceware.org/pub/bzip2/bzip2-${BZIP2_VERSION}.tar.gz"
FILENAME "bzip2-${BZIP2_VERSION}.tar.gz"
SHA512 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES fix-import-export-macros.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG
-DBZIP2_SKIP_HEADERS=ON
-DBZIP2_SKIP_TOOLS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(READ "${CURRENT_PACKAGES_DIR}/include/bzlib.h" BZLIB_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "defined(BZ_IMPORT)" "0" BZLIB_H "${BZLIB_H}")
else()
string(REPLACE "defined(BZ_IMPORT)" "1" BZLIB_H "${BZLIB_H}")
endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/include/bzlib.h" "${BZLIB_H}")
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
set(BZIP2_PREFIX "${CURRENT_INSTALLED_DIR}")
set(bzname bz2)
configure_file("${CMAKE_CURRENT_LIST_DIR}/bzip2.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/bzip2.pc" @ONLY)
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
set(BZIP2_PREFIX "${CURRENT_INSTALLED_DIR}/debug")
set(bzname bz2d)
configure_file("${CMAKE_CURRENT_LIST_DIR}/bzip2.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/bzip2.pc" @ONLY)
endif()
vcpkg_fixup_pkgconfig()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

4
externals/vcpkg/ports/bzip2/usage vendored Executable file
View File

@@ -0,0 +1,4 @@
The package bzip2 is compatible with built-in CMake targets:
find_package(BZip2 REQUIRED)
target_link_libraries(main PRIVATE BZip2::BZip2)

8
externals/vcpkg/ports/bzip2/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,8 @@
{
"name": "bzip2",
"version-semver": "1.0.8",
"port-version": 2,
"description": "bzip2 is a freely available, patent free, high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.",
"homepage": "https://sourceware.org/bzip2/",
"documentation": "https://sourceware.org/bzip2/docs.html"
}