ports/148109: [patch] audio/ladspa: avoid custom make targets

Anonymous swell.k at gmail.com
Thu Jun 24 10:20:08 UTC 2010


>Number:         148109
>Category:       ports
>Synopsis:       [patch] audio/ladspa: avoid custom make targets
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 24 10:20:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
- use build/install logic from distfile, the port depends
  on devel/gmake, anyway
- respect CC/CXX from environ and make.conf
- make post-patch target quiet, not install target
>How-To-Repeat:
$ env CC=clang CXX=clang++ make build
>Fix:
--- a.diff begins here ---
Index: audio/ladspa/Makefile
===================================================================
RCS file: /a/.cvsup/ports/audio/ladspa/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- audio/ladspa/Makefile	4 Jun 2010 21:41:40 -0000	1.14
+++ audio/ladspa/Makefile	24 Jun 2010 09:47:33 -0000
@@ -17,28 +17,20 @@ COMMENT=	Linux Audio Developer's Simple 
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/doc/COPYING
 
-WRKSRC=		${WRKDIR}/ladspa_sdk
 USE_GMAKE=	yes
 USE_LDCONFIG=	yes
-PROGRAM_FILES=	analyseplugin applyplugin listplugins
-PLUGIN_FILES=	amp.so delay.so filter.so noise.so sine.so
-PLUGIN_DIR?=	${PREFIX}/lib/ladspa/
-
-post-patch:
-	${REINPLACE_CMD} -e 's,-ldl,,; s,-O3,${CFLAGS},; s,CPP,CXX,' \
-		${WRKSRC}/src/makefile
 
-do-build:
-	cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${GMAKE} -f makefile targets
+WRKSRC=		${WRKDIR}/ladspa_sdk
+BUILD_WRKSRC=	${WRKSRC}/src
+INSTALL_WRKSRC=	${BUILD_WRKSRC}
+MAKEFILE=	makefile
+ALL_TARGET=	targets
 
-do-install:
-	@${INSTALL_DATA} ${WRKSRC}/src/ladspa.h ${PREFIX}/include
-.for file in ${PROGRAM_FILES}
-	@${INSTALL_PROGRAM} ${WRKSRC}/bin/${file} ${PREFIX}/bin
-.endfor
-	@${MKDIR} ${PLUGIN_DIR}
-.for file in ${PLUGIN_FILES}
-	@${INSTALL_DATA} ${WRKSRC}/plugins/${file} ${PLUGIN_DIR}
-.endfor
+post-patch:	.SILENT
+	${REINPLACE_CMD} -e 's,-ldl,,; s,/usr,${PREFIX},; s,-mkdirhier,${INSTALL} -d,; /CFLAGS/s,-O3,,; s,CPP,CXX,' \
+		-Ee '/CC|CXX[[:space:]]/s,=,?=,; /CFLAGS|CXXFLAGS/s,=,+=,;' \
+		-e '/install:/,/^$$/{ /(BINARY|PLUGINS)_DIR/s,cp,${INSTALL_PROGRAM},; \
+			/INCLUDE_DIR/s,cp,${INSTALL_DATA},; }' \
+		${WRKSRC}/src/makefile
 
 .include <bsd.port.mk>
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list