Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2018 15:32:54 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r470621 - head/graphics/gocr
Message-ID:  <201805221532.w4MFWsi7072296@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Tue May 22 15:32:53 2018
New Revision: 470621
URL: https://svnweb.freebsd.org/changeset/ports/470621

Log:
  graphics/gocr: Modernize port: use helpers instead of .include/.if/.endif
  
  Approved by:	portmgr blanket

Modified:
  head/graphics/gocr/Makefile

Modified: head/graphics/gocr/Makefile
==============================================================================
--- head/graphics/gocr/Makefile	Tue May 22 15:09:38 2018	(r470620)
+++ head/graphics/gocr/Makefile	Tue May 22 15:32:53 2018	(r470621)
@@ -34,28 +34,25 @@ DOC_FILES2=	*.dtd *.xml *.html *.txt *.fig *.png
 OPTIONS_DEFINE=	X11 DOCS
 OPTIONS_DEFAULT=	X11
 
-.include <bsd.port.options.mk>
+X11_USES=		tk
+X11_PLIST_FILES=	bin/gocr.tcl
 
-.if ${PORT_OPTIONS:MX11}
-USES+=		tk
-PLIST_FILES+=	bin/gocr.tcl
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e 's|@LIBS@|-L${LOCALBASE}/lib @LIBS@|g' ${WRKSRC}/src/Makefile.in
-.if !  ${PORT_OPTIONS:MX11}
+
+post-patch-X11-off:
 	@${REINPLACE_CMD} -e '/gocr.tcl/d' ${WRKSRC}/src/Makefile.in
-.else
+
+post-patch-X11-on:
 	@${REINPLACE_CMD} -e 's|exec wish|exec ${WISH}|' ${WRKSRC}/bin/gocr.tcl
-.endif
 
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gocr
-.if ${PORT_OPTIONS:MDOCS}
+
+post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR2}
 	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}
-.endif
 
 .include <bsd.port.mk>



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