diff --git a/devel/libdasm/Makefile b/devel/libdasm/Makefile index 3bae9304090d..e015fe42a979 100644 --- a/devel/libdasm/Makefile +++ b/devel/libdasm/Makefile @@ -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 -.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 diff --git a/devel/libdasm/pkg-plist b/devel/libdasm/pkg-plist index 7c347fd47a5a..fd7bd82e9f3d 100644 --- a/devel/libdasm/pkg-plist +++ b/devel/libdasm/pkg-plist @@ -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%%