[94741] trunk/dports/lang/ragel

jmr at macports.org jmr at macports.org
Thu Jun 28 01:33:42 PDT 2012


Revision: 94741
          https://trac.macports.org/changeset/94741
Author:   jmr at macports.org
Date:     2012-06-28 01:33:40 -0700 (Thu, 28 Jun 2012)
Log Message:
-----------
ragel: fix build with clang (#32346)

Modified Paths:
--------------
    trunk/dports/lang/ragel/Portfile

Added Paths:
-----------
    trunk/dports/lang/ragel/files/
    trunk/dports/lang/ragel/files/cxx_syntax.patch

Modified: trunk/dports/lang/ragel/Portfile
===================================================================
--- trunk/dports/lang/ragel/Portfile	2012-06-28 07:48:11 UTC (rev 94740)
+++ trunk/dports/lang/ragel/Portfile	2012-06-28 08:33:40 UTC (rev 94741)
@@ -24,9 +24,7 @@
 
 depends_build       port:bison
 
-if {${configure.compiler} == "clang"} {
-    configure.compiler llvm-gcc-4.2
-}
+patchfiles          cxx_syntax.patch
 
 post-build    {
     system -W ${worksrcpath}/doc "${build.cmd} ragel.1"

Added: trunk/dports/lang/ragel/files/cxx_syntax.patch
===================================================================
--- trunk/dports/lang/ragel/files/cxx_syntax.patch	                        (rev 0)
+++ trunk/dports/lang/ragel/files/cxx_syntax.patch	2012-06-28 08:33:40 UTC (rev 94741)
@@ -0,0 +1,154 @@
+--- aapl/bstcommon.h.orig	2011-02-11 15:14:44.000000000 +1100
++++ aapl/bstcommon.h	2012-06-28 18:22:04.000000000 +1000
+@@ -361,7 +361,7 @@ template <BST_TEMPL_DEF> bool BstTable<B
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(key, GET_KEY(*mid));
++		keyRelation = this->compare(key, GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+@@ -373,12 +373,12 @@ template <BST_TEMPL_DEF> bool BstTable<B
+ 
+ 			lower = mid - 1;
+ 			while ( lower != lowEnd && 
+-					compare(key, GET_KEY(*lower)) == 0 )
++					this->compare(key, GET_KEY(*lower)) == 0 )
+ 				lower--;
+ 
+ 			upper = mid + 1;
+ 			while ( upper != highEnd && 
+-					compare(key, GET_KEY(*upper)) == 0 )
++					this->compare(key, GET_KEY(*upper)) == 0 )
+ 				upper++;
+ 			
+ 			low = (Element*)lower + 1;
+@@ -419,7 +419,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(key, GET_KEY(*mid));
++		keyRelation = this->compare(key, GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+@@ -457,7 +457,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(key, GET_KEY(*mid));
++		keyRelation = this->compare(key, GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+@@ -508,7 +508,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(key, GET_KEY(*mid));
++		keyRelation = this->compare(key, GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+@@ -603,7 +603,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(GET_KEY(el), GET_KEY(*mid));
++		keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+@@ -662,7 +662,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(GET_KEY(el), GET_KEY(*mid));
++		keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+--- aapl/mergesort.h.orig	2011-02-11 15:14:44.000000000 +1100
++++ aapl/mergesort.h	2012-06-28 18:24:41.000000000 +1000
+@@ -110,7 +110,7 @@ template< class T, class Compare> void M
+ 		}
+ 		else {
+ 			/* Both upper and lower left. */
+-			if ( compare(*lower, *upper) <= 0 )
++			if ( this->compare(*lower, *upper) <= 0 )
+ 				memcpy( dest++, lower++, sizeof(T) );
+ 			else
+ 				memcpy( dest++, upper++, sizeof(T) );
+--- aapl/bubblesort.h.orig	2011-02-11 15:14:44.000000000 +1100
++++ aapl/bubblesort.h	2012-06-28 18:25:59.000000000 +1000
+@@ -72,7 +72,7 @@ template <class T, class Compare> void B
+ 		changed = false;
+ 		for ( long i = 0; i < len-pass; i++ ) {
+ 			/* Do we swap pos with the next one? */
+-			if ( compare( data[i], data[i+1] ) > 0 ) {
++			if ( this->compare( data[i], data[i+1] ) > 0 ) {
+ 				char tmp[sizeof(T)];
+ 
+ 				/* Swap the two items. */
+--- aapl/avlcommon.h.orig	2011-02-11 15:14:44.000000000 +1100
++++ aapl/avlcommon.h	2012-06-28 18:27:36.000000000 +1000
+@@ -881,9 +881,9 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 		}
+ 
+ #ifdef AVL_BASIC
+-		keyRelation = compare( *element, *curEl );
++		keyRelation = this->compare( *element, *curEl );
+ #else
+-		keyRelation = compare( element->BASEKEY(getKey()), 
++		keyRelation = this->compare( element->BASEKEY(getKey()), 
+ 				curEl->BASEKEY(getKey()) );
+ #endif
+ 
+@@ -920,7 +920,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 	long keyRelation;
+ 
+ 	while (curEl) {
+-		keyRelation = compare( *element, *curEl );
++		keyRelation = this->compare( *element, *curEl );
+ 
+ 		/* Do we go left? */
+ 		if ( keyRelation < 0 )
+@@ -969,7 +969,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 			return element;
+ 		}
+ 
+-		keyRelation = compare( key, curEl->BASEKEY(getKey()) );
++		keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+ 
+ 		/* Do we go left? */
+ 		if ( keyRelation < 0 ) {
+@@ -1023,7 +1023,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 			return element;
+ 		}
+ 
+-		keyRelation = compare(key, curEl->getKey());
++		keyRelation = this->compare(key, curEl->getKey());
+ 
+ 		/* Do we go left? */
+ 		if ( keyRelation < 0 ) {
+@@ -1058,7 +1058,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 	long keyRelation;
+ 
+ 	while (curEl) {
+-		keyRelation = compare( key, curEl->BASEKEY(getKey()) );
++		keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+ 
+ 		/* Do we go left? */
+ 		if ( keyRelation < 0 )
+--- ragel/javacodegen.cpp.orig	2011-02-11 15:14:43.000000000 +1100
++++ ragel/javacodegen.cpp	2012-06-28 18:29:53.000000000 +1000
+@@ -1184,7 +1184,7 @@ std::ostream &JavaTabCodeGen::ARRAY_ITEM
+ {
+ 	item_count++;
+ 
+-	out << setw(5) << setiosflags(ios::right) << item;
++	out << setw(5) << std::setiosflags(ios::right) << item;
+ 	
+ 	if ( !last ) {
+ 		if ( item_count % SAIIC == 0 ) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120628/0364f033/attachment.html>


More information about the macports-changes mailing list