summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Hovorka2016-09-22 14:53:49 +0200
committerMarkus Hovorka2016-09-22 14:53:49 +0200
commitf02d6beca1014797c79243f006e9945ae964d011 (patch)
tree1672609723bf48b2b75b9c3223b963e5f98c29be
parent81dafe1f739773be79ce828bda59fe62280e50eb (diff)
downloadaur-f02d6beca1014797c79243f006e9945ae964d011.tar.gz
Use PKGBUILD from freecad-netgen-git
-rw-r--r--.SRCINFO44
-rw-r--r--PKGBUILD100
-rw-r--r--fem-rpath.patch23
3 files changed, 97 insertions, 70 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 70dcd82bd35..fb285bb222f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = freecad-git
pkgdesc = A general purpose 3D CAD modeler - git checkout
- pkgver = 0.16.pre.r3.g192dca3
+ pkgver = 0.17pre.r1771.gf944ab3
pkgrel = 1
+ epoch = 1
url = http://www.freecadweb.org/
install = freecad.install
arch = i686
@@ -9,35 +10,42 @@ pkgbase = freecad-git
license = LGPL
makedepends = git
makedepends = boost
- makedepends = eigen
- makedepends = gcc-fortran
- makedepends = swig
- makedepends = desktop-file-utils
makedepends = cmake
makedepends = coin
makedepends = python2-pyside-tools
+ makedepends = desktop-file-utils
+ makedepends = eigen
+ makedepends = gcc-fortran
+ makedepends = swig
+ makedepends = patch
depends = boost-libs
depends = curl
- depends = opencascade>=6.6.0
- depends = python2-pivy
- depends = xerces-c
- depends = libspnav
- depends = shared-mime-info
depends = hicolor-icon-theme
- depends = python2-matplotlib
- depends = python2-shiboken
+ depends = libspnav
+ depends = opencascade
+ depends = med
+ depends = xerces-c
+ depends = python2-pivy
depends = python2-pyside
depends = qtwebkit
- optdepends = freecad-dxf: import DXF files
- optdepends = pycollada-git: create, edit and load COLLADA documents
+ depends = libtheora
+ depends = shared-mime-info
+ depends = vtk-qt4
+ depends = jsoncpp
+ optdepends = python2-matplotlib
+ optdepends = pycollada-git: Create, edit and load COLLADA documents.
provides = freecad
conflicts = freecad
- source = freecad::git://github.com/FreeCAD/FreeCAD
+ source = freecad-git::git+https://github.com/FreeCAD/FreeCAD.git
+ source = freecad.install
source = freecad.desktop
source = freecad.xml
- sha256sums = SKIP
- sha256sums = 886688f1f3624fafe92710890bda7504d1e0181c2c5239b313066eb412a78e0f
- sha256sums = 248918de7d3c2145b5cc4fbbc9e224d22f4a6ca7ead2680e8c3a32e91772482a
+ source = fem-rpath.patch
+ md5sums = SKIP
+ md5sums = 2fad48203f96f1e7cb97934ea20ed848
+ md5sums = 0a4d0635dbd97d9f594ac8e927284316
+ md5sums = c2f4154c8e4678825411de8e7fa54c6b
+ md5sums = 99a41687a9ba980eea86aee4345d9a1d
pkgname = freecad-git
diff --git a/PKGBUILD b/PKGBUILD
index 034a75b7bc9..27eef751a29 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,82 +1,78 @@
-# Maintainer: Christian Hesse <mail@eworm.de>
+# Maintainer: Markus Hovorka <m.hovorka@live.de>
+# Contributer: Christian Hesse <mail@eworm.de>
pkgname=freecad-git
-pkgver=0.16.pre.r3.g192dca3
+pkgver=0.17pre.r1771.gf944ab3
pkgrel=1
+epoch=1
pkgdesc='A general purpose 3D CAD modeler - git checkout'
arch=('i686' 'x86_64')
url='http://www.freecadweb.org/'
license=('LGPL')
-depends=('boost-libs' 'curl' 'opencascade>=6.6.0' 'python2-pivy' 'xerces-c'
- 'libspnav' 'shared-mime-info' 'hicolor-icon-theme'
- 'python2-matplotlib' 'python2-shiboken' 'python2-pyside' 'qtwebkit')
-makedepends=('git' 'boost' 'eigen' 'gcc-fortran' 'swig' 'desktop-file-utils'
- 'cmake' 'coin' 'python2-pyside-tools')
-optdepends=('freecad-dxf: import DXF files'
- 'pycollada-git: create, edit and load COLLADA documents')
+depends=('boost-libs' 'curl' 'hicolor-icon-theme' 'libspnav' 'opencascade'
+ 'med' 'xerces-c' 'python2-pivy' 'python2-pyside' 'qtwebkit'
+ 'libtheora' 'shared-mime-info' 'vtk-qt4' 'jsoncpp')
+makedepends=('git' 'boost' 'cmake' 'coin' 'python2-pyside-tools'
+ 'desktop-file-utils' 'eigen' 'gcc-fortran' 'swig' 'patch')
+optdepends=('python2-matplotlib'
+ 'pycollada-git: Create, edit and load COLLADA documents.')
provides=('freecad')
conflicts=('freecad')
install=freecad.install
-source=('freecad::git://github.com/FreeCAD/FreeCAD'
- 'freecad.desktop'
- 'freecad.xml')
-sha256sums=('SKIP'
- '886688f1f3624fafe92710890bda7504d1e0181c2c5239b313066eb412a78e0f'
- '248918de7d3c2145b5cc4fbbc9e224d22f4a6ca7ead2680e8c3a32e91772482a')
+source=("$pkgname::git+https://github.com/FreeCAD/FreeCAD.git"
+ "freecad.install"
+ "freecad.desktop"
+ "freecad.xml"
+ "fem-rpath.patch")
+md5sums=('SKIP'
+ '2fad48203f96f1e7cb97934ea20ed848'
+ '0a4d0635dbd97d9f594ac8e927284316'
+ 'c2f4154c8e4678825411de8e7fa54c6b'
+ '99a41687a9ba980eea86aee4345d9a1d')
pkgver() {
- cd freecad/
-
- if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
- echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
- else
- echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
- fi
+ cd "$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/_//'
}
prepare() {
- sed -i \
- -e "46i\\\tModDir = '/usr/share/freecad/Mod'" \
- -e "50i\\\tLibDir = '/usr/lib/freecad'" \
- "${srcdir}/freecad/src/App/FreeCADInit.py"
+ cd "$srcdir/$pkgname"
+ patch -p1 -i "$srcdir/fem-rpath.patch"
}
build() {
- cd freecad/
- mkdir -p build
- cd build
+ cd "$srcdir/$pkgname"
- cmake .. \
- -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
- -DCMAKE_INSTALL_DOCDIR:PATH="share/freecad/doc" \
- -DCMAKE_INSTALL_DATADIR:PATH="share/freecad" \
- -DCMAKE_INSTALL_LIBDIR:PATH="lib/freecad" \
- -DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc/ \
- -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
- -DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic \
- -DFREECAD_USE_EXTERNAL_PIVY:BOOL=ON
+ cmake -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX:PATH="/opt/freecad" \
+ -DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc \
+ -DOCC_LIBRARY_DIR:PATH=/opt/opencascade/lib \
+ -DVTK_DIR:PATH=/opt/vtk-qt4/lib/cmake/vtk-7.0 \
+ -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
+ -DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic
make
}
package() {
- cd freecad/build/
-
- make DESTDIR="${pkgdir}" install
+ cd "$srcdir/$pkgname"
- # Symlink to /usr/bin
- ln -sf "FreeCAD" "${pkgdir}/usr/bin/freecad"
- ln -sf "FreeCADCmd" "${pkgdir}/usr/bin/freecadcmd"
+ 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"
- cp -ra "${pkgdir}/usr/Mod" "${pkgdir}/usr/share/freecad/"
- rm -r "${pkgdir}/usr/Mod"
+ # 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"
- # Install pixmaps and desktop shortcut
+ # Install pixmaps and desktop shortcut.
desktop-file-install \
- --dir="${pkgdir}/usr/share/applications" \
- "${srcdir}/freecad.desktop"
+ --dir="$pkgdir/usr/share/applications" "$srcdir/freecad.desktop"
- # Mime info
- install -D -m644 "${srcdir}/freecad.xml" "${pkgdir}/usr/share/mime/packages/freecad.xml"
+ # Install mime info.
+ install -D -m644 "$srcdir/freecad.xml" \
+ "$pkgdir/usr/share/mime/packages/freecad.xml"
}
-
diff --git a/fem-rpath.patch b/fem-rpath.patch
new file mode 100644
index 00000000000..69c6043edc3
--- /dev/null
+++ b/fem-rpath.patch
@@ -0,0 +1,23 @@
+diff --git a/src/Mod/Fem/App/CMakeLists.txt b/src/Mod/Fem/App/CMakeLists.txt
+index fd57fa0..3c649d4 100755
+--- a/src/Mod/Fem/App/CMakeLists.txt
++++ b/src/Mod/Fem/App/CMakeLists.txt
+@@ -263,5 +263,7 @@ fc_target_copy_resource(Fem
+
+ SET_BIN_DIR(Fem Fem /Mod/Fem)
+ SET_PYTHON_PREFIX_SUFFIX(Fem)
++set_property(TARGET Fem APPEND PROPERTY INSTALL_RPATH "/opt/vtk-qt4/lib")
++
+
+ INSTALL(TARGETS Fem DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/src/Mod/Fem/Gui/CMakeLists.txt b/src/Mod/Fem/Gui/CMakeLists.txt
+index cec8d78..b3a7c48 100755
+--- a/src/Mod/Fem/Gui/CMakeLists.txt
++++ b/src/Mod/Fem/Gui/CMakeLists.txt
+@@ -344,5 +344,6 @@ INSTALL(FILES ${FemGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Fem/Re
+
+ SET_BIN_DIR(FemGui FemGui /Mod/Fem)
+ SET_PYTHON_PREFIX_SUFFIX(FemGui)
++set_property(TARGET FemGui APPEND PROPERTY INSTALL_RPATH "/opt/vtk-qt4/lib")
+
+ INSTALL(TARGETS FemGui DESTINATION ${CMAKE_INSTALL_LIBDIR})