ports/177052: [maintainer] update devel/libdasm to use PORTEXAMPLES
Antoine Brodin
antoine at freebsd.org
Sun Mar 17 13:50:00 UTC 2013
>Number: 177052
>Category: ports
>Synopsis: [maintainer] update devel/libdasm to use PORTEXAMPLES
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Mar 17 13:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Antoine Brodin
>Release: FreeBSD 10.0-CURRENT i386
>Organization:
none
>Environment:
System: FreeBSD barton.dreadbsd.org. 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r248109M: Sat Mar 9 18:30:15 CET 2013 root at barton.dreadbsd.org.:/usr/obj/usr/src/sys/MYGENERICFAST i386
>Description:
- Use PORTEXAMPLES
- No need to patch examples/Makefile, we don't use it
- Clean up DOCS installation too
>How-To-Repeat:
>Fix:
--- libdasm.diff begins here ---
Index: devel/libdasm/Makefile
===================================================================
--- devel/libdasm/Makefile (revision 314423)
+++ devel/libdasm/Makefile (working copy)
@@ -13,15 +13,10 @@
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 @@
@${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>
Index: devel/libdasm/pkg-plist
===================================================================
--- devel/libdasm/pkg-plist (revision 314423)
+++ devel/libdasm/pkg-plist (working copy)
@@ -2,7 +2,3 @@
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%%
--- libdasm.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list