COMMENT= ${SAL_MODULE_UPPER} module of Salome platform USE_PYTHON= 2.5+ USE_GMAKE= yes USE_LDCONFIG= yes SAL_MODULE= ${PKGNAMESUFFIX:S/-//} USE_GCC= 4.4 FC:= gfortran44 F77:= gfortran44 CONFIGURE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" MAKE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" #SAL_MODULE_UPPER= `${ECHO} ${SAL_MODULE} | ${AWK} '{ print(toupper($$1)); }'` #SAL_MODULE_UPPER= YACS USE_TK= 84+ PLIST= ../salome${PKGNAMESUFFIX}/pkg-plist #dependencies between modules KERNEL_DEPEND= "" GUI_DEPEND= KERNEL QWT GEOM_DEPEND= KERNEL GUI MED_DEPEND= KERNEL GUI MED2 SMESH_DEPEND= KERNEL GUI MED GEOM NETGENPLUGIN_DEPEND= KERNEL GUI MED GEOM MED SMESH NETGEN VISU_DEPEND= KERNEL GUI MED LIGHT_DEPEND= KERNEL GUI YACS_DEPEND= KERNEL GUI RANDOMIZER_DEPEND= KERNEL GUI JOBMANAGER_DEPEND= KERNEL GUI SIERPINSKY_DEPEND= KERNEL GUI VISU MED RANDOMIZER FILTER_DEPEND= KERNEL GUI MED MULTIPR_DEPEND= KERNEL GUI MED MED2 HDF5 CAS QT OMNIORB .if !${SAL_MODULE} == "jobmanager" RELEASENAME= 5.1.4 .else RELEASENAME= 0.1 .endif HAS_CONFIGURE= yes CONFIGURE_ARGS+= --prefix=${PREFIX} CONFIGURE_ARGS+= --enable-debug CONFIGURE_ENV+= MACHINE=${OPSYS:U} CPPFLAGS+= -L${LOCALBASE}/lib -I/usr/include -I${LOCALBASE}/include -D__freebsd__ -DFREEBSD -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHAVE_IOMANIP -DMPICH_IGNORE_CXX_SEEK CXXFLAGS+= -ffriend-injection -fno-inline -fpermissive -fPIC -L${LOCALBASE}/lib -L${LOCALBASE}/lib/salome CONFIGURE_SCRIPT= ../configure PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}/${SAL_MODULE_UPPER}_SRC_${RELEASENAME} WRKSRC= ${PATCH_WRKSRC} CONFIGURE_WRKSRC= ${WRKSRC}/${SAL_MODULE_UPPER}_build BUILD_WRKSRC= ${WRKSRC}/${SAL_MODULE_UPPER}_build INSTALL_WRKSRC= ${BUILD_WRKSRC} EXTRACT_AFTER_ARGS= ${DISTNAME}/${SAL_MODULE_UPPER}_SRC_${RELEASENAME}/* PATCHDIR= ${MASTERDIR}/../salome-${SAL_MODULE}/files/ #Depend from other modules .if !${SAL_MODULE} == "kernel" .for D in ${${SAL_MODULE_UPPER}_DEPEND} CONFIGURE_ENV+= ${D}_ROOT_DIR=${LOCALBASE} AUTOTOOLS_ENV+= ${D}_ROOT_DIR=${LOCALBASE} CPPFLAGS+= -L${LOCALBASE}/lib/salome .endfor .endif #Depndency from KERNEL module .if !${SAL_MODULE} == "kernel" BUILD_DEPENDS+= ${RESOURCEDIR}/kernel:${PORTSDIR}/cad/salome-kernel RUN_DEPENDS+= ${RESOURCEDIR}/kernel:${PORTSDIR}/cad/salome-kernel .endif #Depndency from GUI module .if !${SAL_MODULE} == "kernel" && !${SAL_MODULE} == "gui" BUILD_DEPENDS+= ${RESOURCEDIR}/gui:${PORTSDIR}/cad/salome-gui RUN_DEPENDS+= ${RESOURCEDIR}/gui:${PORTSDIR}/cad/salome-gui .endif #Depndency from MED module .if ${SAL_MODULE} == "smesh" || ${SAL_MODULE} == "sierpinsky" || ${SAL_MODULE} == "multipr" || ${SAL_MODULE} == "visu" BUILD_DEPENDS+= ${RESOURCEDIR}/med:${PORTSDIR}/cad/salome-med RUN_DEPENDS+= ${RESOURCEDIR}/med:${PORTSDIR}/cad/salome-med AUTOTOOLS_ENV+= MED2HOME=${LOCALBASE} .endif #Depndency from GEOM module .if ${SAL_MODULE} == "smesh" BUILD_DEPENDS+= ${RESOURCEDIR}/geom:${PORTSDIR}/cad/salome-geom RUN_DEPENDS+= ${RESOURCEDIR}/geom:${PORTSDIR}/cad/salome-geom .endif #Depndency from SMESH module .if ${SAL_MODULE} == "netgenplugin" BUILD_DEPENDS+= ${RESOURCEDIR}/smesh:${PORTSDIR}/cad/salome-smesh RUN_DEPENDS+= ${RESOURCEDIR}/smesh:${PORTSDIR}/cad/salome-smesh .endif #Dependency for SIERPINSKY .if ${SAL_MODULE} == "sierpinsky" BUILD_DEPENDS+= ${RESOURCEDIR}/visu:${PORTSDIR}/cad/salome-visu \ ${RESOURCEDIR}/randomizer:${PORTSDIR}/cad/salome-randomizer RUN_DEPENDS+= ${RESOURCEDIR}/visu:${PORTSDIR}/cad/salome-visu \ ${RESOURCEDIR}/randomizer:${PORTSDIR}/cad/salome-randomizer .endif ########################################################################### #Dependency from other ports ########################################################################### #Dependency from autotools USE_AUTOTOOLS= autoconf automake libtool aclocal .if ${SAL_MODULE} == "kernel" ACLOCAL_ARGS= -I salome_adm/unix/config_files .else . if ${SAL_MODULE} == "yacs" ACLOCAL_ARGS= -I adm/unix/config_files USE_AUTOTOOLS+= autoheader AUTOHEADER_ARGS= -I adm/unix/config_files . else . if ${SAL_MODULE} != "jobmanager" ACLOCAL_ARGS= -I adm_local/unix/config_files -I ${LOCALBASE}/salome_adm/unix/config_files . else ACLOCAL_ARGS= -I m4 AUTOHEADER_ARGS+= -I m4 . endif . if ${SAL_MODULE} != "gui" && ${SAL_MODULE} != "jobmanager" ACLOCAL_ARGS+= -I ${LOCALBASE}/adm_local/unix/config_files . endif . endif .endif LIBTOOLFLAGS=--force --copy --automake AUTOMAKE_ARGS=--add-missing --copy --gnu #Dependency from HDF5 .if !${SAL_MODULE} == "randomizer" && !${SAL_MODULE} == "yacs" && !${SAL_MODULE} == "hello" && !${SAL_MODULE} == "pyhello" LIB_DEPENDS+= hdf5.7:${PORTSDIR}/science/hdf5-18 CONFIGURE_ARGS+= --with-hdf5=${LOCALBASE} AUTOTOOLS_ENV+= HDF5HOME=${LOCALBASE} .endif #Dependency from Opencascade .if !${SAL_MODULE} == "kernel" LIB_DEPENDS+= TKernel.0:${PORTSDIR}/cad/opencascade CASROOT= ${LOCALBASE}/OpenCAS/ros CONFIGURE_ENV+= CASROOT=${CASROOT} AUTOTOOLS_ENV+= CASROOT=${CASROOT} #CXXFLAGS+= -I${CASROOT}/inc .endif #Dependency from swig .if !${SAL_MODULE} == "randomizer" && !${SAL_MODULE} == "light" && !${SAL_MODULE} == "multipr" BUILD_DEPENDS+= swig:${PORTSDIR}/devel/swig13 .endif #Dependency from libxml2 .if ${SAL_MODULE} == "gui" || ${SAL_MODULE} == "kernel" || ${SAL_MODULE} == "med" || ${SAL_MODULE} == "yacs" LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2 CPPFLAGS+= -I${LOCALBASE}/include/libxml2 CONFIGURE_ENV+= LIBXML_DIR=${LOCALBASE} .endif #Dependency from boost .if !${SAL_MODULE} == "light" && !${SAL_MODULE} == "randomizer" && !${SAL_MODULE} == "pycalculator" && !${SAL_MODULE} == "light" CONFIGURE_ENV+= BOOSTDIR=${LOCALBASE} LIB_DEPENDS+= boost_thread:${PORTSDIR}/devel/boost-all ###python boost support off by default RUN_DEPENDS+= ${LOCALBASE}/lib/libboost_python.so:${PORTSDIR}/devel/boost-python-libs BUILD_DEPENDS+= ${LOCALBASE}/lib/libboost_python.so:${PORTSDIR}/devel/boost-python-libs .endif #Dependency from qt4 .if !${SAL_MODULE} == "kernel" && !${SAL_MODULE} == "randomizer" CONFIGURE_ENV+= QTDIR=${LOCALBASE} QTFLAGS+= -I${LOCALBASE}/include/qt4 -L${LOCALBASE}/lib/qt4 USE_QT4= gui opengl svg xml qmake_build moc_build rcc_build uic_build linguist AUTOTOOLS_ENV+= QTDIR=${LOCALBASE} .endif #Dependency from qscintilla2 .if ${SAL_MODULE} == "yacs" LIB_DEPEDNS+= qscintilla2:${PORTSDIR}/devel/qscintilla2 CONFIGURE_ARGS+= --with-qsci4-libraries=${QT_LIBDIR} --with-qsci4-includes=${QT_INCDIR} .endif #Dependency from vtk .if !${SAL_MODULE} == "kernel" && !${SAL_MODULE} == "randomizer" LIB_DEPENDS+= vtkCommon.5:${PORTSDIR}/math/vtk5 CONFIGURE_ARGS+= --with-vtk=${LOCALBASE} CONFIGURE_ENV+= VTKSUFFIX=-5.10 .endif #Dependency from cad/netgen .if ${SAL_MODULE} == "netgenplugin" LIB_DEPENDS+= nglib.1:${PORTSDIR}/cad/netgen CONFIGURE_ENV+= NETGENHOME=${LOCALBASE} AUTOTOOLS_ENV+= NETGENHOME=${LOCALBASE} .endif #Dependency from qwt5 .if ${SAL_MODULE} == "gui" || ${SAL_MODULE} == "component" || ${SAL_MODULE} == "smesh" || ${SAL_MODULE} == "visu" || ${SAL_MODULE} == "filter" LIB_DEPENDS+= qwt.5:${PORTSDIR}/x11-toolkits/qwt5 CONFIGURE_ARGS+= --with-qwt=${LOCALBASE} CPPFLAGS+= -I/${LOCALBASE}/include/qwt/ AUTOTOOLS_ENV+= QWTHOME=${LOCALBASE} .endif #Dependency from omniORB & py-omniorb .if !${SAL_MODULE} == "light" LIB_DEPENDS+= omniORB4.1:${PORTSDIR}/devel/omniORB RUN_DEPENDS+= ${LOCALBASE}/include/omniORBpy.h:${PORTSDIR}/devel/py-omniorb RUN_DEPENDS+= notifd:${PORTSDIR}/devel/omniNotify AUTOTOOLS_ENV+= OMNIORBDIR=${LOCALBASE} .endif #Dependency from sip .if ${SAL_MODULE} == "gui" || ${SAL_MODULE} == "component" BUILD_DEPENDS+= sip:${PORTSDIR}/devel/py-sip RUN_DEPENDS+= sip:${PORTSDIR}/devel/py-sip .endif #Dependency from Pyqt4 .if ${SAL_MODULE} == "gui" || ${SAL_MODULE} == "component" CONFIGURE_ENV+= PYQTDIR=${PYTHON_SITELIBDIR} PYQT_SIPS=${LOCALBASE}/share/py-sip RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/PyQt4/QtGui.so:${PORTSDIR}/x11-toolkits/py-qt4-gui BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/PyQt4/QtGui.so:${PORTSDIR}/x11-toolkits/py-qt4-gui RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/PyQt4/QtXml.so:${PORTSDIR}/textproc/py-qt4-xml BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/PyQt4/QtXml.so:${PORTSDIR}/textproc/py-qt4-xml .endif #Dependency from metis & scotsch .if ${SAL_MODULE} == "med" . if exists(${LOCALBASE}/bin/oemetis) BUILD_DEPENDS+= kmetis:${PORTSDIR}/math/metis4 RUN_DEPENDS+= kmetis:${PORTSDIR}/math/metis4 . else BUILD_DEPENDS+= kmetis:${PORTSDIR}/math/metis-edf RUN_DEPENDS+= kmetis:${PORTSDIR}/math/metis-edf .endif BUILD_DEPENDS+= gmap:${PORTSDIR}/cad/scotch RUN_DEPENDS+= gmap:${PORTSDIR}/cad/scotch CONFIGURE_ENV+= METISDIR=${LOCALBASE} SCOTCHDIR=${LOCALBASE} CPPFLAGS+= -I${LOCALBASE}/include/metis .endif #Dependency from MED .if ${SAL_MODULE} == "med" LIB_DEPENDS+= med.2:${PORTSDIR}/french/med CONFIGURE_ENV+= MED2HOME=${LOCALBASE} .endif #Dependency from gd .if ${SAL_MODULE} == "sierpinsky" LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd .endif .if ${SAL_MODULE} == "yacs" LIB_DEPENDS+= argp.0:${PORTSDIR}/devel/argp-standalone LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 LIB_DEPENDS+= gvc:${PORTSDIR}/graphics/graphviz LDFLAGS+= -largp .endif #Don't strip binaries .if ${SAL_MODULE} == "multipr" STRIP= .endif #turn off cppunit support .if ${SAL_MODULE} == "kernel" || ${SAL_MODULE} == "gui" || ${SAL_MODULE} == "yacs" || ${SAL_MODULE} == "med" #.if ${PORT_OPTIONS:MCPPUNIT} #CONFIGURE_ARGS+= --with-cppunit=${LOCALBASE} --with-cppunit_inc=${LOCALBASE}/include/cppunit #BUILD_DEPENDS+= cppunit-config:${PORTSDIR}/devel/cppunit #PLIST_SUB+= CPPUNIT="" #. else CONFIGURE_ARGS+= --with-cppunit=no PLIST_SUB+= CPPUNIT="@comment " #.endif .endif #optionally dependency from mpich2 .if ${SAL_MODULE} == "kernel" || ${SAL_MODULE} == "med" .if ${PORT_OPTIONS:MMPI} LIB_DEPENDS+= mpich.2:${PORTSDIR}/net/mpich2 CONFIGURE_ARGS+= --with-mpich=${LOCALBASE}/mpich2 --with-mpi=${LOCALBASE}/mpich2 PLIST_SUB+= MPI="" . else #CONFIGURE_ARGS+= --with-mpich=NO --with-mpi=NO PLIST_SUB+= MPI="@comment " .endif .endif CXXFLAGS+= ${QSCIFLAGS} ${QTFLAGS} .include #MAKE_JOBS_SAFE= yes .if ${SAL_MODULE} == "kernel" post-patch: . if ${PYTHON_REL} > 260 ${REINPLACE_CMD} 's|fromlist=None)|fromlist=None, level=-1)|g' ${WRKSRC}/src/KERNEL_PY/import_hook.py . endif ${REINPLACE_CMD} 's|/bin/bash|${LOCALBASE}/bin/bash|g' ${WRKSRC}/bin/appli_clean.sh ${WRKSRC}/bin/runSalome .endif .if ${SAL_MODULE} == "gui" post-patch: ${REINPLACE_CMD} 's|/bin/bash|${LOCALBASE}/bin/bash|g' ${WRKSRC}/bin/runLightSalome.sh .endif .if ${SAL_MODULE} == "yacs" post-patch: ${CP} ${WRKSRC}/configure.in.base ${WRKSRC}/configure.in .endif .if ${SAL_MODULE} == "kernel" pre-patch: ${MKDIR} ${WRKSRC}/src/Communication/rpc ${CP} /usr/include/rpc/xdr.h ${WRKSRC}/src/Communication/rpc ${REINPLACE_CMD} 's|__rpc_xdr|XDR|g' ${WRKSRC}/src/Communication/rpc/xdr.h .endif MMDEPENDS=${SAL_MODULE_UPPER}_DEPEND AUTOTOOLS_ENV+= ${SAL_MODULE_UPPER}_ROOT_DIR=${PREFIX} .for D in ${MMDEPENDS} AUTOTOOLS_ENV+=${D}_ROOT_DIR=${LOCALBASE} .endfor run-autotools-aclocal: echo "Start of aclocal" @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \ ${ACLOCAL_ARGS}) echo "End of aclocal" run-autotools-autoconf: echo "Start of autoconf" @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \ ${AUTOCONF_ARGS}) echo "End of autotools" run-autotools-automake: echo "Start of automake" @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE} \ ${AUTOMAKE_ARGS}) echo "End of automake" .if ${SAL_MODULE} == "yacs" || ${SAL_MODULE} == "jobmanager" run-autotools-autoheader: echo "Start of autoheader" @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER} \ ${AUTOHEADER_ARGS}) echo "End of autoheader" .endif patch-autotools-libtool: @(cd ${PATCH_WRKSRC}; ${LIBTOOLIZE} --force;) pre-configure: ${MKDIR} ${BUILD_WRKSRC} .include