diff options
author | miwi <miwi@FreeBSD.org> | 2007-11-21 22:57:50 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-11-21 22:57:50 +0800 |
commit | 555e81be51bb507d08031e5a6c0397b695138ea1 (patch) | |
tree | 09372d0ab82676ac3f02e6f864cdd63b65f4f78e /graphics/libv3d | |
parent | a8088458d4f2f97157bc026571acbd831e69909f (diff) | |
download | freebsd-ports-gnome-555e81be51bb507d08031e5a6c0397b695138ea1.tar.gz freebsd-ports-gnome-555e81be51bb507d08031e5a6c0397b695138ea1.tar.zst freebsd-ports-gnome-555e81be51bb507d08031e5a6c0397b695138ea1.zip |
- Fix build with gcc 4.2
PR: 118085
Submitted by: Pietro Cerutti <gahr@gahr.ch>
Approved by: portmgr (pav)
Diffstat (limited to 'graphics/libv3d')
-rw-r--r-- | graphics/libv3d/Makefile | 8 | ||||
-rw-r--r-- | graphics/libv3d/files/patch-libv3d_disk.cpp | 42 | ||||
-rw-r--r-- | graphics/libv3d/files/patch-libv3d_string.cpp | 81 |
3 files changed, 124 insertions, 7 deletions
diff --git a/graphics/libv3d/Makefile b/graphics/libv3d/Makefile index 9bc025c82543..ada1e0dacc91 100644 --- a/graphics/libv3d/Makefile +++ b/graphics/libv3d/Makefile @@ -78,12 +78,6 @@ MAN3= V3DGLInterpriteDelete.3 \ v3d_hf_options_struct.3 \ v3d_texture_ref_struct.3 -.include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 700042 -BROKEN= Broken with gcc 4.2 -.endif - post-patch: @${REINPLACE_CMD} -e "s,make,${GMAKE},g" ${WRKSRC}/Makefile @${REINPLACE_CMD} -e "s,%%CFLAGS%%,${CFLAGS},g" \ @@ -92,4 +86,4 @@ post-patch: -e "s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g" \ ${WRKSRC}/libv3d/platforms.ini -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/graphics/libv3d/files/patch-libv3d_disk.cpp b/graphics/libv3d/files/patch-libv3d_disk.cpp new file mode 100644 index 000000000000..33d4c77b6889 --- /dev/null +++ b/graphics/libv3d/files/patch-libv3d_disk.cpp @@ -0,0 +1,42 @@ +--- libv3d/disk.cpp.orig 2007-11-16 12:27:26.000000000 +0100 ++++ libv3d/disk.cpp 2007-11-16 12:30:59.000000000 +0100 +@@ -120,12 +120,7 @@ + if(path == NULL) + return(0); + +- // Dan S: typecast is due to const. +-#if defined(__cplusplus) || defined(c_plusplus) +- while(ISBLANK(reinterpret_cast<char>(*path))) +-#else + while(ISBLANK(*path)) +-#endif + path++; + + return((*path) == DIR_DELIMINATOR); +@@ -440,7 +435,7 @@ + /* Get enviroment value of HOME. */ + strptr = getenv("HOME"); + if(strptr == NULL) +- strptr = "/"; ++ strptr = (char *)"/"; + + /* Copy input path to return path. */ + strncpy(rtn_path, path, PATH_MAX); +@@ -1006,7 +1001,7 @@ + (child == NULL) || + (parent == child) + ) +- return("/"); ++ return((char *)"/"); + + /* If child is absolute, copy child and return. */ + if((*child) == DIR_DELIMINATOR) +@@ -1245,7 +1240,7 @@ + + + if(path == NULL) +- return("/"); ++ return((char *)"/"); + + i = 0; + strptr1 = path; diff --git a/graphics/libv3d/files/patch-libv3d_string.cpp b/graphics/libv3d/files/patch-libv3d_string.cpp new file mode 100644 index 000000000000..3e26dff883c9 --- /dev/null +++ b/graphics/libv3d/files/patch-libv3d_string.cpp @@ -0,0 +1,81 @@ +--- libv3d/string.cpp.orig 2007-11-16 12:31:03.000000000 +0100 ++++ libv3d/string.cpp 2007-11-16 12:39:14.000000000 +0100 +@@ -1012,20 +1012,20 @@ + + /* Is string empty? */ + if(string == NULL) +- return(""); ++ return((char *)""); + if((string[0] == '\0') || + (string[0] == '\r') || + (string[0] == '\n') + ) +- return(""); ++ return((char *)""); + + /* Is string a comment? */ + if(StringIsComment(string, UNIXCFG_COMMENT_CHAR)) +- return(""); ++ return((char *)""); + + /* Does string have a delimiter? */ + if(strchr(string, CFG_PARAMETER_DELIMITER) == NULL) +- return(""); ++ return((char *)""); + + + /* Begin fetching value from string. */ +@@ -1295,7 +1295,7 @@ + static char arg[CS_DATA_MAX_LEN]; + + if(str == NULL) +- return(""); ++ return((char *)""); + + strncpy(arg, str, CS_DATA_MAX_LEN); + arg[CS_DATA_MAX_LEN - 1] = '\0'; +@@ -1309,7 +1309,7 @@ + return(strptr); + } + +- return(""); ++ return((char *)""); + } + + +@@ -1337,15 +1337,15 @@ + + + if(format == NULL) +- return(""); ++ return((char *)""); + if((*format) == '\0') +- return(""); ++ return((char *)""); + + /* Get current time. */ + time(¤t); + tm_ptr = localtime(¤t); + if(tm_ptr == NULL) +- return(""); ++ return((char *)""); + + /* Format time string. */ + len = strftime( +@@ -1377,13 +1377,13 @@ + + + if(format == NULL) +- return(""); ++ return((char *)""); + if((*format) == '\0') +- return(""); ++ return((char *)""); + + tm_ptr = localtime(&seconds); + if(tm_ptr == NULL) +- return(""); ++ return((char *)""); + + /* Format time string. */ + len = strftime( |