diff options
Diffstat (limited to 'vcpkg/ports/libxpm')
| -rw-r--r-- | vcpkg/ports/libxpm/fix-dependency-gettext.patch | 15 | ||||
| -rw-r--r-- | vcpkg/ports/libxpm/portfile.cmake | 46 | ||||
| -rw-r--r-- | vcpkg/ports/libxpm/remove_strings_h.patch | 14 | ||||
| -rw-r--r-- | vcpkg/ports/libxpm/strcasecmp.patch | 15 | ||||
| -rw-r--r-- | vcpkg/ports/libxpm/subdirs.diff | 13 | ||||
| -rw-r--r-- | vcpkg/ports/libxpm/tools.patch | 16 | ||||
| -rw-r--r-- | vcpkg/ports/libxpm/vcpkg.json | 28 |
7 files changed, 147 insertions, 0 deletions
diff --git a/vcpkg/ports/libxpm/fix-dependency-gettext.patch b/vcpkg/ports/libxpm/fix-dependency-gettext.patch new file mode 100644 index 0000000..05e3156 --- /dev/null +++ b/vcpkg/ports/libxpm/fix-dependency-gettext.patch @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index 365544b..51bc0f2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -30,7 +30,9 @@ PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17], + AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue) + + # Internationalization & localization support +-AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"]) ++AC_ARG_WITH([gettext], AC_HELP_STRING([--with-gettext], ++ [Use gettext, default is no]), ++ [USE_GETTEXT=${withval}]) + AC_MSG_CHECKING([where to install localized messages]) + AC_ARG_WITH([localedir], AS_HELP_STRING([--with-localedir=<path>], + [Path to install message files in (default: datadir/locale)]), diff --git a/vcpkg/ports/libxpm/portfile.cmake b/vcpkg/ports/libxpm/portfile.cmake new file mode 100644 index 0000000..0fe418a --- /dev/null +++ b/vcpkg/ports/libxpm/portfile.cmake @@ -0,0 +1,46 @@ +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) + 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 30d473b6184d56643114ab1f7719f033ac5ecfd9fd46ebefc03db171a82a809d996046a039c922c184046310fc12a088467ca73740386b3e73b1e699bde78db7 + PATCHES + remove_strings_h.patch + fix-dependency-gettext.patch + strcasecmp.patch + subdirs.diff + tools.patch # will look for libxt otherwise +) + +set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") + +if ("gettext" IN_LIST FEATURES) + set(EXTRA_OPTIONS --with-gettext=yes) +else() + set(EXTRA_OPTIONS --with-gettext=no) +endif() + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + OPTIONS + ${EXTRA_OPTIONS} + ) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/vcpkg/ports/libxpm/remove_strings_h.patch b/vcpkg/ports/libxpm/remove_strings_h.patch new file mode 100644 index 0000000..290796f --- /dev/null +++ b/vcpkg/ports/libxpm/remove_strings_h.patch @@ -0,0 +1,14 @@ +diff --git a/src/XpmI.h b/src/XpmI.h
+index 4360ad3b9..a8d78b0ba 100644
+--- a/src/XpmI.h
++++ b/src/XpmI.h
+@@ -332,7 +332,9 @@ FUNC(xpmstrcasecmp, int, (char *s1, char *s2));
+ #else
+ #undef xpmstrcasecmp
+ #define xpmstrcasecmp strcasecmp
++# if !defined(_MSC_VER)
+ #include <strings.h>
++# endif
+ #endif
+
+ HFUNC(xpmatoui, unsigned int,
diff --git a/vcpkg/ports/libxpm/strcasecmp.patch b/vcpkg/ports/libxpm/strcasecmp.patch new file mode 100644 index 0000000..cab1684 --- /dev/null +++ b/vcpkg/ports/libxpm/strcasecmp.patch @@ -0,0 +1,15 @@ +diff --git a/include/X11/xpm.h b/include/X11/xpm.h +index f108f1f6e..143b6657d 100644 +--- a/include/X11/xpm.h ++++ b/include/X11/xpm.h +@@ -69,6 +69,10 @@ + # include <malloc.h> + # include "simx.h" /* defines some X stuff using MSW types */ + #define NEED_STRCASECMP /* at least for MSVC++ */ ++#elif _MSC_VER ++#define strcasecmp _stricmp ++# include <X11/Xlib.h> ++# include <X11/Xutil.h> + #else /* FOR_MSW */ + # ifdef AMIGA + # include "amigax.h" diff --git a/vcpkg/ports/libxpm/subdirs.diff b/vcpkg/ports/libxpm/subdirs.diff new file mode 100644 index 0000000..b149184 --- /dev/null +++ b/vcpkg/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/vcpkg/ports/libxpm/tools.patch b/vcpkg/ports/libxpm/tools.patch new file mode 100644 index 0000000..7b60eef --- /dev/null +++ b/vcpkg/ports/libxpm/tools.patch @@ -0,0 +1,16 @@ +diff --git a/configure.ac b/configure.ac +index 51bc0f2bc..e35dc6e17 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,9 +25,9 @@ AC_CHECK_FUNC([fork],[], AC_DEFINE(NO_ZPIPE)) + + # Obtain compiler/linker options for dependencies + PKG_CHECK_MODULES(XPM, xproto x11) +-PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17], +- [build_sxpm=true], [build_sxpm=false]) ++# PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17], ++# [build_sxpm=true], [build_sxpm=false]) + AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue) + + # Internationalization & localization support + AC_ARG_WITH([gettext], AC_HELP_STRING([--with-gettext], diff --git a/vcpkg/ports/libxpm/vcpkg.json b/vcpkg/ports/libxpm/vcpkg.json new file mode 100644 index 0000000..1a5095f --- /dev/null +++ b/vcpkg/ports/libxpm/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "libxpm", + "version": "3.5.17", + "description": "XPM format pixmap library", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxpm", + "license": "MIT", + "supports": "windows | linux", + "dependencies": [ + "libx11", + "xorg-macros", + "xproto" + ], + "features": { + "gettext": { + "description": "use xgettext to build source", + "dependencies": [ + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "gettext-libintl" + ] + } + } +} |