pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/festival Use compiler.mk logic to determine the ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/396db3dfd908
branches:  trunk
changeset: 465178:396db3dfd908
user:      sketch <sketch%pkgsrc.org@localhost>
date:      Tue Dec 23 10:35:30 2003 +0000

description:
Use compiler.mk logic to determine the correct compiler to use, and clean
up the pattern matching.

Fixes build warnings on systems which do not use GCC.

diffstat:

 audio/festival/Makefile |  29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diffs (47 lines):

diff -r d0cd0b66f39b -r 396db3dfd908 audio/festival/Makefile
--- a/audio/festival/Makefile   Tue Dec 23 10:21:53 2003 +0000
+++ b/audio/festival/Makefile   Tue Dec 23 10:35:30 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2003/10/06 21:40:17 jmc Exp $
+# $NetBSD: Makefile,v 1.28 2003/12/23 10:35:30 sketch Exp $
 
 DISTNAME=      festival-1.4.1
 PKGREVISION=   1
@@ -29,6 +29,24 @@
 
 .include "../../mk/bsd.prefs.mk"
 
+.if defined(USE_SUNPRO)
+PKG_COMPILER?= suncc
+.else
+PKG_COMPILER!= case "${CC_VERSION}" in                                 \
+                       gcc-2.6.*)      ${ECHO} gcc26;;                 \
+                       gcc-2.7.*)      ${ECHO} gcc27;;                 \
+                       gcc-2.8.*)      ${ECHO} gcc28;;                 \
+                       gcc-2.95.*)     ${ECHO} gcc295;;                \
+                       gcc-3.3.*)      ${ECHO} gcc295;;                \
+                       egcs*)          ${ECHO} egcs;;                  \
+                       *)              ${ECHO} ;;                      \
+               esac
+.endif
+
+.if empty(PKG_COMPILER)
+PKG_FAIL_REASON=       "${CC_VERSION} is not currently supported."
+.endif
+
 MAKE_ENV+=     PKG_EST_HOME="${SPEECHTOOLS}"                           \
                EST_HOME="${SPEECHTOOLS}"                               \
                PKG_FESTIVAL_BUILD_HOME="${FESTIVAL}"                   \
@@ -81,12 +99,3 @@
 
 .include "../../audio/nas/buildlink2.mk"
 .include "../../mk/bsd.pkg.mk"
-
-# has to be below bsd.pkg.mk, else ${ECHO} isn't expanded correctly
-PKG_COMPILER!= case "`${CC} -v 2>&1`" in *2.6.*) ${ECHO} gcc26;;\
-                                       *2.7.*) ${ECHO} gcc27;;\
-                                       *2.8.*) ${ECHO} gcc28;;\
-                                       *2.95.*) ${ECHO} gcc295;;\
-                                       *3.3.*) ${ECHO} gcc295;;\
-                                       *egcs*) ${ECHO} egcs;;\
-                                       esac



Home | Main Index | Thread Index | Old Index