From c92408defd283bc3ad55839a2b54c06a16554edc Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 13 Oct 2022 08:00:15 +0200 Subject: [PATCH 01/10] Add libltdl --- ports/libltdl/portfile.cmake | 37 ++++++++++++++++++++++++++++++++++++ ports/libltdl/vcpkg.json | 8 ++++++++ 2 files changed, 45 insertions(+) create mode 100644 ports/libltdl/portfile.cmake create mode 100644 ports/libltdl/vcpkg.json diff --git a/ports/libltdl/portfile.cmake b/ports/libltdl/portfile.cmake new file mode 100644 index 00000000000000..29fc90d6d503f4 --- /dev/null +++ b/ports/libltdl/portfile.cmake @@ -0,0 +1,37 @@ +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_ex( + OUT_SOURCE_PATH 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") diff --git a/ports/libltdl/vcpkg.json b/ports/libltdl/vcpkg.json new file mode 100644 index 00000000000000..a07da2f6c21e90 --- /dev/null +++ b/ports/libltdl/vcpkg.json @@ -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" +} From 64b6eb0cdbb01395f2663441c988f4544f45c740 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 13 Oct 2022 09:03:56 +0200 Subject: [PATCH 02/10] [libcanberra] Use port libltdl --- ports/libcanberra/ltdl-dlopen.patch | 26 +++++++++++++++++++++++++ ports/libcanberra/pkgconfig.patch | 12 ------------ ports/libcanberra/portfile.cmake | 30 +++-------------------------- ports/libcanberra/vcpkg.json | 3 ++- 4 files changed, 31 insertions(+), 40 deletions(-) create mode 100644 ports/libcanberra/ltdl-dlopen.patch delete mode 100644 ports/libcanberra/pkgconfig.patch diff --git a/ports/libcanberra/ltdl-dlopen.patch b/ports/libcanberra/ltdl-dlopen.patch new file mode 100644 index 00000000000000..ab03c25266f27d --- /dev/null +++ b/ports/libcanberra/ltdl-dlopen.patch @@ -0,0 +1,26 @@ +diff --git a/configure.ac b/configure.ac +index f68602d..a4e24b3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -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. + ++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 $lt_cv_dlopen_libs"], [LIBLTDL=], [$lt_cv_dlopen_libs])], + [LIBLTDL=]) + + AS_IF([test "x$LIBLTDL" = "x"], +diff --git a/libcanberra.pc.in b/libcanberra.pc.in +index 0a5c7a1..a6a989b 100644 +--- a/libcanberra.pc.in ++++ b/libcanberra.pc.in +@@ -7,5 +7,6 @@ Name: libcanberra + Description: Event Sound API + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lcanberra @PTHREAD_LIBS@ ++Libs.private: @LIBLTDL@ + Cflags: -D_REENTRANT -I${includedir} + Requires: diff --git a/ports/libcanberra/pkgconfig.patch b/ports/libcanberra/pkgconfig.patch deleted file mode 100644 index 7179e5b673f2d3..00000000000000 --- a/ports/libcanberra/pkgconfig.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/libcanberra.pc.in b/libcanberra.pc.in -index 0a5c7a1..91a9e39 100644 ---- a/libcanberra.pc.in -+++ b/libcanberra.pc.in -@@ -7,5 +7,7 @@ Name: libcanberra - Description: Event Sound API - Version: @PACKAGE_VERSION@ - Libs: -L${libdir} -lcanberra @PTHREAD_LIBS@ -+Libs.private: @LIBS_PRIVATE@ - Cflags: -D_REENTRANT -I${includedir} -+Cflags.private: @CFLAGS_PRIVATE@ - Requires: diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index 9b862ca23eb998..1a663f5a25e265 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -1,6 +1,5 @@ set(VERSION 0.30) set(PATCHES - pkgconfig.patch undefined_reference.diff # https://sources.debian.org/patches/libcanberra/0.30-7/ gtk_dont_assume_x11.patch # likewise 03_onlyshowin_unity.patch # likewise @@ -26,28 +25,11 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE "${ARCHIVE}" REF ${VERSION} - PATCHES ${PATCHES} + PATCHES + ${PATCHES} + ltdl-dlopen.patch ) -set(EXTRA_CPPFLAGS) -set(EXTRA_LDFLAGS) - -#libltdl fixes -if(VCPKG_TARGET_IS_OSX) - execute_process( - COMMAND brew --prefix libtool - OUTPUT_VARIABLE BREW_LIBTOOL_PATH - ) - string(STRIP ${BREW_LIBTOOL_PATH} BREW_LIBTOOL_PATH) - - set(LIBS_PRIVATE "-L${BREW_LIBTOOL_PATH}/lib -lltdl") - set(CFLAGS_PRIVATE "-I${BREW_LIBTOOL_PATH}/include") - set(EXTRA_LDFLAGS "LDFLAGS=${LIBS_PRIVATE}") - set(EXTRA_CPPFLAGS "CPPFLAGS=${CFLAGS_PRIVATE}") -else() - set(LIBS_PRIVATE "-lltdl") -endif() - if (NOT "alsa" IN_LIST FEATURES) list(APPEND FEATURES_BACKENDS "--disable-alsa") endif() @@ -75,15 +57,9 @@ vcpkg_configure_make( --disable-silent-rules --disable-tdb ${FEATURES_BACKENDS} - ${EXTRA_CPPFLAGS} - ${EXTRA_LDFLAGS} ) vcpkg_install_make() - -configure_file("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY) -configure_file("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY) - vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/libcanberra/vcpkg.json b/ports/libcanberra/vcpkg.json index 44c64d07b21e44..f333bc57d6093a 100644 --- a/ports/libcanberra/vcpkg.json +++ b/ports/libcanberra/vcpkg.json @@ -1,11 +1,12 @@ { "name": "libcanberra", "version": "0.30", - "port-version": 2, + "port-version": 3, "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/", "supports": "!(windows | uwp)", "dependencies": [ + "libltdl", "libvorbis" ], "default-features": [ From 345c585b252be95fcca957c139281b2ad873e612 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 13 Oct 2022 09:12:38 +0200 Subject: [PATCH 03/10] [libcanberra] Control dependencies, trim patches --- ports/libcanberra/gtk_dont_assume_x11.patch | 70 --------------------- ports/libcanberra/macos_fix.patch | 14 ----- ports/libcanberra/portfile.cmake | 22 ++++--- ports/libcanberra/undefined_reference.diff | 40 ------------ 4 files changed, 12 insertions(+), 134 deletions(-) delete mode 100644 ports/libcanberra/gtk_dont_assume_x11.patch delete mode 100644 ports/libcanberra/macos_fix.patch delete mode 100644 ports/libcanberra/undefined_reference.diff diff --git a/ports/libcanberra/gtk_dont_assume_x11.patch b/ports/libcanberra/gtk_dont_assume_x11.patch deleted file mode 100644 index efbc15367724bb..00000000000000 --- a/ports/libcanberra/gtk_dont_assume_x11.patch +++ /dev/null @@ -1,70 +0,0 @@ -From c0620e432650e81062c1967cc669829dbd29b310 Mon Sep 17 00:00:00 2001 -From: Michael Meeks -Date: Fri, 9 Nov 2012 16:16:40 +0000 -Subject: gtk: Don't assume all GdkDisplays are GdkX11Displays: - broadway/wayland - ---- - src/canberra-gtk-module.c | 15 +++++++++++++++ - src/canberra-gtk.c | 5 +++++ - 2 files changed, 20 insertions(+) - -diff --git a/src/canberra-gtk-module.c b/src/canberra-gtk-module.c -index 67791f0..c1532ab 100644 ---- a/src/canberra-gtk-module.c -+++ b/src/canberra-gtk-module.c -@@ -307,6 +307,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { - guchar *data = NULL; - gint ret = -1; - -+#ifdef GDK_IS_X11_DISPLAY -+ if (!GDK_IS_X11_DISPLAY(d)) -+ return 0; -+#endif -+ - if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), - gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), - 0, G_MAXLONG, False, XA_CARDINAL, &type_return, -@@ -335,6 +340,11 @@ static gint display_get_desktop(GdkDisplay *d) { - guchar *data = NULL; - gint ret = -1; - -+#ifdef GDK_IS_X11_DISPLAY -+ if (!GDK_IS_X11_DISPLAY(d)) -+ return 0; -+#endif -+ - if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)), - gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"), - 0, G_MAXLONG, False, XA_CARDINAL, &type_return, -@@ -365,6 +375,11 @@ static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) { - gboolean ret = FALSE; - Atom xembed; - -+#ifdef GDK_IS_X11_DISPLAY -+ if (!GDK_IS_X11_DISPLAY(d)) -+ return FALSE; -+#endif -+ - /* Gnome Panel applets are XEMBED windows. We need to make sure we - * ignore them */ - -diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c -index 34446f5..08cb668 100644 ---- a/src/canberra-gtk.c -+++ b/src/canberra-gtk.c -@@ -185,6 +185,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { - guchar *data = NULL; - gint ret = -1; - -+#ifdef GDK_IS_X11_DISPLAY -+ if (!GDK_IS_X11_DISPLAY(d)) -+ return 0; -+#endif -+ - if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), - gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), - 0, G_MAXLONG, False, XA_CARDINAL, &type_return, --- -cgit v0.12 - diff --git a/ports/libcanberra/macos_fix.patch b/ports/libcanberra/macos_fix.patch deleted file mode 100644 index e7f9016e721c3a..00000000000000 --- a/ports/libcanberra/macos_fix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index f68602d..1451747 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -115,8 +115,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ - AC_SUBST([WARNINGFLAGS], $with_cflags) - - CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ -- -Wl,--as-needed \ -- -Wl,--gc-sections]) -+]) - AC_SUBST([GCLDFLAGS], $with_ldflags) - - #### libtool stuff #### diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index 1a663f5a25e265..666fd2e0772fdf 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -1,13 +1,4 @@ set(VERSION 0.30) -set(PATCHES - undefined_reference.diff # https://sources.debian.org/patches/libcanberra/0.30-7/ - gtk_dont_assume_x11.patch # likewise - 03_onlyshowin_unity.patch # likewise -) - -if(VCPKG_TARGET_IS_OSX) - list(APPEND PATCHES macos_fix.patch) -endif() 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") @@ -26,8 +17,8 @@ vcpkg_extract_source_archive_ex( ARCHIVE "${ARCHIVE}" REF ${VERSION} PATCHES - ${PATCHES} ltdl-dlopen.patch + 03_onlyshowin_unity.patch ) if (NOT "alsa" IN_LIST FEATURES) @@ -46,17 +37,28 @@ if (NOT "pulse" IN_LIST FEATURES) list(APPEND FEATURES_BACKENDS "--disable-pulse") endif() +vcpkg_list(SET options) +if(VCPKG_TARGET_IS_OSX) + vcpkg_list(APPEND options + cc_cv_LDFLAGS__Wl___as_needed=no + cc_cv_LDFLAGS__Wl___gc_sections=no + ) +endif() set(ENV{GTKDOCIZE} true) vcpkg_configure_make( AUTOCONFIG SOURCE_PATH "${SOURCE_PATH}" OPTIONS + --disable-gtk + --disable-gtk3 --disable-gtk-doc --disable-lynx --disable-silent-rules --disable-tdb + --disable-udev ${FEATURES_BACKENDS} + ) vcpkg_install_make() diff --git a/ports/libcanberra/undefined_reference.diff b/ports/libcanberra/undefined_reference.diff deleted file mode 100644 index 138fc19fc74f62..00000000000000 --- a/ports/libcanberra/undefined_reference.diff +++ /dev/null @@ -1,40 +0,0 @@ -Description: Fix FTBFS with binutils-gold -Author: Bart Martens -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555081 - ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -341,6 +341,7 @@ libcanberra_gtk3_la_CFLAGS = \ - $(GTK3_CFLAGS) - libcanberra_gtk3_la_LIBADD = \ - $(GTK3_LIBS) \ -+ -lX11 \ - libcanberra.la - libcanberra_gtk3_la_LDFLAGS = \ - -export-dynamic -version-info $(LIBCANBERRA_GTK_VERSION_INFO) -@@ -351,6 +352,8 @@ libcanberra_gtk3_module_la_CFLAGS = \ - $(GTK3_CFLAGS) - libcanberra_gtk3_module_la_LIBADD = \ - $(GTK3_LIBS) \ -+ -lX11 \ -+ -lgmodule-2.0 \ - libcanberra.la \ - libcanberra-gtk3.la - libcanberra_gtk3_module_la_LDFLAGS = \ -@@ -379,6 +382,7 @@ libcanberra_gtk_la_CFLAGS = \ - $(GTK_CFLAGS) - libcanberra_gtk_la_LIBADD = \ - $(GTK_LIBS) \ -+ -lX11 \ - libcanberra.la - libcanberra_gtk_la_LDFLAGS = \ - -export-dynamic -version-info $(LIBCANBERRA_GTK_VERSION_INFO) -@@ -389,6 +393,8 @@ libcanberra_gtk_module_la_CFLAGS = \ - $(GTK_CFLAGS) - libcanberra_gtk_module_la_LIBADD = \ - $(GTK_LIBS) \ -+ -lX11 \ -+ -lgmodule-2.0 \ - libcanberra.la \ - libcanberra-gtk.la - libcanberra_gtk_module_la_LDFLAGS = \ From 06447da515a3c66b0d2747f1804686c6bddc9f8e Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 13 Oct 2022 09:21:40 +0200 Subject: [PATCH 04/10] [graphviz] Use port libltdl --- ports/graphviz/portfile.cmake | 9 --------- ports/graphviz/vcpkg.json | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ports/graphviz/portfile.cmake b/ports/graphviz/portfile.cmake index 3310b5be75839f..8346d16e16e55c 100644 --- a/ports/graphviz/portfile.cmake +++ b/ports/graphviz/portfile.cmake @@ -15,15 +15,6 @@ 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) diff --git a/ports/graphviz/vcpkg.json b/ports/graphviz/vcpkg.json index ea8b7ad360160d..bdb207a0b575c4 100644 --- a/ports/graphviz/vcpkg.json +++ b/ports/graphviz/vcpkg.json @@ -11,6 +11,7 @@ "getopt", "libffi", "libgd", + "libltdl", "pango", { "name": "pkgconf", From c20b02811a2112c7b897b0d2b7ecda4c9fa30de3 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 13 Oct 2022 09:27:52 +0200 Subject: [PATCH 05/10] More ltdl usage [skip actions] --- ports/unixodbc/portfile.cmake | 2 +- ports/unixodbc/vcpkg.json | 5 ++++- ports/xmlsec/vcpkg.json | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/unixodbc/portfile.cmake b/ports/unixodbc/portfile.cmake index c2d5f9776372c4..01124774a1eec9 100644 --- a/ports/unixodbc/portfile.cmake +++ b/ports/unixodbc/portfile.cmake @@ -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( diff --git a/ports/unixodbc/vcpkg.json b/ports/unixodbc/vcpkg.json index 4f3457179b6258..4c172d0b5d6fe2 100644 --- a/ports/unixodbc/vcpkg.json +++ b/ports/unixodbc/vcpkg.json @@ -5,5 +5,8 @@ "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" + ] } diff --git a/ports/xmlsec/vcpkg.json b/ports/xmlsec/vcpkg.json index c09ebc45e816ce..54cb8c3a5127ab 100644 --- a/ports/xmlsec/vcpkg.json +++ b/ports/xmlsec/vcpkg.json @@ -1,9 +1,11 @@ { "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/", "dependencies": [ + "libltdl", "libxml2", "openssl", { From 7b2820e45c6430a8b43fc6b55bfdafba33b20c89 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 25 Oct 2022 09:19:11 +0200 Subject: [PATCH 06/10] Fix graphviz --- ports/graphviz/ltdl-dlopen.patch | 10 ++++++++++ ports/graphviz/portfile.cmake | 16 +++++++++------- ports/graphviz/vcpkg.json | 7 +++++-- 3 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 ports/graphviz/ltdl-dlopen.patch diff --git a/ports/graphviz/ltdl-dlopen.patch b/ports/graphviz/ltdl-dlopen.patch new file mode 100644 index 00000000000000..642853ed9e643d --- /dev/null +++ b/ports/graphviz/ltdl-dlopen.patch @@ -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}) diff --git a/ports/graphviz/portfile.cmake b/ports/graphviz/portfile.cmake index 8346d16e16e55c..ef6f799e48c5ee 100644 --- a/ports/graphviz/portfile.cmake +++ b/ports/graphviz/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_gitlab( HEAD_REF main PATCHES 0001-Fix-build.patch + ltdl-dlopen.patch ) if(VCPKG_TARGET_IS_OSX) @@ -17,8 +18,11 @@ 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") 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) @@ -40,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") @@ -57,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() diff --git a/ports/graphviz/vcpkg.json b/ports/graphviz/vcpkg.json index bdb207a0b575c4..fc3d5b3f934a9b 100644 --- a/ports/graphviz/vcpkg.json +++ b/ports/graphviz/vcpkg.json @@ -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", @@ -11,7 +11,10 @@ "getopt", "libffi", "libgd", - "libltdl", + { + "name": "libltdl", + "platform": "!windows | mingw" + }, "pango", { "name": "pkgconf", From 4958e7680863a77c4cf2a0aa80c27c2c733af36b Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 25 Oct 2022 09:45:01 +0200 Subject: [PATCH 07/10] Fix xmlsec --- ports/xmlsec/CMakeLists.txt | 3 +++ ports/xmlsec/vcpkg.json | 1 + 2 files changed, 4 insertions(+) diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt index cf019d51c670df..75ef52baef1bb5 100644 --- a/ports/xmlsec/CMakeLists.txt +++ b/ports/xmlsec/CMakeLists.txt @@ -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}") diff --git a/ports/xmlsec/vcpkg.json b/ports/xmlsec/vcpkg.json index 54cb8c3a5127ab..4bdc9ffc2cea89 100644 --- a/ports/xmlsec/vcpkg.json +++ b/ports/xmlsec/vcpkg.json @@ -4,6 +4,7 @@ "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", From c26b4f80a3dcce561048fba9a5d6b20afbb7c045 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 25 Oct 2022 10:00:04 +0200 Subject: [PATCH 08/10] port-version --- ports/unixodbc/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/unixodbc/vcpkg.json b/ports/unixodbc/vcpkg.json index 4c172d0b5d6fe2..b326afc94682e8 100644 --- a/ports/unixodbc/vcpkg.json +++ b/ports/unixodbc/vcpkg.json @@ -1,7 +1,7 @@ { "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", From a7c4b605e58683fe7f5a363a902aeb9d784cf8c4 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 26 Oct 2022 05:37:42 +0200 Subject: [PATCH 09/10] Fix deprecated function --- ports/libltdl/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/libltdl/portfile.cmake b/ports/libltdl/portfile.cmake index 29fc90d6d503f4..876f3f1d4b1964 100644 --- a/ports/libltdl/portfile.cmake +++ b/ports/libltdl/portfile.cmake @@ -5,8 +5,7 @@ vcpkg_download_distfile(ARCHIVE SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da ) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH +vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${ARCHIVE}" ) From a2ef4f0eed2b7fa3d7094789c305fa01c39eda61 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 26 Oct 2022 09:16:07 +0200 Subject: [PATCH 10/10] Update versions --- versions/baseline.json | 12 ++++++++---- versions/g-/graphviz.json | 5 +++++ versions/l-/libcanberra.json | 5 +++++ versions/u-/unixodbc.json | 5 +++++ versions/x-/xmlsec.json | 5 +++++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 8a1fb05dc71f8c..0d60959fc7316e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2754,7 +2754,7 @@ }, "graphviz": { "baseline": "2.49.1", - "port-version": 4 + "port-version": 5 }, "greatest": { "baseline": "1.5.0", @@ -3594,7 +3594,7 @@ }, "libcanberra": { "baseline": "0.30", - "port-version": 3 + "port-version": 4 }, "libcbor": { "baseline": "0.9.0", @@ -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 @@ -7594,7 +7598,7 @@ }, "unixodbc": { "baseline": "2.3.11", - "port-version": 1 + "port-version": 2 }, "unqlite": { "baseline": "1.1.9", @@ -8050,7 +8054,7 @@ }, "xmlsec": { "baseline": "1.2.34", - "port-version": 0 + "port-version": 1 }, "xnnpack": { "baseline": "2021-05-17", diff --git a/versions/g-/graphviz.json b/versions/g-/graphviz.json index e9db85c9ea833a..c9402662af6cf2 100644 --- a/versions/g-/graphviz.json +++ b/versions/g-/graphviz.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "12fb431a0231be55d0493bf127041236a0a88e78", + "version-semver": "2.49.1", + "port-version": 5 + }, { "git-tree": "14f5333a2eb91b052b2691132f48aefced3bf1df", "version-semver": "2.49.1", diff --git a/versions/l-/libcanberra.json b/versions/l-/libcanberra.json index 8595a19a5908d1..1cb39ce80774cc 100644 --- a/versions/l-/libcanberra.json +++ b/versions/l-/libcanberra.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ad646fe9be66ed682de9f9fabd6e3f971e2d7440", + "version": "0.30", + "port-version": 4 + }, { "git-tree": "3b2ba637761d93c1a71e356c0249c54933655b09", "version": "0.30", diff --git a/versions/u-/unixodbc.json b/versions/u-/unixodbc.json index 394daa07c112fe..49b6815e720144 100644 --- a/versions/u-/unixodbc.json +++ b/versions/u-/unixodbc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ab41db2307baaecd3aa6af0659a4fcbaee43e6a0", + "version": "2.3.11", + "port-version": 2 + }, { "git-tree": "d5bf2c65c912060aaebaba66eb6ce1544d6dd7e6", "version": "2.3.11", diff --git a/versions/x-/xmlsec.json b/versions/x-/xmlsec.json index f9b1032eb01c51..a29d3998f5743a 100644 --- a/versions/x-/xmlsec.json +++ b/versions/x-/xmlsec.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2b3f35c5fb2b00a2a375fdb4d2108d706952c6f9", + "version": "1.2.34", + "port-version": 1 + }, { "git-tree": "a41c14aae637b02b4e018902e0f9b67bcdef12f2", "version": "1.2.34",