mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:11:07 +08:00
[xwindow] part 4/N (#26576)
* [font-util] add port * [libfontenc] add port * [libfs] add port * format manifest * remove -string * v db * Update ports/font-util/build.patch * v db * use magic macro instead of magic numbers.... * v db
This commit is contained in:
parent
056a7303b0
commit
1f3914c769
33
ports/font-util/build.patch
Normal file
33
ports/font-util/build.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff --git a/bdftruncate.c b/bdftruncate.c
|
||||
index 2b317c0b0..3ab84978f 100644
|
||||
--- a/bdftruncate.c
|
||||
+++ b/bdftruncate.c
|
||||
@@ -40,7 +40,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-
|
||||
+#if defined(_MSC_VER)
|
||||
+# if defined(_M_X64) || defined(_M_ARM64)
|
||||
+# define SSIZE_MAX LLONG_MAX
|
||||
+# else
|
||||
+# define SSIZE_MAX LONG_MAX
|
||||
+# endif
|
||||
+#endif
|
||||
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
|
||||
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
# define ATTR_NORETURN __attribute((noreturn))
|
||||
diff --git a/ucs2any.c b/ucs2any.c
|
||||
index 1f575d14f..75b662b3d 100644
|
||||
--- a/ucs2any.c
|
||||
+++ b/ucs2any.c
|
||||
@@ -49,7 +49,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
/* global variable for argv[0] */
|
||||
static const char *my_name = NULL;
|
56
ports/font-util/portfile.cmake
Normal file
56
ports/font-util/portfile.cmake
Normal file
@ -0,0 +1,56 @@
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||
|
||||
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 font/util
|
||||
REF d45011b8324fecebb4fc79e57491d341dd96e325 #1.3.2
|
||||
SHA512 d783cbb5b8b0975891a247f98b78c2afadfd33e1d26ee8bcf7ab7ccc11615b0150d07345c719182b0929afc3c54dc3288a01a789b5374e18aff883ac23d15b04
|
||||
HEAD_REF master
|
||||
PATCHES build.patch
|
||||
)
|
||||
|
||||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND VCPKG_C_FLAGS " /DNEED_BASENAME")
|
||||
list(APPEND VCPKG_CXX_FLAGS " /DNEED_BASENAME")
|
||||
endif()
|
||||
|
||||
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")
|
||||
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/aclocal/" "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/fonts/" "${CURRENT_PACKAGES_DIR}/share/xorg/fonts")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/debug")
|
||||
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/fontutil.pc")
|
||||
file(READ "${_file}" _contents)
|
||||
string(REPLACE "datarootdir=\${prefix}/share/${PORT}" "datarootdir=\${prefix}/share/xorg" _contents "${_contents}")
|
||||
string(REPLACE "exec_prefix=\${prefix}" "exec_prefix=\${prefix}/tools/${PORT}" _contents "${_contents}")
|
||||
file(WRITE "${_file}" "${_contents}")
|
||||
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fontutil.pc")
|
||||
file(READ "${_file}" _contents)
|
||||
string(REPLACE "datarootdir=\${prefix}/share/${PORT}" "datarootdir=\${prefix}/../share/xorg" _contents "${_contents}")
|
||||
string(REPLACE "exec_prefix=\${prefix}" "exec_prefix=\${prefix}/../tools/${PORT}" _contents "${_contents}")
|
||||
file(WRITE "${_file}" "${_contents}")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
|
||||
endif()
|
10
ports/font-util/vcpkg.json
Normal file
10
ports/font-util/vcpkg.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "font-util",
|
||||
"version": "1.3.2",
|
||||
"description": "X.Org font package creation/installation utilities",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/font/util",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
"xorg-macros"
|
||||
]
|
||||
}
|
38
ports/libfontenc/build.patch
Normal file
38
ports/libfontenc/build.patch
Normal file
@ -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
|
13
ports/libfontenc/configure.ac.patch
Normal file
13
ports/libfontenc/configure.ac.patch
Normal file
@ -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
|
32
ports/libfontenc/portfile.cmake
Normal file
32
ports/libfontenc/portfile.cmake
Normal file
@ -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()
|
13
ports/libfontenc/vcpkg.json
Normal file
13
ports/libfontenc/vcpkg.json
Normal file
@ -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"
|
||||
]
|
||||
}
|
30
ports/libfs/portfile.cmake
Normal file
30
ports/libfs/portfile.cmake
Normal file
@ -0,0 +1,30 @@
|
||||
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/libfs
|
||||
REF 02de7390e58f00a3701f656a2b205dc6c8dafb58 # 1.0.8
|
||||
SHA512 7395434c20cebc45213122c12dc272773d100ade606d6fb2cacf94e2d102c9869124a89dbd0ddf2fa9128e8b238cf2f52b89d356b296e8d95ff352be48a4bc54
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
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(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
endif()
|
14
ports/libfs/vcpkg.json
Normal file
14
ports/libfs/vcpkg.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "libfs",
|
||||
"version": "1.0.8",
|
||||
"description": "X Font Service client library",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libfs",
|
||||
"license": null,
|
||||
"supports": "!windows",
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
"xorg-macros",
|
||||
"xproto",
|
||||
"xtrans"
|
||||
]
|
||||
}
|
@ -2372,6 +2372,10 @@
|
||||
"baseline": "1.1.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"font-util": {
|
||||
"baseline": "1.3.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"fontconfig": {
|
||||
"baseline": "2.14.0",
|
||||
"port-version": 4
|
||||
@ -3672,6 +3676,10 @@
|
||||
"baseline": "1.3.4",
|
||||
"port-version": 1
|
||||
},
|
||||
"libfontenc": {
|
||||
"baseline": "1.1.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"libfort": {
|
||||
"baseline": "0.4.2",
|
||||
"port-version": 1
|
||||
@ -3680,6 +3688,10 @@
|
||||
"baseline": "0.2.0",
|
||||
"port-version": 9
|
||||
},
|
||||
"libfs": {
|
||||
"baseline": "1.0.8",
|
||||
"port-version": 0
|
||||
},
|
||||
"libftdi": {
|
||||
"baseline": "0.20",
|
||||
"port-version": 3
|
||||
|
9
versions/f-/font-util.json
Normal file
9
versions/f-/font-util.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "752c6b7df7c1181d4c27b64da1c20c03137ed3c6",
|
||||
"version": "1.3.2",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/l-/libfontenc.json
Normal file
9
versions/l-/libfontenc.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "4201b994bdcfcf20458025d0fcfffe1f97d444dc",
|
||||
"version": "1.1.4",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/l-/libfs.json
Normal file
9
versions/l-/libfs.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "48390af67d3ade78652e3b646864aa96b7cde8c0",
|
||||
"version": "1.0.8",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user