Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libltdl] New port #27217

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ports/graphviz/ltdl-dlopen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/cmake/FindLTDL.cmake b/cmake/FindLTDL.cmake
index 0623f89..0918ae9 100644
--- a/cmake/FindLTDL.cmake
+++ b/cmake/FindLTDL.cmake
@@ -15,4 +15,4 @@ endif()
mark_as_advanced(LTDL_INCLUDE_DIR LTDL_LIBRARY)

set(LTDL_INCLUDE_DIRS ${LTDL_INCLUDE_DIR})
-set(LTDL_LIBRARIES ${LTDL_LIBRARY})
+set(LTDL_LIBRARIES ${LTDL_LIBRARY} ${CMAKE_DL_LIBS})
25 changes: 9 additions & 16 deletions ports/graphviz/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,20 @@ vcpkg_from_gitlab(
HEAD_REF main
PATCHES
0001-Fix-build.patch
ltdl-dlopen.patch
)

if(VCPKG_TARGET_IS_OSX)
message("${PORT} currently requires the following libraries from the system package manager:\n libtool\n\nThey can be installed with brew install libtool")
elseif(VCPKG_TARGET_IS_LINUX)
message("${PORT} currently requires the following libraries from the system package manager:\n libtool\n\nThey can be installed with apt-get install libtool")
else()
vcpkg_download_distfile(
LTDL_H_PATH
URLS "https://gitlab.com/graphviz/graphviz-windows-dependencies/-/raw/141d3a21be904fa8dc2ae3ed01d36684db07a35d/${VCPKG_TARGET_ARCHITECTURE}/include/ltdl.h"
FILENAME ltdl.h
SHA512 f2d20e849e35060536265f47014c40eb70e57dacd600a9db112fc465fbfa6a66217b44a8c3dc33039c260a27f09d9034b329b03cc28c32a22ec503fcd17b78cd
)
file(COPY ${LTDL_H_PATH} DESTINATION ${SOURCE_PATH}/lib/common)
set(EXTRA_CMAKE_OPTION "-DLTDL_INCLUDE_DIR=${SOURCE_PATH}/lib/common")
endif()

if(NOT VCPKG_TARGET_IS_WINDOWS)
set(EXTRA_CMAKE_OPTION "-DCMAKE_INSTALL_RPATH=${CURRENT_INSTALLED_DIR}/lib")
vcpkg_list(SET OPTIONS)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_list(APPEND OPTIONS "-DCMAKE_DISABLE_FIND_PACKAGE_LTDL=ON") # unsupported
else()
vcpkg_list(APPEND OPTIONS "-DCMAKE_INSTALL_RPATH=${CURRENT_INSTALLED_DIR}/lib")
endif()

if(VCPKG_HOST_IS_WINDOWS)
Expand All @@ -49,10 +44,11 @@ vcpkg_cmake_configure(
"-DGIT_EXECUTABLE=${GIT}"
"-DPython3_EXECUTABLE=${PYTHON3}"
"-DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf"
${EXTRA_CMAKE_OPTION}
${OPTIONS}
)

vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
Expand All @@ -66,14 +62,11 @@ if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB PLUGINS "${CURRENT_PACKAGES_DIR}/bin/gvplugin_*")
file(COPY ${PLUGINS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
vcpkg_execute_required_process(
COMMAND dot -c
COMMAND "${CURRENT_PACKAGES_DIR}/tools/${PORT}/dot" -c
WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}"
LOGNAME configure-plugins
)
file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/config6" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
endif()

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_fixup_pkgconfig()
6 changes: 5 additions & 1 deletion ports/graphviz/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "graphviz",
"version-semver": "2.49.1",
"port-version": 4,
"port-version": 5,
"description": "Graph Visualization Tools",
"homepage": "https://graphviz.org/",
"license": "EPL-1.0",
Expand All @@ -11,6 +11,10 @@
"getopt",
"libffi",
"libgd",
{
"name": "libltdl",
"platform": "!windows | mingw"
},
"pango",
{
"name": "pkgconf",
Expand Down
9 changes: 3 additions & 6 deletions ports/libcanberra/ltdl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ diff --git a/configure.ac b/configure.ac
index f68602d..a4e24b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,8 +140,12 @@ dnl We don't need any special variable for this though, since the user
@@ -140,8 +140,9 @@ dnl We don't need any special variable for this though, since the user
dnl can give the proper place to find libltdl through the standard
dnl variables like LDFLAGS and CPPFLAGS.

+LTDL_INIT
+if test -n "$LTDL_LDFLAGS"; then
+ LDFLAGS="$LDFLAGS $LTDL_LDFLAGS"
+fi
+AC_LIBTOOL_DLOPEN
AC_CHECK_HEADER([ltdl.h],
- [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL="-lltdl $LTDL_LDFLAGS $lt_cv_dlopen_libs"], [LIBLTDL=])],
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL="-lltdl $lt_cv_dlopen_libs"], [LIBLTDL=], [$lt_cv_dlopen_libs])],
[LIBLTDL=])

AS_IF([test "x$LIBLTDL" = "x"],
Expand Down
9 changes: 1 addition & 8 deletions ports/libcanberra/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if(VCPKG_TARGET_IS_OSX)
message("${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with brew install automake libtool")
else()
message("${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n ltdl-dev\n\nThey can be installed with apt-get install automake libtool ltdl-dev")
message("${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with apt-get install automake libtool")
endif()

vcpkg_download_distfile(ARCHIVE
Expand Down Expand Up @@ -36,14 +36,7 @@ foreach(feature IN ITEMS alsa gstreamer gtk3 null oss pulse)
endforeach()

if(VCPKG_TARGET_IS_OSX)
execute_process(
COMMAND brew --prefix libtool
OUTPUT_VARIABLE BREW_LIBTOOL_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
vcpkg_list(APPEND OPTIONS
"CPPFLAGS=-I${BREW_LIBTOOL_PATH}/include"
"LTDL_LDFLAGS=-L${BREW_LIBTOOL_PATH}/lib"
cc_cv_LDFLAGS__Wl___as_needed=no
cc_cv_LDFLAGS__Wl___gc_sections=no
)
Expand Down
3 changes: 2 additions & 1 deletion ports/libcanberra/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "libcanberra",
"version": "0.30",
"port-version": 3,
"port-version": 4,
"description": "An implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops",
"homepage": "http://0pointer.de/lennart/projects/libcanberra/",
"license": "LGPL-2.1-or-later",
"supports": "!windows | mingw",
"dependencies": [
"gettext",
"libltdl",
"libvorbis"
],
"default-features": [
Expand Down
36 changes: 36 additions & 0 deletions ports/libltdl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
set(VERSION "2.4.7") # Remove after tool update
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnu.org/pub/gnu/libtool/libtool-${VERSION}.tar.xz"
FILENAME "gnu-libtool-${VERSION}.tar.xz"
SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da
)

vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
)

if(VCPKG_TARGET_IS_OSX)
message("${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with brew install automake libtool")
else()
message("${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with apt-get install automake libtool")
endif()

vcpkg_list(SET OPTIONS "")
if(VCPKG_TARGET_IS_WINDOWS)
string(APPEND VCPKG_C_FLAGS " -D_CRT_SECURE_NO_WARNINGS")
string(APPEND VCPKG_CXX_FLAGS " -D_CRT_SECURE_NO_WARNINGS")
if(NOT VCPKG_TARGET_IS_MINGW)
vcpkg_list(APPEND OPTIONS ac_cv_header_dirent_h=no) # Ignore vcpkg port dirent
endif()
endif()

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}/libltdl"
AUTOCONFIG
OPTIONS
--enable-ltdl-install
${OPTIONS}
)
vcpkg_install_make()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/libltdl/COPYING.LIB")
8 changes: 8 additions & 0 deletions ports/libltdl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "libltdl",
"version": "2.4.7",
"description": "A system independent dlopen wrapper for GNU libtool",
"homepage": "https://www.gnu.org/software/libtool/",
"license": "LGPL-2.1-or-later",
"supports": "!uwp"
}
2 changes: 1 addition & 1 deletion ports/unixodbc/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vcpkg_from_github(
set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration")

if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX)
list(APPEND OPTIONS --with-included-ltdl)
#list(APPEND OPTIONS --with-included-ltdl)
endif()

vcpkg_configure_make(
Expand Down
7 changes: 5 additions & 2 deletions ports/unixodbc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "unixodbc",
"version": "2.3.11",
"port-version": 1,
"port-version": 2,
"description": "unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux, Mac OSX, and UNIX",
"homepage": "https://github.com/lurcher/unixODBC",
"license": "LGPL-2.1-only",
"supports": "osx | linux"
"supports": "osx | linux",
"dependencies": [
"libltdl"
]
}
3 changes: 3 additions & 0 deletions ports/xmlsec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
set(OPENSSL_LIBS "-lssl -lcrypto")
set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
foreach(lib IN LISTS CMAKE_DL_LIBS)
string(APPEND XMLSEC_CORE_LIBS " -l${lib}")
endforeach()
set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")

Expand Down
3 changes: 3 additions & 0 deletions ports/xmlsec/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "xmlsec",
"version": "1.2.34",
"port-version": 1,
"description": "XML Security Library is a C library based on LibXML2. The library supports major XML security standards.",
"homepage": "https://www.aleksey.com/xmlsec/",
"license": "X11 AND MPL-1.1",
"dependencies": [
"libltdl",
"libxml2",
"openssl",
{
Expand Down
12 changes: 8 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2754,7 +2754,7 @@
},
"graphviz": {
"baseline": "2.49.1",
"port-version": 4
"port-version": 5
},
"greatest": {
"baseline": "1.5.0",
Expand Down Expand Up @@ -3594,7 +3594,7 @@
},
"libcanberra": {
"baseline": "0.30",
"port-version": 3
"port-version": 4
},
"libcbor": {
"baseline": "0.9.0",
Expand Down Expand Up @@ -3908,6 +3908,10 @@
"baseline": "3.1.1",
"port-version": 1
},
"libltdl": {
"baseline": "2.4.7",
"port-version": 0
},
"liblzma": {
"baseline": "5.2.5",
"port-version": 6
Expand Down Expand Up @@ -7594,7 +7598,7 @@
},
"unixodbc": {
"baseline": "2.3.11",
"port-version": 1
"port-version": 2
},
"unqlite": {
"baseline": "1.1.9",
Expand Down Expand Up @@ -8050,7 +8054,7 @@
},
"xmlsec": {
"baseline": "1.2.34",
"port-version": 0
"port-version": 1
},
"xnnpack": {
"baseline": "2021-05-17",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/graphviz.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "12fb431a0231be55d0493bf127041236a0a88e78",
"version-semver": "2.49.1",
"port-version": 5
},
{
"git-tree": "14f5333a2eb91b052b2691132f48aefced3bf1df",
"version-semver": "2.49.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libcanberra.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ad646fe9be66ed682de9f9fabd6e3f971e2d7440",
"version": "0.30",
"port-version": 4
},
{
"git-tree": "3b2ba637761d93c1a71e356c0249c54933655b09",
"version": "0.30",
Expand Down
5 changes: 5 additions & 0 deletions versions/u-/unixodbc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ab41db2307baaecd3aa6af0659a4fcbaee43e6a0",
"version": "2.3.11",
"port-version": 2
},
{
"git-tree": "d5bf2c65c912060aaebaba66eb6ce1544d6dd7e6",
"version": "2.3.11",
Expand Down
5 changes: 5 additions & 0 deletions versions/x-/xmlsec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2b3f35c5fb2b00a2a375fdb4d2108d706952c6f9",
"version": "1.2.34",
"port-version": 1
},
{
"git-tree": "a41c14aae637b02b4e018902e0f9b67bcdef12f2",
"version": "1.2.34",
Expand Down