mirror of https://github.com/microsoft/vcpkg.git
[gpgme] Update 2.0.0, add separate gpgmepp port (#47299)
This commit is contained in:
parent
25d20d679f
commit
5310ca834d
|
|
@ -1,10 +1,8 @@
|
|||
vcpkg_download_distfile(tarball
|
||||
URLS
|
||||
"https://gnupg.org/ftp/gcrypt/gpgme/gpgme-${VERSION}.tar.bz2"
|
||||
"https://mirrors.dotsrc.org/gcrypt/gpgme/gpgme-${VERSION}.tar.bz2"
|
||||
"https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gpgme/gpgme-${VERSION}.tar.bz2"
|
||||
URLS "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gpgme/gpgme-${VERSION}.tar.bz2"
|
||||
"https://gnupg.org/ftp/gcrypt/gpgme/gpgme-${VERSION}.tar.bz2"
|
||||
FILENAME "gpgme-${VERSION}.tar.bz2"
|
||||
SHA512 3b5fc22a2f83576058ac14e744333f46df362b39f742d6c9e54a5a66828194a1312f5f365bdc15683e148821f5d591fa92a2daad83fc116f65dccf14e817ca48
|
||||
SHA512 ee58dc2a4273c740d5b9ef13cc655d5e600ddddd137fb85a781c31e8854829283b4ce241d7810a963d9a125d603213600f37e7d0c1ce3b3cf1b935e62cf60777
|
||||
)
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
|
|
@ -13,20 +11,14 @@ vcpkg_extract_source_archive(
|
|||
disable-docs.patch
|
||||
)
|
||||
|
||||
vcpkg_list(SET LANGUAGES)
|
||||
if("cpp" IN_LIST FEATURES)
|
||||
vcpkg_list(APPEND LANGUAGES "cpp")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
AUTOCONFIG
|
||||
vcpkg_make_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTORECONF
|
||||
OPTIONS
|
||||
--disable-gpgconf-test
|
||||
--disable-gpg-test
|
||||
--disable-gpgsm-test
|
||||
--disable-g13-test
|
||||
--enable-languages=${LANGUAGES}
|
||||
GPG_ERROR_CONFIG=/ # fake absolute path; gpgrt-config is used instead
|
||||
OPTIONS_RELEASE
|
||||
"GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/bin/gpgrt-config"
|
||||
|
|
@ -34,16 +26,13 @@ vcpkg_configure_make(
|
|||
"GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/debug/bin/gpgrt-config"
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
vcpkg_make_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# This port doesn't support the windows-only glib integration.
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gpgme-glib.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gpgme-glib.pc")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# CMake config needs work for linkage and build type.
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
|
||||
|
||||
set(install_prefix "${CURRENT_INSTALLED_DIR}")
|
||||
if(VCPKG_HOST_IS_WINDOWS)
|
||||
string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" install_prefix "${install_prefix}")
|
||||
|
|
@ -58,7 +47,7 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|||
vcpkg_install_copyright(COMMENT [[
|
||||
The library is distributed under the terms of the GNU Lesser General Public License (LGPL).
|
||||
The helper programs are distributed under the terms of the GNU General Public License (GPL).
|
||||
There are additonal notices about contributions that require these additional notices are distributed.
|
||||
There are additional notices about contributions that require these additional notices are distributed.
|
||||
]]
|
||||
FILE_LIST
|
||||
"${SOURCE_PATH}/COPYING.LESSER"
|
||||
|
|
|
|||
|
|
@ -1,20 +1,16 @@
|
|||
{
|
||||
"name": "gpgme",
|
||||
"version": "1.24.3",
|
||||
"version": "2.0.0",
|
||||
"description": "A library designed to make access to GnuPG easier for applications",
|
||||
"homepage": "https://gnupg.org/software/gpgme/",
|
||||
"license": null,
|
||||
"supports": "!windows | mingw",
|
||||
"dependencies": [
|
||||
"libassuan",
|
||||
"libgpg-error"
|
||||
],
|
||||
"default-features": [
|
||||
"cpp"
|
||||
],
|
||||
"features": {
|
||||
"cpp": {
|
||||
"description": "C++ bindings"
|
||||
"libgpg-error",
|
||||
{
|
||||
"name": "vcpkg-make",
|
||||
"host": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index c121025..1f0554f 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -194,14 +194,14 @@ configure_package_config_file(GpgmeppConfig.cmake.in
|
||||
)
|
||||
|
||||
if(ENABLE_SHARED)
|
||||
- if (MSVC)
|
||||
+ if (0)
|
||||
install(TARGETS Gpgmepp EXPORT GpgmeppTargets "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
|
||||
else()
|
||||
install(TARGETS Gpgmepp EXPORT GpgmeppTargets)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_STATIC)
|
||||
- install(TARGETS GpgmeppStatic)
|
||||
+ install(TARGETS GpgmeppStatic EXPORT GpgmeppTargets)
|
||||
endif()
|
||||
|
||||
set(pkgconfig_host_line "")
|
||||
@@ -224,7 +224,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gpgmepp_version.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gpgme++)
|
||||
|
||||
# for now we install the cmake config files only for the shared library
|
||||
-if(ENABLE_SHARED)
|
||||
+if(1)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GpgmeppConfigVersion.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/GpgmeppConfig.cmake
|
||||
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 33a55c7..ed169aa 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -62,10 +62,8 @@ include(ECMUninstallTarget)
|
||||
include(FeatureSummary)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
-find_package(LibGpgError ${GPG_ERROR_REQUIRED_VERSION})
|
||||
-set_package_properties(LibGpgError PROPERTIES TYPE REQUIRED)
|
||||
-find_package(Gpgme ${GPGME_REQUIRED_VERSION})
|
||||
-set_package_properties(Gpgme PROPERTIES TYPE REQUIRED)
|
||||
+find_package(PkgConfig REQUIRED)
|
||||
+pkg_check_modules(Gpgme "gpgme>=${GPGME_REQUIRED_VERSION}" "gpg-error>=${GPG_ERROR_REQUIRED_VERSION}" REQUIRED)
|
||||
|
||||
g10_get_full_version()
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index d28ed8f..989a011 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -126,11 +126,11 @@ if(ENABLE_SHARED)
|
||||
target_sources(Gpgmepp PRIVATE ${Gpgmepp_SOURCES})
|
||||
|
||||
target_include_directories(Gpgmepp
|
||||
- PRIVATE ${LibGpgError_INCLUDE_DIRS}
|
||||
+ PRIVATE ${Gpgme_INCLUDE_DIRS}
|
||||
INTERFACE $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
- target_link_libraries(Gpgmepp Gpgme::Gpgme)
|
||||
+ target_link_libraries(Gpgmepp PRIVATE ${Gpgme_LINK_LIBRARIES})
|
||||
|
||||
set_target_properties(Gpgmepp PROPERTIES
|
||||
OUTPUT_NAME gpgmepp
|
||||
@@ -142,11 +142,11 @@ if(ENABLE_STATIC)
|
||||
target_sources(GpgmeppStatic PRIVATE ${Gpgmepp_SOURCES})
|
||||
|
||||
target_include_directories(GpgmeppStatic
|
||||
- PRIVATE ${LibGpgError_INCLUDE_DIRS}
|
||||
+ PRIVATE ${Gpgme_INCLUDE_DIRS}
|
||||
INTERFACE $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
- target_link_libraries(GpgmeppStatic Gpgme::Gpgme)
|
||||
+ target_link_libraries(GpgmeppStatic PRIVATE ${Gpgme_LINK_LIBRARIES})
|
||||
|
||||
set_target_properties(GpgmeppStatic PROPERTIES
|
||||
OUTPUT_NAME gpgmepp
|
||||
diff --git a/src/GpgmeppConfig.cmake.in b/src/GpgmeppConfig.cmake.in
|
||||
index 8969602..4d5fedd 100644
|
||||
--- a/src/GpgmeppConfig.cmake.in
|
||||
+++ b/src/GpgmeppConfig.cmake.in
|
||||
@@ -20,9 +20,5 @@
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
-include(CMakeFindDependencyMacro)
|
||||
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
-find_dependency(LibGpgError "@GPG_ERROR_REQUIRED_VERSION@")
|
||||
-find_dependency(Gpgme "@GPGME_REQUIRED_VERSION@")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/GpgmeppTargets.cmake")
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 1772d69..9bf9863 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -45,7 +45,7 @@ else
|
||||
tests =
|
||||
endif
|
||||
|
||||
-SUBDIRS = src ${tests} doc lang
|
||||
+SUBDIRS = src ${tests} lang
|
||||
|
||||
# Fix the version of the spec file.
|
||||
dist-hook: gen-ChangeLog
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
vcpkg_download_distfile(tarball
|
||||
URLS "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gpgmepp/gpgmepp-${VERSION}.tar.xz"
|
||||
"https://gnupg.org/ftp/gcrypt/gpgme/gpgmepp-${VERSION}.tar.xz"
|
||||
FILENAME "gpgmepp-${VERSION}.tar.xz"
|
||||
SHA512 ed98f5dfd45efa216d0fc983ad650b46235b28a8e4faaf4349bc8e14cf76758e3099cfdc61e549f07e57d663e82550f373641f67303c5f2891b00fa5b419e927
|
||||
)
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${tarball}"
|
||||
PATCHES
|
||||
cmake-config.diff
|
||||
dependencies.diff
|
||||
)
|
||||
file(WRITE "${SOURCE_PATH}/VERSION" "${VERSION}")
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
set(ENV{PKG_CONFIG} "${PKGCONFIG}")
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
||||
-DENABLE_SHARED=${ENABLE_SHARED}
|
||||
-DENABLE_STATIC=${ENABLE_STATIC}
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/Gpgmepp")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.LIB")
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "gpgmepp",
|
||||
"version": "2.0.0",
|
||||
"description": "A C++ binding for gpgme",
|
||||
"homepage": "https://gnupg.org/software/gpgme/",
|
||||
"license": "LGPL-2.0-or-later",
|
||||
"dependencies": [
|
||||
"gpgme",
|
||||
"libgpg-error",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -3401,7 +3401,11 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"gpgme": {
|
||||
"baseline": "1.24.3",
|
||||
"baseline": "2.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"gpgmepp": {
|
||||
"baseline": "2.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"gpgmm": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "32b19979f8ee8d0288885786718f0c8e8c5d3969",
|
||||
"version": "2.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "383136db526f4875a32ca65e1605e2e0b08426ad",
|
||||
"version": "1.24.3",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b900118dfc9a93bb85a3ae93667a01eff64e4c4c",
|
||||
"version": "2.0.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue