Delete vcpkg-ports directory
This commit is contained in:
parent
71c14a089a
commit
db0cfb4b07
@ -1,100 +0,0 @@
|
|||||||
{
|
|
||||||
"libraries": [
|
|
||||||
{
|
|
||||||
"name": "alac",
|
|
||||||
"version-string": "2017-11-03-c38887c5",
|
|
||||||
"port-version": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "expat",
|
|
||||||
"version-string": "2.4.9",
|
|
||||||
"port-version": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "freetype",
|
|
||||||
"version-string": "2.12.1",
|
|
||||||
"port-version": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ijg-libjpeg",
|
|
||||||
"version-string": "9e"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libflac",
|
|
||||||
"version-string": "1.4.2",
|
|
||||||
"port-version": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libogg",
|
|
||||||
"version-string": "1.3.5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libogg",
|
|
||||||
"version-string": "1.3.5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libpng",
|
|
||||||
"version-string": "1.6.37",
|
|
||||||
"port-version": 19
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libsndfile",
|
|
||||||
"version-string": "1.1.0",
|
|
||||||
"port-version": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libtheora",
|
|
||||||
"version-string": "1.2.0alpha1-20170719",
|
|
||||||
"port-version": 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libvorbis",
|
|
||||||
"version-string": "1.3.7",
|
|
||||||
"port-version": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libvpx",
|
|
||||||
"version-string": "1.12.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "minizip",
|
|
||||||
"version-string": "1.2.13"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mp3lame",
|
|
||||||
"version-string": "3.100",
|
|
||||||
"port-version": 9
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mpg123",
|
|
||||||
"version-string": "1.29.2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "openssl",
|
|
||||||
"version-string": "3.0.5",
|
|
||||||
"port-version": 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pthread",
|
|
||||||
"version-string": "3.0.0",
|
|
||||||
"port-version": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "rapidjson",
|
|
||||||
"version-string": "2022-06-28"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "restclient-cpp",
|
|
||||||
"version-string": "2022-02-09"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spdlog",
|
|
||||||
"version-string": "1.10.0",
|
|
||||||
"port-version": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "zlib",
|
|
||||||
"version-string": "1.2.13"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
cmake_minimum_required (VERSION 3.9)
|
|
||||||
project (alac)
|
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
codec/EndianPortable.h
|
|
||||||
codec/aglib.h
|
|
||||||
codec/ALACAudioTypes.h
|
|
||||||
codec/ALACBitUtilities.h
|
|
||||||
codec/ALACDecoder.h
|
|
||||||
codec/ALACEncoder.h
|
|
||||||
codec/dplib.h
|
|
||||||
codec/matrixlib.h
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
set (SRCS
|
|
||||||
codec/EndianPortable.c
|
|
||||||
codec/ALACBitUtilities.c
|
|
||||||
codec/ALACDecoder.cpp
|
|
||||||
codec/ALACEncoder.cpp
|
|
||||||
codec/ag_dec.c
|
|
||||||
codec/ag_enc.c
|
|
||||||
codec/dp_dec.c
|
|
||||||
codec/dp_enc.c
|
|
||||||
codec/matrix_dec.c
|
|
||||||
codec/matrix_enc.c
|
|
||||||
)
|
|
||||||
|
|
||||||
set(EXE_SRCS
|
|
||||||
convert-utility/main.cpp
|
|
||||||
convert-utility/CAFFileALAC.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include_directories(. codec convert-utility)
|
|
||||||
|
|
||||||
add_library(libalac ${SRCS})
|
|
||||||
|
|
||||||
add_executable(alacconvert ${EXE_SRCS})
|
|
||||||
target_link_libraries(alacconvert libalac)
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS libalac
|
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
LIBRARY DESTINATION lib
|
|
||||||
ARCHIVE DESTINATION lib
|
|
||||||
)
|
|
||||||
|
|
||||||
if(NOT DISABLE_INSTALL_TOOLS)
|
|
||||||
install (
|
|
||||||
TARGETS alacconvert
|
|
||||||
RUNTIME DESTINATION tools/alac
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT DISABLE_INSTALL_HEADERS)
|
|
||||||
install(FILES ${HEADERS} DESTINATION include/alac)
|
|
||||||
endif()
|
|
@ -1,26 +0,0 @@
|
|||||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
||||||
message(FATAL_ERROR "${PORT} does not currently support UWP")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO macosforge/alac
|
|
||||||
REF c38887c5c5e64a4b31108733bd79ca9b2496d987
|
|
||||||
SHA512 8da18df25807e76f9187f7bf30585aace303d55444f0a614ab00d98d11caca3fdc5c6f5b9fd11e5f4c92a2ab1e86fef73deeeada57e9d49951fea8b80ba383cc
|
|
||||||
HEAD_REF master
|
|
||||||
)
|
|
||||||
|
|
||||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
|
||||||
PREFER_NINJA
|
|
||||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alac)
|
|
||||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac RENAME copyright)
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "alac",
|
|
||||||
"version-string": "2017-11-03-c38887c5",
|
|
||||||
"port-version": 2,
|
|
||||||
"description": "The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices.",
|
|
||||||
"homepage": "https://github.com/macosforge/alac",
|
|
||||||
"supports": "!uwp"
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/expat/CMakeLists.txt
|
|
||||||
+++ b/expat/CMakeLists.txt
|
|
||||||
@@ -459,7 +459,7 @@ if(NOT WIN32)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-if(MINGW)
|
|
||||||
+if(MINGW AND EXPAT_SHARED_LIBS)
|
|
||||||
set_target_properties(expat PROPERTIES SUFFIX "-${LIBCURRENT_MINUS_AGE}.dll")
|
|
||||||
endif()
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
--- a/expat/CMakeLists.txt
|
|
||||||
+++ b/expat/CMakeLists.txt
|
|
||||||
@@ -469,7 +469,7 @@ if(WIN32 AND NOT MINGW)
|
|
||||||
# Everything but MSVC is already adding prefix "lib", automatically.
|
|
||||||
# NOTE: "set_property(TARGET expat PROPERTY PREFIX lib)" would only affect *.dll
|
|
||||||
# files but not *.lib files, so we have to rely on property OUTPUT_NAME, instead.
|
|
||||||
- # Property CMAKE_*_POSTFIX still applies.
|
|
||||||
+ # Property EXPAT_*_POSTFIX still applies.
|
|
||||||
set(_EXPAT_OUTPUT_NAME libexpat)
|
|
||||||
set_property(TARGET expat PROPERTY OUTPUT_NAME ${_EXPAT_OUTPUT_NAME})
|
|
||||||
else()
|
|
||||||
@@ -520,8 +520,8 @@ if(EXPAT_BUILD_PKGCONFIG)
|
|
||||||
foreach(_build_type ${CMAKE_BUILD_TYPE} Debug Release RelWithDebInfo MinSizeRel)
|
|
||||||
string(TOLOWER "${_build_type}" _build_type_lower)
|
|
||||||
string(TOUPPER "${_build_type}" _build_type_upper)
|
|
||||||
- set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_name" "expat${CMAKE_${_build_type_upper}_POSTFIX}")
|
|
||||||
- set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_output_name" "${_EXPAT_OUTPUT_NAME}${CMAKE_${_build_type_upper}_POSTFIX}")
|
|
||||||
+ set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_name" "expat${EXPAT_${_build_type_upper}_POSTFIX}")
|
|
||||||
+ set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_output_name" "${_EXPAT_OUTPUT_NAME}${EXPAT_${_build_type_upper}_POSTFIX}")
|
|
||||||
if(_EXPAT_LIBM_FOUND)
|
|
||||||
set_property(TARGET expat PROPERTY "pkgconfig_libm" "-lm")
|
|
||||||
else()
|
|
@ -1,49 +0,0 @@
|
|||||||
file(READ ${CMAKE_CURRENT_LIST_DIR}/vcpkg.json vcpkg_json)
|
|
||||||
string(JSON VERSION GET "${vcpkg_json}" "version")
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO libexpat/libexpat
|
|
||||||
REF R_2_4_9
|
|
||||||
SHA512 6bf92516ce2642b2cdcbc586aaac0f706f125394fa428670f9b8b042a1f393e3b9dda1a24e58e6c8ad8b4ff3303cb5a8700628c6c04a881a06251c08be3759d3
|
|
||||||
HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
"pkgconfig_fix.patch" # https://github.com/libexpat/libexpat/pull/656
|
|
||||||
"mingw_static_fix.patch" # https://github.com/libexpat/libexpat/pull/658
|
|
||||||
)
|
|
||||||
|
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" EXPAT_LINKAGE)
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}/expat"
|
|
||||||
OPTIONS
|
|
||||||
-DEXPAT_BUILD_EXAMPLES=OFF
|
|
||||||
-DEXPAT_BUILD_TESTS=OFF
|
|
||||||
-DEXPAT_BUILD_TOOLS=OFF
|
|
||||||
-DEXPAT_BUILD_DOCS=OFF
|
|
||||||
-DEXPAT_SHARED_LIBS=${EXPAT_LINKAGE}
|
|
||||||
-DEXPAT_BUILD_PKGCONFIG=ON
|
|
||||||
-DEXPAT_CHAR_TYPE=wchar_t
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/expat-${VERSION}")
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/expat_external.h"
|
|
||||||
"! defined(XML_STATIC)"
|
|
||||||
"/* vcpkg static build ! defined(XML_STATIC) */ 0"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
||||||
file(INSTALL "${SOURCE_PATH}/expat/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,27 +0,0 @@
|
|||||||
include(SelectLibraryConfigurations)
|
|
||||||
|
|
||||||
set(EXPATNAMES expat expatw libexpat libexpatw)
|
|
||||||
set(DEBUGNAMES)
|
|
||||||
foreach(_CRT "" MT MD)
|
|
||||||
foreach(name IN LISTS EXPATNAMES)
|
|
||||||
list(APPEND EXPATNAMES ${name}${_CRT})
|
|
||||||
list(APPEND DEBUGNAMES ${name}d${_CRT})
|
|
||||||
endforeach()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
find_library(EXPAT_LIBRARY_DEBUG NAMES ${DEBUGNAMES} ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
|
|
||||||
find_library(EXPAT_LIBRARY_RELEASE NAMES ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
|
|
||||||
select_library_configurations(EXPAT)
|
|
||||||
set(EXPAT_LIBRARY "${EXPAT_LIBRARIES}" CACHE STRING "" FORCE)
|
|
||||||
_find_package(${ARGS})
|
|
||||||
if(EXPAT_FOUND AND TARGET EXPAT::EXPAT)
|
|
||||||
if(EXPAT_LIBRARY_DEBUG)
|
|
||||||
set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}")
|
|
||||||
endif()
|
|
||||||
if(EXPAT_LIBRARY_RELEASE)
|
|
||||||
set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
unset(EXPATNAMES)
|
|
||||||
unset(DEBUGNAMES)
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "expat",
|
|
||||||
"version": "2.4.9",
|
|
||||||
"port-version": 1,
|
|
||||||
"description": "XML parser library written in C",
|
|
||||||
"homepage": "https://github.com/libexpat/libexpat",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index db48e9f..5c35276 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -328,6 +328,10 @@ else ()
|
|
||||||
list(APPEND BASE_SRCS src/base/ftdebug.c)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
+if(MSVC)
|
|
||||||
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
if (BUILD_FRAMEWORK)
|
|
||||||
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
|
|
||||||
endif ()
|
|
||||||
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
|
|
||||||
index 4f2eaca..1e01fe4 100644
|
|
||||||
--- a/include/freetype/freetype.h
|
|
||||||
+++ b/include/freetype/freetype.h
|
|
||||||
@@ -1038,6 +1038,11 @@ FT_BEGIN_HEADER
|
|
||||||
* Especially for TrueType fonts see also the documentation for
|
|
||||||
* @FT_Size_Metrics.
|
|
||||||
*/
|
|
||||||
+
|
|
||||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
|
||||||
+#define generic GenericFromFreeTypeLibrary
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
typedef struct FT_FaceRec_
|
|
||||||
{
|
|
||||||
FT_Long num_faces;
|
|
||||||
@@ -1910,6 +1915,9 @@ FT_BEGIN_HEADER
|
|
||||||
|
|
||||||
} FT_GlyphSlotRec;
|
|
||||||
|
|
||||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
|
||||||
+#undef generic
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/*************************************************************************/
|
|
||||||
/*************************************************************************/
|
|
||||||
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
|
|
||||||
index 3f8619d..edf03b6 100644
|
|
||||||
--- a/src/base/ftobjs.c
|
|
||||||
+++ b/src/base/ftobjs.c
|
|
||||||
@@ -528,6 +528,9 @@
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
|
||||||
+#define generic GenericFromFreeTypeLibrary
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static void
|
|
||||||
ft_glyphslot_clear( FT_GlyphSlot slot )
|
|
||||||
@@ -1195,6 +1198,9 @@
|
|
||||||
FT_FREE( face );
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
|
||||||
+#undef generic
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static void
|
|
||||||
Destroy_Driver( FT_Driver driver )
|
|
@ -1,23 +0,0 @@
|
|||||||
diff --git a/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake
|
|
||||||
index 46356b1fd..ed4cc2409 100644
|
|
||||||
--- a/builds/cmake/FindBrotliDec.cmake
|
|
||||||
+++ b/builds/cmake/FindBrotliDec.cmake
|
|
||||||
@@ -35,10 +35,17 @@ find_path(BROTLIDEC_INCLUDE_DIRS
|
|
||||||
PATH_SUFFIXES brotli)
|
|
||||||
|
|
||||||
find_library(BROTLIDEC_LIBRARIES
|
|
||||||
- NAMES brotlidec
|
|
||||||
+ NAMES brotlidec brotlidec-static NAMES_PER_DIR
|
|
||||||
HINTS ${PC_BROTLIDEC_LIBDIR}
|
|
||||||
${PC_BROTLIDEC_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
+if(BROTLIDEC_LIBRARIES MATCHES "-static")
|
|
||||||
+ find_library(BROTLICOMMON_LIBRARIES
|
|
||||||
+ NAMES brotlicommon-static
|
|
||||||
+ HINTS ${PC_BROTLIDEC_LIBDIR}
|
|
||||||
+ ${PC_BROTLIDEC_LIBRARY_DIRS})
|
|
||||||
+ set(BROTLIDEC_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES})
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 469a141a2..eec19c7d0 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -517,7 +517,7 @@ if (BZIP2_FOUND)
|
|
||||||
if (PC_BZIP2_FOUND)
|
|
||||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
|
|
||||||
else ()
|
|
||||||
- list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
|
|
||||||
+ list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
if (PNG_FOUND)
|
|
@ -1,37 +0,0 @@
|
|||||||
From 5672a353682a68cb76a03179739bdec0a2f5cf0e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sean Farrell <sean.farrell@rioki.org>
|
|
||||||
Date: Fri, 19 Aug 2022 15:32:19 +0200
|
|
||||||
Subject: [PATCH] Adds config support for error strings.
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 7 +++++++
|
|
||||||
1 file changed, 7 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index feb4be39a..4eea860e8 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -215,6 +215,8 @@ cmake_dependent_option(FT_REQUIRE_BROTLI
|
|
||||||
"Require support of compressed WOFF2 fonts." OFF
|
|
||||||
"NOT FT_DISABLE_BROTLI" OFF)
|
|
||||||
|
|
||||||
+option(FT_ENABLE_ERROR_STRINGS
|
|
||||||
+ "Enable support for meaningful error descriptions" OFF)
|
|
||||||
|
|
||||||
# Disallow in-source builds
|
|
||||||
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
|
||||||
@@ -353,6 +355,11 @@ if (BROTLIDEC_FOUND)
|
|
||||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_BROTLI) +\\*/" "\\1"
|
|
||||||
FTOPTION_H "${FTOPTION_H}")
|
|
||||||
endif ()
|
|
||||||
+if (FT_ENABLE_ERROR_STRINGS)
|
|
||||||
+ string(REGEX REPLACE
|
|
||||||
+ "/\\* +(#define +FT_CONFIG_OPTION_ERROR_STRINGS) +\\*/" "\\1"
|
|
||||||
+ FTOPTION_H "${FTOPTION_H}")
|
|
||||||
+endif ()
|
|
||||||
|
|
||||||
set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
|
|
||||||
if (EXISTS "${FTOPTION_H_NAME}")
|
|
||||||
--
|
|
||||||
2.33.0.windows.2
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index cb1b9a0f2..edca5d579 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -508,7 +508,6 @@ set(PKG_CONFIG_REQUIRED_PRIVATE "")
|
|
||||||
set(PKGCONFIG_LIBS_PRIVATE "")
|
|
||||||
|
|
||||||
if (ZLIB_FOUND)
|
|
||||||
- target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
|
|
||||||
+ target_link_libraries(freetype PRIVATE ZLIB::ZLIB)
|
|
||||||
- target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
|
|
||||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
|
|
||||||
endif ()
|
|
||||||
@@ -596,12 +596,25 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
|
||||||
install(
|
|
||||||
EXPORT freetype-targets
|
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
|
||||||
- FILE freetype-config.cmake
|
|
||||||
COMPONENT headers)
|
|
||||||
install(
|
|
||||||
FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
|
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
|
||||||
COMPONENT headers)
|
|
||||||
+
|
|
||||||
+ if(ZLIB_FOUND)
|
|
||||||
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freetype-config.cmake"
|
|
||||||
+[[include(CMakeFindDependencyMacro)
|
|
||||||
+find_dependency(ZLIB)
|
|
||||||
+include("${CMAKE_CURRENT_LIST_DIR}/freetype-targets.cmake")
|
|
||||||
+]])
|
|
||||||
+ else()
|
|
||||||
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freetype-config.cmake"
|
|
||||||
+[[include("${CMAKE_CURRENT_LIST_DIR}/freetype-targets.cmake")
|
|
||||||
+]])
|
|
||||||
+ endif()
|
|
||||||
+
|
|
||||||
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freetype-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
set(FT_VERSION 2.12.1)
|
|
||||||
|
|
||||||
vcpkg_from_sourceforge(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO freetype/freetype2
|
|
||||||
REF ${FT_VERSION}
|
|
||||||
FILENAME freetype-${FT_VERSION}.tar.xz
|
|
||||||
SHA512 6482de1748dc2cc01e033d21a3b492dadb1f039d13d9179685fdcf985e24d7f587cbca4c27ed8a7fdb7d9ad59612642ac5f4db062443154753295363f45c052f
|
|
||||||
PATCHES
|
|
||||||
0003-Fix-UWP.patch
|
|
||||||
brotli-static.patch
|
|
||||||
bzip2.patch
|
|
||||||
fix-exports.patch
|
|
||||||
error-strings.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
||||||
FEATURES
|
|
||||||
zlib FT_REQUIRE_ZLIB
|
|
||||||
bzip2 FT_REQUIRE_BZIP2
|
|
||||||
error-strings FT_ENABLE_ERROR_STRINGS
|
|
||||||
png FT_REQUIRE_PNG
|
|
||||||
brotli FT_REQUIRE_BROTLI
|
|
||||||
INVERTED_FEATURES
|
|
||||||
zlib FT_DISABLE_ZLIB
|
|
||||||
bzip2 FT_DISABLE_BZIP2
|
|
||||||
png FT_DISABLE_PNG
|
|
||||||
brotli FT_DISABLE_BROTLI
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
-DFT_DISABLE_HARFBUZZ=ON
|
|
||||||
${FEATURE_OPTIONS}
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/freetype)
|
|
||||||
|
|
||||||
# Rename for easy usage (VS integration; CMake and autotools will not care)
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/include/freetype2/freetype" "${CURRENT_PACKAGES_DIR}/include/freetype")
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h" "${CURRENT_PACKAGES_DIR}/include/ft2build.h")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/freetype2")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
|
|
||||||
# Fix the include dir [freetype2 -> freetype]
|
|
||||||
file(READ "${CURRENT_PACKAGES_DIR}/share/freetype/freetype-targets.cmake" CONFIG_MODULE)
|
|
||||||
string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include" CONFIG_MODULE "${CONFIG_MODULE}")
|
|
||||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlicommon-static.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlicommon-static.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlicommon-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
|
|
||||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec-static.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec-static.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
|
|
||||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
|
|
||||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
|
|
||||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-targets.cmake "${CONFIG_MODULE}")
|
|
||||||
|
|
||||||
find_library(FREETYPE_DEBUG NAMES freetyped PATHS "${CURRENT_PACKAGES_DIR}/debug/lib/" NO_DEFAULT_PATH)
|
|
||||||
if(NOT VCPKG_BUILD_TYPE)
|
|
||||||
file(READ "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" _contents)
|
|
||||||
if(FREETYPE_DEBUG)
|
|
||||||
string(REPLACE "-lfreetype" "-lfreetyped" _contents "${_contents}")
|
|
||||||
endif()
|
|
||||||
string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}")
|
|
||||||
file(WRITE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" "${_contents}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(READ "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" _contents)
|
|
||||||
string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}")
|
|
||||||
file(WRITE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" "${_contents}")
|
|
||||||
|
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
|
||||||
|
|
||||||
vcpkg_install_copyright(
|
|
||||||
FILE_LIST
|
|
||||||
"${SOURCE_PATH}/LICENSE.TXT"
|
|
||||||
"${SOURCE_PATH}/docs/FTL.TXT"
|
|
||||||
"${SOURCE_PATH}/docs/GPLv2.TXT"
|
|
||||||
)
|
|
@ -1,64 +0,0 @@
|
|||||||
cmake_policy(PUSH)
|
|
||||||
cmake_policy(SET CMP0012 NEW)
|
|
||||||
cmake_policy(SET CMP0054 NEW)
|
|
||||||
|
|
||||||
_find_package(${ARGS})
|
|
||||||
|
|
||||||
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
|
|
||||||
if("@FT_REQUIRE_ZLIB@")
|
|
||||||
find_package(ZLIB)
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_BZIP2@")
|
|
||||||
find_package(BZip2)
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_PNG@")
|
|
||||||
find_package(PNG)
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_BROTLI@")
|
|
||||||
find_library(BROTLIDEC_LIBRARY_RELEASE NAMES brotlidec brotlidec-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
|
||||||
find_library(BROTLIDEC_LIBRARY_DEBUG NAMES brotlidec brotlidec-static brotlidecd brotlidec-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
|
||||||
find_library(BROTLICOMMON_LIBRARY_RELEASE NAMES brotlicommon brotlicommon-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
|
||||||
find_library(BROTLICOMMON_LIBRARY_DEBUG NAMES brotlicommon brotlicommon-static brotlicommond brotlicommon-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
|
||||||
include(SelectLibraryConfigurations)
|
|
||||||
select_library_configurations(BROTLIDEC)
|
|
||||||
select_library_configurations(BROTLICOMMON)
|
|
||||||
endif("@FT_REQUIRE_BROTLI@")
|
|
||||||
|
|
||||||
if(TARGET Freetype::Freetype)
|
|
||||||
if("@FT_REQUIRE_ZLIB@")
|
|
||||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_BZIP2@")
|
|
||||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2)
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_PNG@")
|
|
||||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES PNG::PNG)
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_BROTLI@")
|
|
||||||
if(BROTLIDEC_LIBRARY_DEBUG)
|
|
||||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$<CONFIG:DEBUG>:${BROTLIDEC_LIBRARY_DEBUG}>")
|
|
||||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$<CONFIG:DEBUG>:${BROTLICOMMON_LIBRARY_DEBUG}>")
|
|
||||||
endif()
|
|
||||||
if(BROTLIDEC_LIBRARY_RELEASE)
|
|
||||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$<NOT:$<CONFIG:DEBUG>>:${BROTLIDEC_LIBRARY_RELEASE}>")
|
|
||||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$<NOT:$<CONFIG:DEBUG>>:${BROTLICOMMON_LIBRARY_RELEASE}>")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(FREETYPE_LIBRARIES)
|
|
||||||
if("@FT_REQUIRE_ZLIB@")
|
|
||||||
list(APPEND FREETYPE_LIBRARIES ${ZLIB_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_BZIP2@")
|
|
||||||
list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_PNG@")
|
|
||||||
list(APPEND FREETYPE_LIBRARIES ${PNG_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
if("@FT_REQUIRE_BROTLI@")
|
|
||||||
list(APPEND FREETYPE_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
cmake_policy(POP)
|
|
@ -1,53 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "freetype",
|
|
||||||
"version": "2.12.1",
|
|
||||||
"port-version": 2,
|
|
||||||
"description": "A library to render fonts.",
|
|
||||||
"homepage": "https://www.freetype.org/",
|
|
||||||
"license": "FTL OR GPL-2.0-or-later",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default-features": [
|
|
||||||
"brotli",
|
|
||||||
"bzip2",
|
|
||||||
"png",
|
|
||||||
"zlib"
|
|
||||||
],
|
|
||||||
"features": {
|
|
||||||
"brotli": {
|
|
||||||
"description": "Support decompression of WOFF2 streams",
|
|
||||||
"dependencies": [
|
|
||||||
"brotli"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"bzip2": {
|
|
||||||
"description": "Support bzip2 compressed fonts.",
|
|
||||||
"dependencies": [
|
|
||||||
"bzip2"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"error-strings": {
|
|
||||||
"description": "Enable support for meaningful error descriptions."
|
|
||||||
},
|
|
||||||
"png": {
|
|
||||||
"description": "Support PNG compressed OpenType embedded bitmaps.",
|
|
||||||
"dependencies": [
|
|
||||||
"libpng"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"zlib": {
|
|
||||||
"description": "Use zlib instead of internal library for DEFLATE",
|
|
||||||
"dependencies": [
|
|
||||||
"zlib"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
|
||||||
project(libjpeg LANGUAGES C)
|
|
||||||
|
|
||||||
option(BUILD_EXECUTABLES OFF)
|
|
||||||
|
|
||||||
#
|
|
||||||
# jconfig.h is a public header, so it must be genrated. Please reference the install.txt in jpegsr9d.zip
|
|
||||||
#
|
|
||||||
# jconfig.txt should contain #cmakedefine which is modified by porfile.cmake of ijg-libjpeg port in VcPkg
|
|
||||||
# By doing this we can skip 'configure' step. Visit https://github.com/LuaDist/libjpeg
|
|
||||||
#
|
|
||||||
include(CheckIncludeFile)
|
|
||||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
|
||||||
check_include_file(stdlib.h HAVE_STDLIB_H)
|
|
||||||
configure_file(jconfig.txt ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h)
|
|
||||||
|
|
||||||
list(APPEND PUBLIC_HEADERS jpeglib.h jerror.h jmorecfg.h ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h)
|
|
||||||
|
|
||||||
add_library(jpeg
|
|
||||||
${PUBLIC_HEADERS} jinclude.h jpegint.h jversion.h
|
|
||||||
transupp.h jidctflt.c jidctfst.c jidctint.c jquant1.c jquant2.c jutils.c jmemnobs.c jaricom.c jerror.c jdatadst.c jdatasrc.c
|
|
||||||
jmemsys.h
|
|
||||||
jmemmgr.c
|
|
||||||
cdjpeg.h cderror.h
|
|
||||||
jcmaster.c jcmarker.c jcmainct.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcsample.c jctrans.c jcinit.c jcomapi.c jcparam.c jcprepct.c
|
|
||||||
jdmaster.c jdmarker.c jdmainct.c jdapimin.c jdapistd.c jdarith.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdsample.c jdtrans.c jdinput.c jdmerge.c jdpostct.c
|
|
||||||
jdct.h
|
|
||||||
jfdctflt.c jfdctfst.c jfdctint.c
|
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
target_compile_definitions(jpeg
|
|
||||||
PRIVATE
|
|
||||||
_CRT_SECURE_NO_WARNINGS
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(jpeg PRIVATE include ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
|
|
||||||
install(FILES ${PUBLIC_HEADERS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
|
||||||
)
|
|
||||||
install(TARGETS jpeg
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
if(BUILD_EXECUTABLES)
|
|
||||||
add_executable(cjpeg cdjpeg.c cjpeg.c rdbmp.c rdgif.c rdppm.c rdrle.c rdtarga.c rdswitch.c)
|
|
||||||
target_link_libraries(cjpeg PRIVATE jpeg)
|
|
||||||
|
|
||||||
add_executable(djpeg cdjpeg.c djpeg.c wrbmp.c wrgif.c wrppm.c wrrle.c wrtarga.c rdcolmap.c)
|
|
||||||
target_link_libraries(djpeg PRIVATE jpeg)
|
|
||||||
|
|
||||||
add_executable(jpegtran jpegtran.c cdjpeg.c rdswitch.c transupp.c)
|
|
||||||
target_link_libraries(jpegtran PRIVATE jpeg)
|
|
||||||
|
|
||||||
add_executable(rdjpgcom rdjpgcom.c)
|
|
||||||
add_executable(wrjpgcom wrjpgcom.c)
|
|
||||||
|
|
||||||
install(TARGETS cjpeg djpeg jpegtran rdjpgcom wrjpgcom
|
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/tools
|
|
||||||
)
|
|
||||||
endif()
|
|
@ -1,50 +0,0 @@
|
|||||||
if(EXISTS ${CURRENT_INSTALLED_DIR}/share/libturbo-jpeg/copyright)
|
|
||||||
message(FATAL_ERROR "'${PORT}' conflicts with 'libturbo-jpeg'. Please remove libturbo-jpeg:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.")
|
|
||||||
endif()
|
|
||||||
if(EXISTS ${CURRENT_INSTALLED_DIR}/share/mozjpeg/copyright)
|
|
||||||
message(FATAL_ERROR "'${PORT}' conflicts with 'mozjpeg'. Please remove mozjpeg:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS)
|
|
||||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_download_distfile(ARCHIVE
|
|
||||||
URLS "http://www.ijg.org/files/jpegsr9e.zip"
|
|
||||||
FILENAME "jpegsr9e.zip"
|
|
||||||
SHA512 db7a2fb44e5cc20d61956c46334948af034c07cdcc0d6e41d9bd4f6611c0fbed8943d0a05029ba1bfb9d993f4acd0df5e95d0bc1cfb5a889b86a55b6b75fdf64
|
|
||||||
)
|
|
||||||
vcpkg_extract_source_archive_ex(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
ARCHIVE ${ARCHIVE}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Replace some #define in jconfig.txt to #cmakedefine so the CMakeLists.txt can run `configure_file` command.
|
|
||||||
# See https://github.com/LuaDist/libjpeg
|
|
||||||
vcpkg_replace_string("${SOURCE_PATH}/jconfig.txt"
|
|
||||||
"#define HAVE_STDDEF_H"
|
|
||||||
"#cmakedefine HAVE_STDDEF_H"
|
|
||||||
)
|
|
||||||
vcpkg_replace_string("${SOURCE_PATH}/jconfig.txt"
|
|
||||||
"#define HAVE_STDLIB_H"
|
|
||||||
"#cmakedefine HAVE_STDLIB_H"
|
|
||||||
)
|
|
||||||
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
-DBUILD_EXECUTABLES=OFF # supports [tools] feature to enable this option?
|
|
||||||
)
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
# There is no LICENSE file, but README containes some legal text.
|
|
||||||
file(INSTALL "${SOURCE_PATH}/README" 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")
|
|
||||||
endif()
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "ijg-libjpeg",
|
|
||||||
"version-string": "9e",
|
|
||||||
"description": "Independent JPEG Group's JPEG software",
|
|
||||||
"homepage": "http://www.ijg.org/",
|
|
||||||
"license": null,
|
|
||||||
"supports": "!emscripten & !wasm32",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index c83dd83..2d1a7e6 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -82,9 +82,11 @@ if(HAVE_WERROR_FLAG)
|
|
||||||
option(ENABLE_WERROR "Enable -Werror in all Makefiles" OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
+if(MSVC AND NOT WITH_ASM)
|
|
||||||
+ add_compile_options(/wd4267 /wd4996)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
add_compile_options(
|
|
||||||
- $<$<BOOL:${MSVC}>:/wd4267>
|
|
||||||
- $<$<BOOL:${MSVC}>:/wd4996>
|
|
||||||
$<$<BOOL:${ENABLE_WERROR}>:-Werror>
|
|
||||||
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:${HAVE_WEFFCXX_FLAG}>>:-Weffc++>
|
|
||||||
$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:${HAVE_DECL_AFTER_STMT_FLAG}>>:-Wdeclaration-after-statement>)
|
|
@ -1,85 +0,0 @@
|
|||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO xiph/flac
|
|
||||||
REF b32e5cbf9818ca23dd22aaa75522042c16ea7d17 #1.4.2
|
|
||||||
SHA512 911891203f3064b39058e209b62fc3fac8940ed01cc3c3d75c9e3e6f94b5cc5905efde94304a6aafa453adde2da2f9bafea9fb5297e6231562133a8acac2ea47 HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
uwp-library-console.patch
|
|
||||||
uwp-createfile2.patch
|
|
||||||
fix-compile-options.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_MINGW)
|
|
||||||
set(WITH_STACK_PROTECTOR OFF)
|
|
||||||
string(APPEND VCPKG_C_FLAGS " -D_FORTIFY_SOURCE=0")
|
|
||||||
string(APPEND VCPKG_CXX_FLAGS " -D_FORTIFY_SOURCE=0")
|
|
||||||
else()
|
|
||||||
set(WITH_STACK_PROTECTOR ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("asm" IN_LIST FEATURES)
|
|
||||||
VCPKG_FIND_ACQUIRE_PROGRAM(NASM)
|
|
||||||
GET_FILENAME_COMPONENT(NASM_PATH "${NASM}" DIRECTORY)
|
|
||||||
vcpkg_add_to_path("${NASM_PATH}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
||||||
FEATURES
|
|
||||||
asm WITH_ASM
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
${FEATURE_OPTIONS}
|
|
||||||
-DBUILD_PROGRAMS=OFF
|
|
||||||
-DBUILD_EXAMPLES=OFF
|
|
||||||
-DBUILD_DOCS=OFF
|
|
||||||
-DBUILD_TESTING=OFF
|
|
||||||
-DWITH_STACK_PROTECTOR=${WITH_STACK_PROTECTOR}
|
|
||||||
-DINSTALL_MANPAGES=OFF
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
|
|
||||||
vcpkg_cmake_config_fixup(PACKAGE_NAME FLAC CONFIG_PATH lib/cmake/FLAC)
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/LICENSE")
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC/export.h"
|
|
||||||
"#if defined(FLAC__NO_DLL)"
|
|
||||||
"#if 0"
|
|
||||||
)
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h"
|
|
||||||
"#if defined(FLAC__NO_DLL)"
|
|
||||||
"#if 0"
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC/export.h"
|
|
||||||
"#if defined(FLAC__NO_DLL)"
|
|
||||||
"#if 1"
|
|
||||||
)
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h"
|
|
||||||
"#if defined(FLAC__NO_DLL)"
|
|
||||||
"#if 1"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS)
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/flac.pc" " -lm" "")
|
|
||||||
|
|
||||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac.pc")
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac.pc" " -lm" "")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
|
||||||
# This license (BSD) is relevant only for library - if someone would want to install
|
|
||||||
# FLAC cmd line tools as well additional license (GPL) should be included
|
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING.Xiph" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,41 +0,0 @@
|
|||||||
diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
|
|
||||||
index af6d0f4..6a6de15 100644
|
|
||||||
--- a/src/share/win_utf8_io/win_utf8_io.c
|
|
||||||
+++ b/src/share/win_utf8_io/win_utf8_io.c
|
|
||||||
@@ -160,6 +160,27 @@ int get_utf8_argv(int *argc, char ***argv)
|
|
||||||
/* similar to CreateFileW but accepts UTF-8 encoded lpFileName */
|
|
||||||
HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
|
|
||||||
{
|
|
||||||
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
|
||||||
+ HANDLE handle = INVALID_HANDLE_VALUE;
|
|
||||||
+
|
|
||||||
+ if (!flac_internal_get_utf8_filenames())
|
|
||||||
+ return handle;
|
|
||||||
+
|
|
||||||
+ wchar_t *wname;
|
|
||||||
+
|
|
||||||
+ if ((wname = wchar_from_utf8(lpFileName)) != NULL)
|
|
||||||
+ {
|
|
||||||
+ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0};
|
|
||||||
+ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS);
|
|
||||||
+ cfParams.dwFileAttributes = dwFlagsAndAttributes & FILE_ATTRIBUTE_NORMAL;
|
|
||||||
+ cfParams.lpSecurityAttributes = lpSecurityAttributes;
|
|
||||||
+ cfParams.hTemplateFile = hTemplateFile;
|
|
||||||
+ handle = CreateFile2(wname, dwDesiredAccess, dwShareMode, dwCreationDisposition, &cfParams);
|
|
||||||
+ free(wname);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return handle;
|
|
||||||
+#else
|
|
||||||
wchar_t *wname;
|
|
||||||
HANDLE handle = INVALID_HANDLE_VALUE;
|
|
||||||
|
|
||||||
@@ -180,6 +201,7 @@ HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWO
|
|
||||||
}
|
|
||||||
|
|
||||||
return handle;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* return number of characters in the UTF-8 string */
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
|
|
||||||
index 65b5699..af6d0f4 100644
|
|
||||||
--- a/src/share/win_utf8_io/win_utf8_io.c
|
|
||||||
+++ b/src/share/win_utf8_io/win_utf8_io.c
|
|
||||||
@@ -115,7 +115,11 @@ int get_utf8_argv(int *argc, char ***argv)
|
|
||||||
char **utf8argv;
|
|
||||||
int ret, i;
|
|
||||||
|
|
||||||
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
|
||||||
+ if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1;
|
|
||||||
+#else
|
|
||||||
if ((handle = LoadLibraryW(L"msvcrt.dll")) == NULL) return 1;
|
|
||||||
+#endif
|
|
||||||
if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) {
|
|
||||||
FreeLibrary(handle);
|
|
||||||
return 1;
|
|
||||||
@@ -192,6 +196,9 @@ size_t strlen_utf8(const char *str)
|
|
||||||
/* get the console width in characters */
|
|
||||||
int win_get_console_width(void)
|
|
||||||
{
|
|
||||||
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
|
||||||
+ return 80;
|
|
||||||
+#else
|
|
||||||
int width = 80;
|
|
||||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
|
||||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
|
||||||
@@ -201,6 +208,7 @@ int win_get_console_width(void)
|
|
||||||
width = csbi.dwSize.X;
|
|
||||||
#endif // WINAPI_PARTITION_DESKTOP
|
|
||||||
return width;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* print functions */
|
|
||||||
@@ -211,6 +219,11 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
|
|
||||||
DWORD out;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
|
||||||
+ // disabled for UWP as there's no alternative:
|
|
||||||
+ // https://docs.microsoft.com/en-us/uwp/win32-and-com/alternatives-to-windows-apis-uwp
|
|
||||||
+#else
|
|
||||||
+
|
|
||||||
do {
|
|
||||||
if (stream == stdout) {
|
|
||||||
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
|
||||||
@@ -229,6 +242,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
} while(0);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
ret = fputws(text, stream);
|
|
||||||
if (ret < 0)
|
|
@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "libflac",
|
|
||||||
"version": "1.4.2",
|
|
||||||
"port-version": 0,
|
|
||||||
"description": "Library for manipulating FLAC files",
|
|
||||||
"homepage": "https://xiph.org/flac/",
|
|
||||||
"license": "GFDL-1.2-or-later",
|
|
||||||
"dependencies": [
|
|
||||||
"libogg",
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"features": {
|
|
||||||
"asm": {
|
|
||||||
"description": "Use any assembly optimization routines",
|
|
||||||
"supports": "x86"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
vcpkg_from_gitlab(
|
|
||||||
GITLAB_URL https://gitlab.xiph.org
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO xiph/ogg
|
|
||||||
REF v1.3.5
|
|
||||||
SHA512 72bfad534a459bfca534eae9b209fa630ac20364a82e82f2707b210a40deaf9a7dc9031532a8b27120a9dd66f804655ddce79875758ef14b109bf869e57fb747
|
|
||||||
HEAD_REF master
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_MINGW)
|
|
||||||
vcpkg_replace_string(${SOURCE_PATH}/win32/ogg.def "LIBRARY ogg" "LIBRARY libogg")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
|
||||||
PREFER_NINJA
|
|
||||||
OPTIONS -DINSTALL_DOCS=0 -DINSTALL_PKG_CONFIG_MODULE=1
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
|
||||||
|
|
||||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Ogg TARGET_PATH share/ogg)
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
|
||||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "libogg",
|
|
||||||
"version": "1.3.5",
|
|
||||||
"description": "Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.",
|
|
||||||
"homepage": "https://www.xiph.org/ogg"
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index a8e5100..0ccac52 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -40,11 +40,11 @@ option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" OFF)
|
|
||||||
|
|
||||||
if(NOT PNG_BUILD_ZLIB)
|
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
- include_directories(${ZLIB_INCLUDE_DIR})
|
|
||||||
+ set(ZLIB_LIBRARY ZLIB::ZLIB)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
|
|
||||||
- find_library(M_LIBRARY m)
|
|
||||||
+ set(M_LIBRARY m)
|
|
||||||
else()
|
|
||||||
# libm is not needed and/or not available
|
|
||||||
set(M_LIBRARY "")
|
|
||||||
@@ -557,7 +557,7 @@ if(PNG_STATIC)
|
|
||||||
# MSVC doesn't use a different file extension for shared vs. static
|
|
||||||
# libs. We are able to change OUTPUT_NAME to remove the _static
|
|
||||||
# for all other platforms.
|
|
||||||
- if(NOT MSVC)
|
|
||||||
+ if(1)
|
|
||||||
set_target_properties(png_static PROPERTIES
|
|
||||||
OUTPUT_NAME "${PNG_LIB_NAME}"
|
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
|
@ -1,17 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 3931f12..b570fa8 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -909,6 +909,12 @@ endif()
|
|
||||||
# Create an export file that CMake users can include() to import our targets.
|
|
||||||
if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
|
|
||||||
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
|
|
||||||
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" "
|
|
||||||
+include(CMakeFindDependencyMacro)
|
|
||||||
+find_dependency(ZLIB)
|
|
||||||
+include(\"\${CMAKE_CURRENT_LIST_DIR}/lib${PNG_LIB_NAME}.cmake\")
|
|
||||||
+")
|
|
||||||
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/libpng")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# what's with libpng-manual.txt and all the extra files?
|
|
@ -1,25 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 6c1d632..a2a0d0d 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -158,8 +158,8 @@ endif()
|
|
||||||
# set definitions and sources for MIPS
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
|
|
||||||
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
|
|
||||||
- set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
|
|
||||||
- set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
|
|
||||||
+ set(PNG_MIPS_MSA_POSSIBLE_VALUES on off check)
|
|
||||||
+ set(PNG_MIPS_MSA "check" CACHE STRING "Enable MIPS_MSA optimizations:
|
|
||||||
off: disable the optimizations")
|
|
||||||
set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
|
|
||||||
${PNG_MIPS_MSA_POSSIBLE_VALUES})
|
|
||||||
@@ -173,6 +173,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
|
|
||||||
mips/filter_msa_intrinsics.c)
|
|
||||||
if(${PNG_MIPS_MSA} STREQUAL "on")
|
|
||||||
add_definitions(-DPNG_MIPS_MSA_OPT=2)
|
|
||||||
+ else()
|
|
||||||
+ add_definitions(-DPNG_MIPS_MSA_CHECK_SUPPORTED)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
add_definitions(-DPNG_MIPS_MSA_OPT=0)
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 6451fcf1b..dbd5016ca 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -63,11 +63,22 @@ option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON)
|
|
||||||
set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names")
|
|
||||||
set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings")
|
|
||||||
|
|
||||||
+# CMake currently sets CMAKE_SYSTEM_PROCESSOR to one of x86_64 or arm64 on macOS,
|
|
||||||
+# based upon the OS architecture, not the target architecture. As such, we need
|
|
||||||
+# to check CMAKE_OSX_ARCHITECTURES to identify which hardware-specific flags to
|
|
||||||
+# enable. Note that this will fail if you attempt to build a universal binary in
|
|
||||||
+# a single cmake invokation.
|
|
||||||
+if (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
|
||||||
+ set(TARGET_ARCH ${CMAKE_OSX_ARCHITECTURES})
|
|
||||||
+else()
|
|
||||||
+ set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
if(PNG_HARDWARE_OPTIMIZATIONS)
|
|
||||||
|
|
||||||
# set definitions and sources for arm
|
|
||||||
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
|
|
||||||
- CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
|
||||||
+if(TARGET_ARCH MATCHES "^arm" OR
|
|
||||||
+ TARGET_ARCH MATCHES "^aarch64")
|
|
||||||
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
|
|
||||||
set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
|
|
||||||
check: (default) use internal checking code;
|
|
||||||
@@ -121,8 +132,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# set definitions and sources for intel
|
|
||||||
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
|
|
||||||
- CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
|
|
||||||
+if(TARGET_ARCH MATCHES "^i?86" OR
|
|
||||||
+ TARGET_ARCH MATCHES "^x86_64*")
|
|
||||||
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
|
|
||||||
set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
|
|
||||||
off: disable the optimizations")
|
|
||||||
@@ -171,8 +182,8 @@ endif()
|
|
||||||
else(PNG_HARDWARE_OPTIMIZATIONS)
|
|
||||||
|
|
||||||
# set definitions and sources for arm
|
|
||||||
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
|
|
||||||
- CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
|
||||||
+if(TARGET_ARCH MATCHES "^arm" OR
|
|
||||||
+ TARGET_ARCH MATCHES "^aarch64")
|
|
||||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
@@ -183,8 +194,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# set definitions and sources for intel
|
|
||||||
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
|
|
||||||
- CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
|
|
||||||
+if(TARGET_ARCH MATCHES "^i?86" OR
|
|
||||||
+ TARGET_ARCH MATCHES "^x86_64")
|
|
||||||
add_definitions(-DPNG_INTEL_SSE_OPT=0)
|
|
||||||
endif()
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 0ccac52..218747a 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -820,12 +820,15 @@ endif()
|
|
||||||
# We use the same files like ./configure, so we have to set its vars.
|
|
||||||
# Only do this on Windows for Cygwin - the files don't make much sense outside
|
|
||||||
# of a UNIX look-alike.
|
|
||||||
-if(NOT WIN32 OR CYGWIN OR MINGW)
|
|
||||||
+if(1)
|
|
||||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
|
||||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
|
||||||
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
|
|
||||||
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
|
|
||||||
- set(LIBS "-lz -lm")
|
|
||||||
+ set(LIBS "")
|
|
||||||
+ if(M_LIBRARY)
|
|
||||||
+ string(APPEND LIBS "-lm")
|
|
||||||
+ endif()
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
|
|
||||||
create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc)
|
|
||||||
@@ -894,6 +897,9 @@ if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
|
|
||||||
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
||||||
+elseif(0)
|
|
||||||
# Install man pages
|
|
||||||
if(NOT PNG_MAN_DIR)
|
|
||||||
set(PNG_MAN_DIR "share/man")
|
|
@ -1,103 +0,0 @@
|
|||||||
set(LIBPNG_VER 1.6.37)
|
|
||||||
|
|
||||||
# Download the apng patch
|
|
||||||
set(LIBPNG_APNG_PATCH_PATH "")
|
|
||||||
set(LIBPNG_APNG_OPTION "")
|
|
||||||
if ("apng" IN_LIST FEATURES)
|
|
||||||
if(VCPKG_HOST_IS_WINDOWS)
|
|
||||||
# Get (g)awk and gzip installed
|
|
||||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES gawk gzip)
|
|
||||||
set(AWK_EXE_PATH "${MSYS_ROOT}/usr/bin")
|
|
||||||
vcpkg_add_to_path("${AWK_EXE_PATH}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(LIBPNG_APNG_PATCH_NAME "libpng-${LIBPNG_VER}-apng.patch")
|
|
||||||
vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE
|
|
||||||
URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_VER}/${LIBPNG_APNG_PATCH_NAME}.gz"
|
|
||||||
FILENAME "${LIBPNG_APNG_PATCH_NAME}.gz"
|
|
||||||
SHA512 226adcb3a8c60f2267fe2976ab531329ae43c2603dab4d0cf8f16217d64069936b879f3d6516b75d259c47d6f5c5b1f24f887602206c8e46abde0fb7f5c7946b
|
|
||||||
)
|
|
||||||
set(LIBPNG_APNG_PATCH_PATH "${CURRENT_BUILDTREES_DIR}/src/${LIBPNG_APNG_PATCH_NAME}")
|
|
||||||
if (NOT EXISTS "${LIBPNG_APNG_PATCH_PATH}")
|
|
||||||
file(INSTALL "${LIBPNG_APNG_PATCH_ARCHIVE}" DESTINATION "${CURRENT_BUILDTREES_DIR}/src")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND gzip -d "${LIBPNG_APNG_PATCH_NAME}.gz"
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src"
|
|
||||||
ALLOW_IN_DOWNLOAD_MODE
|
|
||||||
LOGNAME extract-patch.log
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
set(LIBPNG_APNG_OPTION "-DPNG_PREFIX=a")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO glennrp/libpng
|
|
||||||
REF v${LIBPNG_VER}
|
|
||||||
SHA512 ccb3705c23b2724e86d072e2ac8cfc380f41fadfd6977a248d588a8ad57b6abe0e4155e525243011f245e98d9b7afbe2e8cc7fd4ff7d82fcefb40c0f48f88918
|
|
||||||
HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
"${LIBPNG_APNG_PATCH_PATH}"
|
|
||||||
use_abort.patch
|
|
||||||
cmake.patch
|
|
||||||
fix-export-targets.patch
|
|
||||||
pkgconfig.patch
|
|
||||||
macos-arch-fix.patch
|
|
||||||
fix-msa-support-for-mips.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PNG_SHARED)
|
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PNG_STATIC)
|
|
||||||
|
|
||||||
vcpkg_list(SET LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION)
|
|
||||||
if(VCPKG_TARGET_IS_IOS)
|
|
||||||
vcpkg_list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_HARDWARE_OPTIMIZATIONS=OFF")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_list(SET LD_VERSION_SCRIPT_OPTION)
|
|
||||||
if(VCPKG_TARGET_IS_ANDROID)
|
|
||||||
vcpkg_list(APPEND LD_VERSION_SCRIPT_OPTION "-Dld-version-script=OFF")
|
|
||||||
# for armeabi-v7a, check whether NEON is available
|
|
||||||
vcpkg_list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=check")
|
|
||||||
else()
|
|
||||||
vcpkg_list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=on")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
${LIBPNG_APNG_OPTION}
|
|
||||||
${LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION}
|
|
||||||
${LD_VERSION_SCRIPT_OPTION}
|
|
||||||
-DPNG_STATIC=${PNG_STATIC}
|
|
||||||
-DPNG_SHARED=${PNG_SHARED}
|
|
||||||
-DPNG_TESTS=OFF
|
|
||||||
-DSKIP_INSTALL_PROGRAMS=ON
|
|
||||||
-DSKIP_INSTALL_EXECUTABLES=ON
|
|
||||||
-DSKIP_INSTALL_FILES=OFF
|
|
||||||
OPTIONS_DEBUG
|
|
||||||
-DSKIP_INSTALL_HEADERS=ON
|
|
||||||
MAYBE_UNUSED_VARIABLES
|
|
||||||
PNG_ARM_NEON
|
|
||||||
)
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/libpng)
|
|
||||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/png")
|
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
||||||
if(NOT VCPKG_BUILD_TYPE)
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc" "-lpng16" "-llibpng16d")
|
|
||||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" RENAME "libpng.pc")
|
|
||||||
endif()
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpng16.pc" "-lpng16" "-llibpng16")
|
|
||||||
elseif(NOT VCPKG_BUILD_TYPE)
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc" "-lpng16" "-lpng16d")
|
|
||||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" RENAME "libpng.pc")
|
|
||||||
endif()
|
|
||||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpng16.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" RENAME "libpng.pc")
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
||||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
||||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,4 +0,0 @@
|
|||||||
The package libpng is compatible with built-in CMake targets:
|
|
||||||
|
|
||||||
find_package(PNG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE PNG::PNG)
|
|
@ -1,17 +0,0 @@
|
|||||||
diff --git a/pngpriv.h b/pngpriv.h
|
|
||||||
index 583c26f..135651c 100644
|
|
||||||
--- a/pngpriv.h
|
|
||||||
+++ b/pngpriv.h
|
|
||||||
@@ -556,11 +556,7 @@
|
|
||||||
|
|
||||||
/* Memory model/platform independent fns */
|
|
||||||
#ifndef PNG_ABORT
|
|
||||||
-# ifdef _WINDOWS_
|
|
||||||
-# define PNG_ABORT() ExitProcess(0)
|
|
||||||
-# else
|
|
||||||
-# define PNG_ABORT() abort()
|
|
||||||
-# endif
|
|
||||||
+# define PNG_ABORT() abort()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* These macros may need to be architecture dependent. */
|
|
@ -1,3 +0,0 @@
|
|||||||
find_library(PNG_LIBRARY_RELEASE NAMES png16 libpng16 NAMES_PER_DIR PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH)
|
|
||||||
find_library(PNG_LIBRARY_DEBUG NAMES png16d libpng16d NAMES_PER_DIR PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH)
|
|
||||||
_find_package(${ARGS})
|
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "libpng",
|
|
||||||
"version": "1.6.37",
|
|
||||||
"port-version": 19,
|
|
||||||
"description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files",
|
|
||||||
"homepage": "https://github.com/glennrp/libpng",
|
|
||||||
"license": "libpng-2.0",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
"zlib"
|
|
||||||
],
|
|
||||||
"features": {
|
|
||||||
"apng": {
|
|
||||||
"description": "This is backward compatible with the regular libpng, both in library usage and format"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index b1b49e9..ae8ebec 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -174,7 +174,7 @@ set_package_properties (FLAC PROPERTIES
|
|
||||||
DESCRIPTION "Free Lossless Audio Codec Library"
|
|
||||||
PURPOSE "Enables FLAC support"
|
|
||||||
)
|
|
||||||
-set_package_properties (Lame PROPERTIES
|
|
||||||
+set_package_properties (mp3lame PROPERTIES
|
|
||||||
TYPE RECOMMENDED
|
|
||||||
URL "https://lame.sourceforge.io/"
|
|
||||||
DESCRIPTION "High quality MPEG Audio Layer III (MP3) encoder"
|
|
||||||
@@ -237,20 +237,7 @@ if (INSTALL_PKGCONFIG_MODULE)
|
|
||||||
endif ()
|
|
||||||
if (ENABLE_MPEG)
|
|
||||||
set (EXTERNAL_MPEG_REQUIRE "libmpg123")
|
|
||||||
- get_filename_component(LAME_WE ${LAME_LIBRARY} NAME_WE)
|
|
||||||
- if (LAME_HIP_LIBRARY)
|
|
||||||
- get_filename_component(LAME_HIP_WE ${LAME_HIP_LIBRARY} NAME_WE)
|
|
||||||
- endif ()
|
|
||||||
- if (CMAKE_IMPORT_LIBRARY_PREFIX)
|
|
||||||
- string (REGEX REPLACE "^${CMAKE_IMPORT_LIBRARY_PREFIX}" "" LAME_WE_NO_PREFIX ${LAME_WE})
|
|
||||||
- if (LAME_HIP_LIBRARY)
|
|
||||||
- string (REGEX REPLACE "^${CMAKE_IMPORT_LIBRARY_PREFIX}" "" LAME_HIP_WE_NO_PREFIX ${LAME_HIP_WE})
|
|
||||||
- endif ()
|
|
||||||
- endif ()
|
|
||||||
- set (EXTERNAL_MPEG_LIBS "-l${LAME_WE_NO_PREFIX}")
|
|
||||||
- if (LAME_HIP_LIBRARY)
|
|
||||||
- set (EXTERNAL_MPEG_LIBS "${MPEG_LIBS} -l${LAME_HIP_WE}")
|
|
||||||
- endif ()
|
|
||||||
+ set (EXTERNAL_MPEG_LIBS "-lmp3lame")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
configure_file (sndfile.pc.in sndfile.pc @ONLY)
|
|
||||||
@@ -411,7 +398,7 @@ target_link_libraries (sndfile
|
|
||||||
$<$<AND:$<BOOL:${ENABLE_EXPERIMENTAL}>,$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>,$<BOOL:${HAVE_SPEEX}>>:Speex::Speex>
|
|
||||||
$<$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>:Opus::opus>
|
|
||||||
$<$<BOOL:${HAVE_MPEG}>:MPG123::libmpg123>
|
|
||||||
- $<$<BOOL:${HAVE_MPEG}>:Lame::Lame>
|
|
||||||
+ $<$<BOOL:${HAVE_MPEG}>:mp3lame::mp3lame>
|
|
||||||
)
|
|
||||||
set_target_properties (sndfile PROPERTIES
|
|
||||||
PUBLIC_HEADER "${sndfile_HDRS}"
|
|
||||||
diff --git a/cmake/SndFileChecks.cmake b/cmake/SndFileChecks.cmake
|
|
||||||
index f5d5994..2e09ba6 100644
|
|
||||||
--- a/cmake/SndFileChecks.cmake
|
|
||||||
+++ b/cmake/SndFileChecks.cmake
|
|
||||||
@@ -56,9 +56,9 @@ else ()
|
|
||||||
set (HAVE_EXTERNAL_XIPH_LIBS 0)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
-find_package (Lame)
|
|
||||||
+find_package (mp3lame)
|
|
||||||
find_package (Mpg123 1.25.10)
|
|
||||||
-if (LAME_FOUND AND (TARGET MPG123::libmpg123))
|
|
||||||
+if (TARGET mp3lame::mp3lame AND (TARGET MPG123::libmpg123))
|
|
||||||
set (HAVE_MPEG_LIBS 1)
|
|
||||||
else ()
|
|
||||||
set (HAVE_MPEG_LIBS 0)
|
|
||||||
diff --git a/cmake/SndFileConfig.cmake.in b/cmake/SndFileConfig.cmake.in
|
|
||||||
index 1d5463a..0c98e7e 100644
|
|
||||||
--- a/cmake/SndFileConfig.cmake.in
|
|
||||||
+++ b/cmake/SndFileConfig.cmake.in
|
|
||||||
@@ -18,7 +18,7 @@ if (SndFile_WITH_EXTERNAL_LIBS AND NOT @BUILD_SHARED_LIBS@)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (SndFile_WITH_MPEG AND NOT @BUILD_SHARED_LIBS@)
|
|
||||||
- find_dependency (Lame)
|
|
||||||
+ find_dependency (mp3lame)
|
|
||||||
find_dependency (MPG123)
|
|
||||||
endif ()
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
diff --git a/src/file_io.c b/src/file_io.c
|
|
||||||
index 334ba2a..90c9608 100644
|
|
||||||
--- a/src/file_io.c
|
|
||||||
+++ b/src/file_io.c
|
|
||||||
@@ -827,9 +827,6 @@ psf_open_handle (PSF_FILE * pfile)
|
|
||||||
} ;
|
|
||||||
|
|
||||||
#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
|
||||||
- if (!pfile->use_wchar)
|
|
||||||
- return INVALID_HANDLE_VALUE ;
|
|
||||||
-
|
|
||||||
CREATEFILE2_EXTENDED_PARAMETERS cfParams = { 0 } ;
|
|
||||||
cfParams.dwSize = sizeof (CREATEFILE2_EXTENDED_PARAMETERS) ;
|
|
||||||
cfParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL ;
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/src/wavlike.c b/src/wavlike.c
|
|
||||||
index a3388d75..cf5a7d2b 100644
|
|
||||||
--- a/src/wavlike.c
|
|
||||||
+++ b/src/wavlike.c
|
|
||||||
@@ -971,7 +971,7 @@ wavlike_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t chunk_length)
|
|
||||||
else
|
|
||||||
psf_log_printf (psf, "%M : %u\n", chunk, chunk_length) ;
|
|
||||||
|
|
||||||
- while (bytesread < chunk_length)
|
|
||||||
+ while (chunk_length - bytesread >= 4)
|
|
||||||
{ uint32_t thisread ;
|
|
||||||
|
|
||||||
if ((thisread = psf_binheader_readf (psf, "m", &chunk)) == 0)
|
|
@ -1,61 +0,0 @@
|
|||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO libsndfile/libsndfile
|
|
||||||
REF 1.1.0
|
|
||||||
SHA512 5e530c33165a2d2be1c22d3a4bd96f0f1817dded3a45d24bad0e3f2c7908ccc1f19327a91d5040c3ea4d591845876019180747a125bf2a6f8bd49a6f67eadacd
|
|
||||||
HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
fix-mp3lame.patch
|
|
||||||
fix-uwp.patch
|
|
||||||
fix-wavlike.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
||||||
vcpkg_find_acquire_program(PYTHON3)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
||||||
FEATURES
|
|
||||||
external-libs ENABLE_EXTERNAL_LIBS
|
|
||||||
mpeg ENABLE_MPEG
|
|
||||||
regtest BUILD_REGTEST
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_UWP)
|
|
||||||
set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}")
|
|
||||||
set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
-DBUILD_EXAMPLES=OFF
|
|
||||||
-DBUILD_TESTING=OFF
|
|
||||||
-DENABLE_BOW_DOCS=OFF
|
|
||||||
-DBUILD_PROGRAMS=OFF
|
|
||||||
-DBUILD_REGTEST=OFF
|
|
||||||
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
|
|
||||||
-DPYTHON_EXECUTABLE=${PYTHON3}
|
|
||||||
${FEATURE_OPTIONS}
|
|
||||||
MAYBE_UNUSED_VARIABLES
|
|
||||||
PYTHON_EXECUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
|
|
||||||
if(WIN32 AND (NOT MINGW) AND (NOT CYGWIN))
|
|
||||||
set(CONFIG_PATH cmake)
|
|
||||||
else()
|
|
||||||
set(CONFIG_PATH lib/cmake/SndFile)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_config_fixup(PACKAGE_NAME SndFile CONFIG_PATH "${CONFIG_PATH}")
|
|
||||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,51 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "libsndfile",
|
|
||||||
"version-semver": "1.1.0",
|
|
||||||
"port-version": 1,
|
|
||||||
"description": "A library for reading and writing audio files",
|
|
||||||
"homepage": "https://github.com/erikd/libsndfile",
|
|
||||||
"license": "LGPL-2.1-or-later",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default-features": [
|
|
||||||
"external-libs",
|
|
||||||
"mpeg"
|
|
||||||
],
|
|
||||||
"features": {
|
|
||||||
"experimental": {
|
|
||||||
"description": "Enable experimental code",
|
|
||||||
"dependencies": [
|
|
||||||
"speex"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"external-libs": {
|
|
||||||
"description": "Enable FLAC, Vorbis, and Opus codecs",
|
|
||||||
"dependencies": [
|
|
||||||
"libflac",
|
|
||||||
"libvorbis",
|
|
||||||
"opus"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"mpeg": {
|
|
||||||
"description": "Enable MPEG codecs",
|
|
||||||
"dependencies": [
|
|
||||||
"mp3lame",
|
|
||||||
"mpg123"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"regtest": {
|
|
||||||
"description": "Build regtest",
|
|
||||||
"dependencies": [
|
|
||||||
"sqlite3"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
From 47eb8d07a8caaa6cc1e6e906a7cd5b44ee0fb624 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mikhail Paulyshka <me@mixaill.tk>
|
|
||||||
Date: Thu, 27 Jul 2017 04:24:36 +0300
|
|
||||||
Subject: [PATCH] remove redundant assignments
|
|
||||||
|
|
||||||
---
|
|
||||||
lib/tokenize.c | 16 ++++++++--------
|
|
||||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/tokenize.c b/lib/tokenize.c
|
|
||||||
index 57b7aa8..3f53fb5 100644
|
|
||||||
--- a/lib/tokenize.c
|
|
||||||
+++ b/lib/tokenize.c
|
|
||||||
@@ -487,11 +487,11 @@ int oc_enc_tokenize_ac(oc_enc_ctx *_enc,int _pli,ptrdiff_t _fragi,
|
|
||||||
zzj=64;
|
|
||||||
for(zzi=OC_MINI(_zzi,63);zzi>0;zzi--){
|
|
||||||
ogg_uint32_t best_cost;
|
|
||||||
- int best_bits=best_bits;
|
|
||||||
- int best_next=best_next;
|
|
||||||
- int best_token=best_token;
|
|
||||||
- int best_eb=best_eb;
|
|
||||||
- int best_qc=best_qc;
|
|
||||||
+ int best_bits;
|
|
||||||
+ int best_next;
|
|
||||||
+ int best_token;
|
|
||||||
+ int best_eb;
|
|
||||||
+ int best_qc;
|
|
||||||
ogg_uint32_t d2;
|
|
||||||
int dq;
|
|
||||||
int qc_m;
|
|
||||||
@@ -1091,8 +1091,8 @@ void oc_enc_tokenize_dc_frag_list(oc_enc_ctx *_enc,int _pli,
|
|
||||||
int neobs1;
|
|
||||||
int token;
|
|
||||||
int eb;
|
|
||||||
- int token1=token1;
|
|
||||||
- int eb1=eb1;
|
|
||||||
+ int token1;
|
|
||||||
+ int eb1;
|
|
||||||
/*Return immediately if there are no coded fragments; otherwise we'd flush
|
|
||||||
any trailing EOB run into the AC 1 list and never read it back out.*/
|
|
||||||
if(_ncoded_fragis<=0)return;
|
|
||||||
@@ -1328,7 +1328,7 @@ void oc_enc_tokenize_finish(oc_enc_ctx *_enc){
|
|
||||||
int new_eb;
|
|
||||||
int zzj;
|
|
||||||
int plj;
|
|
||||||
- ptrdiff_t ti=ti;
|
|
||||||
+ ptrdiff_t ti;
|
|
||||||
int run_count;
|
|
||||||
/*Make sure this coefficient has tokens at all.*/
|
|
||||||
if(_enc->ndct_tokens[pli][zzi]<=0)continue;
|
|
||||||
--
|
|
||||||
2.12.2.windows.2
|
|
||||||
|
|
@ -1,114 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
|
||||||
project(theora LANGUAGES C)
|
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
|
|
||||||
FIND_PACKAGE(Ogg REQUIRED)
|
|
||||||
|
|
||||||
file(GLOB HEADERS
|
|
||||||
"include/theora/codec.h"
|
|
||||||
"include/theora/theora.h"
|
|
||||||
"include/theora/theoradec.h"
|
|
||||||
"include/theora/theoraenc.h"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(LIBTHEORA_COMMON
|
|
||||||
"lib/apiwrapper.c"
|
|
||||||
"lib/bitpack.c"
|
|
||||||
"lib/dequant.c"
|
|
||||||
"lib/fragment.c"
|
|
||||||
"lib/idct.c"
|
|
||||||
"lib/info.c"
|
|
||||||
"lib/internal.c"
|
|
||||||
"lib/state.c"
|
|
||||||
"lib/quant.c"
|
|
||||||
|
|
||||||
"lib/x86_vc/mmxfrag.c"
|
|
||||||
"lib/x86_vc/mmxidct.c"
|
|
||||||
"lib/x86_vc/mmxstate.c"
|
|
||||||
"lib/x86_vc/x86cpu.c"
|
|
||||||
"lib/x86_vc/x86state.c"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(LIBTHEORA_ENC
|
|
||||||
"lib/analyze.c"
|
|
||||||
"lib/encapiwrapper.c"
|
|
||||||
"lib/encfrag.c"
|
|
||||||
"lib/encinfo.c"
|
|
||||||
"lib/encode.c"
|
|
||||||
"lib/enquant.c"
|
|
||||||
"lib/fdct.c"
|
|
||||||
"lib/huffenc.c"
|
|
||||||
"lib/mathops.c"
|
|
||||||
"lib/mcenc.c"
|
|
||||||
"lib/rate.c"
|
|
||||||
"lib/tokenize.c"
|
|
||||||
|
|
||||||
"lib/x86_vc/mmxencfrag.c"
|
|
||||||
"lib/x86_vc/mmxfdct.c"
|
|
||||||
"lib/x86_vc/x86enc.c"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(LIBTHEORA_DEC
|
|
||||||
"lib/decapiwrapper.c"
|
|
||||||
"lib/decinfo.c"
|
|
||||||
"lib/decode.c"
|
|
||||||
"lib/huffdec.c"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
|
||||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
|
||||||
|
|
||||||
option(USE_X86 "Use x86 optimization" OFF)
|
|
||||||
if(USE_X86)
|
|
||||||
add_definitions(-DOC_X86_ASM)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
|
||||||
add_definitions(-DLIBTHEORA_EXPORTS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS})
|
|
||||||
target_link_libraries(theora-common PUBLIC Ogg::ogg)
|
|
||||||
target_include_directories(theora-common PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
|
||||||
add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS})
|
|
||||||
target_link_libraries(theora-enc PUBLIC Ogg::ogg)
|
|
||||||
target_include_directories(theora-enc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
|
||||||
add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS})
|
|
||||||
target_link_libraries(theora-dec PUBLIC Ogg::ogg)
|
|
||||||
target_include_directories(theora-dec PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
|
||||||
|
|
||||||
add_library(theora $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> $<TARGET_OBJECTS:theora-dec> "libtheora.def")
|
|
||||||
target_link_libraries(theora PUBLIC Ogg::ogg)
|
|
||||||
target_include_directories(theora PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
|
||||||
|
|
||||||
add_library(theoraenc $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> "win32/xmingw32/libtheoraenc-all.def")
|
|
||||||
target_link_libraries(theoraenc PUBLIC Ogg::ogg)
|
|
||||||
target_include_directories(theoraenc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
|
||||||
|
|
||||||
add_library(theoradec $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-dec> "win32/xmingw32/libtheoradec-all.def")
|
|
||||||
target_link_libraries(theoradec PUBLIC Ogg::ogg)
|
|
||||||
target_include_directories(theoradec PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
|
||||||
|
|
||||||
configure_package_config_file(unofficial-theora-config.cmake.in unofficial-theora-config.cmake
|
|
||||||
INSTALL_DESTINATION "lib/unofficial-theora")
|
|
||||||
|
|
||||||
install(FILES ${HEADERS} DESTINATION include/theora)
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-theora-config.cmake"
|
|
||||||
DESTINATION "lib/unofficial-theora"
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS theora theoraenc theoradec
|
|
||||||
EXPORT unofficial-theora-targets
|
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
install(EXPORT unofficial-theora-targets
|
|
||||||
NAMESPACE unofficial::theora::
|
|
||||||
DESTINATION "lib/unofficial-theora"
|
|
||||||
)
|
|
@ -1,61 +0,0 @@
|
|||||||
EXPORTS
|
|
||||||
; Old alpha API
|
|
||||||
theora_version_string
|
|
||||||
theora_version_number
|
|
||||||
theora_decode_header
|
|
||||||
theora_decode_init
|
|
||||||
theora_decode_packetin
|
|
||||||
theora_decode_YUVout
|
|
||||||
theora_control
|
|
||||||
theora_packet_isheader
|
|
||||||
theora_packet_iskeyframe
|
|
||||||
theora_granule_shift
|
|
||||||
theora_granule_frame
|
|
||||||
theora_granule_time
|
|
||||||
theora_info_init
|
|
||||||
theora_info_clear
|
|
||||||
theora_clear
|
|
||||||
theora_comment_init
|
|
||||||
theora_comment_add
|
|
||||||
theora_comment_add_tag
|
|
||||||
theora_comment_query
|
|
||||||
theora_comment_query_count
|
|
||||||
theora_comment_clear
|
|
||||||
; New theora-exp API
|
|
||||||
th_version_string
|
|
||||||
th_version_number
|
|
||||||
th_decode_headerin
|
|
||||||
th_decode_alloc
|
|
||||||
th_setup_free
|
|
||||||
th_decode_ctl
|
|
||||||
th_decode_packetin
|
|
||||||
th_decode_ycbcr_out
|
|
||||||
th_decode_free
|
|
||||||
th_packet_isheader
|
|
||||||
th_packet_iskeyframe
|
|
||||||
th_granule_frame
|
|
||||||
th_granule_time
|
|
||||||
th_info_init
|
|
||||||
th_info_clear
|
|
||||||
th_comment_init
|
|
||||||
th_comment_add
|
|
||||||
th_comment_add_tag
|
|
||||||
th_comment_query
|
|
||||||
th_comment_query_count
|
|
||||||
th_comment_clear
|
|
||||||
; Old alpha API
|
|
||||||
theora_encode_init
|
|
||||||
theora_encode_YUVin
|
|
||||||
theora_encode_packetout
|
|
||||||
theora_encode_header
|
|
||||||
theora_encode_comment
|
|
||||||
theora_encode_tables
|
|
||||||
; New theora-exp API
|
|
||||||
th_encode_alloc
|
|
||||||
th_encode_ctl
|
|
||||||
th_encode_flushheader
|
|
||||||
th_encode_ycbcr_in
|
|
||||||
th_encode_packetout
|
|
||||||
th_encode_free
|
|
||||||
TH_VP31_QUANT_INFO
|
|
||||||
TH_VP31_HUFF_CODES
|
|
@ -1,34 +0,0 @@
|
|||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO xiph/theora
|
|
||||||
REF fa5707d68c2a4338d58aa8b6afc95539ba89fecb
|
|
||||||
SHA512 e33da23a17e93709dfe4421b512cedbd9aab0d706f5650e0436f9c8e1cde76b902c3338d46750bb86d83e1bceb111ee84e90df36fb59b5c2e7f7aee1610752b2
|
|
||||||
HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
0001-fix-uwp.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/libtheora.def" DESTINATION "${SOURCE_PATH}")
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-config.cmake.in" DESTINATION "${SOURCE_PATH}")
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
||||||
set(THEORA_X86_OPT ON)
|
|
||||||
else()
|
|
||||||
set(THEORA_X86_OPT OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
-DUSE_X86=${THEORA_X86_OPT}
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/unofficial-theora")
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
|
|
||||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE")
|
|
@ -1,3 +0,0 @@
|
|||||||
@PACKAGE_INIT@
|
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-targets.cmake")
|
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "libtheora",
|
|
||||||
"version-string": "1.2.0alpha1-20170719",
|
|
||||||
"port-version": 4,
|
|
||||||
"description": "Theora is a free and open video compression format from the Xiph.org Foundation.",
|
|
||||||
"homepage": "https://github.com/xiph/theora",
|
|
||||||
"license": null,
|
|
||||||
"dependencies": [
|
|
||||||
"libogg",
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
diff --git a/win32/vorbis.def b/win32/vorbis.def
|
|
||||||
index 9cca64d..a80fff7 100644
|
|
||||||
--- a/win32/vorbis.def
|
|
||||||
+++ b/win32/vorbis.def
|
|
||||||
@@ -49,11 +49,4 @@ vorbis_synthesis_idheader
|
|
||||||
;
|
|
||||||
vorbis_window
|
|
||||||
;_analysis_output_always
|
|
||||||
-vorbis_encode_init
|
|
||||||
-vorbis_encode_setup_managed
|
|
||||||
-vorbis_encode_setup_vbr
|
|
||||||
-vorbis_encode_init_vbr
|
|
||||||
-vorbis_encode_setup_init
|
|
||||||
-vorbis_encode_ctl
|
|
||||||
-;
|
|
||||||
vorbis_version_string
|
|
@ -1,15 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index f377c428..07530304 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
|
|
||||||
# Find math library
|
|
||||||
|
|
||||||
check_library_exists(m floor "" HAVE_LIBM)
|
|
||||||
+if(HAVE_LIBM)
|
|
||||||
+ set(VORBIS_LIBS "-lm")
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
# Find ogg dependency
|
|
||||||
find_package(Ogg REQUIRED)
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
diff --git a/win32/vorbis.def b/win32/vorbis.def
|
|
||||||
index 1310b6c..de14385 100644
|
|
||||||
--- a/win32/vorbis.def
|
|
||||||
+++ b/win32/vorbis.def
|
|
||||||
@@ -1,6 +1,5 @@
|
|
||||||
; vorbis.def
|
|
||||||
;
|
|
||||||
-LIBRARY
|
|
||||||
EXPORTS
|
|
||||||
_floor_P
|
|
||||||
_mapping_P
|
|
||||||
diff --git a/win32/vorbisenc.def b/win32/vorbisenc.def
|
|
||||||
index 79af064..40a3e39 100644
|
|
||||||
--- a/win32/vorbisenc.def
|
|
||||||
+++ b/win32/vorbisenc.def
|
|
||||||
@@ -1,6 +1,5 @@
|
|
||||||
; vorbisenc.def
|
|
||||||
;
|
|
||||||
-LIBRARY
|
|
||||||
|
|
||||||
EXPORTS
|
|
||||||
vorbis_encode_init
|
|
||||||
diff --git a/win32/vorbisfile.def b/win32/vorbisfile.def
|
|
||||||
index 4dc5549..243795d 100644
|
|
||||||
--- a/win32/vorbisfile.def
|
|
||||||
+++ b/win32/vorbisfile.def
|
|
||||||
@@ -1,6 +1,5 @@
|
|
||||||
; vorbisfile.def
|
|
||||||
;
|
|
||||||
-LIBRARY
|
|
||||||
EXPORTS
|
|
||||||
ov_clear
|
|
||||||
ov_open
|
|
@ -1,25 +0,0 @@
|
|||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO xiph/vorbis
|
|
||||||
REF v1.3.7
|
|
||||||
SHA512 bfb6f5dbfd49ed38b2b08b3667c06d02e68f649068a050f21a3cc7e1e56b27afd546aaa3199c4f6448f03f6e66a82f9a9dc2241c826d3d1d4acbd38339b9e9fb
|
|
||||||
HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
0001-Dont-export-vorbisenc-functions.patch
|
|
||||||
0002-Fixup-pkgconfig-libs.patch
|
|
||||||
0003-def-mingw-compat.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_cmake_config_fixup(PACKAGE_NAME Vorbis CONFIG_PATH "lib/cmake/Vorbis")
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
|
|
||||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,13 +0,0 @@
|
|||||||
The package libvorbis provides CMake targets:
|
|
||||||
|
|
||||||
# Vorbis reference encoder and decoder, low-level API
|
|
||||||
find_package(Vorbis CONFIG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE Vorbis::vorbis)
|
|
||||||
|
|
||||||
# Audio stream decoding and basic manipulation, high-level API
|
|
||||||
find_package(Vorbis CONFIG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE Vorbis::vorbisfile)
|
|
||||||
|
|
||||||
# Convenience API for setting up an encoding environment
|
|
||||||
find_package(Vorbis CONFIG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE Vorbis::vorbisenc)
|
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "libvorbis",
|
|
||||||
"version": "1.3.7",
|
|
||||||
"port-version": 2,
|
|
||||||
"description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format",
|
|
||||||
"homepage": "https://github.com/xiph/vorbis",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"dependencies": [
|
|
||||||
"libogg",
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
|
||||||
index 81d30a1..325017e 100644
|
|
||||||
--- a/build/make/configure.sh
|
|
||||||
+++ b/build/make/configure.sh
|
|
||||||
@@ -1370,12 +1370,14 @@ EOF
|
|
||||||
case ${tgt_os} in
|
|
||||||
win32)
|
|
||||||
add_asflags -f win32
|
|
||||||
- enabled debug && add_asflags -g cv8
|
|
||||||
+ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
|
|
||||||
+ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
|
|
||||||
EXE_SFX=.exe
|
|
||||||
;;
|
|
||||||
win64)
|
|
||||||
add_asflags -f win64
|
|
||||||
- enabled debug && add_asflags -g cv8
|
|
||||||
+ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
|
|
||||||
+ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
|
|
||||||
EXE_SFX=.exe
|
|
||||||
;;
|
|
||||||
linux*|solaris*|android*)
|
|
@ -1,160 +0,0 @@
|
|||||||
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
|
||||||
index 119d206..41bac75 100644
|
|
||||||
--- a/build/make/configure.sh
|
|
||||||
+++ b/build/make/configure.sh
|
|
||||||
@@ -1038,7 +1038,7 @@ EOF
|
|
||||||
# A number of ARM-based Windows platforms are constrained by their
|
|
||||||
# respective SDKs' limitations. Fortunately, these are all 32-bit ABIs
|
|
||||||
# and so can be selected as 'win32'.
|
|
||||||
- if [ ${tgt_os} = "win32" ]; then
|
|
||||||
+ if [ ${tgt_os} = "win32" ] || [ ${tgt_isa} = "armv7" ]; then
|
|
||||||
asm_conversion_cmd="${source_path_mk}/build/make/ads2armasm_ms.pl"
|
|
||||||
AS_SFX=.S
|
|
||||||
msvs_arch_dir=arm-msvs
|
|
||||||
@@ -1272,6 +1272,9 @@ EOF
|
|
||||||
android)
|
|
||||||
soft_enable realtime_only
|
|
||||||
;;
|
|
||||||
+ uwp)
|
|
||||||
+ enabled gcc && add_cflags -fno-common
|
|
||||||
+ ;;
|
|
||||||
win*)
|
|
||||||
enabled gcc && add_cflags -fno-common
|
|
||||||
;;
|
|
||||||
@@ -1390,6 +1393,16 @@ EOF
|
|
||||||
fi
|
|
||||||
AS_SFX=.asm
|
|
||||||
case ${tgt_os} in
|
|
||||||
+ uwp)
|
|
||||||
+ if [ {$tgt_isa} = "x86" ] || [ {$tgt_isa} = "armv7" ]; then
|
|
||||||
+ add_asflags -f win32
|
|
||||||
+ else
|
|
||||||
+ add_asflags -f win64
|
|
||||||
+ fi
|
|
||||||
+ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
|
|
||||||
+ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
|
|
||||||
+ EXE_SFX=.exe
|
|
||||||
+ ;;
|
|
||||||
win32)
|
|
||||||
add_asflags -f win32
|
|
||||||
enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
|
|
||||||
@@ -1519,6 +1532,8 @@ EOF
|
|
||||||
# Almost every platform uses pthreads.
|
|
||||||
if enabled multithread; then
|
|
||||||
case ${toolchain} in
|
|
||||||
+ *-uwp-vs*)
|
|
||||||
+ ;;
|
|
||||||
*-win*-vs*)
|
|
||||||
;;
|
|
||||||
*-android-gcc)
|
|
||||||
diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
|
|
||||||
index 58bb66b..b4cad6c 100644
|
|
||||||
--- a/build/make/gen_msvs_vcxproj.sh
|
|
||||||
+++ b/build/make/gen_msvs_vcxproj.sh
|
|
||||||
@@ -296,7 +296,22 @@ generate_vcxproj() {
|
|
||||||
tag_content ProjectGuid "{${guid}}"
|
|
||||||
tag_content RootNamespace ${name}
|
|
||||||
tag_content Keyword ManagedCProj
|
|
||||||
- if [ $vs_ver -ge 12 ] && [ "${platforms[0]}" = "ARM" ]; then
|
|
||||||
+ if [ $vs_ver -ge 16 ]; then
|
|
||||||
+ if [[ $target =~ [^-]*-uwp-.* ]]; then
|
|
||||||
+ # Universal Windows Applications
|
|
||||||
+ tag_content AppContainerApplication true
|
|
||||||
+ tag_content ApplicationType "Windows Store"
|
|
||||||
+ tag_content ApplicationTypeRevision 10.0
|
|
||||||
+ fi
|
|
||||||
+ if [[ $target =~ [^-]*-uwp-.* ]] || [ "${platforms[0]}" = "ARM" ] || [ "${platforms[0]}" = "ARM64" ]; then
|
|
||||||
+ # Default to the latest Windows 10 SDK
|
|
||||||
+ tag_content WindowsTargetPlatformVersion 10.0
|
|
||||||
+ else
|
|
||||||
+ # Minimum supported version of Windows for the desktop
|
|
||||||
+ tag_content WindowsTargetPlatformVersion 8.1
|
|
||||||
+ fi
|
|
||||||
+ tag_content MinimumVisualStudioVersion 16.0
|
|
||||||
+ elif [ $vs_ver -ge 12 ] && [ "${platforms[0]}" = "ARM" ]; then
|
|
||||||
tag_content AppContainerApplication true
|
|
||||||
# The application type can be one of "Windows Store",
|
|
||||||
# "Windows Phone" or "Windows Phone Silverlight". The
|
|
||||||
@@ -394,7 +409,7 @@ generate_vcxproj() {
|
|
||||||
Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'"
|
|
||||||
if [ "$name" == "vpx" ]; then
|
|
||||||
hostplat=$plat
|
|
||||||
- if [ "$hostplat" == "ARM" ]; then
|
|
||||||
+ if [ "$hostplat" == "ARM" ] && [ $vs_ver -le 15 ]; then
|
|
||||||
hostplat=Win32
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
diff --git a/configure b/configure
|
|
||||||
index beea650..91ae3c8 100644
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -102,16 +102,24 @@ all_platforms="${all_platforms} arm64-darwin-gcc"
|
|
||||||
all_platforms="${all_platforms} arm64-darwin20-gcc"
|
|
||||||
all_platforms="${all_platforms} arm64-darwin21-gcc"
|
|
||||||
all_platforms="${all_platforms} arm64-linux-gcc"
|
|
||||||
+all_platforms="${all_platforms} arm64-uwp-vs16"
|
|
||||||
+all_platforms="${all_platforms} arm64-uwp-vs17"
|
|
||||||
all_platforms="${all_platforms} arm64-win64-gcc"
|
|
||||||
all_platforms="${all_platforms} arm64-win64-vs15"
|
|
||||||
+all_platforms="${all_platforms} arm64-win64-vs16"
|
|
||||||
+all_platforms="${all_platforms} arm64-win64-vs17"
|
|
||||||
all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8
|
|
||||||
all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8
|
|
||||||
all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8
|
|
||||||
all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8
|
|
||||||
all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8
|
|
||||||
+all_platforms="${all_platforms} armv7-uwp-vs16"
|
|
||||||
+all_platforms="${all_platforms} armv7-uwp-vs17"
|
|
||||||
all_platforms="${all_platforms} armv7-win32-gcc"
|
|
||||||
all_platforms="${all_platforms} armv7-win32-vs14"
|
|
||||||
all_platforms="${all_platforms} armv7-win32-vs15"
|
|
||||||
+all_platforms="${all_platforms} armv7-win32-vs16"
|
|
||||||
+all_platforms="${all_platforms} armv7-win32-vs17"
|
|
||||||
all_platforms="${all_platforms} armv7s-darwin-gcc"
|
|
||||||
all_platforms="${all_platforms} armv8-linux-gcc"
|
|
||||||
all_platforms="${all_platforms} loongarch32-linux-gcc"
|
|
||||||
@@ -138,6 +146,8 @@ all_platforms="${all_platforms} x86-linux-gcc"
|
|
||||||
all_platforms="${all_platforms} x86-linux-icc"
|
|
||||||
all_platforms="${all_platforms} x86-os2-gcc"
|
|
||||||
all_platforms="${all_platforms} x86-solaris-gcc"
|
|
||||||
+all_platforms="${all_platforms} x86-uwp-vs16"
|
|
||||||
+all_platforms="${all_platforms} x86-uwp-vs17"
|
|
||||||
all_platforms="${all_platforms} x86-win32-gcc"
|
|
||||||
all_platforms="${all_platforms} x86-win32-vs14"
|
|
||||||
all_platforms="${all_platforms} x86-win32-vs15"
|
|
||||||
@@ -161,6 +171,8 @@ all_platforms="${all_platforms} x86_64-iphonesimulator-gcc"
|
|
||||||
all_platforms="${all_platforms} x86_64-linux-gcc"
|
|
||||||
all_platforms="${all_platforms} x86_64-linux-icc"
|
|
||||||
all_platforms="${all_platforms} x86_64-solaris-gcc"
|
|
||||||
+all_platforms="${all_platforms} x86_64-uwp-vs16"
|
|
||||||
+all_platforms="${all_platforms} x86_64-uwp-vs17"
|
|
||||||
all_platforms="${all_platforms} x86_64-win64-gcc"
|
|
||||||
all_platforms="${all_platforms} x86_64-win64-vs14"
|
|
||||||
all_platforms="${all_platforms} x86_64-win64-vs15"
|
|
||||||
@@ -485,11 +497,10 @@ process_targets() {
|
|
||||||
! enabled multithread && DIST_DIR="${DIST_DIR}-nomt"
|
|
||||||
! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs"
|
|
||||||
DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}"
|
|
||||||
- case "${tgt_os}" in
|
|
||||||
- win*) enabled static_msvcrt && DIST_DIR="${DIST_DIR}mt" || DIST_DIR="${DIST_DIR}md"
|
|
||||||
- DIST_DIR="${DIST_DIR}-${tgt_cc}"
|
|
||||||
- ;;
|
|
||||||
- esac
|
|
||||||
+ if [[ ${tgt_os} =~ win.* ]] || [ "${tgt_os}" = "uwp" ]; then
|
|
||||||
+ enabled static_msvcrt && DIST_DIR="${DIST_DIR}mt" || DIST_DIR="${DIST_DIR}md"
|
|
||||||
+ DIST_DIR="${DIST_DIR}-${tgt_cc}"
|
|
||||||
+ fi
|
|
||||||
if [ -f "${source_path}/build/make/version.sh" ]; then
|
|
||||||
ver=`"$source_path/build/make/version.sh" --bare "$source_path"`
|
|
||||||
DIST_DIR="${DIST_DIR}-${ver}"
|
|
||||||
@@ -578,6 +589,10 @@ process_detect() {
|
|
||||||
|
|
||||||
# Specialize windows and POSIX environments.
|
|
||||||
case $toolchain in
|
|
||||||
+ *-uwp-*)
|
|
||||||
+ # Don't check for any headers in UWP builds.
|
|
||||||
+ false
|
|
||||||
+ ;;
|
|
||||||
*-win*-*)
|
|
||||||
# Don't check for any headers in Windows builds.
|
|
||||||
false
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
|
|
||||||
index 916851662..e60405bc9 100755
|
|
||||||
--- a/build/make/gen_msvs_vcxproj.sh
|
|
||||||
+++ b/build/make/gen_msvs_vcxproj.sh
|
|
||||||
@@ -394,7 +394,7 @@ generate_vcxproj() {
|
|
||||||
else
|
|
||||||
config_suffix=""
|
|
||||||
fi
|
|
||||||
- tag_content TargetName "${name}${lib_sfx}${config_suffix}"
|
|
||||||
+ tag_content TargetName "${name}"
|
|
||||||
fi
|
|
||||||
close_tag PropertyGroup
|
|
||||||
done
|
|
@ -1,283 +0,0 @@
|
|||||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
set(LIBVPX_VERSION 1.12.0)
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO webmproject/libvpx
|
|
||||||
REF v${LIBVPX_VERSION}
|
|
||||||
SHA512 dc059bc3102b75524ae29989372334b3e0f2acf1520e5a4daa4073831bb55949d82897c498fb9d2d38b59f1a66bb0ad24407d0d086b1e3a8394a4933f04f2ed0
|
|
||||||
HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
0002-Fix-nasm-debug-format-flag.patch
|
|
||||||
0003-add-uwp-v142-and-v143-support.patch
|
|
||||||
0004-remove-library-suffixes.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_find_acquire_program(PERL)
|
|
||||||
|
|
||||||
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
|
||||||
|
|
||||||
if(CMAKE_HOST_WIN32)
|
|
||||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
|
|
||||||
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
|
|
||||||
set(ENV{PATH} "${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}")
|
|
||||||
else()
|
|
||||||
set(BASH /bin/bash)
|
|
||||||
set(ENV{PATH} "${MSYS_ROOT}/usr/bin:$ENV{PATH}:${PERL_EXE_PATH}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_find_acquire_program(NASM)
|
|
||||||
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
|
||||||
vcpkg_add_to_path(${NASM_EXE_PATH})
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
|
||||||
|
|
||||||
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
|
||||||
set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt)
|
|
||||||
set(LIBVPX_CRT_SUFFIX mt)
|
|
||||||
else()
|
|
||||||
set(LIBVPX_CRT_SUFFIX md)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore AND (VCPKG_PLATFORM_TOOLSET STREQUAL v142 OR VCPKG_PLATFORM_TOOLSET STREQUAL v143))
|
|
||||||
set(LIBVPX_TARGET_OS "uwp")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
|
|
||||||
set(LIBVPX_TARGET_OS "win32")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
|
||||||
set(LIBVPX_TARGET_OS "win64")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
|
|
||||||
set(LIBVPX_TARGET_ARCH "x86-${LIBVPX_TARGET_OS}")
|
|
||||||
set(LIBVPX_ARCH_DIR "Win32")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
||||||
set(LIBVPX_TARGET_ARCH "x86_64-${LIBVPX_TARGET_OS}")
|
|
||||||
set(LIBVPX_ARCH_DIR "x64")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
|
||||||
set(LIBVPX_TARGET_ARCH "arm64-${LIBVPX_TARGET_OS}")
|
|
||||||
set(LIBVPX_ARCH_DIR "ARM64")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
|
|
||||||
set(LIBVPX_TARGET_ARCH "armv7-${LIBVPX_TARGET_OS}")
|
|
||||||
set(LIBVPX_ARCH_DIR "ARM")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_PLATFORM_TOOLSET STREQUAL v143)
|
|
||||||
set(LIBVPX_TARGET_VS "vs17")
|
|
||||||
elseif(VCPKG_PLATFORM_TOOLSET STREQUAL v142)
|
|
||||||
set(LIBVPX_TARGET_VS "vs16")
|
|
||||||
else()
|
|
||||||
set(LIBVPX_TARGET_VS "vs15")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(OPTIONS "--disable-examples --disable-tools --disable-docs --enable-pic")
|
|
||||||
|
|
||||||
if("realtime" IN_LIST FEATURES)
|
|
||||||
set(OPTIONS "${OPTIONS} --enable-realtime-only")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("highbitdepth" IN_LIST FEATURES)
|
|
||||||
set(OPTIONS "${OPTIONS} --enable-vp9-highbitdepth")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Generating makefile")
|
|
||||||
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc
|
|
||||||
"${SOURCE_PATH}/configure"
|
|
||||||
--target=${LIBVPX_TARGET_ARCH}-${LIBVPX_TARGET_VS}
|
|
||||||
${LIBVPX_CRT_LINKAGE}
|
|
||||||
${OPTIONS}
|
|
||||||
--as=nasm
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
|
|
||||||
LOGNAME configure-${TARGET_TRIPLET})
|
|
||||||
|
|
||||||
message(STATUS "Generating MSBuild projects")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc -c "make dist"
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
|
|
||||||
LOGNAME generate-${TARGET_TRIPLET})
|
|
||||||
|
|
||||||
vcpkg_build_msbuild(
|
|
||||||
PROJECT_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx.vcxproj"
|
|
||||||
OPTIONS /p:UseEnv=True
|
|
||||||
)
|
|
||||||
|
|
||||||
# note: pdb file names are hardcoded in the lib file, cannot rename
|
|
||||||
set(LIBVPX_OUTPUT_PREFIX "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}")
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
|
||||||
if (EXISTS "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.pdb")
|
|
||||||
file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
|
||||||
else()
|
|
||||||
file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
|
||||||
if (EXISTS "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.pdb")
|
|
||||||
file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
|
||||||
else()
|
|
||||||
file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
|
||||||
set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
|
|
||||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
|
|
||||||
set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nomt-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
|
|
||||||
else()
|
|
||||||
set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
|
|
||||||
endif()
|
|
||||||
file(
|
|
||||||
INSTALL
|
|
||||||
"${LIBVPX_INCLUDE_DIR}"
|
|
||||||
DESTINATION
|
|
||||||
"${CURRENT_PACKAGES_DIR}/include"
|
|
||||||
RENAME
|
|
||||||
"vpx")
|
|
||||||
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}")
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/vpx.pc" @ONLY)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}/debug")
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/vpx.pc" @ONLY)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
else()
|
|
||||||
|
|
||||||
set(OPTIONS "--disable-examples --disable-tools --disable-docs --disable-unit-tests --enable-pic")
|
|
||||||
|
|
||||||
set(OPTIONS_DEBUG "--enable-debug-libs --enable-debug --prefix=${CURRENT_PACKAGES_DIR}/debug")
|
|
||||||
set(OPTIONS_RELEASE "--prefix=${CURRENT_PACKAGES_DIR}")
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
||||||
set(OPTIONS "${OPTIONS} --disable-static --enable-shared")
|
|
||||||
else()
|
|
||||||
set(OPTIONS "${OPTIONS} --enable-static --disable-shared")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("realtime" IN_LIST FEATURES)
|
|
||||||
set(OPTIONS "${OPTIONS} --enable-realtime-only")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("highbitdepth" IN_LIST FEATURES)
|
|
||||||
set(OPTIONS "${OPTIONS} --enable-vp9-highbitdepth")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
|
|
||||||
set(LIBVPX_TARGET_ARCH "x86")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
||||||
set(LIBVPX_TARGET_ARCH "x86_64")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
|
||||||
set(LIBVPX_TARGET_ARCH "arm64")
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "libvpx does not support architecture ${VCPKG_TARGET_ARCHITECTURE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_MINGW)
|
|
||||||
if(LIBVPX_TARGET_ARCH STREQUAL "x86")
|
|
||||||
set(LIBVPX_TARGET "x86-win32-gcc")
|
|
||||||
else()
|
|
||||||
set(LIBVPX_TARGET "x86_64-win64-gcc")
|
|
||||||
endif()
|
|
||||||
elseif(VCPKG_TARGET_IS_LINUX)
|
|
||||||
set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-linux-gcc")
|
|
||||||
elseif(VCPKG_TARGET_IS_OSX)
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
||||||
set(LIBVPX_TARGET "arm64-darwin20-gcc")
|
|
||||||
else()
|
|
||||||
set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-darwin17-gcc") # enable latest CPU instructions for best performance and less CPU usage on MacOS
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
set(LIBVPX_TARGET "generic-gnu") # use default target
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Build info. Target: ${LIBVPX_TARGET}; Options: ${OPTIONS}")
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
message(STATUS "Configuring libvpx for Release")
|
|
||||||
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc
|
|
||||||
"${SOURCE_PATH}/configure"
|
|
||||||
--target=${LIBVPX_TARGET}
|
|
||||||
${OPTIONS}
|
|
||||||
${OPTIONS_RELEASE}
|
|
||||||
--as=nasm
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
|
|
||||||
LOGNAME configure-${TARGET_TRIPLET}-rel)
|
|
||||||
|
|
||||||
message(STATUS "Building libvpx for Release")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc -c "make -j8"
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
|
||||||
)
|
|
||||||
|
|
||||||
message(STATUS "Installing libvpx for Release")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc -c "make install"
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
|
|
||||||
LOGNAME install-${TARGET_TRIPLET}-rel
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# --- --- ---
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
message(STATUS "Configuring libvpx for Debug")
|
|
||||||
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc
|
|
||||||
"${SOURCE_PATH}/configure"
|
|
||||||
--target=${LIBVPX_TARGET}
|
|
||||||
${OPTIONS}
|
|
||||||
${OPTIONS_DEBUG}
|
|
||||||
--as=nasm
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
|
|
||||||
LOGNAME configure-${TARGET_TRIPLET}-dbg)
|
|
||||||
|
|
||||||
message(STATUS "Building libvpx for Debug")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc -c "make -j8"
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-dbg
|
|
||||||
)
|
|
||||||
|
|
||||||
message(STATUS "Installing libvpx for Debug")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND
|
|
||||||
${BASH} --noprofile --norc -c "make install"
|
|
||||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
|
|
||||||
LOGNAME install-${TARGET_TRIPLET}-dbg
|
|
||||||
)
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libvpx_g.a")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
set(LIBVPX_CONFIG_DEBUG ON)
|
|
||||||
else()
|
|
||||||
set(LIBVPX_CONFIG_DEBUG OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/unofficial-libvpx-config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-libvpx/unofficial-libvpx-config.cmake" @ONLY)
|
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,49 +0,0 @@
|
|||||||
if(NOT TARGET unofficial::libvpx::libvpx)
|
|
||||||
# Compute the installation prefix relative to this file.
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
|
|
||||||
# Add library target (note: vpx always has a static build in vcpkg).
|
|
||||||
add_library(unofficial::libvpx::libvpx STATIC IMPORTED)
|
|
||||||
|
|
||||||
# Add interface include directories and link interface languages (applies to all configurations).
|
|
||||||
set_target_properties(unofficial::libvpx::libvpx PROPERTIES
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
|
||||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
|
||||||
)
|
|
||||||
list(APPEND _IMPORT_CHECK_FILES "${_IMPORT_PREFIX}/include/vpx/vpx_codec.h")
|
|
||||||
|
|
||||||
# Add release configuration properties.
|
|
||||||
find_library(_LIBFILE_RELEASE NAMES vpx PATHS "${_IMPORT_PREFIX}/lib/" NO_DEFAULT_PATH)
|
|
||||||
set_property(TARGET unofficial::libvpx::libvpx
|
|
||||||
APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
set_target_properties(unofficial::libvpx::libvpx PROPERTIES
|
|
||||||
IMPORTED_LOCATION_RELEASE ${_LIBFILE_RELEASE})
|
|
||||||
list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_RELEASE})
|
|
||||||
unset(_LIBFILE_RELEASE CACHE)
|
|
||||||
|
|
||||||
# Add debug configuration properties.
|
|
||||||
if(@LIBVPX_CONFIG_DEBUG@)
|
|
||||||
find_library(_LIBFILE_DEBUG NAMES vpx PATHS "${_IMPORT_PREFIX}/debug/lib/" NO_DEFAULT_PATH)
|
|
||||||
set_property(TARGET unofficial::libvpx::libvpx
|
|
||||||
APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
set_target_properties(unofficial::libvpx::libvpx PROPERTIES
|
|
||||||
IMPORTED_LOCATION_DEBUG ${_LIBFILE_DEBUG})
|
|
||||||
list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_DEBUG})
|
|
||||||
unset(_LIBFILE_DEBUG CACHE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check header and library files are present.
|
|
||||||
foreach(file ${_IMPORT_CHECK_FILES} )
|
|
||||||
if(NOT EXISTS "${file}" )
|
|
||||||
message(FATAL_ERROR "unofficial::libvpx::libvpx references the file
|
|
||||||
\"${file}\"
|
|
||||||
but this file does not exist. Possible reasons include:
|
|
||||||
* The file was deleted, renamed, or moved to another location.
|
|
||||||
* An install or uninstall procedure did not complete successfully.
|
|
||||||
")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
unset(_IMPORT_CHECK_FILES)
|
|
||||||
endif()
|
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "libvpx",
|
|
||||||
"version": "1.12.0",
|
|
||||||
"description": "The reference software implementation for the video coding formats VP8 and VP9.",
|
|
||||||
"homepage": "https://github.com/webmproject/libvpx",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"features": {
|
|
||||||
"highbitdepth": {
|
|
||||||
"description": "use VP9 high bit depth (10/12) profiles"
|
|
||||||
},
|
|
||||||
"realtime": {
|
|
||||||
"description": "enable this option while building for real-time encoding"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
prefix=@LIBVPX_PREFIX@
|
|
||||||
# pkg-config file from libvpx v1.10.0
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=${prefix}/lib
|
|
||||||
includedir=${prefix}/include
|
|
||||||
|
|
||||||
Name: vpx
|
|
||||||
Description: WebM Project VPx codec implementation
|
|
||||||
Version: @LIBVPX_VERSION@
|
|
||||||
Requires:
|
|
||||||
Conflicts:
|
|
||||||
Libs: -L"${libdir}" -lvpx
|
|
||||||
Cflags: -I"${includedir}"
|
|
@ -1,29 +0,0 @@
|
|||||||
From a6fd3992d44053a523a67aa16f5ae88fecfb20e1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nicole Mazzuca <mazzucan@outlook.com>
|
|
||||||
Date: Tue, 22 Sep 2020 14:09:53 -0700
|
|
||||||
Subject: [PATCH 1/2] remove `#ifndef NOUNCRYPT`
|
|
||||||
|
|
||||||
enable decrypt support for password-encrypted ZIP files
|
|
||||||
|
|
||||||
---
|
|
||||||
contrib/minizip/unzip.c | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c
|
|
||||||
index bcfb941..1895a0f 100644
|
|
||||||
--- a/contrib/minizip/unzip.c
|
|
||||||
+++ b/contrib/minizip/unzip.c
|
|
||||||
@@ -68,10 +68,6 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
-#ifndef NOUNCRYPT
|
|
||||||
- #define NOUNCRYPT
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
#include "zlib.h"
|
|
||||||
#include "unzip.h"
|
|
||||||
|
|
||||||
--
|
|
||||||
2.24.3 (Apple Git-128)
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From 6c38b6f544b55f9fc554f0fe22e2cbaddfaed7f8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nicole Mazzuca <mazzucan@outlook.com>
|
|
||||||
Date: Tue, 22 Sep 2020 14:15:04 -0700
|
|
||||||
Subject: [PATCH 2/2] add declaration for mkdir
|
|
||||||
|
|
||||||
It's invalid in C99 to implicitly declare mkdir
|
|
||||||
|
|
||||||
---
|
|
||||||
contrib/minizip/miniunz.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c
|
|
||||||
index 3d65401..5341af2 100644
|
|
||||||
--- a/contrib/minizip/miniunz.c
|
|
||||||
+++ b/contrib/minizip/miniunz.c
|
|
||||||
@@ -12,6 +12,10 @@
|
|
||||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#if !defined(_WIN32)
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
|
|
||||||
#ifndef __USE_FILE_OFFSET64
|
|
||||||
#define __USE_FILE_OFFSET64
|
|
||||||
--
|
|
||||||
2.24.3 (Apple Git-128)
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
diff --git a/contrib/minizip/ioapi.c b/contrib/minizip/ioapi.c
|
|
||||||
index 7f5c191..d42e050 100644
|
|
||||||
--- a/contrib/minizip/ioapi.c
|
|
||||||
+++ b/contrib/minizip/ioapi.c
|
|
||||||
@@ -17,8 +17,8 @@
|
|
||||||
#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
|
||||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
|
||||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
|
||||||
-#define FTELLO_FUNC(stream) ftello(stream)
|
|
||||||
-#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
|
||||||
+#define FTELLO_FUNC(stream) ftell(stream)
|
|
||||||
+#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
|
|
||||||
#else
|
|
||||||
#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
|
||||||
#define FTELLO_FUNC(stream) ftello64(stream)
|
|
||||||
diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c
|
|
||||||
index 3d65401..a1269ea 100644
|
|
||||||
--- a/contrib/minizip/miniunz.c
|
|
||||||
+++ b/contrib/minizip/miniunz.c
|
|
||||||
@@ -33,9 +33,9 @@
|
|
||||||
#define FTELLO_FUNC(stream) ftello(stream)
|
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
|
||||||
#else
|
|
||||||
-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
|
||||||
-#define FTELLO_FUNC(stream) ftello64(stream)
|
|
||||||
-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
|
|
||||||
+#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
|
||||||
+#define FTELLO_FUNC(stream) ftell(stream)
|
|
||||||
+#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/contrib/minizip/minizip.c b/contrib/minizip/minizip.c
|
|
||||||
index 4288962..02267fb 100644
|
|
||||||
--- a/contrib/minizip/minizip.c
|
|
||||||
+++ b/contrib/minizip/minizip.c
|
|
||||||
@@ -34,9 +34,9 @@
|
|
||||||
#define FTELLO_FUNC(stream) ftello(stream)
|
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
|
||||||
#else
|
|
||||||
-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
|
||||||
-#define FTELLO_FUNC(stream) ftello64(stream)
|
|
||||||
-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
|
|
||||||
+#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
|
||||||
+#define FTELLO_FUNC(stream) ftell(stream)
|
|
||||||
+#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
@ -1,104 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.8)
|
|
||||||
project(minizip VERSION 1.2.13 LANGUAGES C)
|
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
set(MIN_SRC contrib/minizip)
|
|
||||||
|
|
||||||
include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
set(MINIZIP_LIBRARIES ZLIB::ZLIB)
|
|
||||||
if(ENABLE_BZIP2)
|
|
||||||
message(STATUS "Building with bzip2 support")
|
|
||||||
find_package(BZip2)
|
|
||||||
|
|
||||||
include_directories(${BZIP2_INCLUDE_DIR})
|
|
||||||
set(MINIZIP_LIBRARIES ${MINIZIP_LIBRARIES} ${BZIP2_LIBRARIES})
|
|
||||||
else()
|
|
||||||
message(STATUS "Building without bzip2 support")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(SRC
|
|
||||||
${MIN_SRC}/ioapi.c
|
|
||||||
${MIN_SRC}/unzip.c
|
|
||||||
${MIN_SRC}/zip.c
|
|
||||||
${MIN_SRC}/mztools.c
|
|
||||||
)
|
|
||||||
if(WIN32)
|
|
||||||
list(APPEND SRC ${MIN_SRC}/iowin32.c)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
${MIN_SRC}/crypt.h
|
|
||||||
${MIN_SRC}/ioapi.h
|
|
||||||
${MIN_SRC}/unzip.h
|
|
||||||
${MIN_SRC}/zip.h
|
|
||||||
${MIN_SRC}/mztools.h
|
|
||||||
)
|
|
||||||
if(WIN32)
|
|
||||||
list(APPEND HEADERS ${MIN_SRC}/iowin32.h)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(minizip ${SRC})
|
|
||||||
|
|
||||||
target_link_libraries(minizip PRIVATE ZLIB::ZLIB)
|
|
||||||
target_compile_definitions(minizip PRIVATE -D_ZLIB_H)
|
|
||||||
|
|
||||||
if(ENABLE_BZIP2)
|
|
||||||
target_link_libraries(minizip PUBLIC ${BZIP2_LIBRARIES})
|
|
||||||
target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1)
|
|
||||||
endif()
|
|
||||||
if(ANDROID)
|
|
||||||
target_compile_definitions(minizip PRIVATE IOAPI_NO_64)
|
|
||||||
endif()
|
|
||||||
if(NOT DISABLE_INSTALL_TOOLS)
|
|
||||||
add_executable(minizip_bin ${MIN_SRC}/minizip.c)
|
|
||||||
add_executable(miniunz_bin ${MIN_SRC}/miniunz.c)
|
|
||||||
|
|
||||||
target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES})
|
|
||||||
target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES})
|
|
||||||
|
|
||||||
set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip)
|
|
||||||
set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS minizip
|
|
||||||
EXPORT minizipTargets
|
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
LIBRARY DESTINATION lib
|
|
||||||
ARCHIVE DESTINATION lib
|
|
||||||
)
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
|
||||||
write_basic_package_version_file("${PROJECT_BINARY_DIR}/minizipConfigVersion.cmake"
|
|
||||||
COMPATIBILITY SameMajorVersion)
|
|
||||||
|
|
||||||
configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/minizipConfig.cmake.in
|
|
||||||
minizipConfig.cmake
|
|
||||||
INSTALL_DESTINATION share/minizip)
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
"${PROJECT_BINARY_DIR}/minizipConfig.cmake"
|
|
||||||
"${PROJECT_BINARY_DIR}/minizipConfigVersion.cmake"
|
|
||||||
DESTINATION share/minizip
|
|
||||||
)
|
|
||||||
|
|
||||||
install(EXPORT minizipTargets
|
|
||||||
NAMESPACE minizip::
|
|
||||||
DESTINATION share/minizip
|
|
||||||
)
|
|
||||||
|
|
||||||
if(NOT DISABLE_INSTALL_TOOLS)
|
|
||||||
install (
|
|
||||||
TARGETS minizip_bin miniunz_bin
|
|
||||||
RUNTIME DESTINATION tools/minizip
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT DISABLE_INSTALL_HEADERS)
|
|
||||||
install(FILES ${HEADERS} DESTINATION include/minizip)
|
|
||||||
endif()
|
|
@ -1,12 +0,0 @@
|
|||||||
#@PACKAGE_INIT@
|
|
||||||
|
|
||||||
include(CMakeFindDependencyMacro)
|
|
||||||
|
|
||||||
find_dependency(ZLIB)
|
|
||||||
|
|
||||||
if (@ENABLE_BZIP2@)
|
|
||||||
find_dependency(BZip2)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
|
||||||
check_required_components("@PROJECT_NAME@")
|
|
@ -1,49 +0,0 @@
|
|||||||
# When this port is updated, the minizip port should be updated at the same time
|
|
||||||
|
|
||||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO madler/zlib
|
|
||||||
REF v1.2.13
|
|
||||||
SHA512 44b834fbfb50cca229209b8dbe1f96b258f19a49f5df23b80970b716371d856a4adf525edb4c6e0e645b180ea949cb90f5365a1d896160f297f56794dd888659
|
|
||||||
HEAD_REF master
|
|
||||||
PATCHES
|
|
||||||
0001-remove-ifndef-NOUNCRYPT.patch
|
|
||||||
0002-add-declaration-for-mkdir.patch
|
|
||||||
0003-no-io64.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
||||||
FEATURES
|
|
||||||
bzip2 ENABLE_BZIP2
|
|
||||||
)
|
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/minizipConfig.cmake.in" "${SOURCE_PATH}/cmake/minizipConfig.cmake.in" COPYONLY)
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${SOURCE_PATH}/CMakeLists.txt" COPYONLY)
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
${FEATURE_OPTIONS}
|
|
||||||
-DDISABLE_INSTALL_TOOLS=${VCPKG_TARGET_IS_IOS}
|
|
||||||
OPTIONS_DEBUG
|
|
||||||
-DDISABLE_INSTALL_HEADERS=ON
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
vcpkg_cmake_config_fixup()
|
|
||||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/minizip")
|
|
||||||
|
|
||||||
if ("bzip2" IN_LIST FEATURES)
|
|
||||||
file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h")
|
|
||||||
foreach(HEADER ${HEADERS})
|
|
||||||
file(READ "${HEADER}" _contents)
|
|
||||||
string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}")
|
|
||||||
file(WRITE "${HEADER}" "${_contents}")
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
||||||
file(INSTALL "${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,4 +0,0 @@
|
|||||||
minizip provides CMake targets:
|
|
||||||
|
|
||||||
find_package(minizip CONFIG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE minizip::minizip)
|
|
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "minizip",
|
|
||||||
"version-semver": "1.2.13",
|
|
||||||
"description": "Zip compression library",
|
|
||||||
"homepage": "https://github.com/madler/zlib",
|
|
||||||
"license": "Zlib",
|
|
||||||
"supports": "!uwp",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
"zlib"
|
|
||||||
],
|
|
||||||
"features": {
|
|
||||||
"bzip2": {
|
|
||||||
"description": "Support compression using bzip2 library",
|
|
||||||
"dependencies": [
|
|
||||||
"bzip2"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,60 +0,0 @@
|
|||||||
|
|
||||||
get_filename_component(_mp3lame_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
get_filename_component(_mp3lame_root "${_mp3lame_root}" PATH)
|
|
||||||
get_filename_component(_mp3lame_root "${_mp3lame_root}" PATH)
|
|
||||||
|
|
||||||
set(_mp3lame_rel_lib "${_mp3lame_root}/lib/@MP3LAME_LIB@")
|
|
||||||
set(_mp3lame_dbg_lib "${_mp3lame_root}/debug/lib/@MP3LAME_LIB@")
|
|
||||||
|
|
||||||
if (EXISTS "${_mp3lame_rel_lib}" OR EXISTS "${_mp3lame_dbg_lib}")
|
|
||||||
|
|
||||||
add_library(mp3lame::mp3lame UNKNOWN IMPORTED)
|
|
||||||
set_target_properties(mp3lame::mp3lame
|
|
||||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_mp3lame_root}/include")
|
|
||||||
|
|
||||||
if (EXISTS "${_mp3lame_rel_lib}")
|
|
||||||
set_target_properties(mp3lame::mp3lame
|
|
||||||
PROPERTIES IMPORTED_LOCATION_RELEASE "${_mp3lame_rel_lib}")
|
|
||||||
set_property(TARGET mp3lame::mp3lame APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
endif()
|
|
||||||
if (EXISTS "${_mp3lame_dbg_lib}")
|
|
||||||
set_target_properties(mp3lame::mp3lame
|
|
||||||
PROPERTIES IMPORTED_LOCATION_DEBUG "${_mp3lame_dbg_lib}")
|
|
||||||
set_property(TARGET mp3lame::mp3lame APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(_mp3lame_mpghip_rel_lib "${_mp3lame_root}/lib/libmpghip-static.lib")
|
|
||||||
set(_mp3lame_mpghip_dbg_lib "${_mp3lame_root}/debug/lib/libmpghip-static.lib")
|
|
||||||
|
|
||||||
if (EXISTS "${_mp3lame_mpghip_rel_lib}" OR EXISTS "${_mp3lame_mpghip_dbg_lib}")
|
|
||||||
|
|
||||||
add_library(mp3lame::mpghip UNKNOWN IMPORTED)
|
|
||||||
|
|
||||||
if (EXISTS "${_mp3lame_rel_lib}")
|
|
||||||
set_target_properties(mp3lame::mpghip
|
|
||||||
PROPERTIES IMPORTED_LOCATION_RELEASE "${_mp3lame_mpghip_rel_lib}")
|
|
||||||
set_property(TARGET mp3lame::mpghip APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
endif()
|
|
||||||
if (EXISTS "${_mp3lame_dbg_lib}")
|
|
||||||
set_target_properties(mp3lame::mpghip
|
|
||||||
PROPERTIES IMPORTED_LOCATION_DEBUG "${_mp3lame_mpghip_dbg_lib}")
|
|
||||||
set_property(TARGET mp3lame::mpghip APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(mp3lame::mp3lame PROPERTIES INTERFACE_LINK_LIBRARIES mp3lame::mpghip)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
unset(_mp3lame_mpghip_rel_lib)
|
|
||||||
unset(_mp3lame_mpghip_dbg_lib)
|
|
||||||
|
|
||||||
else()
|
|
||||||
|
|
||||||
set(mp3lame_FOUND FALSE)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
unset(_mp3lame_rel_lib)
|
|
||||||
unset(_mp3lame_dbg_lib)
|
|
||||||
|
|
||||||
unset(_mp3lame_root)
|
|
@ -1,12 +0,0 @@
|
|||||||
diff --git a/config.sub b/config.sub
|
|
||||||
index 3580aaf..bf099fc 100755
|
|
||||||
--- a/config.sub
|
|
||||||
+++ b/config.sub
|
|
||||||
@@ -439,6 +439,7 @@ case $basic_machine in
|
|
||||||
| tile*-* \
|
|
||||||
| tron-* \
|
|
||||||
| ubicom32-* \
|
|
||||||
+ | universal-* \
|
|
||||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
|
||||||
| vax-* \
|
|
||||||
| visium-* \
|
|
@ -1,122 +0,0 @@
|
|||||||
set(VERSION 3.100)
|
|
||||||
|
|
||||||
vcpkg_from_sourceforge(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO lame/lame
|
|
||||||
REF ${VERSION}
|
|
||||||
FILENAME "lame-${VERSION}.tar.gz"
|
|
||||||
SHA512 0844b9eadb4aacf8000444621451277de365041cc1d97b7f7a589da0b7a23899310afd4e4d81114b9912aa97832621d20588034715573d417b2923948c08634b
|
|
||||||
PATCHES
|
|
||||||
00001-msvc-upgrade-solution-up-to-vc11.patch
|
|
||||||
remove_lame_init_old_from_symbol_list.patch # deprecated https://github.com/zlargon/lame/blob/master/include/lame.h#L169
|
|
||||||
add-macos-universal-config.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
||||||
set(platform "ARM64")
|
|
||||||
set(machine "ARM64")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
||||||
set(platform "ARM")
|
|
||||||
set(machine "ARM")
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
||||||
set(platform "x64")
|
|
||||||
set(machine "x64")
|
|
||||||
else()
|
|
||||||
set(platform "Win32")
|
|
||||||
set(machine "x86")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(READ "${SOURCE_PATH}/vc_solution/vc11_lame.sln" sln_con)
|
|
||||||
string(REPLACE "|Win32" "|${platform}" sln_con "${sln_con}")
|
|
||||||
string(REPLACE "\"vc11_" "\"${machine}_vc11_" sln_con "${sln_con}")
|
|
||||||
file(WRITE "${SOURCE_PATH}/vc_solution/${machine}_vc11_lame.sln" "${sln_con}")
|
|
||||||
|
|
||||||
|
|
||||||
file(GLOB vcxprojs RELATIVE "${SOURCE_PATH}/vc_solution" "${SOURCE_PATH}/vc_solution/vc11_*.vcxproj")
|
|
||||||
foreach(vcxproj ${vcxprojs})
|
|
||||||
file(READ "${SOURCE_PATH}/vc_solution/${vcxproj}" vcxproj_con)
|
|
||||||
|
|
||||||
if(NOT VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
||||||
string(REPLACE "DLL</RuntimeLibrary>" "</RuntimeLibrary>" vcxproj_con "${vcxproj_con}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
string(REPLACE "/machine:x86" "/machine:${machine}" vcxproj_con "${vcxproj_con}")
|
|
||||||
string(REPLACE "<Platform>Win32</Platform>" "<Platform>${platform}</Platform>" vcxproj_con "${vcxproj_con}")
|
|
||||||
string(REPLACE "|Win32" "|${platform}" vcxproj_con "${vcxproj_con}")
|
|
||||||
string(REPLACE "Include=\"vc11_" "Include=\"${machine}_vc11_" vcxproj_con "${vcxproj_con}")
|
|
||||||
|
|
||||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
||||||
string(REPLACE "/APPCONTAINER" "" vcxproj_con "${vcxproj_con}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(WRITE "${SOURCE_PATH}/vc_solution/${machine}_${vcxproj}" "${vcxproj_con}")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
vcpkg_install_msbuild(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
PROJECT_SUBPATH "vc_solution/${machine}_vc11_lame.sln"
|
|
||||||
TARGET "lame"
|
|
||||||
PLATFORM "${platform}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libmp3lame.lib")
|
|
||||||
endif()
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libmp3lame.lib")
|
|
||||||
endif()
|
|
||||||
set(MP3LAME_LIB "libmp3lame-static.lib")
|
|
||||||
else()
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libmp3lame-static.lib")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libmpghip-static.lib")
|
|
||||||
endif()
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libmp3lame-static.lib")
|
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libmpghip-static.lib")
|
|
||||||
endif()
|
|
||||||
set(MP3LAME_LIB "libmp3lame.lib")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
else()
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
||||||
set(OPTIONS --enable-static=yes --enable-shared=no)
|
|
||||||
set(MP3LAME_LIB "libmp3lame${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}")
|
|
||||||
else()
|
|
||||||
set(OPTIONS --enable-shared=yes --enable-static=no)
|
|
||||||
if(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX)
|
|
||||||
set(MP3LAME_LIB "libmp3lame${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}")
|
|
||||||
else()
|
|
||||||
set(MP3LAME_LIB "libmp3lame${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT VCPKG_TARGET_IS_MINGW)
|
|
||||||
string(APPEND OPTIONS --with-pic=yes)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_configure_make(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
DETERMINE_BUILD_TRIPLET
|
|
||||||
OPTIONS ${OPTIONS}
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_install_make()
|
|
||||||
file(REMOVE_RECURSE
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/doc" "${CURRENT_PACKAGES_DIR}/share/${PORT}/man1")
|
|
||||||
|
|
||||||
file(COPY "${SOURCE_PATH}/include/lame.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/lame")
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/mp3lame-config.cmake" @ONLY)
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,9 +0,0 @@
|
|||||||
diff --color -Naur src_old/include/libmp3lame.sym src/include/libmp3lame.sym
|
|
||||||
--- src_old/include/libmp3lame.sym 2017-09-07 02:33:35.000000000 +0700
|
|
||||||
+++ src/include/libmp3lame.sym 2020-11-12 17:45:59.946448300 +0700
|
|
||||||
@@ -1,5 +1,4 @@
|
|
||||||
lame_init
|
|
||||||
-lame_init_old
|
|
||||||
lame_set_num_samples
|
|
||||||
lame_get_num_samples
|
|
||||||
lame_set_in_samplerate
|
|
@ -1,4 +0,0 @@
|
|||||||
The package mp3lame provides CMake targets:
|
|
||||||
|
|
||||||
find_package(mp3lame CONFIG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE mp3lame::mp3lame)
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "mp3lame",
|
|
||||||
"version": "3.100",
|
|
||||||
"port-version": 9,
|
|
||||||
"description": "LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.",
|
|
||||||
"homepage": "https://sourceforge.net/projects/lame",
|
|
||||||
"license": "LGPL-2.0-only"
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt
|
|
||||||
index ee9a1ba..81d23f8 100644
|
|
||||||
--- a/ports/cmake/src/CMakeLists.txt
|
|
||||||
+++ b/ports/cmake/src/CMakeLists.txt
|
|
||||||
@@ -185,7 +185,7 @@ if(NO_MESSAGES)
|
|
||||||
set(NO_ERETURN ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-if(WIN32)
|
|
||||||
+if(WIN32 OR APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES arm)
|
|
||||||
set(HAVE_FPU 1)
|
|
||||||
else()
|
|
||||||
cmake_host_system_information(RESULT HAVE_FPU QUERY HAS_FPU)
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt
|
|
||||||
index 7147174..76e1743 100644
|
|
||||||
--- a/ports/cmake/src/CMakeLists.txt
|
|
||||||
+++ b/ports/cmake/src/CMakeLists.txt
|
|
||||||
@@ -238,7 +238,7 @@ if(BUILD_LIBOUT123)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
- if(NOT CHECK_MODULES OR NOT JACK_REQUIRED EQUAL -1)
|
|
||||||
+ if(0)
|
|
||||||
pkg_search_module(JACK jack)
|
|
||||||
if(JACK_FOUND)
|
|
||||||
list(APPEND OUTPUT_MODULES jack)
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt
|
|
||||||
index c7ba36f..7147174 100644
|
|
||||||
--- a/ports/cmake/src/CMakeLists.txt
|
|
||||||
+++ b/ports/cmake/src/CMakeLists.txt
|
|
||||||
@@ -372,7 +372,7 @@ if(BUILD_LIBOUT123)
|
|
||||||
endif()
|
|
||||||
add_subdirectory("libsyn123")
|
|
||||||
|
|
||||||
-if(UNIX)
|
|
||||||
+if(0)
|
|
||||||
add_subdirectory("tests")
|
|
||||||
|
|
||||||
if(BUILD_LIBOUT123)
|
|
@ -1,37 +0,0 @@
|
|||||||
set(MPG123_VERSION 1.29.2)
|
|
||||||
set(MPG123_HASH ffb82ffbebedeb12783338b5159bf055afd25cb77e1b705bef29f04fa50bcb2ceaf2a6418d0e111fab1151ea956fe48ba3576d978e6b0c8f4ca72c3883608ec0)
|
|
||||||
|
|
||||||
vcpkg_from_sourceforge(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO mpg123/mpg123
|
|
||||||
REF ${MPG123_VERSION}
|
|
||||||
FILENAME "mpg123-${MPG123_VERSION}.tar.bz2"
|
|
||||||
SHA512 ${MPG123_HASH}
|
|
||||||
PATCHES
|
|
||||||
no-executables.patch
|
|
||||||
fix-modulejack.patch
|
|
||||||
fix-m1-build.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
||||||
include("${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake")
|
|
||||||
yasm_tool_helper(APPEND_TO_PATH)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}/ports/cmake"
|
|
||||||
OPTIONS -DUSE_MODULES=OFF
|
|
||||||
)
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_OSX)
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "mpg123",
|
|
||||||
"version": "1.29.2",
|
|
||||||
"port-version": 3,
|
|
||||||
"description": "mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).",
|
|
||||||
"homepage": "https://sourceforge.net/projects/mpg123/",
|
|
||||||
"license": "LGPL-2.1-or-later",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "yasm-tool-helper",
|
|
||||||
"platform": "windows"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
function(install_pc_file name pc_data)
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${name}.pc" @ONLY)
|
|
||||||
endif()
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${name}.pc" @ONLY)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
install_pc_file(openssl [[
|
|
||||||
Name: OpenSSL
|
|
||||||
Description: Secure Sockets Layer and cryptography libraries and tools
|
|
||||||
Requires: libssl libcrypto
|
|
||||||
]])
|
|
||||||
|
|
||||||
install_pc_file(libssl [[
|
|
||||||
Name: OpenSSL-libssl
|
|
||||||
Description: Secure Sockets Layer and cryptography libraries
|
|
||||||
Libs: -L"${libdir}" -llibssl
|
|
||||||
Requires: libcrypto
|
|
||||||
Cflags: -I"${includedir}"
|
|
||||||
]])
|
|
||||||
|
|
||||||
install_pc_file(libcrypto [[
|
|
||||||
Name: OpenSSL-libcrypto
|
|
||||||
Description: OpenSSL cryptography library
|
|
||||||
Libs: -L"${libdir}" -llibcrypto
|
|
||||||
Libs.private: -lcrypt32 -lws2_32 -ladvapi32 -luser32
|
|
||||||
Cflags: -I"${includedir}"
|
|
||||||
]])
|
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
@ -1,6 +0,0 @@
|
|||||||
prefix=${pcfiledir}/../..
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=${exec_prefix}/lib
|
|
||||||
includedir=${prefix}/include
|
|
||||||
Version: @OPENSSL_VERSION@
|
|
||||||
@pc_data@
|
|
@ -1,43 +0,0 @@
|
|||||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/share/libressl/copyright"
|
|
||||||
OR EXISTS "${CURRENT_INSTALLED_DIR}/share/boringssl/copyright")
|
|
||||||
message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (VCPKG_TARGET_IS_LINUX)
|
|
||||||
message(WARNING
|
|
||||||
[[openssl currently requires the following library from the system package manager:
|
|
||||||
linux-headers
|
|
||||||
It can be installed on alpine systems via apk add linux-headers.]]
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(OPENSSL_VERSION 3.0.5)
|
|
||||||
|
|
||||||
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
|
|
||||||
set(OPENSSL_PATCHES "${CMAKE_CURRENT_LIST_DIR}/windows/flags.patch")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO openssl/openssl
|
|
||||||
REF openssl-${OPENSSL_VERSION}
|
|
||||||
SHA512 e426f2d48dcd87ad938b246cea69988710198c3ed2f5bb9065aa9e74492161b056336f5b1f29be64e70dfd86a77808fe727ebb46eae10331c76f1ff08e341133
|
|
||||||
PATCHES ${OPENSSL_PATCHES}
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_find_acquire_program(PERL)
|
|
||||||
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
|
||||||
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_UWP)
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/uwp/portfile.cmake")
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake")
|
|
||||||
elseif(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/windows/portfile.cmake")
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake")
|
|
||||||
else()
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
|
||||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
@ -1,281 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.9)
|
|
||||||
project(openssl C)
|
|
||||||
|
|
||||||
if(NOT SOURCE_PATH)
|
|
||||||
message(FATAL_ERROR "Requires SOURCE_PATH")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
||||||
set(PLATFORM linux-x86_64)
|
|
||||||
else()
|
|
||||||
set(PLATFORM linux-generic32)
|
|
||||||
endif()
|
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
|
|
||||||
set(PLATFORM ios64-xcrun)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
|
|
||||||
set(PLATFORM ios-xcrun)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" OR
|
|
||||||
VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
|
|
||||||
set(PLATFORM iossimulator-xcrun)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Unknown iOS target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
||||||
endif()
|
|
||||||
# disable that makes linkage error (e.g. require stderr usage)
|
|
||||||
list(APPEND DISABLES no-ui no-asm)
|
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
|
|
||||||
set(PLATFORM darwin64-arm64-cc)
|
|
||||||
else()
|
|
||||||
set(PLATFORM darwin64-x86_64-cc)
|
|
||||||
endif()
|
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
|
||||||
set(PLATFORM BSD-generic64)
|
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
|
||||||
set(PLATFORM BSD-generic64)
|
|
||||||
elseif(MINGW)
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
||||||
set(PLATFORM mingw64)
|
|
||||||
else()
|
|
||||||
set(PLATFORM mingw)
|
|
||||||
endif()
|
|
||||||
elseif(EMSCRIPTEN)
|
|
||||||
set(MAKE $ENV{EMSDK}/upstream/emscripten/emmake)
|
|
||||||
set(ENV{MAKE} $ENV{EMSDK}/upstream/emscripten/emmake)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Unknown platform")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY)
|
|
||||||
|
|
||||||
message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
|
|
||||||
message("COMPILER_ROOT=${COMPILER_ROOT}")
|
|
||||||
message("CMAKE_SYSROOT=${CMAKE_SYSROOT}")
|
|
||||||
message("CMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}")
|
|
||||||
message("CMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
|
||||||
message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}")
|
|
||||||
message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
|
|
||||||
message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}")
|
|
||||||
message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}")
|
|
||||||
message("CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG=${CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG}")
|
|
||||||
|
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
|
||||||
set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BUILD_TYPE}}")
|
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|
||||||
set(CFLAGS "${CFLAGS} -Wno-error=unused-command-line-argument")
|
|
||||||
endif()
|
|
||||||
if(CMAKE_C_COMPILER_TARGET AND CMAKE_C_COMPILE_OPTIONS_TARGET)
|
|
||||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}")
|
|
||||||
endif()
|
|
||||||
if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN AND CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN)
|
|
||||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}")
|
|
||||||
endif()
|
|
||||||
if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
|
|
||||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
|
|
||||||
elseif(CMAKE_OSX_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
|
|
||||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_OSX_SYSROOT}")
|
|
||||||
endif()
|
|
||||||
if (CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG)
|
|
||||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
|
||||||
elseif((CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND (VCPKG_TARGET_ARCHITECTURE MATCHES "arm64"))
|
|
||||||
set(CFLAGS "${CFLAGS} -mmacosx-version-min=11.0")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
string(REGEX REPLACE "^ " "" CFLAGS "${CFLAGS}")
|
|
||||||
|
|
||||||
set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr")
|
|
||||||
|
|
||||||
if(NOT IOS)
|
|
||||||
set(ENV{CC} "${CMAKE_C_COMPILER}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}")
|
|
||||||
|
|
||||||
get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME)
|
|
||||||
set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}")
|
|
||||||
|
|
||||||
if(NOT EXISTS "${BUILDDIR}")
|
|
||||||
file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY)
|
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
|
||||||
set(SHARED shared)
|
|
||||||
file(STRINGS "${BUILDDIR}/VERSION.dat" SHLIB_VERSION
|
|
||||||
REGEX "^SHLIB_VERSION=.*")
|
|
||||||
string(REGEX REPLACE "^(SHLIB_VERSION=)(.*)$" "\\2"
|
|
||||||
SHLIB_VERSION "${SHLIB_VERSION}")
|
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|
||||||
set(LIB_EXT dylib)
|
|
||||||
set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT})
|
|
||||||
elseif(MINGW)
|
|
||||||
string(REPLACE "." "_" SHLIB_VERSION "${SHLIB_VERSION}")
|
|
||||||
set(BIN_EXT dll)
|
|
||||||
set(LIB_EXT dll.a)
|
|
||||||
else()
|
|
||||||
set(LIB_EXT so)
|
|
||||||
set(LIB_EXTS ${LIB_EXT}.${SHLIB_VERSION})
|
|
||||||
endif()
|
|
||||||
list(APPEND BIN_EXTS ${BIN_EXT})
|
|
||||||
list(APPEND LIB_EXTS ${LIB_EXT})
|
|
||||||
else()
|
|
||||||
set(SHARED no-shared no-module)
|
|
||||||
set(LIB_EXTS a)
|
|
||||||
endif()
|
|
||||||
set(INSTALL_PKG_CONFIGS "${BUILDDIR}/openssl.pc")
|
|
||||||
foreach(lib ssl crypto)
|
|
||||||
foreach(ext ${LIB_EXTS})
|
|
||||||
list(APPEND INSTALL_LIBS "${BUILDDIR}/lib${lib}.${ext}")
|
|
||||||
list(APPEND INSTALL_PKG_CONFIGS "${BUILDDIR}/lib${lib}.pc")
|
|
||||||
endforeach()
|
|
||||||
foreach(ext ${BIN_EXTS})
|
|
||||||
# This might be wrong for targets which don't follow this naming scheme, but I'm not aware of any
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
||||||
list(APPEND INSTALL_BINS "${BUILDDIR}/lib${lib}-${SHLIB_VERSION}-x64.${ext}")
|
|
||||||
else()
|
|
||||||
list(APPEND INSTALL_BINS "${BUILDDIR}/lib${lib}-${SHLIB_VERSION}.${ext}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if(CMAKE_HOST_WIN32)
|
|
||||||
set(ENV_COMMAND set)
|
|
||||||
set(PATH_VAR ";%PATH%")
|
|
||||||
else()
|
|
||||||
set(ENV_COMMAND export)
|
|
||||||
set(PATH_VAR ":$ENV{PATH}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${BUILDDIR}/Makefile"
|
|
||||||
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
|
|
||||||
VERBATIM
|
|
||||||
WORKING_DIRECTORY "${BUILDDIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(NOT IOS)
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${BUILDDIR}/Makefile"
|
|
||||||
COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
|
|
||||||
COMMAND ${ENV_COMMAND} AR=${CMAKE_AR}
|
|
||||||
COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER}
|
|
||||||
COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB}
|
|
||||||
COMMAND ${ENV_COMMAND} MAKE=${MAKE}
|
|
||||||
COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER}
|
|
||||||
COMMAND ${ENV_COMMAND} WINDRES=${CMAKE_RC_COMPILER}
|
|
||||||
VERBATIM
|
|
||||||
APPEND
|
|
||||||
)
|
|
||||||
if(EMSCRIPTEN)
|
|
||||||
list(APPEND DISABLES
|
|
||||||
threads
|
|
||||||
no-engine
|
|
||||||
no-dso
|
|
||||||
no-asm
|
|
||||||
no-shared
|
|
||||||
no-sse2
|
|
||||||
no-srtp
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
list(APPEND DISABLES
|
|
||||||
enable-static-engine
|
|
||||||
no-zlib
|
|
||||||
no-ssl2
|
|
||||||
no-idea
|
|
||||||
no-cast
|
|
||||||
no-seed
|
|
||||||
no-md2
|
|
||||||
no-tests)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(EMSCRIPTEN)
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${BUILDDIR}/Makefile"
|
|
||||||
COMMAND "$ENV{EMSDK}/upstream/emscripten/emconfigure" ./config
|
|
||||||
${SHARED}
|
|
||||||
${DISABLES}
|
|
||||||
"--prefix=${CMAKE_INSTALL_PREFIX}"
|
|
||||||
"--openssldir=/etc/ssl"
|
|
||||||
"--cross-compile-prefix=\"/\""
|
|
||||||
VERBATIM
|
|
||||||
APPEND
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(build_libs ALL
|
|
||||||
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
|
|
||||||
COMMAND "${MAKE}" make build_libs
|
|
||||||
VERBATIM
|
|
||||||
WORKING_DIRECTORY "${BUILDDIR}"
|
|
||||||
DEPENDS "${BUILDDIR}/Makefile"
|
|
||||||
BYPRODUCTS ${INSTALL_LIBS}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${BUILDDIR}/Makefile"
|
|
||||||
COMMAND "${PERL}" Configure
|
|
||||||
${SHARED}
|
|
||||||
${DISABLES}
|
|
||||||
${PLATFORM}
|
|
||||||
"--prefix=${CMAKE_INSTALL_PREFIX}"
|
|
||||||
"--libdir=${CMAKE_INSTALL_PREFIX}/lib"
|
|
||||||
"--openssldir=/etc/ssl"
|
|
||||||
${CFLAGS}
|
|
||||||
VERBATIM
|
|
||||||
APPEND
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(build_libs ALL
|
|
||||||
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
|
|
||||||
COMMAND "${MAKE}" -j ${VCPKG_CONCURRENCY} build_libs
|
|
||||||
VERBATIM
|
|
||||||
WORKING_DIRECTORY "${BUILDDIR}"
|
|
||||||
DEPENDS "${BUILDDIR}/Makefile"
|
|
||||||
BYPRODUCTS ${INSTALL_LIBS}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${BUILDDIR}/Makefile"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
|
|
||||||
VERBATIM
|
|
||||||
APPEND
|
|
||||||
)
|
|
||||||
|
|
||||||
if((CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS") AND BUILD_SHARED_LIBS)
|
|
||||||
if(DEFINED CMAKE_INSTALL_NAME_DIR)
|
|
||||||
set(ID_PREFIX "${CMAKE_INSTALL_NAME_DIR}")
|
|
||||||
else()
|
|
||||||
set(ID_PREFIX "@rpath")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
TARGET build_libs
|
|
||||||
COMMAND /usr/bin/install_name_tool -id "${ID_PREFIX}/libssl.${SHLIB_VERSION}.dylib"
|
|
||||||
"${BUILDDIR}/libssl.${SHLIB_VERSION}.dylib"
|
|
||||||
COMMAND /usr/bin/install_name_tool -id "${ID_PREFIX}/libcrypto.${SHLIB_VERSION}.dylib"
|
|
||||||
"${BUILDDIR}/libcrypto.${SHLIB_VERSION}.dylib"
|
|
||||||
COMMAND /usr/bin/install_name_tool -change "${CMAKE_INSTALL_PREFIX}/lib/libcrypto.${SHLIB_VERSION}.dylib"
|
|
||||||
"${ID_PREFIX}/libcrypto.${SHLIB_VERSION}.dylib"
|
|
||||||
"${BUILDDIR}/libssl.${SHLIB_VERSION}.dylib"
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES ${INSTALL_LIBS}
|
|
||||||
DESTINATION lib
|
|
||||||
)
|
|
||||||
install(
|
|
||||||
FILES ${INSTALL_BINS}
|
|
||||||
DESTINATION bin
|
|
||||||
)
|
|
||||||
install(
|
|
||||||
FILES ${INSTALL_PKG_CONFIGS}
|
|
||||||
DESTINATION lib/pkgconfig
|
|
||||||
)
|
|
@ -1,32 +0,0 @@
|
|||||||
if(CMAKE_HOST_WIN32)
|
|
||||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make perl)
|
|
||||||
set(MAKE "${MSYS_ROOT}/usr/bin/make.exe")
|
|
||||||
set(PERL "${MSYS_ROOT}/usr/bin/perl.exe")
|
|
||||||
else()
|
|
||||||
find_program(MAKE make)
|
|
||||||
if(NOT MAKE)
|
|
||||||
message(FATAL_ERROR "Could not find make. Please install it through your package manager.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}"
|
|
||||||
OPTIONS
|
|
||||||
-DSOURCE_PATH=${SOURCE_PATH}
|
|
||||||
-DPERL=${PERL}
|
|
||||||
-DMAKE=${MAKE}
|
|
||||||
-DVCPKG_CONCURRENCY=${VCPKG_CONCURRENCY}
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
|
||||||
file(GLOB HEADERS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h")
|
|
||||||
set(RESOLVED_HEADERS)
|
|
||||||
foreach(HEADER ${HEADERS})
|
|
||||||
get_filename_component(X "${HEADER}" REALPATH)
|
|
||||||
list(APPEND RESOLVED_HEADERS "${X}")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
file(INSTALL ${RESOLVED_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include/openssl")
|
|
||||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,7 +0,0 @@
|
|||||||
file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile)
|
|
||||||
foreach(MAKEFILE ${MAKEFILES})
|
|
||||||
message("removing deps from ${MAKEFILE}")
|
|
||||||
file(READ "${MAKEFILE}" _contents)
|
|
||||||
string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}")
|
|
||||||
file(WRITE "${MAKEFILE}" "${_contents}")
|
|
||||||
endforeach()
|
|
@ -1,4 +0,0 @@
|
|||||||
The package openssl is compatible with built-in CMake targets:
|
|
||||||
|
|
||||||
find_package(OpenSSL REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
|
@ -1,16 +0,0 @@
|
|||||||
set build=%1
|
|
||||||
|
|
||||||
perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h
|
|
||||||
|
|
||||||
for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\
|
|
||||||
for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\
|
|
||||||
for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\
|
|
||||||
for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\
|
|
||||||
|
|
||||||
call ms\do_winuniversal.bat
|
|
||||||
|
|
||||||
mkdir inc32\openssl
|
|
||||||
|
|
||||||
jom -j %NUMBER_OF_PROCESSORS% -k -f ms\ntdll.mak
|
|
||||||
REM due to a race condition in the build, we need to have a second single-threaded pass.
|
|
||||||
nmake -f ms\ntdll.mak
|
|
@ -1,155 +0,0 @@
|
|||||||
vcpkg_find_acquire_program(JOM)
|
|
||||||
get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY)
|
|
||||||
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
|
||||||
|
|
||||||
set(OPENSSL_SHARED no-shared)
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
||||||
set(OPENSSL_SHARED shared)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_find_acquire_program(NASM)
|
|
||||||
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
|
||||||
vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}")
|
|
||||||
|
|
||||||
set(CONFIGURE_COMMAND ${PERL} Configure
|
|
||||||
enable-static-engine
|
|
||||||
enable-capieng
|
|
||||||
no-unit-test
|
|
||||||
no-ssl2
|
|
||||||
no-asm
|
|
||||||
no-uplink
|
|
||||||
no-tests
|
|
||||||
-utf-8
|
|
||||||
${OPENSSL_SHARED}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
||||||
set(OPENSSL_ARCH VC-WIN32-UWP)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
||||||
set(OPENSSL_ARCH VC-WIN64A-UWP)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
||||||
set(OPENSSL_ARCH VC-WIN32-ARM-UWP)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
||||||
set(OPENSSL_ARCH VC-WIN64-ARM-UWP)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(OPENSSL_MAKEFILE "makefile")
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
|
|
||||||
# Copy openssl sources.
|
|
||||||
message(STATUS "Copying openssl release source files...")
|
|
||||||
file(GLOB OPENSSL_SOURCE_FILES "${SOURCE_PATH}/*")
|
|
||||||
foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES})
|
|
||||||
file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
|
||||||
endforeach()
|
|
||||||
message(STATUS "Copying openssl release source files... done")
|
|
||||||
set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
|
||||||
|
|
||||||
set(OPENSSLDIR_RELEASE "${CURRENT_PACKAGES_DIR}")
|
|
||||||
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-rel")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
|
|
||||||
LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-rel
|
|
||||||
)
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-rel done")
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-rel")
|
|
||||||
# Openssl's buildsystem has a race condition which will cause JOM to fail at some point.
|
|
||||||
# This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build.
|
|
||||||
make_directory("${SOURCE_PATH_RELEASE}/inc32/openssl")
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${JOM}" -k -j ${VCPKG_CONCURRENCY} -f "${OPENSSL_MAKEFILE}" build_libs
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
|
|
||||||
OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log"
|
|
||||||
ERROR_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log"
|
|
||||||
)
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND nmake -f "${OPENSSL_MAKEFILE}" install_dev
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-rel-1)
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-rel done")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
# Copy openssl sources.
|
|
||||||
message(STATUS "Copying openssl debug source files...")
|
|
||||||
file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*)
|
|
||||||
foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES})
|
|
||||||
file(COPY "${SOURCE_FILE}" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
||||||
endforeach()
|
|
||||||
message(STATUS "Copying openssl debug source files... done")
|
|
||||||
set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
||||||
|
|
||||||
set(OPENSSLDIR_DEBUG "${CURRENT_PACKAGES_DIR}/debug")
|
|
||||||
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-dbg")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
|
|
||||||
LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-dbg
|
|
||||||
)
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-dbg done")
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg")
|
|
||||||
make_directory("${SOURCE_PATH_DEBUG}/inc32/openssl")
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${JOM}" -k -j ${VCPKG_CONCURRENCY} -f "${OPENSSL_MAKEFILE}" build_libs
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
|
|
||||||
OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log"
|
|
||||||
ERROR_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log"
|
|
||||||
)
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND nmake -f "${OPENSSL_MAKEFILE}" install_dev
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-dbg-1)
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/certs")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/private")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/engines-1_1")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/certs")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/private")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
|
|
||||||
file(REMOVE
|
|
||||||
"${CURRENT_PACKAGES_DIR}/bin/openssl.exe"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/openssl.cnf"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/openssl.cnf"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/ct_log_list.cnf"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/openssl.cnf.dist"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
||||||
# They should be empty, only the exes deleted above were in these directories
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents)
|
|
||||||
string(REPLACE "<winsock.h>" "<winsock2.h>" _contents "${_contents}")
|
|
||||||
file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}")
|
|
||||||
|
|
||||||
file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents)
|
|
||||||
string(REPLACE "# include <windows.h>" "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include <windows.h>" _contents "${_contents}")
|
|
||||||
file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}")
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,82 +0,0 @@
|
|||||||
cmake_policy(PUSH)
|
|
||||||
cmake_policy(SET CMP0012 NEW)
|
|
||||||
cmake_policy(SET CMP0054 NEW)
|
|
||||||
cmake_policy(SET CMP0057 NEW)
|
|
||||||
|
|
||||||
set(OPENSSL_VERSION_MAJOR 3)
|
|
||||||
set(OPENSSL_VERSION_MINOR 0)
|
|
||||||
set(OPENSSL_VERSION_FIX 5)
|
|
||||||
|
|
||||||
if(OPENSSL_USE_STATIC_LIBS)
|
|
||||||
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "dynamic")
|
|
||||||
message(WARNING "OPENSSL_USE_STATIC_LIBS is set, but vcpkg port openssl was built with dynamic linkage")
|
|
||||||
endif()
|
|
||||||
set(OPENSSL_USE_STATIC_LIBS_BAK "${OPENSSL_USE_STATIC_LIBS}")
|
|
||||||
set(OPENSSL_USE_STATIC_LIBS FALSE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(DEFINED OPENSSL_ROOT_DIR)
|
|
||||||
set(OPENSSL_ROOT_DIR_BAK "${OPENSSL_ROOT_DIR}")
|
|
||||||
endif()
|
|
||||||
get_filename_component(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
|
|
||||||
get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" DIRECTORY)
|
|
||||||
find_path(OPENSSL_INCLUDE_DIR NAMES openssl/ssl.h PATH "${OPENSSL_ROOT_DIR}/include" NO_DEFAULT_PATH)
|
|
||||||
if(MSVC)
|
|
||||||
find_library(LIB_EAY_DEBUG NAMES libcrypto PATHS "${OPENSSL_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH)
|
|
||||||
find_library(LIB_EAY_RELEASE NAMES libcrypto PATHS "${OPENSSL_ROOT_DIR}/lib" NO_DEFAULT_PATH)
|
|
||||||
find_library(SSL_EAY_DEBUG NAMES libssl PATHS "${OPENSSL_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH)
|
|
||||||
find_library(SSL_EAY_RELEASE NAMES libssl PATHS "${OPENSSL_ROOT_DIR}/lib" NO_DEFAULT_PATH)
|
|
||||||
elseif(WIN32)
|
|
||||||
find_library(LIB_EAY NAMES libcrypto crypto NAMES_PER_DIR)
|
|
||||||
find_library(SSL_EAY NAMES libssl ssl NAMES_PER_DIR)
|
|
||||||
else()
|
|
||||||
find_library(OPENSSL_CRYPTO_LIBRARY NAMES crypto)
|
|
||||||
find_library(OPENSSL_SSL_LIBRARY NAMES ssl)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
_find_package(${ARGS})
|
|
||||||
|
|
||||||
unset(OPENSSL_ROOT_DIR)
|
|
||||||
if(DEFINED OPENSSL_ROOT_DIR_BAK)
|
|
||||||
set(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR_BAK}")
|
|
||||||
unset(OPENSSL_ROOT_DIR_BAK)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(DEFINED OPENSSL_USE_STATIC_LIBS_BAK)
|
|
||||||
set(OPENSSL_USE_STATIC_LIBS "${OPENSSL_USE_STATIC_LIBS_BAK}")
|
|
||||||
unset(OPENSSL_USE_STATIC_LIBS_BAK)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(OPENSSL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
|
|
||||||
if(WIN32)
|
|
||||||
list(APPEND OPENSSL_LIBRARIES crypt32 ws2_32)
|
|
||||||
if(TARGET OpenSSL::Crypto)
|
|
||||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "crypt32;ws2_32")
|
|
||||||
endif()
|
|
||||||
if(TARGET OpenSSL::SSL)
|
|
||||||
set_property(TARGET OpenSSL::SSL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "crypt32;ws2_32")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
find_library(OPENSSL_DL_LIBRARY NAMES dl)
|
|
||||||
if(OPENSSL_DL_LIBRARY)
|
|
||||||
list(APPEND OPENSSL_LIBRARIES "dl")
|
|
||||||
if(TARGET OpenSSL::Crypto)
|
|
||||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("REQUIRED" IN_LIST ARGS)
|
|
||||||
find_package(Threads REQUIRED)
|
|
||||||
else()
|
|
||||||
find_package(Threads)
|
|
||||||
endif()
|
|
||||||
list(APPEND OPENSSL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
if(TARGET OpenSSL::Crypto)
|
|
||||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads")
|
|
||||||
endif()
|
|
||||||
if(TARGET OpenSSL::SSL)
|
|
||||||
set_property(TARGET OpenSSL::SSL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
cmake_policy(POP)
|
|
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "openssl",
|
|
||||||
"version": "3.0.5",
|
|
||||||
"port-version": 5,
|
|
||||||
"description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.",
|
|
||||||
"homepage": "https://www.openssl.org",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-get-vars",
|
|
||||||
"host": true,
|
|
||||||
"platform": "windows & !mingw & !uwp"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
|
|
||||||
index 66bc81d..2364633 100644
|
|
||||||
--- a/Configurations/10-main.conf
|
|
||||||
+++ b/Configurations/10-main.conf
|
|
||||||
@@ -1302,7 +1302,7 @@ my %targets = (
|
|
||||||
inherit_from => [ "BASE_Windows" ],
|
|
||||||
template => 1,
|
|
||||||
CC => "cl",
|
|
||||||
- CPP => '"$(CC)" /EP /C',
|
|
||||||
+ CPP => '$(CC) /EP /C',
|
|
||||||
CFLAGS => "/W3 /wd4090 /nologo",
|
|
||||||
coutflag => "/Fo",
|
|
||||||
LD => "link",
|
|
||||||
diff --git a/Configure b/Configure
|
|
||||||
index 8b234f6..e031768 100644
|
|
||||||
--- a/Configure
|
|
||||||
+++ b/Configure
|
|
||||||
@@ -680,7 +680,7 @@ my $list_separator_re =
|
|
||||||
# (we supported those before the change to "make variable" support.
|
|
||||||
my %user = (
|
|
||||||
AR => env('AR'),
|
|
||||||
- ARFLAGS => [],
|
|
||||||
+ ARFLAGS => [ env('ARFLAGS') || () ],
|
|
||||||
AS => undef,
|
|
||||||
ASFLAGS => [],
|
|
||||||
CC => env('CC'),
|
|
||||||
@@ -693,7 +693,7 @@ my %user = (
|
|
||||||
CPPINCLUDES => [], # Alternative for -I
|
|
||||||
CROSS_COMPILE => env('CROSS_COMPILE'),
|
|
||||||
HASHBANGPERL=> env('HASHBANGPERL') || env('PERL'),
|
|
||||||
- LD => undef,
|
|
||||||
+ LD => env('LD'),
|
|
||||||
LDFLAGS => [ env('LDFLAGS') || () ], # -L, -Wl,
|
|
||||||
LDLIBS => [ env('LDLIBS') || () ], # -l
|
|
||||||
MT => undef,
|
|
@ -1,220 +0,0 @@
|
|||||||
vcpkg_find_acquire_program(NASM)
|
|
||||||
get_filename_component(NASM_EXE_PATH "${NASM}" DIRECTORY)
|
|
||||||
vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}")
|
|
||||||
|
|
||||||
vcpkg_find_acquire_program(JOM)
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
||||||
set(OPENSSL_SHARED shared)
|
|
||||||
else()
|
|
||||||
set(OPENSSL_SHARED no-shared no-module)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_get_vars(cmake_vars_file)
|
|
||||||
include("${cmake_vars_file}")
|
|
||||||
|
|
||||||
set(ENV{CC} "${VCPKG_DETECTED_CMAKE_C_COMPILER}")
|
|
||||||
set(ENV{CXX} "${VCPKG_DETECTED_CMAKE_CXX_COMPILER}")
|
|
||||||
set(ENV{AR} "${VCPKG_DETECTED_CMAKE_AR}")
|
|
||||||
set(ENV{LD} "${VCPKG_DETECTED_CMAKE_LINKER}")
|
|
||||||
|
|
||||||
set(CONFIGURE_OPTIONS
|
|
||||||
enable-static-engine
|
|
||||||
enable-capieng
|
|
||||||
no-ssl2
|
|
||||||
no-tests
|
|
||||||
${OPENSSL_SHARED}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(DEFINED OPENSSL_USE_NOPINSHARED)
|
|
||||||
set(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS} no-pinshared)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(OPENSSL_NO_AUTOLOAD_CONFIG)
|
|
||||||
set(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS} no-autoload-config)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CONFIGURE_COMMAND "${PERL}" Configure ${CONFIGURE_OPTIONS})
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
||||||
set(OPENSSL_ARCH VC-WIN32)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
||||||
set(OPENSSL_ARCH VC-WIN64A)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
||||||
set(OPENSSL_ARCH VC-WIN32-ARM)
|
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
||||||
set(OPENSSL_ARCH VC-WIN64-ARM)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(OPENSSL_MAKEFILE "makefile")
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
|
|
||||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
||||||
|
|
||||||
# Clang always uses /Z7; Patching /Zi /Fd<Name> out of openssl requires more work.
|
|
||||||
if (VCPKG_DETECTED_CMAKE_C_COMPILER_ID MATCHES "Clang" OR VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
||||||
set(OPENSSL_BUILD_MAKES_PDBS OFF)
|
|
||||||
else()
|
|
||||||
set(OPENSSL_BUILD_MAKES_PDBS ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
# Copy openssl sources.
|
|
||||||
message(STATUS "Copying openssl release source files...")
|
|
||||||
file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
|
||||||
|
|
||||||
message(STATUS "Copying openssl release source files... done")
|
|
||||||
set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
|
||||||
|
|
||||||
set(OPENSSLDIR_RELEASE "${CURRENT_PACKAGES_DIR}")
|
|
||||||
|
|
||||||
# Remove install rules for pdbs if they don't exist
|
|
||||||
if(NOT OPENSSL_BUILD_MAKES_PDBS)
|
|
||||||
file(READ "${SOURCE_PATH_RELEASE}/Configurations/windows-makefile.tmpl" contents)
|
|
||||||
string(REGEX REPLACE [["\$\(PERL\)" "\$\(SRCDIR\)\\util\\copy.pl" \$\(INSTALL_(ENGINE|MODULE|SHLIB|PROGRAM)PDBS\)]] "echo " contents "${contents}")
|
|
||||||
string(REGEX REPLACE [["\$\(PERL\)" "\$\(SRCDIR\)\\util\\copy.pl" ossl_static.pdb]] "echo " contents "${contents}")
|
|
||||||
file(WRITE "${SOURCE_PATH_RELEASE}/Configurations/windows-makefile.tmpl" "${contents}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(ENV{CFLAGS} "${VCPKG_COMBINED_C_FLAGS_RELEASE}")
|
|
||||||
set(ENV{CXXFLAGS} "${VCPKG_COMBINED_CXX_FLAGS_RELEASE}")
|
|
||||||
set(ENV{LDFLAGS} "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE}")
|
|
||||||
set(ENV{ARFLAGS} "${VCPKG_COMBINED_STATIC_LINKER_FLAGS_RELEASE}")
|
|
||||||
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-rel")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
|
|
||||||
LOGNAME configure-perl-${TARGET_TRIPLET}-rel
|
|
||||||
)
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-rel done")
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-rel")
|
|
||||||
# Openssl's buildsystem has a race condition which will cause JOM to fail at some point.
|
|
||||||
# This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build.
|
|
||||||
make_directory("${SOURCE_PATH_RELEASE}/inc32/openssl")
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${JOM}" -k -j "${VCPKG_CONCURRENCY}" -f "${OPENSSL_MAKEFILE}"
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
|
|
||||||
OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log"
|
|
||||||
ERROR_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log"
|
|
||||||
)
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND "${JOM}" -j 1 -f "${OPENSSL_MAKEFILE}" install_sw install_ssldirs
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-rel-1)
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-rel done")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
# Copy openssl sources.
|
|
||||||
message(STATUS "Copying openssl debug source files...")
|
|
||||||
file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
||||||
|
|
||||||
message(STATUS "Copying openssl debug source files... done")
|
|
||||||
set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
||||||
|
|
||||||
# Remove install rules for pdbs if they don't exist
|
|
||||||
if(NOT OPENSSL_BUILD_MAKES_PDBS)
|
|
||||||
file(READ "${SOURCE_PATH_DEBUG}/Configurations/windows-makefile.tmpl" contents)
|
|
||||||
string(REGEX REPLACE [["\$\(PERL\)" "\$\(SRCDIR\)\\util\\copy.pl" \$\(INSTALL_(ENGINE|MODULE|SHLIB|PROGRAM)PDBS\)]] "echo " contents "${contents}")
|
|
||||||
string(REGEX REPLACE [["\$\(PERL\)" "\$\(SRCDIR\)\\util\\copy.pl" ossl_static.pdb]] "echo " contents "${contents}")
|
|
||||||
file(WRITE "${SOURCE_PATH_DEBUG}/Configurations/windows-makefile.tmpl" "${contents}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(OPENSSLDIR_DEBUG "${CURRENT_PACKAGES_DIR}/debug")
|
|
||||||
|
|
||||||
set(ENV{CFLAGS} "${VCPKG_COMBINED_C_FLAGS_DEBUG}")
|
|
||||||
set(ENV{CXXFLAGS} "${VCPKG_COMBINED_CXX_FLAGS_DEBUG}")
|
|
||||||
set(ENV{LDFLAGS} "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG}")
|
|
||||||
set(ENV{ARFLAGS} "${VCPKG_COMBINED_STATIC_LINKER_FLAGS_DEBUG}")
|
|
||||||
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-dbg")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
|
|
||||||
LOGNAME configure-perl-${TARGET_TRIPLET}-dbg
|
|
||||||
)
|
|
||||||
message(STATUS "Configure ${TARGET_TRIPLET}-dbg done")
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg")
|
|
||||||
make_directory("${SOURCE_PATH_DEBUG}/inc32/openssl")
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${JOM}" -k -j "${VCPKG_CONCURRENCY}" -f "${OPENSSL_MAKEFILE}"
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
|
|
||||||
OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log"
|
|
||||||
ERROR_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log"
|
|
||||||
)
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND "${JOM}" -j 1 -f "${OPENSSL_MAKEFILE}" install_sw install_ssldirs
|
|
||||||
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-dbg-1)
|
|
||||||
|
|
||||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND NOT VCPKG_DETECTED_CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/legacy.pdb" "${CURRENT_PACKAGES_DIR}/debug/bin/legacy.pdb")
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/ossl-modules/legacy.pdb" "${CURRENT_PACKAGES_DIR}/bin/legacy.pdb")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/certs")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/private")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/engines-1_1")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/engines-3")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/certs")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/engines-3")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/private")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
||||||
if(NOT VCPKG_BUILD_TYPE)
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/legacy.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/legacy.dll")
|
|
||||||
endif()
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/ossl-modules/legacy.dll" "${CURRENT_PACKAGES_DIR}/bin/legacy.dll")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/ossl-modules")
|
|
||||||
|
|
||||||
file(REMOVE
|
|
||||||
"${CURRENT_PACKAGES_DIR}/ct_log_list.cnf"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/openssl.cnf.dist"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/openssl.cnf"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist"
|
|
||||||
)
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl/")
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl.exe" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.exe")
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/openssl.cnf" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.cnf")
|
|
||||||
|
|
||||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl")
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
||||||
# They should be empty, only the exes deleted above were in these directories
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h"
|
|
||||||
"<winsock.h>"
|
|
||||||
"<winsock2.h>"
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openssl/rand.h"
|
|
||||||
"# include <windows.h>"
|
|
||||||
"#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include <windows.h>"
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1 +0,0 @@
|
|||||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "pthread",
|
|
||||||
"version-string": "3.0.0",
|
|
||||||
"port-version": 1,
|
|
||||||
"description": "empty package, linking to other port",
|
|
||||||
"dependencies": [
|
|
||||||
"pthreads"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
if (VCPKG_TARGET_IS_WINDOWS)
|
|
||||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO mrtazz/restclient-cpp
|
|
||||||
REF b782bd26539a3d1a8edcb6d8a3493b111f8fac66 #v2022-02-009
|
|
||||||
SHA512 992b2c067c7b672432a202fea6b5263ff51ca77facace5078077e77e57390d3ddcb99e0e20ad1a1595612efbb625d34f4d2cd8c4a2ac4bb33e3f9d5d28c2c579
|
|
||||||
HEAD_REF master
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
OPTIONS
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_GTest=TRUE
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_jsoncpp=TRUE
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/restclient-cpp)
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
# Remove includes in debug
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
||||||
|
|
||||||
# Handle copyright
|
|
||||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "restclient-cpp",
|
|
||||||
"version-date": "2022-02-09",
|
|
||||||
"description": "Simple REST client for C++. It wraps libcurl for HTTP requests.",
|
|
||||||
"homepage": "https://code.mrtazz.com/restclient-cpp/",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": [
|
|
||||||
"curl",
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,70 +0,0 @@
|
|||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO gabime/spdlog
|
|
||||||
REF v1.10.0
|
|
||||||
SHA512 e82ec0a0c813ed2f1c8a31a0f21dbb733d0a7bd8d05284feae3bd66040bc53ad47a93b26c3e389c7e5623cfdeba1854d690992c842748e072aab3e6e6ecc5666
|
|
||||||
HEAD_REF v1.x
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
||||||
FEATURES
|
|
||||||
benchmark SPDLOG_BUILD_BENCH
|
|
||||||
wchar SPDLOG_WCHAR_SUPPORT
|
|
||||||
)
|
|
||||||
|
|
||||||
# SPDLOG_WCHAR_FILENAMES can only be configured in triplet file since it is an alternative (not additive)
|
|
||||||
if(NOT DEFINED SPDLOG_WCHAR_FILENAMES)
|
|
||||||
set(SPDLOG_WCHAR_FILENAMES OFF)
|
|
||||||
endif()
|
|
||||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
|
||||||
if("wchar" IN_LIST FEATURES)
|
|
||||||
message(WARNING "Feature 'wchar' is only supported for Windows and has no effect on other platforms.")
|
|
||||||
elseif(SPDLOG_WCHAR_FILENAMES)
|
|
||||||
message(FATAL_ERROR "Build option 'SPDLOG_WCHAR_FILENAMES' is for Windows.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SPDLOG_BUILD_SHARED)
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
|
||||||
OPTIONS
|
|
||||||
${FEATURE_OPTIONS}
|
|
||||||
-DSPDLOG_FMT_EXTERNAL=ON
|
|
||||||
-DSPDLOG_INSTALL=ON
|
|
||||||
-DSPDLOG_BUILD_SHARED=${SPDLOG_BUILD_SHARED}
|
|
||||||
-DSPDLOG_WCHAR_FILENAMES=${SPDLOG_WCHAR_FILENAMES}
|
|
||||||
-DSPDLOG_BUILD_EXAMPLE=OFF
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/spdlog)
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
# use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above)
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled)
|
|
||||||
|
|
||||||
# add support for integration other than cmake
|
|
||||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h
|
|
||||||
"// #define SPDLOG_FMT_EXTERNAL"
|
|
||||||
"#ifndef SPDLOG_FMT_EXTERNAL\n#define SPDLOG_FMT_EXTERNAL\n#endif"
|
|
||||||
)
|
|
||||||
if(SPDLOG_WCHAR_SUPPORT)
|
|
||||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h
|
|
||||||
"// #define SPDLOG_WCHAR_TO_UTF8_SUPPORT"
|
|
||||||
"#ifndef SPDLOG_WCHAR_TO_UTF8_SUPPORT\n#define SPDLOG_WCHAR_TO_UTF8_SUPPORT\n#endif"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
if(SPDLOG_WCHAR_FILENAMES)
|
|
||||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h
|
|
||||||
"// #define SPDLOG_WCHAR_FILENAMES"
|
|
||||||
"#ifndef SPDLOG_WCHAR_FILENAMES\n#define SPDLOG_WCHAR_FILENAMES\n#endif"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/share)
|
|
||||||
|
|
||||||
# Handle copyright
|
|
||||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "spdlog",
|
|
||||||
"version-semver": "1.10.0",
|
|
||||||
"port-version": 1,
|
|
||||||
"description": "Very fast, header only, C++ logging library",
|
|
||||||
"homepage": "https://github.com/gabime/spdlog",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": [
|
|
||||||
"fmt",
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"features": {
|
|
||||||
"benchmark": {
|
|
||||||
"description": "Use google benchmark",
|
|
||||||
"dependencies": [
|
|
||||||
"benchmark"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"wchar": {
|
|
||||||
"description": "Build with wchar_t (Windows only)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user