2003-05-05 15:06:37 +02:00
|
|
|
# New ports collection makefile for: CalculiX
|
|
|
|
# Date created: 19 April 2003
|
2013-03-18 02:19:49 +01:00
|
|
|
# Whom: Pedro Giffuni
|
2003-05-05 15:06:37 +02:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= CalculiX
|
2013-08-16 03:45:13 +02:00
|
|
|
PORTVERSION= 2.6.1
|
2003-05-05 15:06:37 +02:00
|
|
|
CATEGORIES= cad
|
|
|
|
MASTER_SITES= http://www.dhondt.de/
|
2005-03-19 11:28:48 +01:00
|
|
|
DISTFILES= ${DIST_SOURCES}
|
2003-05-05 15:06:37 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2011-05-11 07:02:58 +02:00
|
|
|
DISTFILES+= ${DIST_HTM} ${DIST_PS} ${DIST_PDF}
|
2003-06-30 21:37:39 +02:00
|
|
|
.endif
|
|
|
|
.ifdef WITH_EXAMPLES
|
2005-03-19 11:28:48 +01:00
|
|
|
DISTFILES+= ${DIST_EXAMPLES}
|
2003-05-05 15:06:37 +02:00
|
|
|
.endif
|
2003-08-08 18:06:50 +02:00
|
|
|
DIST_SUBDIR= calculix
|
2005-03-19 11:28:48 +01:00
|
|
|
EXTRACT_ONLY= ${DIST_SOURCES}
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
EXTRACT_ONLY+= ${DIST_HTM} ccx_${PORTVERSION}.ps${EXTRACT_SUFX}
|
|
|
|
.endif
|
|
|
|
.ifdef WITH_EXAMPLES
|
|
|
|
EXTRACT_ONLY+= ${DIST_EXAMPLES}
|
|
|
|
.endif
|
2003-05-05 15:06:37 +02:00
|
|
|
|
2003-06-30 21:37:39 +02:00
|
|
|
MAINTAINER= maho@FreeBSD.org
|
2003-05-05 15:06:37 +02:00
|
|
|
COMMENT= A Three-Dimensional Structural Finite Element Program
|
|
|
|
|
2013-03-05 03:20:24 +01:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
|
|
|
LIB_DEPENDS= arpack.1:${PORTSDIR}/math/arpack \
|
2007-01-09 23:53:50 +01:00
|
|
|
spooles.1:${PORTSDIR}/math/spooles \
|
2012-07-09 13:11:44 +02:00
|
|
|
metis.1:${PORTSDIR}/math/metis4 \
|
2007-01-09 23:53:50 +01:00
|
|
|
taucs.1:${PORTSDIR}/math/taucs
|
2003-05-05 15:06:37 +02:00
|
|
|
|
2005-03-19 11:28:48 +01:00
|
|
|
USE_BZIP2= yes
|
|
|
|
|
|
|
|
DIST_SOURCES= ccx_${PORTVERSION}.src${EXTRACT_SUFX} \
|
|
|
|
cgx_${PORTVERSION}.all${EXTRACT_SUFX}
|
|
|
|
DIST_HTM= ccx_${PORTVERSION}.htm${EXTRACT_SUFX} \
|
|
|
|
cgx_${PORTVERSION}.htm${EXTRACT_SUFX}
|
2011-05-11 07:02:58 +02:00
|
|
|
DIST_PS= ccx_${PORTVERSION}.ps${EXTRACT_SUFX}
|
|
|
|
DIST_PDF= cgx_${PORTVERSION}.pdf
|
2005-03-19 11:28:48 +01:00
|
|
|
DIST_EXAMPLES= ccx_${PORTVERSION}.test${EXTRACT_SUFX} \
|
|
|
|
cgx_${PORTVERSION}.exa${EXTRACT_SUFX}
|
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
2005-03-19 11:28:48 +01:00
|
|
|
USE_GMAKE= yes
|
2012-08-05 00:52:02 +02:00
|
|
|
USE_XORG= xmu
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
|
|
|
USE_GL= glut
|
2005-02-06 04:09:06 +01:00
|
|
|
|
2013-03-05 03:20:24 +01:00
|
|
|
BROWSER?= firefox
|
2003-08-08 18:06:50 +02:00
|
|
|
PSVIEWER?= gv
|
2003-05-05 15:06:37 +02:00
|
|
|
|
2013-08-16 03:45:13 +02:00
|
|
|
CCX_VER= ccx_${PORTVERSION}
|
|
|
|
CGX_VER= cgx_2.6
|
|
|
|
|
2005-11-20 00:36:03 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2011-11-22 12:14:10 +01:00
|
|
|
.if exists(${LOCALBASE}/lib/libatlas.so) && !defined(WITH_BLAS)
|
2007-02-27 03:54:26 +01:00
|
|
|
WITH_ATLAS= yes
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_ATLAS)
|
|
|
|
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
|
2011-11-22 12:14:10 +01:00
|
|
|
BLAS_LIBS= -lf77blas
|
2007-02-27 03:54:26 +01:00
|
|
|
LAPACK_LIBS= -lalapack -lcblas
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
|
|
|
|
LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack
|
|
|
|
BLAS_LIBS= -lblas
|
|
|
|
LAPACK_LIBS= -llapack
|
|
|
|
.endif
|
|
|
|
|
2007-07-12 09:29:27 +02:00
|
|
|
USE_FORTRAN= yes
|
2013-08-17 18:27:24 +02:00
|
|
|
USE_GCC= yes
|
2005-11-20 00:36:03 +01:00
|
|
|
|
2007-01-09 08:39:39 +01:00
|
|
|
.if ${ARCH} == "sparc64"
|
2006-03-15 09:12:00 +01:00
|
|
|
CFLAGS+= -fPIC
|
2007-01-09 08:39:39 +01:00
|
|
|
FFLAGS+= -fPIC
|
|
|
|
.else
|
|
|
|
CFLAGS+= -fpic
|
|
|
|
FFLAGS+= -fpic
|
2006-03-15 09:12:00 +01:00
|
|
|
.endif
|
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
.if !defined(WITH_EXAMPLES)
|
2004-05-06 21:49:54 +02:00
|
|
|
PLIST_SUB= WITH_EXAMPLES="@comment "
|
2003-05-05 15:06:37 +02:00
|
|
|
.else
|
2004-05-06 21:49:54 +02:00
|
|
|
PLIST_SUB= WITH_EXAMPLES=""
|
2003-05-05 15:06:37 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.ifndef (WITH_EXAMPLES)
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO} "You can define WITH_EXAMPLES=yes to install example files"
|
|
|
|
.endif
|
|
|
|
|
2003-06-30 21:37:39 +02:00
|
|
|
pre-build:
|
|
|
|
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; s+%%CC%%+${CC}+g ; \
|
|
|
|
s+%%BLAS_LIBS%%+${BLAS_LIBS}+ ; \
|
2007-02-27 03:54:26 +01:00
|
|
|
s+%%LAPACK_LIBS%%+${LAPACK_LIBS}+ ; \
|
2003-08-08 18:06:50 +02:00
|
|
|
s+%%LOCALBASE%%+${LOCALBASE}+g;' \
|
2013-08-16 03:45:13 +02:00
|
|
|
${WRKSRC}/${CCX_VER}/src/Makefile
|
2010-06-06 01:09:26 +02:00
|
|
|
@${REINPLACE_CMD} -e 's/c++/${CXX}/g;' \
|
|
|
|
${WRKSRC}/libSNL/src/makefile
|
2003-08-08 18:06:50 +02:00
|
|
|
@${REINPLACE_CMD} -e 's+%%DOCSDIR%%+${DOCSDIR}+g; \
|
2013-03-18 02:19:49 +01:00
|
|
|
s+"firefox"+"${BROWSER}"+ ; \
|
|
|
|
s+"gv"+"${PSVIEWER}"+ ;' \
|
2013-08-16 03:45:13 +02:00
|
|
|
${WRKSRC}/${CGX_VER}/src/cgx.h
|
2003-06-30 21:37:39 +02:00
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
do-build:
|
2013-08-16 03:45:13 +02:00
|
|
|
@(cd ${WRKSRC}/${CCX_VER}/src; ${SETENV} ${MAKE_ENV} $(GMAKE) )
|
2005-03-19 11:28:48 +01:00
|
|
|
@(cd ${WRKSRC}/libSNL/src; ${SETENV} ${MAKE_ENV} $(GMAKE) )
|
2013-08-16 03:45:13 +02:00
|
|
|
@(cd ${WRKSRC}/${CGX_VER}/src; ${SETENV} ${MAKE_ENV} $(GMAKE) )
|
2003-06-30 21:37:39 +02:00
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
do-install:
|
2013-08-16 03:45:13 +02:00
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/${CCX_VER}/src/${CCX_VER} \
|
2003-05-05 15:06:37 +02:00
|
|
|
${PREFIX}/bin/ccx
|
2013-08-16 03:45:13 +02:00
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/${CGX_VER}/src/cgx \
|
2003-05-05 15:06:37 +02:00
|
|
|
${PREFIX}/bin/cgx
|
2003-06-30 21:37:39 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
@${MKDIR} ${DOCSDIR}/ccx
|
2013-08-16 03:45:13 +02:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${CCX_VER}/doc/ccx/* \
|
2003-06-30 21:37:39 +02:00
|
|
|
${DOCSDIR}/ccx
|
|
|
|
@${MKDIR} ${DOCSDIR}/cgx
|
2013-08-16 03:45:13 +02:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${CGX_VER}/doc/cgx/* \
|
2003-06-30 21:37:39 +02:00
|
|
|
${DOCSDIR}/cgx
|
2013-08-16 03:45:13 +02:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${CCX_VER}/doc/*.ps ${DOCSDIR}
|
2011-05-11 07:02:58 +02:00
|
|
|
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/cgx_${PORTVERSION}.pdf \
|
2005-03-19 11:28:48 +01:00
|
|
|
${DOCSDIR}
|
2003-06-30 21:37:39 +02:00
|
|
|
@${GZIP_CMD} ${DOCSDIR}/*.ps
|
|
|
|
.endif
|
|
|
|
.ifdef WITH_EXAMPLES
|
2003-05-05 15:06:37 +02:00
|
|
|
@${MKDIR} ${EXAMPLESDIR}
|
2013-08-16 03:45:13 +02:00
|
|
|
@${TAR} cf - -C ${WRKSRC}/${CGX_VER}/examples . | ${TAR} xf - -C ${EXAMPLESDIR}
|
2003-05-05 15:06:37 +02:00
|
|
|
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
|
2003-06-30 21:37:39 +02:00
|
|
|
@${MKDIR} ${EXAMPLESDIR}/test
|
2013-08-16 03:45:13 +02:00
|
|
|
@${TAR} cf - -C ${WRKSRC}/${CCX_VER}/test . | ${TAR} xf - -C ${EXAMPLESDIR}/test
|
2003-06-30 21:37:39 +02:00
|
|
|
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
|
2003-05-05 15:06:37 +02:00
|
|
|
.endif
|
|
|
|
|
2005-11-20 00:36:03 +01:00
|
|
|
.include <bsd.port.post.mk>
|