ports/172432: [PATCH] x11-toolkits/tk86: Converting port to new options framework

Michael Gmelin freebsd at grem.de
Sun Oct 7 04:20:21 UTC 2012


>Number:         172432
>Category:       ports
>Synopsis:       [PATCH] x11-toolkits/tk86: Converting port to new options framework
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 07 04:20:19 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Michael Gmelin
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
Grem Equity GmbH
>Environment:
System: FreeBSD bsd64.grem.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC
>Description:
The patch below converts the port to use the new options framework[1]
and converts the Makefile header to the new format[2].

The patch is to be applied using:

patch -p0 -E </path/to/patchfile

No attempts have been made to fix any potential issues the port might
have beyond this scope. I also didn't fix any indentation issues to
keep the patch small and easy to audit, a future port maintainer might
want to take care of this.

See also:
1. http://lists.freebsd.org/pipermail/freebsd-ports/2012-October/078676.html
2. http://lists.freebsd.org/pipermail/freebsd-ports/2012-August/077801.html


Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix)
>How-To-Repeat:
>Fix:

--- tk-8.6.b.2.patch begins here ---
diff -ruN --exclude=CVS ../tk86.orig/Makefile ./Makefile
--- ../tk86.orig/Makefile	2012-10-07 04:29:44.295215589 +0200
+++ ./Makefile	2012-10-07 06:12:26.705392581 +0200
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	tk
-# Date created:		17 January 2007
-# Whom:			Martin Matuska <mm at FreeBSD.org>
-#
-# $FreeBSD: ports/x11-toolkits/tk86/Makefile,v 1.34 2012/08/03 22:57:36 mm Exp $
-#
+# Created by: Martin Matuska <mm at FreeBSD.org>
+# $FreeBSD: $
 
 PORTNAME=	tk
 PORTVERSION=	8.6.b.2
@@ -37,9 +33,10 @@
 .if !defined(BUILDING_TK_THREADS)
 USE_TCL=	${SHORT_TK_VER}
 
-OPTIONS=	TK86_MAN "Install tk 8.6 function manpages" off \
-		XFT "Use Xft fonts" on \
-		DEMOS "Install demos" off
+OPTIONS_DEFINE=	DEMOS TK86_MAN XFT
+OPTIONS_DEFAULT=XFT
+TK86_MAN_DESC=	Install tk 8.6 function manpages
+DEMOS_DESC=	Install demos
 .else
 USE_TK=		${SHORT_TK_VER}
 PLIST=		${PKGDIR}/pkg-plist.threads
@@ -50,11 +47,11 @@
 SUB_LIST+=	THREADS_SUFFIX="${THREADS_SUFFIX}" \
 		TCLPATCHLEVEL="8.6b1"
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 DATADIR=	${PREFIX}/share/${PORTNAME}${TCL_VER}
 
-.if !defined(WITHOUT_XFT)
+.if ${PORT_OPTIONS:MXFT}
 CONFIGURE_ARGS+=	--enable-xft
 LIB_DEPENDS+=	Xft.2:${PORTSDIR}/x11-fonts/libXft
 .else
@@ -77,14 +74,14 @@
 
 SUB_LIST+=		TK_PROVIDE=""
 
-.if defined(WITH_DEMOS)
+.if ${PORT_OPTIONS:MDEMOS}
 INSTALL_TARGET+=	install install-demos
 PLIST_SUB+=	DEMOS=""
 .else
 PLIST_SUB+=	DEMOS="@comment "
 .endif
 
-.if !defined(NO_INSTALL_MANPAGES) && defined(WITH_TK86_MAN)
+.if !defined(NO_INSTALL_MANPAGES) && ${PORT_OPTIONS:MTK86_MAN}
 
 MAN3=	3DBorder.3 AddOption.3 BindTable.3 CanvPsY.3 CanvTkwin.3 \
 	CanvTxtInfo.3 Clipboard.3 ClrSelect.3 ConfigWidg.3 ConfigWind.3 \
@@ -401,7 +398,7 @@
 	text.n tk_textCut.n \
 	text.n tk_textPaste.n
 
-.endif	#!defined(NO_INSTALL_MANPAGES) && !defined(WITH_TK86_MAN)
+.endif	#!defined(NO_INSTALL_MANPAGES) && !${PORT_OPTIONS:MTK86_MAN}
 
 .endif	# defined(BUILDING_TK_THREADS)
 
@@ -454,13 +451,13 @@
 .if !defined(NO_INSTALL_MANPAGES)
 	${MKDIR} ${MANPREFIX}/man/man1
 	${INSTALL_MAN} ${WRKSRC}/../doc/wish.1 ${MANPREFIX}/man/man1/wish${TCL_VER}${THREADS_SUFFIX}.1
-.if !defined(BUILDING_TK_THREADS) && defined(WITH_TK86_MAN)
+.if !defined(BUILDING_TK_THREADS) && ${PORT_OPTIONS:MTK86_MAN}
 . for mp in ${MAN3} ${MANN}
 	@${REINPLACE_CMD} -e 's|^.so man.macros|.so ${DATADIR}/man.macros|'	\
 		${WRKSRC}/../doc/${mp}
 . endfor
 	@cd ${WRKSRC} && ${MAKE} -f Makefile install-doc ${MAKE_ENV}
-.endif # !defined(BUILDING_TK_THREADS) && defined(WITH_TK86_MAN)
+.endif # !defined(BUILDING_TK_THREADS) && ${PORT_OPTIONS:MTK86_MAN}
 
 .endif # !defined(NO_INSTALL_MANPAGES)
 
@@ -469,4 +466,4 @@
 	${ECHO_CMD} "package require Tk" | tclsh${TK_VER}
 	${ECHO_CMD} "load libtk${SHORT_TK_VER}.so" | tclsh${TK_VER}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- tk-8.6.b.2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list