blob: 86db15be3324d3a1983ec826cf3ac89e7375124d (
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
48
49
50
51
52
53
54
55
56
57
58
|
# Maintainer: Maurizio D'Addona <mauritiusdadd@gmail.com>
_svnname='libsnl'
pkgname=libsnl-svn
pkgver=18
pkgrel=7
pkgdesc="libSNL is a library of routines used for the manipulation of NURBS curves and surfaces."
arch=('i686' 'x86_64')
url="https://libsnl.sourceforge.net/"
license=('GPL2')
provides=('libsnl')
conflicts=('libsnl')
depends=()
makedepends=('subversion')
source=(
"$_svnname::svn+https://svn.code.sf.net/p/$_svnname/code/trunk"
"${pkgname}-${pkgver}.patch"
)
md5sums=('SKIP'
'b9dbd85df3a33ef06595757dadccd555')
pkgver()
{
cd "$srcdir/$_svnname"
local ver="$(svnversion)"
printf "%s" "${ver//[[:alpha:]]}"
}
prepare()
{
cd "$srcdir/$_svnname/src"
oldflags="export cflags = -Wall -fPIC -g"
newflags="export cflags = -Wall -fPIC -O2 -g"
sed -i -e "s/$oldflags/$newflags/g" ./makefile
patch -p2 -i "${srcdir}/${pkgname}-${pkgver}.patch"
}
build()
{
cd "$srcdir/$_svnname/src"
msg "Building..."
export CXXFLAGS="${CXXFLAGS} -O2"
export CFLAGS="${CFLAGS} -O2"
make
msg2 "Build complete."
}
package()
{
cd "$srcdir/$_svnname/src"
msg "Copying files..."
install -Dm644 libSNL.so.0.2 $pkgdir/usr/lib/libSNL.so.0.2
ln -s libSNL.so.0.2 $pkgdir/usr/lib/libSNL.so
install -d $pkgdir/usr/include/libSNL
cp *.h $pkgdir/usr/include/libSNL
}
|