From 7ed8c3e354263f144e8028e49732a3ddb92eea9d Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Mon, 2 Apr 2018 21:29:16 +0000 Subject: [PATCH] Reinstate support for GTK2 (rather than GTK3) as an OPTION. While here, add a putty-gtk2 slave port and update _CONFLICTS. Since the default package does not change, and pkg would handle conflicts around attempted installation of the new -gtk2 package, omit the PORTREVISION bump from Miroslav's original patch. PR: 227200 Submitted by: Miroslav Lachman --- security/Makefile | 1 + security/putty-gtk2/Makefile | 13 +++++++++++++ security/putty-nogtk/Makefile | 4 ++-- security/putty/Makefile | 21 +++++++++++++++------ 4 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 security/putty-gtk2/Makefile diff --git a/security/Makefile b/security/Makefile index be2ab8e733d6..f9881e8fdf93 100644 --- a/security/Makefile +++ b/security/Makefile @@ -868,6 +868,7 @@ SUBDIR += pulledpork SUBDIR += pure-sfv SUBDIR += putty + SUBDIR += putty-gtk2 SUBDIR += putty-nogtk SUBDIR += pvk SUBDIR += pwauth diff --git a/security/putty-gtk2/Makefile b/security/putty-gtk2/Makefile new file mode 100644 index 000000000000..2ae72aac3320 --- /dev/null +++ b/security/putty-gtk2/Makefile @@ -0,0 +1,13 @@ +# Created by: Matthias Andree +# $FreeBSD$ + +PKGNAMESUFFIX= -gtk2 + +OPTIONS_SLAVE= GTK2 +OPTIONS_EXCLUDE= GTK3 + +CONFLICTS_INSTALL= pssh-[0-9]* putty-[0-9]* putty-nogtk-[0-9]* + +MASTERDIR= ${.CURDIR}/../../security/putty + +.include "${MASTERDIR}/Makefile" diff --git a/security/putty-nogtk/Makefile b/security/putty-nogtk/Makefile index 66c753139ed6..c6a6a6070965 100644 --- a/security/putty-nogtk/Makefile +++ b/security/putty-nogtk/Makefile @@ -3,9 +3,9 @@ PKGNAMESUFFIX= -nogtk -OPTIONS_EXCLUDE= GTK3 +OPTIONS_EXCLUDE= GTK2 GTK3 -CONFLICTS_INSTALL= pssh-[0-9]* putty-[0-9]* +CONFLICTS_INSTALL= pssh-[0-9]* putty-[0-9]* putty-gtk2-[0-9]* MASTERDIR= ${.CURDIR}/../../security/putty diff --git a/security/putty/Makefile b/security/putty/Makefile index 9a25d9aeec73..0fedc2788c81 100644 --- a/security/putty/Makefile +++ b/security/putty/Makefile @@ -23,27 +23,34 @@ CPE_VENDOR= simon_tatham PLIST_FILES= bin/plink bin/pscp bin/psftp bin/puttygen PLIST_FILES+= man/man1/plink.1.gz man/man1/pscp.1.gz man/man1/psftp.1.gz man/man1/puttygen.1.gz -OPTIONS_DEFINE= GTK3 +OPTIONS_RADIO= TOOLKIT +OPTIONS_RADIO_TOOLKIT= GTK2 GTK3 OPTIONS_DEFAULT=GSSAPI_BASE GTK3 OPTIONS_SINGLE= GSSAPI_SELECT OPTIONS_SINGLE_GSSAPI_SELECT= GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL \ GSSAPI_MIT -CONFLICTS_INSTALL?= pssh-[0-9]* putty-nogtk-[0-9]* +CONFLICTS_INSTALL?= pssh-[0-9]* putty-gtk2-[0-9]* putty-nogtk-[0-9]* .include CFLAGS+= -DBSD_PTYS -DOMIT_UTMP -DIPV6 LDFLAGS+= -Wl,--as-needed -.if ${PORT_OPTIONS:MGTK3} && !defined(WITHOUT_X11) -USE_GNOME= cairo gdkpixbuf2 gtk30 +.if (${PORT_OPTIONS:MGTK2} || ${PORT_OPTIONS:MGTK3}) && !defined(WITHOUT_X11) USE_XORG= x11 +.if ${PORT_OPTIONS:MGTK2} +USE_GNOME= cairo gdkpixbuf2 gtk20 +MAKE_ARGS+= PUTTY_WITH_GTK=yes GTK_CONFIG="pkg-config gtk+-2.0 x11 --cflags" +.endif +.if ${PORT_OPTIONS:MGTK3} +USE_GNOME= cairo gdkpixbuf2 gtk30 +MAKE_ARGS+= PUTTY_WITH_GTK=yes GTK_CONFIG="pkg-config gtk+-3.0 x11 --cflags" +.endif PLIST_FILES+= bin/pageant bin/pterm bin/putty bin/puttytel PLIST_FILES+= man/man1/pageant.1.gz man/man1/pterm.1.gz man/man1/putty.1.gz man/man1/puttytel.1.gz PLIST_FILES+= share/pixmaps/putty.ico -MAKE_ARGS+= PUTTY_WITH_GTK=yes GTK_CONFIG="pkg-config gtk+-3.0 x11 --cflags" DESKTOP_ENTRIES="PuTTY" \ "${COMMENT}" \ "${PREFIX}/share/pixmaps/${PORTNAME}.ico" \ @@ -91,9 +98,11 @@ post-patch: s,make,${MAKE_CMD},'\ ${WRKSRC}/${MAKEFILE} -post-install-GTK3-on: +post-install: +.if ${PORT_OPTIONS:MGTK2} || ${PORT_OPTIONS:MGTK3} @${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${INSTALL_DATA} ${WRKSRC}/../windows/putty.ico \ ${STAGEDIR}${PREFIX}/share/pixmaps/ +.endif .include