diff options
Diffstat (limited to 'vcpkg/ports/libfontenc')
| -rw-r--r-- | vcpkg/ports/libfontenc/build.patch | 38 | ||||
| -rw-r--r-- | vcpkg/ports/libfontenc/configure.ac.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/libfontenc/portfile.cmake | 32 | ||||
| -rw-r--r-- | vcpkg/ports/libfontenc/vcpkg.json | 13 |
4 files changed, 96 insertions, 0 deletions
diff --git a/vcpkg/ports/libfontenc/build.patch b/vcpkg/ports/libfontenc/build.patch new file mode 100644 index 0000000..c5e1b75 --- /dev/null +++ b/vcpkg/ports/libfontenc/build.patch @@ -0,0 +1,38 @@ +diff --git a/src/encparse.c b/src/encparse.c +index 548110ede..61952b9ce 100644 +--- a/src/encparse.c ++++ b/src/encparse.c +@@ -28,12 +28,16 @@ THE SOFTWARE. + to be pure ASCII. Bloody ``Code Set Independence''. */ + + #include <string.h> ++#ifndef _MSC_VER + #include <strings.h> ++#else ++#define strcasecmp _stricmp ++#endif + #include <stdio.h> + + #include <stdlib.h> + +-#include "zlib.h" ++#include <zlib.h> + typedef gzFile FontFilePtr; + + #define FontFileGetc(f) gzgetc(f) +diff --git a/src/fontenc.c b/src/fontenc.c +index c4ccd5eb0..e87d1089d 100644 +--- a/src/fontenc.c ++++ b/src/fontenc.c +@@ -23,7 +23,11 @@ THE SOFTWARE. + /* Backend-independent encoding code */ + + #include <string.h> ++#ifndef _MSC_VER + #include <strings.h> ++#else ++#define strcasecmp _stricmp ++#endif + #include <stdlib.h> + + #define FALSE 0 diff --git a/vcpkg/ports/libfontenc/configure.ac.patch b/vcpkg/ports/libfontenc/configure.ac.patch new file mode 100644 index 0000000..2a9fa85 --- /dev/null +++ b/vcpkg/ports/libfontenc/configure.ac.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index cadc653a0..aa645af81 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -47,7 +47,7 @@ XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings]) + # zlib + AC_CHECK_HEADER([zlib.h], [], + AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +-AC_CHECK_LIB(z, gzclose, [], ++AC_SEARCH_LIBS(gzclose, [z zlib zlibd], [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) + + # Obtain compiler/linker options for depedencies diff --git a/vcpkg/ports/libfontenc/portfile.cmake b/vcpkg/ports/libfontenc/portfile.cmake new file mode 100644 index 0000000..9b29d48 --- /dev/null +++ b/vcpkg/ports/libfontenc/portfile.cmake @@ -0,0 +1,32 @@ +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/libfontenc
+ REF 2baea13978759d1a011fc6d739465893b554d30a #1.1.4
+ SHA512 5ebef8b516a2377b004894b53d56ad960bc5179d9f9a36e18bc2228ea04e8f87e9baffd4883c21783dd1f4c57d7f521cdfa42c1e9facae60c6fc2c9f5472230e
+ HEAD_REF master
+ PATCHES configure.ac.patch
+ build.patch
+)
+set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
+
+vcpkg_configure_make(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTOCONFIG
+)
+
+vcpkg_install_make()
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+# # Handle copyright
+file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/")
+file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/" RENAME copyright)
+endif()
diff --git a/vcpkg/ports/libfontenc/vcpkg.json b/vcpkg/ports/libfontenc/vcpkg.json new file mode 100644 index 0000000..c34079a --- /dev/null +++ b/vcpkg/ports/libfontenc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libfontenc", + "version": "1.1.4", + "description": "X font encoding library", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libfontenc", + "license": null, + "dependencies": [ + "font-util", + "xorg-macros", + "xproto", + "zlib" + ] +} |