mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:28:59 +08:00
[vcpkg baseline][lensfun] Fix and cleanup (#36342)
* [lensfun] Add feature and fix python module * [lensfun] Cleanup, fix, update license * versions * [lensfun] No python on windows
This commit is contained in:
parent
5604c3004f
commit
3b21386457
@ -1,5 +1,3 @@
|
||||
#vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO lensfun/lensfun
|
||||
@ -12,12 +10,31 @@ vcpkg_from_github(
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LENSFUN_STATIC_LIB)
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" LENSFUN_STATIC_CRT)
|
||||
|
||||
|
||||
set(LENSFUN_EXTRA_OPTS "")
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
if("python" IN_LIST FEATURES)
|
||||
find_file(INITIAL_PYTHON3
|
||||
NAMES "python3${VCPKG_HOST_EXECUTABLE_SUFFIX}" "python${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
||||
PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/python3"
|
||||
NO_DEFAULT_PATH
|
||||
REQUIRED
|
||||
)
|
||||
x_vcpkg_get_python_packages(OUT_PYTHON_VAR PYTHON3
|
||||
PYTHON_EXECUTABLE "${INITIAL_PYTHON3}"
|
||||
PYTHON_VERSION "3"
|
||||
PACKAGES setuptools
|
||||
)
|
||||
else()
|
||||
set(PYTHON3 "false")
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND LENSFUN_EXTRA_OPTS -DPLATFORM_WINDOWS=ON)
|
||||
endif()
|
||||
|
||||
if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
list(APPEND LENSFUN_EXTRA_OPTS -DBUILD_FOR_SSE=OFF -DBUILD_FOR_SSE2=OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
@ -26,25 +43,24 @@ vcpkg_cmake_configure(
|
||||
-DBUILD_WITH_MSVC_STATIC_RUNTIME=${LENSFUN_STATIC_CRT}
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_DOC=OFF
|
||||
-DINSTALL_PYTHON_MODULE=ON
|
||||
-DINSTALL_HELPER_SCRIPTS=OFF
|
||||
-DBUILD_LENSTOOL=OFF
|
||||
-DBUILD_FOR_SSE=OFF
|
||||
-DBUILD_FOR_SSE2=OFF
|
||||
-DINSTALL_HELPER_SCRIPTS=OFF
|
||||
"-DPYTHON=${PYTHON3}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if (LENSFUN_STATIC_LIB)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
)
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/docs/gpl-3.0.txt" "${SOURCE_PATH}/docs/lgpl-3.0.txt")
|
||||
file(READ "${SOURCE_PATH}/README.md" license_comment)
|
||||
string(REGEX REPLACE "^.*\n(LICENSE\n)---+\n(.*)" "\\1\\2" license_comment "${license_comment}")
|
||||
string(REGEX REPLACE "[^\n]+\n---+.*\$" "" license_comment "${license_comment}")
|
||||
vcpkg_install_copyright(
|
||||
COMMENT "${license_comment}"
|
||||
FILE_LIST "${SOURCE_PATH}/docs/gpl-3.0.txt" "${SOURCE_PATH}/docs/lgpl-3.0.txt"
|
||||
)
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "lensfun",
|
||||
"version": "0.3.4",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Provide a open source database of photographic lenses and their characteristics",
|
||||
"homepage": "https://scnlib.dev/",
|
||||
"license": "LGPL-3.0 OR GPL-3.0",
|
||||
"homepage": "https://lensfun.github.io/",
|
||||
"license": null,
|
||||
"supports": "!arm",
|
||||
"dependencies": [
|
||||
"glib",
|
||||
@ -16,5 +16,15 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"python": {
|
||||
"description": "Build python module",
|
||||
"supports": "native & !windows",
|
||||
"dependencies": [
|
||||
"python3",
|
||||
"vcpkg-get-python-packages"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4042,7 +4042,7 @@
|
||||
},
|
||||
"lensfun": {
|
||||
"baseline": "0.3.4",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"leptonica": {
|
||||
"baseline": "1.83.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "84eb6a4d2a0d8d670e0f54ec70bb4ad36cb004df",
|
||||
"version": "0.3.4",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "a085269b70f184d8dbf07c595e37ce336bd79906",
|
||||
"version": "0.3.4",
|
||||
|
Loading…
Reference in New Issue
Block a user