From 108a28eaa79054ad0da52235d67dfd597d074c34 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 3 Oct 2024 17:13:36 +0200 Subject: [PATCH] [libxpm] Update, cleanup (#41313) --- ports/libxpm/portfile.cmake | 24 ++++++++++-------------- ports/libxpm/remove_strings_h.patch | 10 ++++------ ports/libxpm/subdirs.diff | 13 +++++++++++++ ports/libxpm/vcpkg.json | 10 +++------- versions/baseline.json | 4 ++-- versions/l-/libxpm.json | 5 +++++ 6 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 ports/libxpm/subdirs.diff diff --git a/ports/libxpm/portfile.cmake b/ports/libxpm/portfile.cmake index 10c8f6932d..0fe418a286 100644 --- a/ports/libxpm/portfile.cmake +++ b/ports/libxpm/portfile.cmake @@ -1,19 +1,24 @@ if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -else() -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + return() +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() vcpkg_from_gitlab( GITLAB_URL https://gitlab.freedesktop.org/xorg OUT_SOURCE_PATH SOURCE_PATH REPO lib/libxpm REF "libXpm-${VERSION}" - SHA512 006d5fb2fd951b8857b8d409d65ebe4f819dc51df3bbe933ef9b879a9dc832b0828481c7c0cac453a82a1e81f39990fc49819314a443a1082bdaea6044bb3013 + SHA512 30d473b6184d56643114ab1f7719f033ac5ecfd9fd46ebefc03db171a82a809d996046a039c922c184046310fc12a088467ca73740386b3e73b1e699bde78db7 PATCHES remove_strings_h.patch fix-dependency-gettext.patch strcasecmp.patch + subdirs.diff tools.patch # will look for libxt otherwise ) @@ -33,18 +38,9 @@ vcpkg_configure_make( ) vcpkg_install_make() - -vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -if(VCPKG_LIBRARY_LINKAGE STREQUAL static OR NOT VCPKG_TARGET_IS_WINDOWS) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") -endif() - -#vcpkg_copy_tools(TOOL_NAMES sxpm cxpm AUTOCLEAN) - -# Handle copyright -file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -endif() +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/ports/libxpm/remove_strings_h.patch b/ports/libxpm/remove_strings_h.patch index 6afeee0166..290796f0b5 100644 --- a/ports/libxpm/remove_strings_h.patch +++ b/ports/libxpm/remove_strings_h.patch @@ -2,15 +2,13 @@ diff --git a/src/XpmI.h b/src/XpmI.h index 4360ad3b9..a8d78b0ba 100644 --- a/src/XpmI.h +++ b/src/XpmI.h -@@ -325,8 +325,10 @@ FUNC(xpmstrcasecmp, int, (char *s1, char *s2)); +@@ -332,7 +332,9 @@ FUNC(xpmstrcasecmp, int, (char *s1, char *s2)); #else #undef xpmstrcasecmp #define xpmstrcasecmp strcasecmp -+#if !defined(_MSC_VER) ++# if !defined(_MSC_VER) #include ++# endif #endif -+#endif - FUNC(xpmatoui, unsigned int, - (char *p, unsigned int l, unsigned int *ui_return)); - \ No newline at end of file + HFUNC(xpmatoui, unsigned int, diff --git a/ports/libxpm/subdirs.diff b/ports/libxpm/subdirs.diff new file mode 100644 index 0000000000..b149184ba1 --- /dev/null +++ b/ports/libxpm/subdirs.diff @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index 235ee1f..d8d0f66 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,7 +1,7 @@ + # Daniel Stone disowns all copyright on this file; no warranty is given as to its + # suitability or otherwise. + +-SUBDIRS = doc include man src sxpm cxpm test ++SUBDIRS = include src + + ACLOCAL_AMFLAGS = -I m4 + diff --git a/ports/libxpm/vcpkg.json b/ports/libxpm/vcpkg.json index 04d87f164a..1a5095f13c 100644 --- a/ports/libxpm/vcpkg.json +++ b/ports/libxpm/vcpkg.json @@ -1,17 +1,12 @@ { "name": "libxpm", - "version": "3.5.16", - "port-version": 1, + "version": "3.5.17", "description": "XPM format pixmap library", "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxpm", "license": "MIT", "supports": "windows | linux", "dependencies": [ "libx11", - { - "name": "vcpkg-cmake", - "host": true - }, "xorg-macros", "xproto" ], @@ -25,7 +20,8 @@ "features": [ "tools" ] - } + }, + "gettext-libintl" ] } } diff --git a/versions/baseline.json b/versions/baseline.json index 57d2aef526..83726a08e4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5397,8 +5397,8 @@ "port-version": 1 }, "libxpm": { - "baseline": "3.5.16", - "port-version": 1 + "baseline": "3.5.17", + "port-version": 0 }, "libxpresent": { "baseline": "1.0.0", diff --git a/versions/l-/libxpm.json b/versions/l-/libxpm.json index aba1020add..041edfd74a 100644 --- a/versions/l-/libxpm.json +++ b/versions/l-/libxpm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6fc4a6c29ce84daa8d65a1bacca9350793a816a8", + "version": "3.5.17", + "port-version": 0 + }, { "git-tree": "3c8857f61f5ee49bd9b25deac150fc95a47eaf87", "version": "3.5.16",