mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 09:19:15 -04:00
Reduce over inclusion of bsd.port.mk
Use options helpers
This commit is contained in:
parent
22c03fd2c4
commit
21b4d1d456
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339878
1 changed files with 6 additions and 14 deletions
|
@ -12,34 +12,26 @@ DISTNAME= indent-${PORTVERSION}
|
||||||
MAINTAINER= johans@FreeBSD.org
|
MAINTAINER= johans@FreeBSD.org
|
||||||
COMMENT= GNU indent
|
COMMENT= GNU indent
|
||||||
|
|
||||||
|
OPTIONS_DEFINE= DOCS NLS
|
||||||
|
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
CPPFLAGS+= -I${LOCALBASE}/include -DBERKELEY_DEFAULTS=1
|
CPPFLAGS+= -I${LOCALBASE}/include -DBERKELEY_DEFAULTS=1
|
||||||
LDFLAGS+= -L${LOCALBASE}/lib
|
LDFLAGS+= -L${LOCALBASE}/lib
|
||||||
CONFIGURE_ARGS= --program-prefix=g
|
CONFIGURE_ARGS= --program-prefix=g
|
||||||
MAKE_JOBS_UNSAFE= yes
|
MAKE_JOBS_UNSAFE= yes
|
||||||
|
|
||||||
.include <bsd.port.options.mk>
|
NLS_USES= gettext
|
||||||
|
OPTIONS_SUB= yes
|
||||||
.if ${PORT_OPTIONS:MNLS}
|
NLS_CONFIGURE_OFF= --disable-nls
|
||||||
USES+= gettext
|
|
||||||
PLIST_SUB+= NLS=""
|
|
||||||
.else
|
|
||||||
CONFIGURE_ARGS+=--disable-nls
|
|
||||||
PLIST_SUB+= NLS="@comment "
|
|
||||||
.endif
|
|
||||||
|
|
||||||
INFO= indent
|
INFO= indent
|
||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
@${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
|
@${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
|
||||||
's|malloc\.h|stdlib.h|g'
|
's|malloc\.h|stdlib.h|g'
|
||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
.if ${PORT_OPTIONS:MDOCS}
|
|
||||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||||
${INSTALL_DATA} ${WRKSRC}/doc/indent.html ${STAGEDIR}${DOCSDIR}
|
${INSTALL_DATA} ${WRKSRC}/doc/indent.html ${STAGEDIR}${DOCSDIR}
|
||||||
.endif
|
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
Loading…
Add table
Reference in a new issue