mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-12 03:04:39 +08:00
91 lines
2.7 KiB
Bash
91 lines
2.7 KiB
Bash
#
|
|
# Apps Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
|
|
|
|
pkgname=freecad
|
|
_pkgname=FreeCAD
|
|
pkgver=0.11.4422
|
|
pkgrel=1
|
|
pkgdesc='A general purpose 3D CAD modeler.'
|
|
arch=('i686' 'x86_64')
|
|
url='http://sourceforge.net/apps/mediawiki/free-cad/'
|
|
license=('GPL')
|
|
depends=('boost-libs>=1.46.0' 'curl' 'opencascade' 'pivy-hg' 'pyqt' 'xerces-c' 'shared-mime-info' 'hicolor-icon-theme')
|
|
makedepends=('boost>=1.46.0' 'eigen' 'gcc-fortran' 'swig1')
|
|
options=(!libtool)
|
|
install=freecad.install
|
|
source=("http://downloads.sourceforge.net/sourceforge/free-cad/$pkgname-$pkgver.tar.gz"
|
|
"$pkgname.desktop"
|
|
"$pkgname.xml"
|
|
"occ65.patch"
|
|
"gcc46.patch")
|
|
md5sums=('39a342338c276ca2386bdb4d02a3b60d'
|
|
'0d3e92a0cb31f2621e9824a099e8a244'
|
|
'c2f4154c8e4678825411de8e7fa54c6b'
|
|
'd22f9ce31a698d49163b5247f247a407'
|
|
'ffad7762c07144f2eb9e666e8c6d08c7')
|
|
|
|
build() {
|
|
cd $srcdir/$_pkgname-$pkgver
|
|
|
|
patch -Np1 -i $srcdir/occ65.patch
|
|
patch -Np1 -i $srcdir/gcc46.patch
|
|
|
|
# Fix boost*-mt libs.
|
|
sed -i -e 's/-lboost\(.*\)-mt/-lboost\1/' acinclude.m4
|
|
|
|
./autogen.sh
|
|
|
|
./configure \
|
|
--prefix=/usr/lib/$pkgname \
|
|
--datadir=/usr/share/$pkgname \
|
|
--includedir=/usr/include/$pkgname \
|
|
--docdir=/usr/share/doc/$pkgname \
|
|
--with-qt4-dir=/usr/lib/qt/ \
|
|
--with-qt4-bin=/usr/bin/ \
|
|
--with-qt4-include=/usr/include/ \
|
|
--with-qt4-lib=/usr/lib/qt/ \
|
|
PYTHON=/usr/bin/python2 \
|
|
--with-python-include=/usr/include/python2.7/ \
|
|
--with-python-lib=/usr/lib/python2.7/ \
|
|
--with-boost-include=/usr/include/boost \
|
|
--with-boost-lib=/usr/lib \
|
|
--with-occ-lib=/usr/share/opencascade/lib \
|
|
--with-occ-include=/usr/share/opencascade/inc \
|
|
--disable-debug
|
|
|
|
# Build main program
|
|
make
|
|
|
|
# Builds Qt plugin
|
|
cd src/Tools/plugins/widget/
|
|
qmake plugin.pro
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $srcdir/$_pkgname-$pkgver
|
|
|
|
# Install main program
|
|
make DESTDIR=$pkgdir install
|
|
|
|
# Symlink to /usr/bin
|
|
mkdir -p $pkgdir/usr/bin/
|
|
ln -sf /usr/lib/$pkgname/bin/$_pkgname $pkgdir/usr/bin/$pkgname
|
|
ln -sf /usr/lib/$pkgname/bin/FreeCADCmd $pkgdir/usr/bin/freecadcmd
|
|
|
|
# Installs Qt plugin
|
|
install -Dm755 src/Tools/plugins/widget/libFreeCAD_widgets.so $pkgdir/usr/lib/qt/plugins/designer/libFreeCAD_widgets.so
|
|
|
|
# Desktop integration.
|
|
desktop-file-install \
|
|
--dir=$pkgdir/usr/share/applications \
|
|
$srcdir/$pkgname.desktop
|
|
|
|
# MIME info.
|
|
install -D -m644 $srcdir/$pkgname.xml $pkgdir/usr/share/mime/packages/$pkgname.xml
|
|
mkdir -p $pkgdir/usr/share/icons/hicolor/48x48/mimetypes/
|
|
ln -s /usr/share/$pkgname/freecad.xpm $pkgdir/usr/share/icons/hicolor/48x48/mimetypes/application-x-extension-fcstd.xpm
|
|
}
|