Use PKGBUILD from freecad-netgen-git
This commit is contained in:
parent
81dafe1f73
commit
f02d6beca1
3 changed files with 97 additions and 70 deletions
44
.SRCINFO
44
.SRCINFO
|
@ -1,7 +1,8 @@
|
||||||
pkgbase = freecad-git
|
pkgbase = freecad-git
|
||||||
pkgdesc = A general purpose 3D CAD modeler - git checkout
|
pkgdesc = A general purpose 3D CAD modeler - git checkout
|
||||||
pkgver = 0.16.pre.r3.g192dca3
|
pkgver = 0.17pre.r1771.gf944ab3
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
|
epoch = 1
|
||||||
url = http://www.freecadweb.org/
|
url = http://www.freecadweb.org/
|
||||||
install = freecad.install
|
install = freecad.install
|
||||||
arch = i686
|
arch = i686
|
||||||
|
@ -9,35 +10,42 @@ pkgbase = freecad-git
|
||||||
license = LGPL
|
license = LGPL
|
||||||
makedepends = git
|
makedepends = git
|
||||||
makedepends = boost
|
makedepends = boost
|
||||||
makedepends = eigen
|
|
||||||
makedepends = gcc-fortran
|
|
||||||
makedepends = swig
|
|
||||||
makedepends = desktop-file-utils
|
|
||||||
makedepends = cmake
|
makedepends = cmake
|
||||||
makedepends = coin
|
makedepends = coin
|
||||||
makedepends = python2-pyside-tools
|
makedepends = python2-pyside-tools
|
||||||
|
makedepends = desktop-file-utils
|
||||||
|
makedepends = eigen
|
||||||
|
makedepends = gcc-fortran
|
||||||
|
makedepends = swig
|
||||||
|
makedepends = patch
|
||||||
depends = boost-libs
|
depends = boost-libs
|
||||||
depends = curl
|
depends = curl
|
||||||
depends = opencascade>=6.6.0
|
|
||||||
depends = python2-pivy
|
|
||||||
depends = xerces-c
|
|
||||||
depends = libspnav
|
|
||||||
depends = shared-mime-info
|
|
||||||
depends = hicolor-icon-theme
|
depends = hicolor-icon-theme
|
||||||
depends = python2-matplotlib
|
depends = libspnav
|
||||||
depends = python2-shiboken
|
depends = opencascade
|
||||||
|
depends = med
|
||||||
|
depends = xerces-c
|
||||||
|
depends = python2-pivy
|
||||||
depends = python2-pyside
|
depends = python2-pyside
|
||||||
depends = qtwebkit
|
depends = qtwebkit
|
||||||
optdepends = freecad-dxf: import DXF files
|
depends = libtheora
|
||||||
optdepends = pycollada-git: create, edit and load COLLADA documents
|
depends = shared-mime-info
|
||||||
|
depends = vtk-qt4
|
||||||
|
depends = jsoncpp
|
||||||
|
optdepends = python2-matplotlib
|
||||||
|
optdepends = pycollada-git: Create, edit and load COLLADA documents.
|
||||||
provides = freecad
|
provides = freecad
|
||||||
conflicts = 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.desktop
|
||||||
source = freecad.xml
|
source = freecad.xml
|
||||||
sha256sums = SKIP
|
source = fem-rpath.patch
|
||||||
sha256sums = 886688f1f3624fafe92710890bda7504d1e0181c2c5239b313066eb412a78e0f
|
md5sums = SKIP
|
||||||
sha256sums = 248918de7d3c2145b5cc4fbbc9e224d22f4a6ca7ead2680e8c3a32e91772482a
|
md5sums = 2fad48203f96f1e7cb97934ea20ed848
|
||||||
|
md5sums = 0a4d0635dbd97d9f594ac8e927284316
|
||||||
|
md5sums = c2f4154c8e4678825411de8e7fa54c6b
|
||||||
|
md5sums = 99a41687a9ba980eea86aee4345d9a1d
|
||||||
|
|
||||||
pkgname = freecad-git
|
pkgname = freecad-git
|
||||||
|
|
||||||
|
|
96
PKGBUILD
96
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
|
pkgname=freecad-git
|
||||||
pkgver=0.16.pre.r3.g192dca3
|
pkgver=0.17pre.r1771.gf944ab3
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
|
epoch=1
|
||||||
pkgdesc='A general purpose 3D CAD modeler - git checkout'
|
pkgdesc='A general purpose 3D CAD modeler - git checkout'
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url='http://www.freecadweb.org/'
|
url='http://www.freecadweb.org/'
|
||||||
license=('LGPL')
|
license=('LGPL')
|
||||||
depends=('boost-libs' 'curl' 'opencascade>=6.6.0' 'python2-pivy' 'xerces-c'
|
depends=('boost-libs' 'curl' 'hicolor-icon-theme' 'libspnav' 'opencascade'
|
||||||
'libspnav' 'shared-mime-info' 'hicolor-icon-theme'
|
'med' 'xerces-c' 'python2-pivy' 'python2-pyside' 'qtwebkit'
|
||||||
'python2-matplotlib' 'python2-shiboken' 'python2-pyside' 'qtwebkit')
|
'libtheora' 'shared-mime-info' 'vtk-qt4' 'jsoncpp')
|
||||||
makedepends=('git' 'boost' 'eigen' 'gcc-fortran' 'swig' 'desktop-file-utils'
|
makedepends=('git' 'boost' 'cmake' 'coin' 'python2-pyside-tools'
|
||||||
'cmake' 'coin' 'python2-pyside-tools')
|
'desktop-file-utils' 'eigen' 'gcc-fortran' 'swig' 'patch')
|
||||||
optdepends=('freecad-dxf: import DXF files'
|
optdepends=('python2-matplotlib'
|
||||||
'pycollada-git: create, edit and load COLLADA documents')
|
'pycollada-git: Create, edit and load COLLADA documents.')
|
||||||
provides=('freecad')
|
provides=('freecad')
|
||||||
conflicts=('freecad')
|
conflicts=('freecad')
|
||||||
install=freecad.install
|
install=freecad.install
|
||||||
source=('freecad::git://github.com/FreeCAD/FreeCAD'
|
source=("$pkgname::git+https://github.com/FreeCAD/FreeCAD.git"
|
||||||
'freecad.desktop'
|
"freecad.install"
|
||||||
'freecad.xml')
|
"freecad.desktop"
|
||||||
sha256sums=('SKIP'
|
"freecad.xml"
|
||||||
'886688f1f3624fafe92710890bda7504d1e0181c2c5239b313066eb412a78e0f'
|
"fem-rpath.patch")
|
||||||
'248918de7d3c2145b5cc4fbbc9e224d22f4a6ca7ead2680e8c3a32e91772482a')
|
md5sums=('SKIP'
|
||||||
|
'2fad48203f96f1e7cb97934ea20ed848'
|
||||||
|
'0a4d0635dbd97d9f594ac8e927284316'
|
||||||
|
'c2f4154c8e4678825411de8e7fa54c6b'
|
||||||
|
'99a41687a9ba980eea86aee4345d9a1d')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd freecad/
|
cd "$pkgname"
|
||||||
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/_//'
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
sed -i \
|
cd "$srcdir/$pkgname"
|
||||||
-e "46i\\\tModDir = '/usr/share/freecad/Mod'" \
|
patch -p1 -i "$srcdir/fem-rpath.patch"
|
||||||
-e "50i\\\tLibDir = '/usr/lib/freecad'" \
|
|
||||||
"${srcdir}/freecad/src/App/FreeCADInit.py"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd freecad/
|
cd "$srcdir/$pkgname"
|
||||||
mkdir -p build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
cmake .. \
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH="/usr" \
|
-DCMAKE_INSTALL_PREFIX:PATH="/opt/freecad" \
|
||||||
-DCMAKE_INSTALL_DOCDIR:PATH="share/freecad/doc" \
|
-DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc \
|
||||||
-DCMAKE_INSTALL_DATADIR:PATH="share/freecad" \
|
-DOCC_LIBRARY_DIR:PATH=/opt/opencascade/lib \
|
||||||
-DCMAKE_INSTALL_LIBDIR:PATH="lib/freecad" \
|
-DVTK_DIR:PATH=/opt/vtk-qt4/lib/cmake/vtk-7.0 \
|
||||||
-DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc/ \
|
|
||||||
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
|
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
|
||||||
-DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic \
|
-DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic
|
||||||
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=ON
|
|
||||||
|
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd freecad/build/
|
cd "$srcdir/$pkgname"
|
||||||
|
|
||||||
make DESTDIR="${pkgdir}" install
|
make DESTDIR="$pkgdir" install
|
||||||
|
|
||||||
# Symlink to /usr/bin
|
# Symlink binaries to /usr/bin.
|
||||||
ln -sf "FreeCAD" "${pkgdir}/usr/bin/freecad"
|
mkdir -p "$pkgdir/usr/bin"
|
||||||
ln -sf "FreeCADCmd" "${pkgdir}/usr/bin/freecadcmd"
|
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/"
|
# Lowercase aliases like the official arch package.
|
||||||
rm -r "${pkgdir}/usr/Mod"
|
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 \
|
desktop-file-install \
|
||||||
--dir="${pkgdir}/usr/share/applications" \
|
--dir="$pkgdir/usr/share/applications" "$srcdir/freecad.desktop"
|
||||||
"${srcdir}/freecad.desktop"
|
|
||||||
|
|
||||||
# Mime info
|
# Install mime info.
|
||||||
install -D -m644 "${srcdir}/freecad.xml" "${pkgdir}/usr/share/mime/packages/freecad.xml"
|
install -D -m644 "$srcdir/freecad.xml" \
|
||||||
|
"$pkgdir/usr/share/mime/packages/freecad.xml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
fem-rpath.patch
Normal file
23
fem-rpath.patch
Normal file
|
@ -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})
|
Loading…
Reference in a new issue