COMMENT= ${SAL_MODULE_UPPER} module of Salome platform USE_PYTHON= 2.4+ USE_GMAKE= yes USE_LDCONFIG= yes SAL_MODULE= ${PKGNAMESUFFIX:S/-//} #.if ${SAL_MODULE} == "med" || ${SAL_MODULE} == "smesh" || ${SAL_MODULE} == "visu" || ${SAL_MODULE} == "sierpinsky" || ${SAL_MODULE} == "multipr" .if !${SAL_MODULE} == "gui" USE_FORTRAN=yes USE_GCC= 4.4 .else USE_GCC= 4.5 .endif #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 VISU_DEPEND= KERNEL GUI MED LIGHT_DEPEND= KERNEL GUI YACS_DEPEND= KERNEL GUI RANDOMIZER_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 RELEASENAME= 5.1.3 HAS_CONFIGURE= yes CONFIGURE_ARGS+= --prefix=${PREFIX} CONFIGURE_ARGS+= --enable-debug CONFIGURE_ENV+= MACHINE=${OPSYS:U} #CXXFLAGS+= -L${LOCALBASE}/lib -I/usr/include -I${LOCALBASE}/include -D__freebsd__ -DFREEBSD -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHAVE_IOMANIP -DMPICH_IGNORE_CXX_SEEK 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 -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= | ${TAR} -xf - ${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} 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 .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 #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:262 automake:15 libtool:22 #Dependency from HDF5 .if !${SAL_MODULE} == "randomizer" && !${SAL_MODULE} == "yacs" && !${SAL_MODULE} == "hello" && !${SAL_MODULE} == "pyhello" LIB_DEPENDS+= hdf5.0:${PORTSDIR}/science/hdf5 CONFIGURE_ARGS+= --with-hdf5=${LOCALBASE} .endif #Dependency from Opencascade .if !${SAL_MODULE} == "kernel" LIB_DEPENDS+= TKernel.0:${PORTSDIR}/cad/opencascade CASROOT= ${LOCALBASE}/OpenCAS/ros CONFIGURE_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 doxygen BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen #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" USE_QT_VER= 4 CONFIGURE_ENV+= QTDIR=${LOCALBASE} QTFLAGS+= -I${LOCALBASE}/include/qt4 -L${LOCALBASE}/lib/qt4 QT_COMPONENTS= gui opengl svg xml qmake_build moc_build rcc_build uic_build linguist .endif #Dependency from qscintilla2 .if ${SAL_MODULE} == "yacs" LIB_DEPEDNS+= qscintilla2.5:${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_ENV+= VTKHOME=${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_ENV+= QWTHOME=${LOCALBASE} CONFIGURE_ARGS+= --with-qwt=${LOCALBASE} CPPFLAGS+= -I/${LOCALBASE}/include/qwt/ .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 .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" BUILD_DEPENDS+= kmetis:${PORTSDIR}/math/metis \ gmap:${PORTSDIR}/cad/scotch RUN_DEPENDS+= kmetis:${PORTSDIR}/math/metis \ gmap:${PORTSDIR}/cad/scotch CONFIGURE_ENV+= METISDIR=${LOCALBASE} SCOTCHDIR=${LOCALBASE} CPPFLAGS+= -I${LOCALBASE}/include/metis .endif #Dependency from graphviz BUILD_DEPENDS+= gvgen:${PORTSDIR}/graphics/graphviz #Dependency from MED .if ${SAL_MODULE} == "med" LIB_DEPENDS+= med.2:${PORTSDIR}/french/med CONFIGURE_ENV+= MED2HOME=${LOCALBASE} .endif .if ${SAL_MODULE} == "yacs" LIB_DEPENDS+= argp.0:${PORTSDIR}/devel/argp-standalone LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 LDFLAGS+= -largp .endif #Don't strip binaries .if ${SAL_MODULE} == "multipr" STRIP= .endif #optionally dependency from cppunit .if ${SAL_MODULE} == "kernel" || ${SAL_MODULE} == "gui" || ${SAL_MODULE} == "yacs" || ${SAL_MODULE} == "med" .if defined(WITH_CPPUNIT) 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 .if ${SAL_MODULE} == "kernel" || ${SAL_MODULE} == "med" .if defined(WITH_MPI) BUILD_DEPENDS+= ${LOCALBASE}/mpich2/bin/mpicc:${PORTSDIR}/net/mpich2 RUN_DEPENDS+= ${LOCALBASE}/mpich2/lib/libmpich.so:${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 CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" CXXFLAGS="${QSCIFLAGS} ${QTFLAGS} ${CXXFLAGS} " CPPFLAGS="${CPPFLAGS}" .include #MAKE_JOBS_SAFE= yes .if ${SAL_MODULE} == "kernel" . if ${PYTHON_REL} > 260 post-patch: ${REINPLACE_CMD} 's|fromlist=None)|fromlist=None, level=-1)|g' ${WRKSRC}/src/KERNEL_PY/import_hook.py . endif .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 pre-configure: # SAL_MODULE_UPPER=`${ECHO} ${SAL_MODULE} | ${AWK} '{ print(toupper($1)); }'`; \ MMDEPENDS="${${SAL_MODULE_UPPER}_DEPEND}"; \ for D in $${MMDEPENDS}; do \ export "$$D"_ROOT_DIR=${LOCALBASE}; \ if test "$$D"="MED2"; then \ export MED2HOME=${LOCALBASE}; \ fi; \ if test "$$D"="QWT"; then \ export QWTHOME=${LOCALBASE}; \ fi; \ if test "$$D"="HDF5HOME"; then \ export HDF5HOME=${LOCALBASE}; \ fi; \ if test "$$D"="CASROOT"; then \ export CASROOT=${CASROOT}; \ fi; \ if test "$$D"="QT"; then \ export QTDIR=${LOCALBASE}; \ fi; \ if test "$$D"="OMNIORB"; then \ export OMNIORBDIR=${LOCALBASE}; \ fi; \ echo "$$D"_ROOT_DIR; \ done; \ MACHINE=${OPSYS:U}; export MACHINE; set ${SAL_MODULE_UPPER}_ROOT_DIR ${PREFIX}; export ${SAL_MODULE_UPPER}_ROOT_DIR; cd ${WRKSRC}; ${MKDIR} ${BUILD_WRKSRC}; ${SH} ./build_configure .include