Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Mar 2017 22:02:36 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r435647 - in head/net: unison unison232 unison240
Message-ID:  <201703072202.v27M2aG9082477@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Tue Mar  7 22:02:36 2017
New Revision: 435647
URL: https://svnweb.freebsd.org/changeset/ports/435647

Log:
  - Convert unison ports to option helpers
  - Some whitespace fixes
  - No functional change
  
  Approved by:	mandree (for net/unison232, implicit)

Modified:
  head/net/unison/Makefile
  head/net/unison232/Makefile
  head/net/unison240/Makefile

Modified: head/net/unison/Makefile
==============================================================================
--- head/net/unison/Makefile	Tue Mar  7 20:40:21 2017	(r435646)
+++ head/net/unison/Makefile	Tue Mar  7 22:02:36 2017	(r435647)
@@ -31,46 +31,39 @@ DOCS=		BUGS.txt NEWS README
 EXTRA_DOCS=	${DISTNAME}-manual.html \
 		${DISTNAME}-manual.pdf ${DISTNAME}-manual.ps
 
-OPTIONS_DEFINE= DOCS X11
+OPTIONS_DEFINE=		DOCS X11
 OPTIONS_DEFAULT?=	X11
 
-.include <bsd.port.options.mk>
+X11_MAKE_ARGS=		UISTYLE=gtk2
+X11_PLIST_SUB=		TEXT=""
+X11_BUILD_DEPENDS=	lablgtk2:x11-toolkits/ocaml-lablgtk2 \
+			icotool:graphics/icoutils
+X11_RUN_DEPENDS=	lablgtk2:x11-toolkits/ocaml-lablgtk2
+X11_SUB_FILES=		${PORTNAME}.desktop
+
+X11_MAKE_ARGS_OFF=	UISTYLE=text
+X11_PLIST_SUB_OFF=	TEXT="@comment "
+X11_VARS_OFF=		PKGMESSAGE=${PKGDIR}/pkg-message.nox11
 
-.if ${PORT_OPTIONS:MX11}
-MAKE_ARGS+=	UISTYLE=gtk2
-PLIST_SUB+=	TEXT=""
-BUILD_DEPENDS+=	lablgtk2:x11-toolkits/ocaml-lablgtk2 \
-		icotool:graphics/icoutils
-RUN_DEPENDS+=	lablgtk2:x11-toolkits/ocaml-lablgtk2
-SUB_FILES+=	${PORTNAME}.desktop
-.else
-MAKE_ARGS+=	UISTYLE=text
-PLIST_SUB+=	TEXT="@comment "
-PKGMESSAGE=	${PKGDIR}/pkg-message.nox11
-.endif
-
-.if ${PORT_OPTIONS:MX11}
-post-patch:
+post-patch-X11-on:
 	@${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk2)@\1site-lib/\2@' \
 		${WRKSRC}/Makefile.OCaml
 
-post-build:
+post-build-X11-on:
 	@${ECHO} Building text-only version
 	@${ECHO} ${WRKSRC}
 	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC} CFLAGS="" UISTYLE=text NAME=unison-text
 	@cd ${WRKSRC}/win32rc && ${LOCALBASE}/bin/icotool -x U.ico
-.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
 	cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${EXTRA_DOCS} ${STAGEDIR}${DOCSDIR}
-.if ${PORT_OPTIONS:MX11}
+
+do-install-X11-on:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-text ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR}
 	${INSTALL_DATA} ${WRKSRC}/win32rc/U_4_48x48x32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
-.endif
 
 .include <bsd.port.mk>

Modified: head/net/unison232/Makefile
==============================================================================
--- head/net/unison232/Makefile	Tue Mar  7 20:40:21 2017	(r435646)
+++ head/net/unison232/Makefile	Tue Mar  7 22:02:36 2017	(r435647)
@@ -34,42 +34,35 @@ EXTRA_DOCS=	${DISTNAME}-manual.html \
 OPTIONS_DEFINE=		DOCS X11
 OPTIONS_DEFAULT=	X11
 
-.include <bsd.port.options.mk>
+X11_MAKE_ARGS=		UISTYLE=gtk2
+X11_PLIST_SUB=		TEXT=""
+X11_BUILD_DEPENDS=	lablgtk2:x11-toolkits/ocaml-lablgtk2 \
+			icotool:graphics/icoutils
+X11_RUN_DEPENDS=	lablgtk2:x11-toolkits/ocaml-lablgtk2
+X11_SUB_FILES=		${PORTNAME}.desktop
 
