66 lines
2.1 KiB
Bash
66 lines
2.1 KiB
Bash
# Template file for 'freecad'
|
|
pkgname=freecad
|
|
version=0.20.1
|
|
revision=4
|
|
wrksrc="FreeCAD-${version}"
|
|
build_style=cmake
|
|
|
|
_inst_prefix=/usr/lib/${pkgname}
|
|
configure_args="
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3
|
|
-DBUILD_QT5=ON
|
|
-DBUILD_FEM_NETGEN=OFF
|
|
-DBUILD_FLAT_MESH=ON
|
|
-DCMAKE_INSTALL_PREFIX=${_inst_prefix}
|
|
-DCMAKE_INSTALL_DATAROOTDIR=/usr/share
|
|
-DCMAKE_INSTALL_DATADIR=/usr/share/${pkgname}
|
|
-DMEDFILE_INCLUDE_DIRS=/usr/include/med
|
|
-DPYSIDE2RCCBINARY=/usr/bin/rcc-qt5
|
|
-DPYSIDE2UICBINARY=/usr/bin/uic-qt5"
|
|
hostmakedepends="pkg-config swig doxygen graphviz"
|
|
makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
|
|
vtk-devel hdf5-devel openmpi-devel libmed-devel eigen double-conversion-devel
|
|
coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
|
|
liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
|
|
jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
|
|
qt5-xmlpatterns-devel coin3-doc glew-devel python3-pivy"
|
|
|
|
depends="python3-matplotlib python3-pyside2-webengine python3-pivy"
|
|
|
|
python_version=3
|
|
pycompile_dirs="usr/lib/${pkgname}/Mod"
|
|
|
|
short_desc="General purpose 3D CAD modeler"
|
|
maintainer="yopito <pierre.bourgin@free.fr>"
|
|
license="LGPL-2.0-or-later"
|
|
homepage="https://freecadweb.org/"
|
|
distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz"
|
|
checksum=70c15f7c1c676e3376cdc2a66c136030c5502f9802935e5b626ca8ce3f8812ed
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
makedepends+=" libexecinfo-devel"
|
|
LDFLAGS="-lexecinfo"
|
|
fi
|
|
|
|
post_extract() {
|
|
# Report exact minor version
|
|
vminor=${version#*.}
|
|
vminor=${vminor%%.*}
|
|
vsed -i -e "s,^\(set(PACKAGE_VERSION_MINOR\) .*,\1 \"${vminor}\")," CMakeLists.txt
|
|
|
|
# SubWCRev.py (SCM check) reports "unknown" for these fields
|
|
vsed -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
|
|
-e "s,\${PACKAGE_WCDATE},(from release)," \
|
|
-e "s,\${PACKAGE_WCURL},VoidLinux package ${pkgname}," \
|
|
-i src/Build/Version.h.cmake
|
|
}
|
|
|
|
post_install() {
|
|
# AppHomePath is computed with binary's realpath:
|
|
# do not move binaries but symlink them instead.
|
|
vmkdir usr/bin
|
|
for f in FreeCAD FreeCADCmd; do
|
|
ln -s ${_inst_prefix}/bin/${f} ${DESTDIR}/usr/bin/${f}
|
|
done
|
|
}
|