blob: db20c5e5fcff16e99a257990989e8d4df01292e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Maintainer: Gabriel Souza Franco <Z2FicmllbGZyYW5jb3NvdXphQGdtYWlsLmNvbQ==>
# Contributor: Florian Pritz
# Contributor: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jordi De Groof <jordi (dot) degroof (at) gmail (dot) com>
# Contributor: mickele
# Contributor: manwithgrenade
# Contributor: bricem13
# Contributor: gborzi
pkgname=freecad
_pkgver=0.18
_count=16158
_commit=783e1346c7a078f5265c3f0c6a927d09a8c1fe70
pkgver=$_pkgver.$_count
pkgrel=1
pkgdesc='A general purpose 3D CAD modeler'
arch=('x86_64')
url='https://www.freecadweb.org/'
license=('LGPL')
depends=('boost-libs' 'curl' 'opencascade>=7.2' 'xerces-c' 'libspnav' 'glew' 'netcdf' 'openmpi'
'shared-mime-info' 'hicolor-icon-theme' 'jsoncpp' 'qt5-base' 'qt5-declarative' 'qt5-svg' 'qt5-tools'
'qt5-x11extras' 'qt5-webkit' 'med' 'python-pivy' 'python-pyside2' 'python-matplotlib' 'pyside2-tools')
makedepends=('boost' 'eigen' 'gcc-fortran' 'swig' 'xerces-c' 'desktop-file-utils' 'git'
'cmake' 'coin>=4.0.0a' 'python-shiboken2' 'pyside2' 'shiboken2')
optdepends=('python-matplotlib' 'graphviz' 'openscad')
source=("git+https://github.com/FreeCAD/FreeCAD.git#commit=$_commit"
"${pkgname}.desktop" "${pkgname}.xml")
sha256sums=('SKIP'
'617968d7bbd1da71bdedaed1b66c5d6eaf24e0fb34678b93f5d925d370c66296'
'1d98fa4e62f352966eb357c93f54b1f0bf562931e8323bf70a83b5e221a5fb14')
_backports=(
299368b1b278f94f579c110be179cf6023882ca5 # Workaround for messy SHIBOKEN_MICRO_VERSION definition.
17ed2b196a58afbbc3cc1bb99f6eb76060171ad2 # [Cmake] Update FindPySide2Tools for PySide2 5.14 - issue #4229
1666b28836baa79b26b707afb1e97c2a0855eb1f # Change IF(...LESS...) into IF(...VERSION_LESS...)
6eacb17b3e03d20039b85c9daebab9e44386d6bf # Update swigpyrun.in for Python 3.8
)
prepare() {
cd "${srcdir}/FreeCAD"
if ((${#_backports[@]})); then
git cherry-pick --quit
git cherry-pick -n -x -Xours -Xignore-space-change "${_backports[@]}"
fi
# Sigh… Why can't upstream backport properly?
sed -i '38a using namespace std\;\r' src/Mod/Raytracing/App/RayFeature.cpp # Fixup d13e777 by partial application of 5095703
# Fix for Qt 5.15
sed -i 's/\(.*\)include <QPainter>$/&\n\1include <QPainterPath>/' src/Mod/Image/Gui/OpenGLImageBox.cpp
}
build() {
cd "${srcdir}/FreeCAD"
PATH=/usr/bin:$PATH # OpenCascade has problems if /bin comes before /usr/bin in the $PATH
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/usr/lib/freecad" \
-DCMAKE_INSTALL_DOCDIR="/usr/share/freecad/doc" \
-DCMAKE_INSTALL_DATADIR="/usr/share/freecad" \
-DFREECAD_USE_OCC_VARIANT="Official Version" \
-DFREECAD_USE_EXTERNAL_PIVY=ON \
-DFREECAD_USE_QT_FILEDIALOG=ON \
-DBUILD_QT5=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python
cmake --build .
}
package() {
cd "${srcdir}/FreeCAD"
DESTDIR="${pkgdir}" cmake --install .
# Symlink to /usr/bin
install -dm755 "${pkgdir}/usr/bin"
ln -srf "${pkgdir}/usr/lib/freecad/bin/FreeCAD" "${pkgdir}/usr/bin/freecad"
ln -srf "${pkgdir}/usr/lib/freecad/bin/FreeCAD" "${pkgdir}/usr/bin/FreeCAD"
ln -srf "${pkgdir}/usr/lib/freecad/bin/FreeCADCmd" "${pkgdir}/usr/bin/freecadcmd"
ln -srf "${pkgdir}/usr/lib/freecad/bin/FreeCADCmd" "${pkgdir}/usr/bin/FreeCADCmd"
# Install pixmaps and desktop shortcut
desktop-file-install \
--dir="${pkgdir}/usr/share/applications" \
"${srcdir}/${pkgname}.desktop"
for i in 16 32 48 64; do
install -Dm644 "src/Gui/Icons/freecad-icon-${i}.png" \
"${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/freecad.png"
done
install -Dm644 "src/Gui/Icons/freecad.svg" \
"${pkgdir}/usr/share/icons/hicolor/scalable/apps/freecad.svg"
# Mime info
install -D -m644 "${srcdir}/freecad.xml" "${pkgdir}/usr/share/mime/packages/freecad.xml"
}
|