diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/mcpp | |
Diffstat (limited to 'vcpkg/ports/mcpp')
| -rw-r--r-- | vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch | 38 | ||||
| -rw-r--r-- | vcpkg/ports/mcpp/portfile.cmake | 27 | ||||
| -rw-r--r-- | vcpkg/ports/mcpp/vcpkg.json | 13 |
3 files changed, 78 insertions, 0 deletions
diff --git a/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch b/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch new file mode 100644 index 0000000..37f625b --- /dev/null +++ b/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch @@ -0,0 +1,38 @@ +From d2625f80e08ff811a173ca3dbe76a0e004c26c65 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca <mazzucan@outlook.com> +Date: Tue, 22 Sep 2020 16:21:43 -0700 +Subject: [PATCH] fix _POSIX_C_SOURCE + +set it to correctly ask for 200112L, for readlink +--- + configed.H | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/configed.H b/configed.H +index 2e01c15..250f441 100644 +--- a/configed.H ++++ b/configed.H +@@ -189,19 +189,13 @@ + #define _POSIX_ 1 + #define _POSIX_SOURCE 1 + #ifndef _POSIX_C_SOURCE +-#define _POSIX_C_SOURCE 1 ++#define _POSIX_C_SOURCE 200112L + #define _POSIX_C_SOURCE_defined 1 + #endif + #include "limits.h" + #ifdef _AIX + #include "sys/stat.h" + #endif +-#undef _POSIX_ +-#undef _POSIX_SOURCE +-#ifdef _POSIX_C_SOURCE_defined +-#undef _POSIX_C_SOURCE +-#undef _POSIX_C_SOURCE_defined +-#endif + #define CHARBIT CHAR_BIT + #define UCHARMAX UCHAR_MAX + #define USHRTMAX USHRT_MAX +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/mcpp/portfile.cmake b/vcpkg/ports/mcpp/portfile.cmake new file mode 100644 index 0000000..33a34aa --- /dev/null +++ b/vcpkg/ports/mcpp/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO zeroc-ice/mcpp
+ REF e6abf9a561294b667bb931b80cf749c9be2d1a2f
+ SHA512 131b68401683bcfb947ac4969a59aa4c1683412c30f76c50e9e9c5c952a881b9950127db2ef22c96968d8c90d26bcdb5a90fb1b77d4dda7dee67bfe4a2676b35
+ HEAD_REF master
+ PATCHES
+ 0001-fix-_POSIX_C_SOURCE.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+file(
+ INSTALL
+ "${SOURCE_PATH}/mcpp_lib.h"
+ "${SOURCE_PATH}/mcpp_out.h"
+ DESTINATION
+ "${CURRENT_PACKAGES_DIR}/include"
+)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/mcpp/vcpkg.json b/vcpkg/ports/mcpp/vcpkg.json new file mode 100644 index 0000000..dbb305d --- /dev/null +++ b/vcpkg/ports/mcpp/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "mcpp", + "version": "2.7.2.14", + "port-version": 5, + "description": "Fork of mcpp, a C/C++ preprocessor", + "homepage": "https://github.com/zeroc-ice/mcpp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |