ports/145254: [PATCH] audio/csound fltk fixes
Chris Petrik
chris at officialunix.com
Thu Apr 1 05:50:03 UTC 2010
>Number: 145254
>Category: ports
>Synopsis: [PATCH] audio/csound fltk fixes
>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: Thu Apr 01 05:50:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Chris Petrik
>Release: FreeBSD 8.0-STABLE
>Organization:
Officialunix
>Environment:
FreeBSD cpet.gateway.2wire.net 8.0-STABLE FreeBSD 8.0-STABLE #0: Mon Mar 29 10:26:36 CST 2010 root at cpet.gateway.2wire.net:/usr/obj/usr/src/sys/cpet amd64
>Description:
1. Add some detection for FLTK if it already installed dont install, if the user doesn't want GUI add and option to disable it
2. add pkg-plist hack to lease above
3. remove fltk script as fltk now defaults with threads.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: csound/Makefile
===================================================================
RCS file: /usr/local/freebsdncvs/ports/audio/csound/Makefile,v
retrieving revision 1.50
diff -u -r1.50 Makefile
--- csound/Makefile 28 Mar 2010 06:30:49 -0000 1.50
+++ csound/Makefile 1 Apr 2010 05:22:06 -0000
@@ -7,7 +7,7 @@
PORTNAME= csound
PORTVERSION= 5.12.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio lang
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}5/${PORTNAME}5.12/:src \
SF/${PORTNAME}/${PORTNAME}5/${PORTNAME}5.10/:manual
@@ -20,8 +20,10 @@
MAINTAINER= chris at officialunix.com
COMMENT= Sound synthesizer
-LIB_DEPENDS= sndfile:${PORTSDIR}/audio/libsndfile \
- fltk.1:${PORTSDIR}/x11-toolkits/fltk
+LIB_DEPENDS= sndfile:${PORTSDIR}/audio/libsndfile
+.if !exists(${LOCALBASE}/include/FL/Fl.h)
+LIB_DEPENDS+= fltk.1:${PORTSDIR}/x11-toolkits/fltk
+.endif
BUILD_DEPENDS= ${LOCALBASE}/bin/swig:${PORTSDIR}/devel/swig13
WRKSRC= ${WRKDIR}/${DISTNAME}/
@@ -29,18 +31,29 @@
USE_SCONS= yes
SCONS_ARGS+= prefix=${PREFIX} CC=${CC} CXX=${CXX} \
usePortAudio=0 usePortMIDI=0 useALSA=0 \
- useJack=0 useFLTK=1 buildCsoundAC=0 buildCsoundVST=0 \
- buildCsound5GUI=1 buildRelease=1 install=1 \
- useCoreAudio=1 buildWinsound=1 buildInterfaces=1 \
+ useJack=0 buildCsoundAC=0 buildCsoundVST=0 \
+ buildRelease=1 install=1 useCoreAudio=1 \
+ buildWinsound=1 buildInterfaces=1 \
buildVirtual=1 buildCSEditor=1 buildDSSI=0 \
useGettext=1 dynamicCsoundLibrary=1 useDouble=1
+
+OPTIONS= FLTKGUI "Build fltk plugin and GUI" on
+
+.include <bsd.port.pre.mk>
+
USE_GETTEXT= yes
SUB_FILES= custom.py pkg-message
SUB_LIST+= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} \
PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
USE_LDCONFIG= yes
-.include <bsd.port.pre.mk>
+.if !defined(WITHOUT_FLTKGUI)
+PLIST_SUB+= FLTKGUI=""
+SCONS_ARGS+= useFLTK=1 buildCsound5GUI=1
+.else
+PLIST_SUB+= FLTKGUI="@comment "
+SCONS_ARGS+= useFLTK=0 buildCsound5GUI=0
+.endif
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
@@ -48,7 +61,6 @@
.endif
post-patch: apply-slist
- @${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/check-fltk-threads.sh
@${MV} ${WRKDIR}/custom.py ${WRKSRC}
@${REINPLACE_CMD} -e "s|'unsupported'|'linux'|; \
s|ENV = {'PATH' : os.environ\['PATH'\]}|ENV = os.environ|; \
Index: csound/pkg-plist
===================================================================
RCS file: /usr/local/freebsdncvs/ports/audio/csound/pkg-plist,v
retrieving revision 1.5
diff -u -r1.5 pkg-plist
--- csound/pkg-plist 23 Mar 2010 21:55:33 -0000 1.5
+++ csound/pkg-plist 1 Apr 2010 05:22:06 -0000
@@ -4,7 +4,7 @@
bin/csb64enc
bin/cseditor
bin/csound
-bin/csound5gui
+%%FLTKGUI%%bin/csound5gui
bin/cvanal
bin/dnoise
bin/envext
Index: csound/scripts/check-fltk-threads.sh
===================================================================
RCS file: csound/scripts/check-fltk-threads.sh
diff -N csound/scripts/check-fltk-threads.sh
--- csound/scripts/check-fltk-threads.sh 5 Nov 2009 20:30:15 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ -x ${LOCALBASE}/bin/fltk-config ] && [ -z "$(fltk-config --ldflags | grep pthread)" ]; then
- echo "FLTK does not have threading support enabled."
- echo "Please remove the x11-toolkits/fltk port first and recompile csound again"
- echo "The csound port will automatically install the x11-toolkits/fltk-threads port."
- exit 1
-else
- exit 0
-fi
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list