2016-09-22 14:53:49 +02:00
|
|
|
# Maintainer: Markus Hovorka <m.hovorka@live.de>
|
|
|
|
# Contributer: Christian Hesse <mail@eworm.de>
|
2015-06-30 09:40:28 +02:00
|
|
|
|
|
|
|
pkgname=freecad-git
|
2017-03-18 00:51:10 +01:00
|
|
|
pkgver=0.17pre.r3794.g4f165179e
|
|
|
|
pkgrel=1
|
2016-09-22 14:53:49 +02:00
|
|
|
epoch=1
|
2015-06-30 09:40:28 +02:00
|
|
|
pkgdesc='A general purpose 3D CAD modeler - git checkout'
|
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url='http://www.freecadweb.org/'
|
|
|
|
license=('LGPL')
|
2017-03-18 00:51:10 +01:00
|
|
|
depends=('boost-libs' 'curl' 'hicolor-icon-theme' 'libspnav' 'opencascade7'
|
2017-03-18 00:54:49 +01:00
|
|
|
'med' 'xerces-c' 'python2-pivy' 'python2-pyside' 'qtwebkit'
|
2016-09-22 14:53:49 +02:00
|
|
|
'libtheora' 'shared-mime-info' 'vtk-qt4' 'jsoncpp')
|
|
|
|
makedepends=('git' 'boost' 'cmake' 'coin' 'python2-pyside-tools'
|
2017-03-18 00:54:49 +01:00
|
|
|
'desktop-file-utils' 'eigen' 'gcc-fortran' 'swig')
|
2016-09-22 14:53:49 +02:00
|
|
|
optdepends=('python2-matplotlib'
|
|
|
|
'pycollada-git: Create, edit and load COLLADA documents.')
|
2015-06-30 09:40:28 +02:00
|
|
|
provides=('freecad')
|
|
|
|
conflicts=('freecad')
|
2016-09-22 14:53:49 +02:00
|
|
|
source=("$pkgname::git+https://github.com/FreeCAD/FreeCAD.git"
|
|
|
|
"freecad.desktop"
|
|
|
|
"freecad.xml"
|
2017-03-18 00:51:10 +01:00
|
|
|
"rpath.patch"
|
|
|
|
"fix-occ-search.patch")
|
2016-09-22 14:53:49 +02:00
|
|
|
md5sums=('SKIP'
|
2017-02-16 23:24:27 +01:00
|
|
|
'7e781d41e90a1c137930e47672996a52'
|
2016-09-22 14:53:49 +02:00
|
|
|
'c2f4154c8e4678825411de8e7fa54c6b'
|
2017-03-18 00:51:10 +01:00
|
|
|
'b313a990287bce43dc698affae35d58d'
|
|
|
|
'5a7beefb78ef73241b0e421fec67f4db')
|
2015-06-30 09:40:28 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2016-09-22 14:53:49 +02:00
|
|
|
cd "$pkgname"
|
|
|
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/_//'
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
2016-09-22 14:53:49 +02:00
|
|
|
cd "$srcdir/$pkgname"
|
2017-03-18 00:51:10 +01:00
|
|
|
patch -Np1 -i "$srcdir/rpath.patch"
|
|
|
|
patch -Np1 -i "$srcdir/fix-occ-search.patch"
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2016-09-22 14:53:49 +02:00
|
|
|
cd "$srcdir/$pkgname"
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2016-09-22 14:53:49 +02:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH="/opt/freecad" \
|
2017-03-18 00:51:10 +01:00
|
|
|
-DOCC_INCLUDE_DIR:PATH=/opt/opencascade7/include/opencascade \
|
|
|
|
-DOCC_LIBRARY_DIR:PATH=/opt/opencascade7/lib \
|
2016-09-22 14:53:49 +02:00
|
|
|
-DVTK_DIR:PATH=/opt/vtk-qt4/lib/cmake/vtk-7.0 \
|
2017-03-18 00:51:10 +01:00
|
|
|
-DCMAKE_PREFIX_PATH=/opt/opencascade7 \
|
|
|
|
-DCMAKE_INCLUDE_PATH:PATH=/opt/opencascade7/include/opencascade \
|
|
|
|
-DCMAKE_LIBRARY_PATH:PATH=/opt/opencascade7/lib \
|
|
|
|
-DCMAKE_INSTALL_RPATH=/opt/opencascade7/lib:/opt/vtk-qt4/lib \
|
2016-09-22 14:53:49 +02:00
|
|
|
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
|
2017-03-04 17:33:00 +01:00
|
|
|
-DPYTHON_SUFFIX=-python2.7 \
|
|
|
|
-DPYTHON_BASENAME=-python2.7 \
|
2016-09-22 14:53:49 +02:00
|
|
|
-DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic
|
2015-06-30 09:40:28 +02:00
|
|
|
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2016-09-22 14:53:49 +02:00
|
|
|
cd "$srcdir/$pkgname"
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2016-09-22 14:53:49 +02:00
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
|
|
|
|
# Symlink binaries to /usr/bin.
|
|
|
|
mkdir -p "$pkgdir/usr/bin"
|
|
|
|
ln -s "/opt/freecad/bin/FreeCAD" "$pkgdir/usr/bin/FreeCAD"
|
|
|
|
ln -s "/opt/freecad/bin/FreeCADCmd" "$pkgdir/usr/bin/FreeCADCmd"
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2016-09-22 14:53:49 +02:00
|
|
|
# Lowercase aliases like the official arch package.
|
|
|
|
ln -s "/opt/freecad/bin/FreeCAD" "$pkgdir/usr/bin/freecad"
|
|
|
|
ln -s "/opt/freecad/bin/FreeCADCmd" "$pkgdir/usr/bin/freecadcmd"
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2016-09-22 14:53:49 +02:00
|
|
|
# Install pixmaps and desktop shortcut.
|
2017-02-16 23:24:27 +01:00
|
|
|
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"
|
2015-06-30 09:40:28 +02:00
|
|
|
desktop-file-install \
|
2016-09-22 14:53:49 +02:00
|
|
|
--dir="$pkgdir/usr/share/applications" "$srcdir/freecad.desktop"
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2016-09-22 14:53:49 +02:00
|
|
|
# Install mime info.
|
|
|
|
install -D -m644 "$srcdir/freecad.xml" \
|
|
|
|
"$pkgdir/usr/share/mime/packages/freecad.xml"
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|