aboutsummaryrefslogtreecommitdiffstats
path: root/cad
diff options
context:
space:
mode:
Diffstat (limited to 'cad')
-rw-r--r--cad/freecad/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/cad/freecad/Makefile b/cad/freecad/Makefile
index 0805fc6c59bc..d830aa3a7ed8 100644
--- a/cad/freecad/Makefile
+++ b/cad/freecad/Makefile
@@ -2,6 +2,7 @@
PORTNAME= FreeCAD
DISTVERSION= 0.17.g20161104
+PORTREVISION= 1
CATEGORIES= cad
MAINTAINER= ports@FreeBSD.org
@@ -39,9 +40,19 @@ USE_XORG= ice sm x11 xext xt
USE_GL= gl glu
USE_QT4= qmake_build corelib gui moc_build network opengl rcc_build \
uic_build svg xml webkit
+USE_LDCONFIG= yes
CMAKE_ARGS= -DOCC_INCLUDE_DIR="${LOCALBASE}/include/OpenCASCADE" \
-DFREECAD_USE_EXTERNAL_PIVY=1
+# To be removed when french/med will be built against science/hdf5
+LIB_DEPENDS+= libhdf5-18.so:science/hdf5-18
+CMAKE_ARGS+= -DHDF5_FOUND="TRUE" -DHDF5_VERSION="1.8.17" \
+ -DHDF5_INCLUDE_DIRS="${LOCALBASE}/include/hdf5-18" \
+ -DCMAKE_CXX_FLAGS="-I${LOCALBASE}/include/hdf5-18" \
+ -DCMAKE_C_FLAGS="-I${LOCALBASE}/include/hdf5-18" \
+ -DHDF5_LIBRARIES="-lhdf5-18"
+CFLAGS+= -I${LOCALBASE}/include/hdf5-18
+
CMAKE_INSTALL_PREFIX= ${PREFIX}/${PORTNAME}
DESKTOP_ENTRIES=${PORTNAME} "" "${PREFIX}/FreeCAD/data/freecad.svg" \
@@ -51,6 +62,13 @@ post-patch:
@${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},' \
${WRKSRC}/src/Gui/CMakeLists.txt
+pre-configure:
+ # To be removed when french/med will be built against science/hdf5
+ ${REINPLACE_CMD} -e 's|find_package(HDF5 REQUIRED)|#find_package(HDF5 REQUIRED)|' \
+ ${WRKSRC}/CMakeLists.txt
+ ${REINPLACE_CMD} -e 's|<hdf5.h>|<hdf5-18/hdf5.h>|' \
+ ${WRKSRC}/src/3rdParty/salomesmesh/inc/MED_Common.hxx
+
post-install:
${LN} -s ../${PORTNAME}/bin/FreeCAD ${STAGEDIR}${LOCALBASE}/bin/FreeCAD
${LN} -s ../${PORTNAME}/bin/FreeCADCmd ${STAGEDIR}${LOCALBASE}/bin/FreeCADCmd