aboutsummaryrefslogtreecommitdiff
path: root/security/putty
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2022-09-19 21:47:18 +0000
committerMatthias Andree <mandree@FreeBSD.org>2022-09-22 06:04:28 +0000
commit80d2d91271d91dbc2ea0e3199328206c4a983d5f (patch)
tree1c3602f796057b85b8c094d84ab7192805ecccbf /security/putty
parent2c5a03c458f1931f945e51fc7720e7e57c0545d0 (diff)
downloadports-80d2d91271d91dbc2ea0e3199328206c4a983d5f.tar.gz
ports-80d2d91271d91dbc2ea0e3199328206c4a983d5f.zip
security/putty: add Git patch to fix X11 inclusion
Pull in a fix from upstream's Git to avoid pulling in X11 headers in no-GTK builds, so we can remove one more local workaround.
Diffstat (limited to 'security/putty')
-rw-r--r--security/putty/Makefile7
-rw-r--r--security/putty/files/0001-Stop-trying-to-include-X11-headers-in-non-GTK-builds.patch31
2 files changed, 34 insertions, 4 deletions
diff --git a/security/putty/Makefile b/security/putty/Makefile
index 80b4f84f2d28..2e4ae7a5cb5a 100644
--- a/security/putty/Makefile
+++ b/security/putty/Makefile
@@ -1,6 +1,6 @@
PORTNAME= putty
PORTVERSION= 0.78~pre20220919
-DISTNAME= ${PORTNAME}-${PORTVERSION}.fda41e1
+DISTVERSIONSUFFIX= .fda41e1
PORTREVISION= 0
CATEGORIES= security
#MASTER_SITES= http://the.earth.li/~sgtatham/putty/${PORTVERSION}/ \
@@ -9,6 +9,7 @@ MASTER_SITES= https://tartarus.org/~simon/putty-prerel-snapshots/ \
LOCAL/mandree/
EXTRA_PATCHES+= ${FILESDIR}/0001-setpgrp-cmake-check-use-if-not-if-defined.patch
EXTRA_PATCHES+= ${FILESDIR}/0002-Use-GTK_LDFLAGS-when-testing-for-Pango.patch
+EXTRA_PATCHES+= ${FILESDIR}/0001-Stop-trying-to-include-X11-headers-in-non-GTK-builds.patch
PATCH_STRIP= -p1
MAINTAINER= mandree@FreeBSD.org
@@ -72,9 +73,7 @@ DESKTOP_ENTRIES= "PuTTY" \
"" \
false
.else
-# hack alert: PuTTY, as of 864b4c, masks the definition of NOT_X_WINDOWS
-# under GTK_FOUND; which it defeats. Pass it down explicitly.
-CMAKE_ARGS+= -DPUTTY_GTK_VERSION:STRING=NONE -DNOT_X_WINDOWS:BOOL=TRUE
+CMAKE_ARGS+= -DPUTTY_GTK_VERSION:STRING=NONE
.endif
.if ${PORT_OPTIONS:MGSSAPI_BASE} # Heimdal-like in base system
diff --git a/security/putty/files/0001-Stop-trying-to-include-X11-headers-in-non-GTK-builds.patch b/security/putty/files/0001-Stop-trying-to-include-X11-headers-in-non-GTK-builds.patch
new file mode 100644
index 000000000000..58ddf65280f4
--- /dev/null
+++ b/security/putty/files/0001-Stop-trying-to-include-X11-headers-in-non-GTK-builds.patch
@@ -0,0 +1,31 @@
+From 9fcfd679b49a015e95f70b3f0380243e0db8b035 Mon Sep 17 00:00:00 2001
+From: Simon Tatham <anakin@pobox.com>
+Date: Mon, 19 Sep 2022 20:21:01 +0100
+Subject: [PATCH] Stop trying to include X11 headers in non-GTK builds.
+
+In commit 732ec31a17a7fea I made the check for libX11 conditional on
+GTK - but I forgot that if we're building without GTK, I should
+_define_ NOT_X_WINDOWS, rather than leaving it undefined. As a result,
+the build would fail on files like unix/utils/x11_ignore_error.c.
+---
+ cmake/platforms/unix.cmake | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake
+index 98474485..4d056d0a 100644
+--- a/cmake/platforms/unix.cmake
++++ b/cmake/platforms/unix.cmake
+@@ -96,6 +96,10 @@ if(GTK_FOUND)
+ endif()
+ endfunction()
+ check_x11()
++else()
++ # If we didn't even have GTK, behave as if X11 is not available.
++ # (There's nothing useful we could do with it even if there was.)
++ set(NOT_X_WINDOWS ON)
+ endif()
+
+ include_directories(${CMAKE_SOURCE_DIR}/charset ${GTK_INCLUDE_DIRS} ${X11_INCLUDE_DIR})
+--
+2.37.3
+