aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2021-04-07 12:25:53 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2021-04-16 18:31:05 +0000
commit885cc329af6ce8db740e4335bf2faf50d769d277 (patch)
tree8f6866ec7a2ddcabfb373eec88fd6580fc38bbb4
parenta0fcd3d7075010c6f0e41309a680f2611fa95249 (diff)
downloadports-885cc329af6ce8db740e4335bf2faf50d769d277.tar.gz
ports-885cc329af6ce8db740e4335bf2faf50d769d277.zip
devel/apitrace: fix build with CMake 3.20
Reported upstream as https://github.com/apitrace/apitrace/issues/727 An internal check that ends up defining HAVE_STDINT_H in CMake is no longer done; do this explicitly instead.
-rw-r--r--devel/apitrace/Makefile1
-rw-r--r--devel/apitrace/files/patch-CMakeLists.txt13
2 files changed, 14 insertions, 0 deletions
diff --git a/devel/apitrace/Makefile b/devel/apitrace/Makefile
index 6519068734dc..001a9ccc5df2 100644
--- a/devel/apitrace/Makefile
+++ b/devel/apitrace/Makefile
@@ -1,5 +1,6 @@
PORTNAME= apitrace
DISTVERSION= 9.0
+PORTREVISION= 1
CATEGORIES= devel
PATCH_SITES= https://github.com/a17r/${GH_PROJECT}/commit/
diff --git a/devel/apitrace/files/patch-CMakeLists.txt b/devel/apitrace/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..ed25e71f8bf1
--- /dev/null
+++ b/devel/apitrace/files/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+--- CMakeLists.txt.orig 2021-04-07 12:23:46 UTC
++++ CMakeLists.txt
+@@ -408,6 +408,10 @@ test_big_endian (HAVE_BIGENDIAN)
+ if (HAVE_BIGENDIAN)
+ add_definitions (-DHAVE_BIGENDIAN)
+ endif ()
++# CMake 3.20 doesn't do the tests internally in TestBigEndian
++# that end up setting HAVE_STDINT_H and similar.
++include(CheckTypeSize)
++CHECK_TYPE_SIZE("unsigned short" CMAKE_SIZEOF_UNSIGNED_SHORT LANGUAGE C)
+
+ # Force certain components to always be built as release
+ macro (force_release_build)