1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- use PORTEXAMPLES

- no need to patch examples/Makefile, we don't use it
- clean up DOCS installation too

PR:		177052
Submitted by:	antoine (maintainer)
This commit is contained in:
Ruslan Makhmatkhanov 2013-03-24 17:18:56 +00:00
parent 57c1c8613b
commit ec84de021e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=315147
2 changed files with 4 additions and 18 deletions

View File

@ -13,15 +13,10 @@ COMMENT= Simple x86 disassembly library
USE_LDCONFIG= yes
PORTDOCS= HISTORY.txt README.txt
PORTEXAMPLES= README.txt das.c simple.c
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MEXAMPLES}
PLIST_SUB+= EXAMPLES=""
.else
PLIST_SUB+= EXAMPLES="@comment "
.endif
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
CFLAGS+= -fPIC -DPIC
.endif
@ -30,21 +25,16 @@ post-patch:
@${REINPLACE_CMD} -E 's,^(CC|CFLAGS|PREFIX).*=,\1 ?=,; \
s,libdasm.so.1.0,libdasm.so.1,g; \
s,cp ,${INSTALL_DATA} ,g' \
${WRKSRC}/Makefile \
${WRKSRC}/examples/Makefile
${WRKSRC}/Makefile
post-install:
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/README.txt ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/das.c ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/simple.c ${EXAMPLESDIR}
${INSTALL_DATA} ${PORTEXAMPLES:S,^,${WRKSRC}/examples/,} ${EXAMPLESDIR}
.endif
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
@for f in ${PORTDOCS}; do \
${INSTALL_DATA} ${WRKSRC}/$${f} ${DOCSDIR}; \
done
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -2,7 +2,3 @@ include/libdasm.h
lib/libdasm.a
lib/libdasm.so
lib/libdasm.so.1
%%EXAMPLES%%%%EXAMPLESDIR%%/README.txt
%%EXAMPLES%%%%EXAMPLESDIR%%/das.c
%%EXAMPLES%%%%EXAMPLESDIR%%/simple.c
%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%