summaryrefslogtreecommitdiff
path: root/extra/swig/PKGBUILD
blob: b74e723ad9ad356c176650ee824898c8ad9dd30b (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
# $Id: PKGBUILD 115117 2011-03-17 01:15:24Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=swig
pkgver=2.0.2
pkgrel=4
pkgdesc="Generate scripting interfaces to C/C++ code"
arch=('i686' 'x86_64')
url="http://www.swig.org/"
license=('custom')
depends=('gcc-libs' 'zlib' 'pcre')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz 
        swig-deprecated-pycobject.patch
        swig-pyslice.patch)
sha1sums=('1fc5a7b42ae41c51772d7268ba0f987e9514d110'
          'add71330c5d839d9a27b1ca688e6c5e31f1edb7b'
          '7248b34032db7cb84143a6cefae425b222ce43a6')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # Use PyCapsule API instead of deprecated PyCObject API in python bindings
  # See https://bugzilla.redhat.com/show_bug.cgi?id=623854
  patch -Np1 -i ../swig-deprecated-pycobject.patch

  # Fix PySlice* API/ABI issues with the Python 3.2
  # See https://bugzilla.redhat.com/show_bug.cgi?id=666429
  patch -Np1 -i ../swig-pyslice.patch

  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
  install -D -m644 LICENSE-UNIVERSITIES "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE-UNIVERSITIES
}