aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorriggs <riggs@FreeBSD.org>2018-04-01 23:36:23 +0800
committerriggs <riggs@FreeBSD.org>2018-04-01 23:36:23 +0800
commitfe13facefdd4a9755b26a8b3e6e76a77902d6647 (patch)
tree352e132b7342de67199485624c0a88cd451953e5
parent7e37e4f8864b810d8121d0cc586a46ddd70e3fb0 (diff)
downloadfreebsd-ports-gnome-fe13facefdd4a9755b26a8b3e6e76a77902d6647.tar.gz
freebsd-ports-gnome-fe13facefdd4a9755b26a8b3e6e76a77902d6647.tar.zst
freebsd-ports-gnome-fe13facefdd4a9755b26a8b3e6e76a77902d6647.zip
Fix build with clang 6.x, pet portlint
PR: 227148 Submitted by: pfg (maintainer) MFH: 2018Q2
-rw-r--r--cad/calculix/Makefile4
-rw-r--r--cad/calculix/files/patch-cgx__VER_src_uselibSNL.cpp20
2 files changed, 22 insertions, 2 deletions
diff --git a/cad/calculix/Makefile b/cad/calculix/Makefile
index 083c687a76d5..f08476e127d6 100644
--- a/cad/calculix/Makefile
+++ b/cad/calculix/Makefile
@@ -15,10 +15,10 @@ COMMENT= Three-Dimensional Structural Finite Element Program
LICENSE= GPLv2
-RUN_DEPENDS= ccx:cad/calculix-ccx
-
BROKEN_FreeBSD_10= Does not build with clang on FreeBSD 10, causes segfaults when built with gcc
+RUN_DEPENDS= ccx:cad/calculix-ccx
+
DIST_SOURCES= cgx_${PORTVERSION}.all${EXTRACT_SUFX}
DIST_HTM= cgx_${PORTVERSION}.htm${EXTRACT_SUFX}
DIST_PDF= cgx_${PORTVERSION}.pdf
diff --git a/cad/calculix/files/patch-cgx__VER_src_uselibSNL.cpp b/cad/calculix/files/patch-cgx__VER_src_uselibSNL.cpp
new file mode 100644
index 000000000000..c8f9ebf10bad
--- /dev/null
+++ b/cad/calculix/files/patch-cgx__VER_src_uselibSNL.cpp
@@ -0,0 +1,20 @@
+--- cgx_2.13/src/uselibSNL.cpp.orig 2017-10-07 09:58:00 UTC
++++ cgx_2.13/src/uselibSNL.cpp
+@@ -934,7 +934,7 @@ int createBlendedNurbs(int nr, Points **
+ // (5) create the cgx nurbs
+ // printf(" create blended nurbs\n");
+ buffer[0]='S';
+- buffer[1]=(char)NULL;
++ buffer[1]='\0';
+ getNewName( name, buffer );
+ for (i=0; i<MAX_LINE_LENGTH; i++) sname[i]=name[i];
+ if(printFlag) printf ("store NURS Nr:%d Name:%s\n", anzGeo->nurs+1, name);
+@@ -1012,7 +1012,7 @@ int createBlendedNurbs(int nr, Points **
+ for (j=0; j<nurbs[nr].v_npnt; j++)
+ {
+ buffer[0]='p';
+- buffer[1]=(char)NULL;
++ buffer[1]='\0';
+ getNewName( name, buffer );
+ nurbs[nr].ctlpnt[i][j] = pnt( name, surface->controlPoints()[ index ].x(), surface->controlPoints()[ index ].y(), surface->controlPoints()[ index ].z(), 0);
+ point=*pntpntr; /* update pointer */