2018-10-18 01:03:07 +02:00
|
|
|
# Maintainer: Grey Christoforo <first name at last name dot net>
|
2019-04-03 19:14:00 +02:00
|
|
|
# Maintainer: Sebastiaan Lokhorst <sebastiaanlokhorst@gmail.com>
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2019-12-27 20:27:04 +01:00
|
|
|
pkgname=freecad-git
|
2020-12-17 15:44:44 +01:00
|
|
|
pkgver=0.19_pre.r4724.g6c6f5e7fbf
|
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
|
|
|
|
libspnav
|
|
|
|
med
|
|
|
|
netcdf
|
|
|
|
opencascade
|
|
|
|
openmpi
|
|
|
|
pyside2-tools
|
|
|
|
python-matplotlib
|
|
|
|
python-pivy
|
|
|
|
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
|
|
|
|
)
|
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
|
2020-12-05 15:18:36 +01:00
|
|
|
# patch out a build error
|
2019-12-31 14:48:34 +01:00
|
|
|
#curl -L "https://github.com/FreeCAD/FreeCAD/pull/2842/commits/095984fce44931a4c8e2ace269d45a62640fbfb4.patch" | patch -p1
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2020-11-20 17:55:21 +01:00
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2020-12-05 12:34:05 +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 \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
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 CMAKE_INSTALL_DATADIR="/usr/share/freecad" \
|
|
|
|
-D CMAKE_INSTALL_DOCDIR="/usr/share/freecad/doc" \
|
|
|
|
-D CMAKE_INSTALL_PREFIX="/usr/lib/freecad" \
|
|
|
|
-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 \
|
|
|
|
-G Ninja
|
2020-12-05 12:34:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd FreeCAD
|
|
|
|
ninja -C build
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
2020-12-17 15:44:44 +01:00
|
|
|
check() {
|
|
|
|
cd FreeCAD
|
|
|
|
./build/bin/FreeCAD --console --run-test 0
|
|
|
|
}
|
|
|
|
|
2015-06-30 09:40:28 +02:00
|
|
|
package() {
|
2020-12-05 12:34:05 +01:00
|
|
|
cd FreeCAD
|
|
|
|
DESTDIR="${pkgdir}" ninja -C build install
|
2020-11-20 17:55:21 +01:00
|
|
|
|
|
|
|
# Create desktop shortcut
|
2020-12-05 12:34:05 +01:00
|
|
|
gendesk -f -n --pkgname "${pkgname}" --pkgdesc "${pkgdesc}" --name FreeCAD \
|
2020-11-20 17:55:21 +01:00
|
|
|
--mimetypes='application/x-extension-fcstd' --startupnotify=true
|
|
|
|
|
|
|
|
# Package desktop shortcut
|
|
|
|
install -Dm644 freecad.desktop \
|
2020-12-05 12:34:05 +01:00
|
|
|
"${pkgdir}/usr/share/applications/freecad.desktop"
|
2020-11-20 17:55:21 +01:00
|
|
|
|
|
|
|
# Package MIME info
|
|
|
|
#install -Dm644 freecad.xml "$pkgdir/usr/share/mime/packages/freecad.xml"
|
|
|
|
|
2020-12-05 12:34:05 +01:00
|
|
|
cd src/Gui/Icons
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2020-11-20 17:55:21 +01:00
|
|
|
# Package icons
|
|
|
|
for i in 16 32 48 64; do
|
|
|
|
install -Dm644 "freecad-icon-$i.png" \
|
2020-12-05 12:34:05 +01:00
|
|
|
"${pkgdir}/usr/share/icons/hicolor/${i}x$i/apps/freecad.png"
|
2020-11-20 17:55:21 +01:00
|
|
|
done
|
|
|
|
install -Dm644 freecad.svg \
|
2020-12-05 12:34:05 +01:00
|
|
|
"${pkgdir}/usr/share/icons/hicolor/scalable/apps/freecad.svg"
|
2019-04-03 19:14:00 +02:00
|
|
|
|
2020-11-20 17:55:21 +01:00
|
|
|
# Package symlinks in /usr/bin
|
2020-12-05 12:34:05 +01:00
|
|
|
install -d "${pkgdir}/usr/bin"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCAD "${pkgdir}/usr/bin/freecad"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCAD "${pkgdir}/usr/bin/FreeCAD"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCADCmd "${pkgdir}/usr/bin/freecadcmd"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCADCmd "${pkgdir}/usr/bin/FreeCADCmd"
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|