diff options
Diffstat (limited to 'vcpkg/ports/libxmu')
| -rw-r--r-- | vcpkg/ports/libxmu/cl-build.patch | 14 | ||||
| -rw-r--r-- | vcpkg/ports/libxmu/portfile.cmake | 36 | ||||
| -rw-r--r-- | vcpkg/ports/libxmu/unistd.patch | 15 | ||||
| -rw-r--r-- | vcpkg/ports/libxmu/vcpkg.json | 14 |
4 files changed, 79 insertions, 0 deletions
diff --git a/vcpkg/ports/libxmu/cl-build.patch b/vcpkg/ports/libxmu/cl-build.patch new file mode 100644 index 0000000..d67d4a0 --- /dev/null +++ b/vcpkg/ports/libxmu/cl-build.patch @@ -0,0 +1,14 @@ +diff --git a/src/EditresCom.c b/src/EditresCom.c
+index 716a2b3c6..d570e19e4 100644
+--- a/src/EditresCom.c
++++ b/src/EditresCom.c
+@@ -34,6 +34,9 @@ in this Software without prior written authorization from The Open Group.
+ #include <X11/IntrinsicP.h> /* To get into the composite and core widget
+ structures. */
+ #include <X11/ObjectP.h> /* For XtIs<Classname> macros. */
++#ifdef _MSC_VER
++#define XTSTRINGDEFINES // Otherwise XtRImmediate is not a constant expression
++#endif
+ #include <X11/StringDefs.h> /* for XtRString. */
+ #include <X11/ShellP.h> /* for Application Shell Widget class. */
+
diff --git a/vcpkg/ports/libxmu/portfile.cmake b/vcpkg/ports/libxmu/portfile.cmake new file mode 100644 index 0000000..41016c2 --- /dev/null +++ b/vcpkg/ports/libxmu/portfile.cmake @@ -0,0 +1,36 @@ +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_from_gitlab(
+ GITLAB_URL https://gitlab.freedesktop.org/xorg
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lib/libxmu
+ REF e9efe2d027b4c46cf6834cc532222f8ad1d1d3c3 # 1.1.3
+ SHA512 9d3ab7534afbb3d220ce846ecfc209536def28e707e68f393673bda6f92054e7a14212ae2400092afdc06bbb61d8315d460feaf5b551dc447390d6d952a5aa1f
+ HEAD_REF master # branch name
+ PATCHES cl-build.patch
+ unistd.patch
+)
+
+set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
+
+vcpkg_configure_make(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTOCONFIG
+ OPTIONS
+ lt_cv_deplibs_check_method=pass_all
+)
+
+vcpkg_install_make()
+vcpkg_fixup_pkgconfig()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/X11/Xmu/Atoms.h" "extern" "__declspec(dllimport) extern")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+endif()
diff --git a/vcpkg/ports/libxmu/unistd.patch b/vcpkg/ports/libxmu/unistd.patch new file mode 100644 index 0000000..e570f13 --- /dev/null +++ b/vcpkg/ports/libxmu/unistd.patch @@ -0,0 +1,15 @@ +diff --git a/src/GetHost.c b/src/GetHost.c +index 2f0bccded..2d698f664 100644 +--- a/src/GetHost.c ++++ b/src/GetHost.c +@@ -35,7 +35,10 @@ in this Software without prior written authorization from The Open Group. + #endif + #include <X11/Xosdefs.h> + #include <string.h> ++ ++#ifdef HAVE_UNISTD_H + #include <unistd.h> ++#endif + + #ifdef WIN32 + #include <X11/Xlibint.h> diff --git a/vcpkg/ports/libxmu/vcpkg.json b/vcpkg/ports/libxmu/vcpkg.json new file mode 100644 index 0000000..4279ecd --- /dev/null +++ b/vcpkg/ports/libxmu/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libxmu", + "version": "1.1.3", + "port-version": 1, + "description": "X miscellaneous utility routines library", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxmu", + "license": null, + "dependencies": [ + "bzip2", + "libxext", + "libxt", + "xorg-macros" + ] +} |