aboutsummaryrefslogtreecommitdiff
path: root/net/unison
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2017-03-07 22:02:36 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2017-03-07 22:02:36 +0000
commit4e5c5f64ebd837673aea89bf8bb4bccfe9d537c3 (patch)
tree6e3257018b9117488a2b04628384b8892cda693c /net/unison
parente81b4bea693371defa3a2c169ddd90ef6cc4e645 (diff)
downloadports-4e5c5f64ebd837673aea89bf8bb4bccfe9d537c3.tar.gz
ports-4e5c5f64ebd837673aea89bf8bb4bccfe9d537c3.zip
- Convert unison ports to option helpers
- Some whitespace fixes - No functional change Approved by: mandree (for net/unison232, implicit)
Notes
Notes: svn path=/head/; revision=435647
Diffstat (limited to 'net/unison')
-rw-r--r--net/unison/Makefile35
1 files changed, 14 insertions, 21 deletions
diff --git a/net/unison/Makefile b/net/unison/Makefile
index 475024717373..1bc84125ee77 100644
--- a/net/unison/Makefile
+++ b/net/unison/Makefile
@@ -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
-.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
+X11_MAKE_ARGS_OFF= UISTYLE=text
+X11_PLIST_SUB_OFF= TEXT="@comment "
+X11_VARS_OFF= PKGMESSAGE=${PKGDIR}/pkg-message.nox11
-.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>