7237e99cc5
[ci skip]
72 lines
2.7 KiB
Bash
72 lines
2.7 KiB
Bash
# Template file for 'freecad'
|
|
#
|
|
# TODO
|
|
# - qt5: needs python-pyside2 (https://wiki.qt.io/PySide2)
|
|
# - python3: freecad code not yet ready for it, probably at 0.18
|
|
pkgname=freecad
|
|
version=0.17
|
|
revision=10
|
|
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=OFF
|
|
-DCMAKE_INSTALL_PREFIX=${_inst_prefix}
|
|
-DCMAKE_INSTALL_LIBDIR=${_inst_prefix}/lib
|
|
-DMEDFILE_INCLUDE_DIRS=/usr/include/med"
|
|
hostmakedepends="pkg-config swig doxygen graphviz dos2unix"
|
|
makedepends="python-devel boost-devel libxerces-c-devel zlib-devel occt-devel
|
|
vtk-devel hdf5-devel openmpi-devel libmed-devel eigen double-conversion-devel
|
|
coin3-devel libshiboken-python-devel libspnav-devel pyside-tools liblz4-devel
|
|
libpyside-python-devel python-matplotlib netcdf-devel jsoncpp-devel
|
|
qt-devel qt-webkit-devel coin3-doc"
|
|
|
|
# FreeCAD help: qt/assistant, in SQLite format
|
|
depends="python-matplotlib python-pyside qt-devel-tools qt-plugin-sqlite python-pivy"
|
|
|
|
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=ae017393476b6dc7f1192bcaf91ceedc2f9b791f2495307ce7c45efadb5266fb
|
|
|
|
post_extract() {
|
|
find $wrksrc -type f -exec dos2unix -q {} +
|
|
|
|
# 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
|
|
|
|
# desktop integration
|
|
vmkdir usr/share/applications
|
|
vcopy ${FILESDIR}/freecad.desktop usr/share/applications
|
|
sed -i -e "s,@_inst_prefix@,${_inst_prefix}," ${DESTDIR}/usr/share/applications/freecad.desktop
|
|
vmkdir usr/share/appdata
|
|
vcopy ${FILESDIR}/freecad.appdata.xml usr/share/appdata
|
|
vmkdir usr/share/mime/packages
|
|
vcopy ${FILESDIR}/freecad.xml usr/share/mime/packages
|
|
for s in 16 32 48 64; do
|
|
_dest_icon=usr/share/icons/hicolor/${s}x${s}/apps
|
|
vmkdir ${_dest_icon}
|
|
ln -s ${_inst_prefix}/data/freecad-icon-${s}.png ${DESTDIR}/${_dest_icon}/freecad.png
|
|
ln -s ${_inst_prefix}/data/freecad.xpm ${DESTDIR}/${_dest_icon}/freecad.xpm
|
|
done
|
|
vmkdir usr/share/icons/scalable/apps
|
|
ln -s ${_inst_prefix}/data/freecad.svg ${DESTDIR}/usr/share/icons/scalable/apps/freecad.svg
|
|
}
|