c6b207dd83
fix #22261 [ci skip] Closes: #22399 [via git-merge-pr]
63 lines
2.2 KiB
Bash
63 lines
2.2 KiB
Bash
# Template file for 'freecad'
|
|
pkgname=freecad
|
|
version=0.18.4
|
|
revision=6
|
|
wrksrc="FreeCAD-${version}"
|
|
build_style=cmake
|
|
|
|
# CMAKE_INSTALL_LIBDIR by default doesn't use PREFIX, so we set it manually
|
|
_inst_prefix=/usr/lib/${pkgname}
|
|
configure_args="
|
|
-DBUILD_QT5=ON
|
|
-DCMAKE_INSTALL_PREFIX=${_inst_prefix}
|
|
-DCMAKE_INSTALL_LIBDIR=${_inst_prefix}/lib
|
|
-DCMAKE_INSTALL_DATAROOTDIR=/usr/share
|
|
-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-x11extras-devel coin3-doc glew-devel"
|
|
|
|
# FreeCAD help: qt5/assistant with datas in SQLite format
|
|
depends="python3-matplotlib python3-pyside2 qt5-plugin-sqlite python3-pivy"
|
|
|
|
python_version=3
|
|
pycompile_dirs="usr/lib/${pkgname}/Mod usr/lib/${pkgname}/data/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=4e0cce447b31b8989a00cf68c49ae012ce8e5546a56c6e0874fbd8f7ddedffd2
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) # SIGSEGV with musl, see https://github.com/void-linux/void-packages/issues/12595
|
|
makedepends=${makedepends/qt5-webkit-devel/}
|
|
;;
|
|
esac
|
|
|
|
post_extract() {
|
|
# Report exact minor version
|
|
sed -i -e "s,^\(set(PACKAGE_VERSION_MINOR\) .*,\1 \"${version#*.}\")," CMakeLists.txt
|
|
|
|
# SubWCRev.py (SCM check) reports "unknown" for these fields
|
|
sed -i -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
|
|
-e "s,\${PACKAGE_WCDATE},(from release)," \
|
|
-e "s,\${PACKAGE_WCURL},VoidLinux package ${pkgname}," \
|
|
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
|
|
}
|