cad/calculix: Split the ccx analyzer out of the main port.

CalculiX has alwasy been comoposed of two independent packages: ccx and
cgx. Ccx, the main tool for doing FEA, depends on fortran and currently
has to be built with GCC. Cgx, on the other hand, uses OpenGL and the C++
libraries it depends on are built with our native clang so buuilding it
with GCC causes C++ library conflicts.

By making ccx an independent port we can better focus on the specific
requirements of each tool and avoid compiler-related conflicts. This also
helps the port work again with newer versions GCC.

PR:	219290. 22043, 220434
Approved by:	gerald
This commit is contained in:
Pedro F. Giffuni 2017-08-15 00:18:22 +00:00
parent 4042b38712
commit 0796f58254
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=447973
14 changed files with 3371 additions and 3274 deletions

View File

@ -14,6 +14,7 @@
SUBDIR += brickutils
SUBDIR += brlcad
SUBDIR += calculix
SUBDIR += calculix-ccx
SUBDIR += cascade
SUBDIR += chipvault
SUBDIR += cider

96
cad/calculix-ccx/Makefile Normal file
View File

@ -0,0 +1,96 @@
# Created by: Pedro Giffuni
# $FreeBSD$
PORTNAME= ccx
PORTVERSION= 2.12
CATEGORIES= cad
MASTER_SITES= http://www.dhondt.de/
PKGNAMEPREFIX= CalculiX-
DISTFILES= ${DIST_SOURCES}
DIST_SUBDIR= calculix
EXTRACT_ONLY= ${DIST_SOURCES}
MAINTAINER= pfg@FreeBSD.org
COMMENT= Three-Dimensional Structural Finite Element Program
LICENSE= GPLv2
LIB_DEPENDS= libarpack.so:math/arpack \
libspooles.so:math/spooles \
libtaucs.so:math/taucs
DIST_SOURCES= ccx_${PORTVERSION}.src${EXTRACT_SUFX}
DIST_HTM= ccx_${PORTVERSION}.htm${EXTRACT_SUFX}
DIST_PS= ccx_${PORTVERSION}.ps${EXTRACT_SUFX}
DIST_EXAMPLES= ccx_${PORTVERSION}.test${EXTRACT_SUFX}
USES= blaslapack compiler:openmp fortran gmake tar:bzip2 shebangfix
USE_PERL5= build
SHEBANG_FILES= date.pl
ALL_TARGET= #Empty
CCX_VER= ccx_${PORTVERSION}
WRKSRC= ${WRKDIR}/CalculiX/${CCX_VER}/src
OPTIONS_DEFINE= DOCS EXAMPLES
OPTIONS_SINGLE= METIS
OPTIONS_SINGLE_METIS= METIS4 METISEDF
OPTIONS_DEFAULT= METISEDF
METIS4_DESC= Reference Metis4 Implementation
METIS4_DEPENDS= libmetis.so:math/metis4
METISEDF_DESC= EDF Metis Variant
METISEDF_DEPENDS= libmetis.so:math/metis-edf
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= ${DIST_HTM} ${DIST_PS}
EXTRACT_ONLY+= ${DIST_HTM} ${DIST_PS}
DOCSDIR= ${PREFIX}/share/doc/CalculiX
.endif
.if $(PORT_OPTIONS:MEXAMPLES)
DISTFILES+= ${DIST_EXAMPLES}
EXTRACT_ONLY+= ${DIST_EXAMPLES}
PLIST_SUB= PORTEXAMPLES=""
.else
PLIST_SUB= PORTEXAMPLES="@comment "
.endif
.if ${ARCH} == "sparc64"
CFLAGS+= -fPIC
FFLAGS+= -fPIC
.else
CFLAGS+= -fpic
FFLAGS+= -fpic
.endif
pre-build:
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; s+%%CC%%+${CC}+g ; \
s+%%BLAS_LIBS%%+${BLASLIB}+ ; \
s+%%LAPACK_LIBS%%+${LAPACKLIB}+ ; \
s+%%LOCALBASE%%+${LOCALBASE}+g;' \
${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${CCX_VER} \
${STAGEDIR}${PREFIX}/bin/ccx
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@(cd ${WRKDIR}/CalculiX/${CCX_VER}/doc/ccx && ${COPYTREE_SHARE} . \
${STAGEDIR}${DOCSDIR}/ccx)
${INSTALL_DATA} ${WRKDIR}/CalculiX/${CCX_VER}/doc/${CCX_VER}.ps \
${STAGEDIR}${DOCSDIR}
@${GZIP_CMD} ${STAGEDIR}${DOCSDIR}/${CCX_VER}.ps
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@(cd ${WRKDIR}/CalculiX/${CCX_VER}/test && ${COPYTREE_SHARE} . \
${STAGEDIR}${EXAMPLESDIR})
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,9 @@
TIMESTAMP = 1502672327
SHA256 (calculix/ccx_2.12.src.tar.bz2) = d75427dfb6db70fdfbb5939df22da8addf0ea4522cff32c9cdc4029e39b6b914
SIZE (calculix/ccx_2.12.src.tar.bz2) = 1061630
SHA256 (calculix/ccx_2.12.htm.tar.bz2) = 79f16a016d37ae8b1599946dbbeb56fc256ba848413fa8ccfbab5b565b41a9e9
SIZE (calculix/ccx_2.12.htm.tar.bz2) = 2130840
SHA256 (calculix/ccx_2.12.ps.tar.bz2) = c93b191cf0b89bbb8c24bcc0f8a6a5425a690f6b3a6d58e27274dbf668312df4
SIZE (calculix/ccx_2.12.ps.tar.bz2) = 2630996
SHA256 (calculix/ccx_2.12.test.tar.bz2) = 1a3758a09a444472bccf0998ae66d3f78671c9fd8a3c8a8fe59372e9b5787bd8
SIZE (calculix/ccx_2.12.test.tar.bz2) = 9380946

