From d3e496de90e04e59a3b00ab08a66f9e79aaf4653 Mon Sep 17 00:00:00 2001 From: rafan Date: Tue, 25 Sep 2007 08:53:49 +0000 Subject: - When fltk is not installed, scripts/check-fltk-threads.sh misbehaves due to not checking existence of fltk-config before using it. Fix that by checking existence before using. PR: ports/116623 Submitted by: bgruber Approved by: Martin Tournoij (maintainer) --- audio/csound/Makefile | 3 ++- audio/csound/scripts/check-fltk-threads.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/audio/csound/Makefile b/audio/csound/Makefile index 29d05e157df5..f337563c7e3a 100644 --- a/audio/csound/Makefile +++ b/audio/csound/Makefile @@ -41,8 +41,9 @@ USE_LDCONFIG= yes DISTFILES+= ${DISTNAME}-manual.tar.gz:manual .endif +FLTKBASE?= ${LOCALBASE} post-patch: apply-slist - @/bin/sh ${SCRIPTDIR}/check-fltk-threads.sh + @${SETENV} FLTKBASE=${FLTKBASE} ${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|; \ diff --git a/audio/csound/scripts/check-fltk-threads.sh b/audio/csound/scripts/check-fltk-threads.sh index 5168db9e1bea..0cd015cf5a37 100644 --- a/audio/csound/scripts/check-fltk-threads.sh +++ b/audio/csound/scripts/check-fltk-threads.sh @@ -1,7 +1,7 @@ #!/bin/sh -if [ -z "$(fltk-config --ldflags | grep pthread)" ]; then - echo "FLTK does not have threading support enabled.e" +if [ -x ${FLTKBASE}/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 -- cgit