[90801] trunk/dports/textproc/lilypond

snc at macports.org snc at macports.org
Wed Mar 14 13:42:27 PDT 2012


Revision: 90801
          https://trac.macports.org/changeset/90801
Author:   snc at macports.org
Date:     2012-03-14 13:42:27 -0700 (Wed, 14 Mar 2012)
Log Message:
-----------
lilypond: build with non-gcc compilers, #32647

Modified Paths:
--------------
    trunk/dports/textproc/lilypond/Portfile

Added Paths:
-----------
    trunk/dports/textproc/lilypond/files/patch-non-gcc.diff

Modified: trunk/dports/textproc/lilypond/Portfile
===================================================================
--- trunk/dports/textproc/lilypond/Portfile	2012-03-14 20:14:39 UTC (rev 90800)
+++ trunk/dports/textproc/lilypond/Portfile	2012-03-14 20:42:27 UTC (rev 90801)
@@ -63,6 +63,10 @@
     }
 }
 
+if {${configure.compiler} == "clang"} {
+    configure.compiler  llvm-gcc-4.2
+}
+
 configure.args  --with-ncsb-dir=${prefix}/share/fonts/urw-fonts \
     --disable-documentation
 

Added: trunk/dports/textproc/lilypond/files/patch-non-gcc.diff
===================================================================
--- trunk/dports/textproc/lilypond/files/patch-non-gcc.diff	                        (rev 0)
+++ trunk/dports/textproc/lilypond/files/patch-non-gcc.diff	2012-03-14 20:42:27 UTC (rev 90801)
@@ -0,0 +1,80 @@
+--- configure.in
++++ configure.in
+@@ -91,10 +91,14 @@ AC_MSG_RESULT($NCSB_SOURCE_FILES)
+ AC_LANG([C++])
+ 
+ STEPMAKE_PYTHON(REQUIRED, 2.4)
+-STEPMAKE_GCC(REQUIRED, 3.4)
++# this checks if we have GNU C by compiling a program with
++# __GNUC__, but that macro now unofficially means "the compiler
++# supports the GNU C extensions" -- the intel C compiler and clang
++# both support __GNUC__!
++STEPMAKE_GCC_OR_CLANG(REQUIRED, 3.4)
+ 
+ STEPMAKE_CXX(REQUIRED)
+-STEPMAKE_GXX(REQUIRED, 3.4)
++STEPMAKE_GXX_OR_CLANG(REQUIRED, 3.4)
+ STEPMAKE_CXXTEMPLATE
+ STEPMAKE_STL_DATA_METHOD
+ STEPMAKE_LIB(REQUIRED)
+--- stepmake/aclocal.m4
++++ stepmake/aclocal.m4
+@@ -494,13 +494,17 @@ EOF
+         AC_MSG_RESULT($FLEXLEXER_FILE)
+ ])
+ 
+-AC_DEFUN(STEPMAKE_GCC, [
+-    if test "$GCC" = "yes"; then
+-        STEPMAKE_CHECK_VERSION(CC, $1, $2)
+-    else
+-	warn="$CC (Please install *GNU* cc)"
+-	STEPMAKE_ADD_ENTRY($1, $warn)
++AC_DEFUN(STEPMAKE_GCC_OR_CLANG, [
++    STEPMAKE_HAS_CLANG()
++    if test "$HAS_CLANG" = "no"; then
++        if test "$GCC" = "yes"; then
++            STEPMAKE_CHECK_VERSION(CC, $1, $2)
++        else
++	    warn="$CC (Please install *GNU* cc)"
++	    STEPMAKE_ADD_ENTRY($1, $warn)
++        fi
+     fi
++    # no else, we're fine with any clang
+ ])
+ 
+ AC_DEFUN(STEPMAKE_GETTEXT, [
+@@ -616,13 +620,25 @@ AC_DEFUN(STEPMAKE_DLOPEN, [
+     AC_CHECK_FUNCS(dlopen)
+ ])
+ 
+-AC_DEFUN(STEPMAKE_GXX, [
+-    if test "$GXX" = "yes"; then
+-        STEPMAKE_CHECK_VERSION(CXX, $1, $2)
+-    else
+-	warn="$CXX (Please install *GNU* c++)"
+-	STEPMAKE_ADD_ENTRY($1, $warn)
++AC_DEFUN(STEPMAKE_HAS_CLANG, [
++    AC_EGREP_CPP(yes,
++      [#ifdef __clang__
++       yes
++       #endif
++      ], HAS_CLANG=yes, HAS_CLANG=no)
++])
++
++AC_DEFUN(STEPMAKE_GXX_OR_CLANG, [
++    STEPMAKE_HAS_CLANG()
++    if test "$HAS_CLANG" = "no"; then
++        if test "$GXX" = "yes"; then
++            STEPMAKE_CHECK_VERSION(CXX, $1, $2)
++        else
++	    warn="$CXX (Please install *GNU* c++)"
++	    STEPMAKE_ADD_ENTRY($1, $warn)
++        fi
+     fi
++    # no else, we're fine with any clang
+ ])
+ 
+ 
+-- 
+1.7.2.5
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120314/b01d0589/attachment.html>


More information about the macports-changes mailing list