2018-10-18 01:03:07 +02:00
|
|
|
# Maintainer: Grey Christoforo <first name at last name dot net>
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2019-12-27 20:27:04 +01:00
|
|
|
pkgname=freecad-git
|
2021-04-04 20:57:30 +02:00
|
|
|
pkgver=0.19.r407.ge66ed26769
|
2020-11-20 19:14:12 +01:00
|
|
|
pkgrel=1
|
2019-12-27 20:27:04 +01:00
|
|
|
epoch=0
|
2015-06-30 09:40:28 +02:00
|
|
|
pkgdesc='A general purpose 3D CAD modeler - git checkout'
|
2019-03-15 20:13:11 +01:00
|
|
|
arch=('x86_64')
|
|
|
|
url='https://www.freecadweb.org/'
|
2015-06-30 09:40:28 +02:00
|
|
|
license=('LGPL')
|
2020-11-21 14:03:21 +01:00
|
|
|
depends=(
|
|
|
|
boost-libs
|
|
|
|
glew
|
|
|
|
jsoncpp
|
|
|
|
med
|
|
|
|
netcdf
|
|
|
|
opencascade
|
|
|
|
openmpi
|
|
|
|
pyside2-tools
|
2020-12-18 11:06:41 +01:00
|
|
|
python-yaml
|
2020-11-21 14:03:21 +01:00
|
|
|
python-matplotlib
|
|
|
|
python-pivy
|
2020-12-20 18:25:30 +01:00
|
|
|
python-ply
|
2020-11-21 14:03:21 +01:00
|
|
|
python-pyside2
|
|
|
|
qt5-svg
|
|
|
|
qt5-tools
|
|
|
|
qt5-webkit
|
|
|
|
qt5-x11extras
|
|
|
|
qt5-xmlpatterns
|
|
|
|
shared-mime-info
|
|
|
|
xerces-c
|
|
|
|
)
|
|
|
|
makedepends=(
|
|
|
|
boost
|
|
|
|
cmake
|
|
|
|
coin
|
|
|
|
eigen
|
|
|
|
gcc-fortran
|
|
|
|
gendesk
|
|
|
|
git
|
|
|
|
ninja
|
|
|
|
pyside2
|
|
|
|
python-shiboken2
|
|
|
|
shiboken2
|
|
|
|
swig
|
|
|
|
)
|
2021-01-09 12:56:40 +01:00
|
|
|
optdepends=(
|
|
|
|
'povray: ray tracing support'
|
2021-01-09 13:07:37 +01:00
|
|
|
'luxcorerender: ray tracing support'
|
2021-01-09 12:56:40 +01:00
|
|
|
'libspnav: 3d mouse support'
|
|
|
|
)
|
2015-06-30 09:40:28 +02:00
|
|
|
provides=('freecad')
|
2019-12-27 20:27:04 +01:00
|
|
|
conflicts=('freecad' 'freecad-appimage' 'freecad-appimage-git')
|
2019-12-31 14:48:34 +01:00
|
|
|
source=("git+https://github.com/FreeCAD/FreeCAD.git")
|
2019-08-22 20:36:39 +02:00
|
|
|
md5sums=('SKIP')
|
2015-06-30 09:40:28 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2020-11-20 19:14:12 +01:00
|
|
|
cd FreeCAD
|
|
|
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
2019-12-27 20:27:04 +01:00
|
|
|
prepare() {
|
2020-12-05 12:34:05 +01:00
|
|
|
cd FreeCAD
|
2021-01-16 14:17:40 +01:00
|
|
|
#git checkout 927fdc9edc
|
2020-12-20 18:25:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd FreeCAD
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2021-01-31 14:59:01 +01:00
|
|
|
cmake -Wno-dev \
|
2020-12-17 15:44:44 +01:00
|
|
|
-D BUILD_ENABLE_CXX_STD=C++14 \
|
2020-11-20 17:55:21 +01:00
|
|
|
-D BUILD_QT5=ON \
|
2021-04-04 20:57:30 +02:00
|
|
|
-D BUILD_FEM=ON \
|
|
|
|
-D BUILD_MESH=ON \
|
2021-01-08 21:24:29 +01:00
|
|
|
-D CMAKE_INSTALL_PREFIX="" \
|
2021-01-16 14:17:40 +01:00
|
|
|
-D CMAKE_BUILD_TYPE=None \
|
2020-12-05 12:34:05 +01:00
|
|
|
-D CMAKE_C_FLAGS="${CFLAGS} -fPIC -w" \
|
|
|
|
-D CMAKE_CXX_FLAGS="${CXXFLAGS} -fPIC -w" \
|
2020-11-20 17:55:21 +01:00
|
|
|
-D FREECAD_USE_EXTERNAL_PIVY=ON \
|
|
|
|
-D FREECAD_USE_OCC_VARIANT="Official Version" \
|
|
|
|
-D FREECAD_USE_QT_FILEDIALOG=ON \
|
|
|
|
-D PYTHON_EXECUTABLE=/usr/bin/python \
|
2021-01-16 14:17:40 +01:00
|
|
|
-G Ninja \
|
|
|
|
-B build_dir \
|
|
|
|
-S .
|
2020-12-05 12:34:05 +01:00
|
|
|
|
2021-01-16 14:17:40 +01:00
|
|
|
cmake --build build_dir
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
2020-12-17 15:44:44 +01:00
|
|
|
check() {
|
2021-01-16 14:17:40 +01:00
|
|
|
cd FreeCAD
|
|
|
|
DESTDIR=check cmake --build build_dir -- install
|
2021-01-08 21:24:29 +01:00
|
|
|
|
2021-01-16 14:17:40 +01:00
|
|
|
cd build_dir/check
|
2021-04-04 20:57:30 +02:00
|
|
|
export LD_LIBRARY_PATH=lib:${LD_LIBRARY_PATH}
|
|
|
|
#exit
|
|
|
|
export PYTHONPATH=lib
|
|
|
|
bin/FreeCADCmd --console --run-test 0
|
2020-12-17 15:44:44 +01:00
|
|
|
}
|
|
|
|
|
2015-06-30 09:40:28 +02:00
|
|
|
package() {
|
2020-12-05 12:34:05 +01:00
|
|
|
cd FreeCAD
|
2021-01-08 21:37:03 +01:00
|
|
|
local _destdir=/usr/local/freecad # maybe this belongs in /opt/freecad-git
|
2021-01-16 14:17:40 +01:00
|
|
|
DESTDIR="${pkgdir}${_destdir}" cmake --build build_dir -- install
|
2020-11-20 17:55:21 +01:00
|
|
|
|
2021-01-08 21:24:29 +01:00
|
|
|
mkdir -p "${pkgdir}"/usr/{share,bin,lib}
|
2020-11-20 17:55:21 +01:00
|
|
|
|
2021-01-08 21:24:29 +01:00
|
|
|
# links for bin
|
|
|
|
FILES="${pkgdir}${_destdir}"/bin/*
|
|
|
|
for f in $FILES
|
|
|
|
do
|
|
|
|
ln -s ${_destdir}/bin/$(basename $f) "${pkgdir}"/usr/bin/$(basename $f)
|
|
|
|
done
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2021-01-08 21:24:29 +01:00
|
|
|
# links for lib
|
|
|
|
FILES="${pkgdir}${_destdir}"/lib/*
|
|
|
|
for f in $FILES
|
|
|
|
do
|
|
|
|
ln -s ${_destdir}/lib/$(basename $f) "${pkgdir}"/usr/lib/$(basename $f)
|
2020-11-20 17:55:21 +01:00
|
|
|
done
|
2019-04-03 19:14:00 +02:00
|
|
|
|
2021-01-08 21:24:29 +01:00
|
|
|
# manage share files
|
|
|
|
mv "${pkgdir}${_destdir}"/share/{applications,doc,icons,metainfo,mime,pixmaps,thumbnailers} "${pkgdir}"/usr/share
|
|
|
|
|
|
|
|
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${pkgdir}${_destdir}"/share/License.txt
|
|
|
|
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICENSE
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|