[PATCH] devel/colorer: fix the build with gcc 3.4, unmark BROKEN

Sergio Mangialardi sergio at softshark.org
Sat Sep 18 04:52:59 PDT 2004


>Submitter-Id:	current-users
>Originator:	Sergio Mangialardi
>Organization:	
>Confidential:	no 
>Synopsis:	[PATCH] devel/colorer: fix the build with gcc 3.4, unmark BROKEN
>Severity:	serious
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 5.2.1-RELEASE-p9 i386
>Environment:
System: FreeBSD ainu.softshark.home 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #10: Sun Jul  4 01:51:04 CEST
>Description:
This patch:
    - fixes some problems with two-stage name-lookup.
    - changes some spaces to tabs in Makefile 
    - remove the BROKEN mark; the port build properly.

Added file(s):
- files/patch-src:shared:common:Hashtable.h

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- colorer-0.b2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/colorer.old/Makefile /usr/ports/devel/colorer/Makefile
--- /usr/ports/devel/colorer.old/Makefile	Sat Sep 18 11:16:35 2004
+++ /usr/ports/devel/colorer/Makefile	Sat Sep 18 13:45:22 2004
@@ -34,17 +34,13 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 502126
-BROKEN=		"Does not compile on FreeBSD >= 5.x"
-.endif
-
 do-build:
 	@(cd ${WRKSRC} && \
-          ${SETENV} JAVA_HOME=${JAVA_HOME} ${ANT} ${ANT_TARGET} ; \
-	  cd distr/Colorer-take5-linux.beta2 ; \
-	  ${REINPLACE_CMD} -e "s|make -C|${GMAKE} -C|" Makefile.in ; \
-	  ${CHMOD} +x configure && ${SETENV} ${CONFIGURE_ENV} ./configure ; \
-	  ${GMAKE} ${PORTNAME} \
+	${SETENV} JAVA_HOME=${JAVA_HOME} ${ANT} ${ANT_TARGET} ; \
+	cd distr/Colorer-take5-linux.beta2 ; \
+	${REINPLACE_CMD} -e "s|make -C|${GMAKE} -C|" Makefile.in ; \
+	${CHMOD} +x configure && ${SETENV} ${CONFIGURE_ENV} ./configure ; \
+	${GMAKE} ${PORTNAME} \
 	)
 
 do-install:
diff -ruN --exclude=CVS /usr/ports/devel/colorer.old/files/patch-src:shared:common:Hashtable.h /usr/ports/devel/colorer/files/patch-src:shared:common:Hashtable.h
--- /usr/ports/devel/colorer.old/files/patch-src:shared:common:Hashtable.h	Thu Jan  1 01:00:00 1970
+++ /usr/ports/devel/colorer/files/patch-src:shared:common:Hashtable.h	Sat Sep 18 13:43:30 2004
@@ -0,0 +1,59 @@
+--- src/shared/common/Hashtable.h.orig	Fri Sep 12 20:46:35 2003
++++ src/shared/common/Hashtable.h	Sat Sep 18 12:38:09 2004
+@@ -20,8 +20,8 @@
+ 
+   T get(const String *key) const{
+     int hash = key->hashCode();
+-    int bno = (hash&0x7FFFFFFF) % capacity;
+-    for(HashEntry<T> *he = bucket[bno]; he != null; he = he->next)
++    int bno = (hash&0x7FFFFFFF) % this->capacity;
++    for(HashEntry<T> *he = this->bucket[bno]; he != null; he = he->next)
+       if (he->hash == hash && *he->key == *key)
+         return he->value;
+     return null;
+@@ -31,7 +31,7 @@
+       Returns first element value in a sequence, or null, if hashtable is empty.
+   */
+   T enumerate() const{
+-    T * retval = enumerate_int();
++    T * retval = this->enumerate_int();
+     if (retval == null) return null;
+     return *retval;
+   };
+@@ -40,7 +40,7 @@
+       is thrown.
+   */
+   T next() const{
+-    T *retval = next_int();
++    T *retval = this->next_int();
+     if (retval == null) return null;
+     return *retval;
+   };
+@@ -62,8 +62,8 @@
+ 
+   const T *get(const String *key) const{
+     int hash = key->hashCode();
+-    int bno = (hash&0x7FFFFFFF) % capacity;
+-    for(HashEntry<T> *he = bucket[bno]; he != null; he = he->next)
++    int bno = (hash&0x7FFFFFFF) % this->capacity;
++    for(HashEntry<T> *he = this->bucket[bno]; he != null; he = he->next)
+       if (he->hash == hash && *he->key == *key)
+         return &he->value;
+     return null;
+@@ -73,14 +73,14 @@
+       Returns first element value in a sequence, or null, if hashtable is empty
+   */
+   T *enumerate() const{
+-    return enumerate_int();
++    return this->enumerate_int();
+   };
+   /** Returns the next value object with current enumeration procedure.
+       If hashtable state is changed, and next() call occurs, exception
+       is thrown.
+   */
+   T *next() const{
+-    return next_int();
++    return this->next_int();
+   };
+ };
+ 
--- colorer-0.b2.patch ends here ---



More information about the freebsd-ports mailing list