View File

@ -1,5 +1,5 @@
--- ccx_2.12/src/CalculiX.h.orig 2017-04-02 12:59:25 UTC
+++ ccx_2.12/src/CalculiX.h
--- CalculiX.h.orig 2017-04-02 12:59:25 UTC
+++ CalculiX.h
@@ -15,12 +15,14 @@
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */

View File

@ -1,5 +1,5 @@
--- ccx_2.12/src/Makefile.orig 2017-04-02 12:59:26 UTC
+++ ccx_2.12/src/Makefile
--- Makefile.orig 2017-04-02 12:59:26 UTC
+++ Makefile
@@ -1,9 +1,9 @@
-CFLAGS = -Wall -O3 -fopenmp -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT

View File

@ -0,0 +1,12 @@
A Three-Dimensional Structural Finite Element Program
CalculiX Finite Element Models can be built, calculated, and
post-processed.
Notice: The authors acknowledge that naming conventions and input style
formats for CalculiX are based on those used by ABAQUS, a proprietary,
general purpose finite element code developed and supported by Hibbitt,
Karlsson & Sorensen, Inc (HKS) and are used with kind permission from HKS.
Results obtained from CalculiX are in no way connected to ABAQUS.
WWW: http://www.calculix.de

3195
cad/calculix-ccx/pkg-plist Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,53 +3,37 @@
PORTNAME= CalculiX
PORTVERSION= 2.12
PORTREVISION= 1
CATEGORIES= cad
MASTER_SITES= http://www.dhondt.de/
PKGNAMEPREFIX= CalculiX-
DISTFILES= ${DIST_SOURCES}
DIST_SUBDIR= calculix
EXTRACT_ONLY= ${DIST_SOURCES}
MAINTAINER= ports@FreeBSD.org
MAINTAINER= pfg@FreeBSD.org
COMMENT= Three-Dimensional Structural Finite Element Program
LICENSE= GPLv2
LIB_DEPENDS= libarpack.so:math/arpack \
libspooles.so:math/spooles \
libtaucs.so:math/taucs
RUN_DEPENDS= ccx:cad/calculix-ccx
DIST_SOURCES= ccx_${PORTVERSION}.src${EXTRACT_SUFX} \
cgx_${PORTVERSION}.all${EXTRACT_SUFX}
DIST_HTM= ccx_${PORTVERSION}.htm${EXTRACT_SUFX} \
cgx_${PORTVERSION}.htm${EXTRACT_SUFX}
DIST_PS= ccx_${PORTVERSION}.ps${EXTRACT_SUFX}
DIST_SOURCES= cgx_${PORTVERSION}.all${EXTRACT_SUFX}
DIST_HTM= cgx_${PORTVERSION}.htm${EXTRACT_SUFX}
DIST_PDF= cgx_${PORTVERSION}.pdf
DIST_EXAMPLES= ccx_${PORTVERSION}.test${EXTRACT_SUFX} \
cgx_${PORTVERSION}.exa${EXTRACT_SUFX}
DIST_EXAMPLES= cgx_${PORTVERSION}.exa${EXTRACT_SUFX}
WRKSRC= ${WRKDIR}/${PORTNAME}
CCX_VER= ccx_${PORTVERSION}
WRKSRC= ${WRKDIR}/CalculiX
CGX_VER= cgx_${PORTVERSION}
USES= compiler:openmp fortran gmake tar:bzip2
USES= gmake tar:bzip2
USE_XORG= ice sm x11 xext xi xmu xt
USE_GL= gl glu # uses its own glut
BROWSER?= firefox
PSVIEWER?= gv
OPTIONS_DEFINE= METIS METIS_EDF DOCS EXAMPLES
OPTIONS_DEFAULT=METIS_EDF
OPTIONS_RADIO= BLAS
OPTIONS_RADIO_BLAS= REFERENCE OBLAS
OPTIONS_DEFAULT= REFERENCE
REFERENCE_DESC= Blas / Lapack
REFERENCE_USES= blaslapack:netlib
OBLAS_DESC= Openblas
OBLAS_USES= blaslapack:openblas
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
@ -59,15 +43,9 @@ EXTRACT_ONLY+= ${DIST_EXAMPLES}
.endif
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= ${DIST_HTM} ${DIST_PS} ${DIST_PDF}
EXTRACT_ONLY+= ${DIST_HTM} ccx_${PORTVERSION}.ps${EXTRACT_SUFX}
.endif
.if ${PORT_OPTIONS:MMETIS}
LIB_DEPENDS+= libmetis.so:math/metis4
.endif
.if ${PORT_OPTIONS:MMETIS_EDF}
LIB_DEPENDS+= libmetis.so:math/metis-edf
DISTFILES+= ${DIST_HTM} ${DIST_PDF}
EXTRACT_ONLY+= ${DIST_HTM}
DOCSDIR= ${PREFIX}/share/doc/CalculiX
.endif
.if ${ARCH} == "sparc64"
@ -78,18 +56,7 @@ CFLAGS+= -fpic
FFLAGS+= -fpic
.endif
.if empty(PORT_OPTIONS:MEXAMPLES)
PLIST_SUB= PORTEXAMPLES="@comment "
.else
PLIST_SUB= PORTEXAMPLES=""
.endif
pre-build:
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; s+%%CC%%+${CC}+g ; \
s+%%BLAS_LIBS%%+${BLASLIB}+ ; \
s+%%LAPACK_LIBS%%+${LAPACKLIB}+ ; \
s+%%LOCALBASE%%+${LOCALBASE}+g;' \
${WRKSRC}/${CCX_VER}/src/Makefile
@${REINPLACE_CMD} -e 's/c++/${CXX}/g;' \
${WRKSRC}/libSNL/src/makefile
@${REINPLACE_CMD} -e 's+%%DOCSDIR%%+${DOCSDIR}+g; \
@ -98,24 +65,16 @@ pre-build:
${WRKSRC}/${CGX_VER}/src/cgx.h
do-build:
@(cd ${WRKSRC}/${CCX_VER}/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
@(cd ${WRKSRC}/libSNL/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
@(cd ${WRKSRC}/${CGX_VER}/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${CCX_VER}/src/${CCX_VER} \
${STAGEDIR}${PREFIX}/bin/ccx
${INSTALL_PROGRAM} ${WRKSRC}/${CGX_VER}/src/cgx \
${STAGEDIR}${PREFIX}/bin/cgx
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}/ccx
@(cd ${WRKSRC}/${CCX_VER}/doc/ccx && ${COPYTREE_SHARE} . \
${STAGEDIR}${DOCSDIR}/ccx)
@${MKDIR} ${STAGEDIR}${DOCSDIR}/cgx
@(cd ${WRKSRC}/${CGX_VER}/doc/cgx && ${COPYTREE_SHARE} . \
${STAGEDIR}${DOCSDIR}/cgx)
${INSTALL_DATA} ${WRKSRC}/${CCX_VER}/doc/${CCX_VER}.ps ${STAGEDIR}${DOCSDIR}
@${GZIP_CMD} ${STAGEDIR}${DOCSDIR}/${CCX_VER}.ps
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/cgx_${PORTVERSION}.pdf \
${STAGEDIR}${DOCSDIR}
.endif
@ -123,9 +82,6 @@ do-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@(cd ${WRKSRC}/${CGX_VER}/examples && ${COPYTREE_SHARE} . \
${STAGEDIR}${EXAMPLESDIR})
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/test
@(cd ${WRKSRC}/${CCX_VER}/test && ${COPYTREE_SHARE} . \
${STAGEDIR}${EXAMPLESDIR}/test)
.endif
.include <bsd.port.mk>

View File

@ -1,17 +1,9 @@
TIMESTAMP = 1498600153
SHA256 (calculix/ccx_2.12.src.tar.bz2) = d75427dfb6db70fdfbb5939df22da8addf0ea4522cff32c9cdc4029e39b6b914
SIZE (calculix/ccx_2.12.src.tar.bz2) = 1061630
TIMESTAMP = 1498928723
SHA256 (calculix/cgx_2.12.all.tar.bz2) = 504e5230902fb3c18001807c1394375b1cf81a10a0e99bd03f121c9b38717a83
SIZE (calculix/cgx_2.12.all.tar.bz2) = 4625123
SHA256 (calculix/ccx_2.12.test.tar.bz2) = 1a3758a09a444472bccf0998ae66d3f78671c9fd8a3c8a8fe59372e9b5787bd8
SIZE (calculix/ccx_2.12.test.tar.bz2) = 9380946
SHA256 (calculix/cgx_2.12.exa.tar.bz2) = 610afec56cd964f7a12179d59c4402f4ded6cb6c27b9e0f296ca0e446af4ee20
SIZE (calculix/cgx_2.12.exa.tar.bz2) = 3035788
SHA256 (calculix/ccx_2.12.htm.tar.bz2) = 79f16a016d37ae8b1599946dbbeb56fc256ba848413fa8ccfbab5b565b41a9e9
SIZE (calculix/ccx_2.12.htm.tar.bz2) = 2130840
SHA256 (calculix/cgx_2.12.htm.tar.bz2) = c648c1e53d5622716f35b15b8a35b09de82f23c1507c101e24d75dbc2ff6daa4
SIZE (calculix/cgx_2.12.htm.tar.bz2) = 328548
SHA256 (calculix/ccx_2.12.ps.tar.bz2) = c93b191cf0b89bbb8c24bcc0f8a6a5425a690f6b3a6d58e27274dbf668312df4
SIZE (calculix/ccx_2.12.ps.tar.bz2) = 2630996
SHA256 (calculix/cgx_2.12.pdf) = 7fda713652322d829178e7f2301a2a7c08125fffdf28c05b226ad0a45365793f
SIZE (calculix/cgx_2.12.pdf) = 1254014

View File

@ -1,4 +1,4 @@
--- cgx_2.12/src/cgx.h.orig 2017-03-30 18:38:08 UTC
--- cgx_2.12/src/cgx.h.orig 2017-04-28 10:12:50 UTC
+++ cgx_2.12/src/cgx.h
@@ -89,8 +89,8 @@ rendering is done in the index-mode.
"/usr/local/CalculiX/ccx_2.12/doc/ccx/ccx.html",\

View File

@ -0,0 +1,28 @@
--- cgx_2.12/src/userFunction.c.orig 2017-07-01 17:49:32 UTC
+++ cgx_2.12/src/userFunction.c
@@ -57,7 +57,12 @@ void sendFacesNodes( char *setname );
/* */
/* */
/* -------------------------------------------------------------------- */
-
+
+ int assembleFEM(char *parameters, Summen *sum, SumGeo *sumGeo ) { return(0); }
+ int assembleFEMVane(char *parameters, Summen *sum, SumGeo *sumGeo ) { return(0); }
+ int createAF(char *sections, char *parameters, Summen *sum, SumGeo *sumGeo ){ return(0); }
+ int createAF_nlb(char *sections, char *parameters, Summen *sum, SumGeo *sumGeo ){ return(0); }
+ int sendFlutter(Summen *sum, char string[2][MAX_LINE_LENGTH] ) { return(0); }
void userFunction(char *string, Summen *sum, SumGeo *sumGeo )
{
int i,j,k,l,n;
@@ -89,11 +94,6 @@ void userFunction(char *string, Summen
// aflib addons
char buf[12][MAX_LINE_LENGTH];
- int assembleFEM(char *parameters, Summen *sum, SumGeo *sumGeo ) { return(0); }
- int assembleFEMVane(char *parameters, Summen *sum, SumGeo *sumGeo ){ return(0); }
- int createAF(char *sections, char *parameters, Summen *sum, SumGeo *sumGeo ){ return(0); }
- int createAF_nlb(char *sections, char *parameters, Summen *sum, SumGeo *sumGeo ){ return(0); }
- int sendFlutter(Summen *sum, char string[2][MAX_LINE_LENGTH] ) { return(0); }
// end
/* list the implemented user-functions if no parameter was provided for the "call" command */

View File

@ -1,13 +1,16 @@
A Three-Dimensional Structural Finite Element Program
CalculiX GraphiX
CalculiX Finite Element Models can be build, calculated and
CalculiX Finite Element Models can be built, calculated, and
post-processed. The pre- and post-processor is an interactive 3D-tool
using the openGL API.
using the OpenGL API.
Notice: The authors acknowledge that naming conventions and input style
formats for CalculiX are based on those used by ABAQUS, a proprietary,
general purpose finite element code developed and supported by Hibbitt,
Karlsson & Sorensen, Inc (HKS) and are used with kind permission from HKS.
Results obtained from CalculiX are in no way connected to ABAQUS.
Supported solvers
* CalculiX ccx, Abaqus FEM (pre, post)
* Nastran FEM (pre)
* Ansys FEM (pre)
* DUNS-CFD (pre, post)
* ISAAC-CFD (pre, post)
* OpenFOAM (pre, post)
WWW: http://www.calculix.de/

File diff suppressed because it is too large Load Diff