-.if ${PORT_OPTIONS:MX11}
-MAKE_ARGS+=	UISTYLE=gtk2
-PLIST_SUB+=	TEXT=""
-BUILD_DEPENDS+= lablgtk2:x11-toolkits/ocaml-lablgtk2 \
-		icotool:graphics/icoutils
-RUN_DEPENDS+=	lablgtk2:x11-toolkits/ocaml-lablgtk2
-SUB_FILES+=	${PORTNAME}.desktop
-.else
-MAKE_ARGS+=	UISTYLE=text
-PLIST_SUB+=	TEXT="@comment "
-.endif
+X11_MAKE_ARGS_OFF=	UISTYLE=text
+X11_PLIST_SUB_OFF=	TEXT="@comment "
 
-.if ${PORT_OPTIONS:MX11}
-post-patch:
+post-patch-X11-on:
 	@${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk2)@\1site-lib/\2@' \
 		${WRKSRC}/Makefile.OCaml
 
-post-build:
+post-build-X11-on:
 	@${ECHO} Building text-only version
 	@${ECHO} ${WRKSRC}
 	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC} CFLAGS="" UISTYLE=text NAME=${PORTNAME}-text
 	@cd ${WRKSRC}/win32rc && ${LOCALBASE}/bin/icotool -x U.ico
-.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}
-
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
 	cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${EXTRA_DOCS} ${STAGEDIR}${DOCSDIR}
-.if ${PORT_OPTIONS:MX11}
+
+do-install-X11-on:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-text ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}-text
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR}/${PORTNAME}${PKGNAMESUFFIX}.desktop
 	${INSTALL_DATA} ${WRKSRC}/win32rc/U_4_48x48x32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}${PKGNAMESUFFIX}.png
-.endif
 
 .include <bsd.port.mk>

Modified: head/net/unison240/Makefile
==============================================================================
--- head/net/unison240/Makefile	Tue Mar  7 20:40:21 2017	(r435646)
+++ head/net/unison240/Makefile	Tue Mar  7 22:02:36 2017	(r435647)
@@ -31,46 +31,39 @@ DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}
 EXTRA_DOCS=	${DISTNAME}-manual.html \
 		${DISTNAME}-manual.pdf ${DISTNAME}-manual.ps
 
-OPTIONS_DEFINE= DOCS X11
-OPTIONS_DEFAULT?=        DOCS X11
+OPTIONS_DEFINE=		DOCS X11
+OPTIONS_DEFAULT?=	DOCS X11
 
-.include <bsd.port.options.mk>
+X11_MAKE_ARGS=		UISTYLE=gtk2
+X11_PLIST_SUB=		TEXT=""
+X11_BUILD_DEPENDS=	lablgtk2:x11-toolkits/ocaml-lablgtk2 \
+			icotool:graphics/icoutils
+X11_RUN_DEPENDS=	lablgtk2:x11-toolkits/ocaml-lablgtk2
+X11_SUB_FILES=		${PORTNAME}.desktop
+
+X11_MAKE_ARGS_OFF=	UISTYLE=text
+X11_PLIST_SUB_OFF=	TEXT="@comment "
+X11_VARS_OFF=		PKGMESSAGE=${PKGDIR}/pkg-message.nox11
 
-.if ${PORT_OPTIONS:MX11}
-MAKE_ARGS+=	UISTYLE=gtk2
-PLIST_SUB+=	TEXT=""
-BUILD_DEPENDS+= lablgtk2:x11-toolkits/ocaml-lablgtk2 \
-		icotool:graphics/icoutils
-RUN_DEPENDS+=	lablgtk2:x11-toolkits/ocaml-lablgtk2
-SUB_FILES+=	${PORTNAME}.desktop
-.else
-MAKE_ARGS+=	UISTYLE=text
-PLIST_SUB+=	TEXT="@comment "
-PKGMESSAGE=	${PKGDIR}/pkg-message.nox11
-.endif
-
-.if ${PORT_OPTIONS:MX11}
-post-patch:
+post-patch-X11-on:
 	@${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk2)@\1site-lib/\2@' \
 		${WRKSRC}/Makefile.OCaml
 
-post-build:
+post-build-X11-on:
 	@${ECHO} Building text-only version
 	@${ECHO} ${WRKSRC}
 	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC} CFLAGS="" UISTYLE=text NAME=unison-text
 	@cd ${WRKSRC}/win32rc && ${LOCALBASE}/bin/icotool -x U.ico
-.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}
-
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
 	cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${EXTRA_DOCS} ${STAGEDIR}${DOCSDIR}
-.if ${PORT_OPTIONS:MX11}
+
+do-install-X11-on:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-text ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}-text
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR}/${PORTNAME}${PKGNAMESUFFIX}.desktop
 	${INSTALL_DATA} ${WRKSRC}/win32rc/U_4_48x48x32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}${PKGNAMESUFFIX}.png
-.endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703072202.v27M2aG9082477>