svn commit: r470621 - head/graphics/gocr

Yuri Victorovich yuri at FreeBSD.org
Tue May 22 15:32:54 UTC 2018


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>


More information about the svn-ports-head mailing list