summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee68f9dfeb37e414c43d8151f05cd486010cd3b0 (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
# Maintainer: Maurizio D'Addona <mauritiusdadd@gmail.com>
# Contributor: Sven Niese <Fd3querm@yahoo.de>
# Contributor: Daniel Murphy <mosquitogang201@gmail.com>

# NOTE: !buildflags is needed in order to compile the code

pkgname=calculix-cgx
pkgver=2.22
pkgrel=1
pkgdesc="CalculiX: 3D Structural Finite Element Program - Post Processor"
arch=('i686' 'x86_64')
options=(!buildflags)
url="http://www.calculix.de/"
license=('GPL2')
depends=('libsnl-svn' 'mesa' 'glu' 'libxmu' 'libxi')
optdepends=('calculix-doc: documentation and examples')
makedepends=('gcc-fortran' 'perl')
checkdepends=('perl')

source=("http://www.dhondt.de/cgx_${pkgver}.all.tar.bz2"
        "calculix_cgx_${pkgver}_archlinux.patch")

sha256sums=('c642431089560eec21b1a6a5d7f5a40bc23ea946115a296b8dd8cb8a596921d1'
            '10fb41e0d53457c100df59428f1ad9bb4cbb953fbf30297c89c6d1c4be673b63')

prepare()
{
    cd "${srcdir}"

    msg "Patching makefiles..."
    rm -rf CalculiX/libSNL
    patch -p0 -f -l -s -i calculix_cgx_${pkgver}_archlinux.patch
    msg2 "Done"
}

build()
{   
    cd "${srcdir}/CalculiX/cgx_${pkgver}/src"
    make  CFLAGS="-O2 -Wall -Wno-narrowing -I./ -I/usr/include/libSNL -I../../glut-3.5/src" \
          LFLAGS="-lGL -lGLU -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE -lSNL -lm -lpthread -lrt"
}

package() 
{
    install -d  ${pkgdir}/usr/bin
    install -Dm755 ${srcdir}/CalculiX/cgx_${pkgver}/src/cgx ${pkgdir}/usr/bin/cgx
}