summaryrefslogtreecommitdiff
path: root/extra/perl-tk/PKGBUILD
blob: 3d779063be04cb04637ecd0945da0b67cd6396e7 (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
# $Id: PKGBUILD 102852 2010-12-12 10:35:16Z remy $
# Maintainer: François Charette <francois ατ archlinux δοτ org>
# Contributor: Jason Chu <jchu@xentac.net>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>

pkgname=perl-tk
_cpanname=Tk
pkgver=804.029
pkgrel=2
pkgdesc="A graphical user interface toolkit for Perl"
arch=('i686' 'x86_64')
url="http://search.cpan.org/dist/${_cpanname}"
license=('PerlArtistic' 'GPL' 'custom')
depends=('libx11' 'libpng' 'libjpeg' 'tk' 'perl')
options=('!emptydirs')
replaces=('perltk')
provides=('perltk')
source=(http://www.cpan.org/authors/id/S/SR/SREZIC/${_cpanname}-${pkgver}.tar.gz) 
md5sums=('f4aebe6fcdb309a8480514f2ccf8117c')

build() {
  cd $srcdir/${_cpanname}-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  /bin/chmod -R u+w *
  # The Xlib header is wrong...
  sed -i 's/XKeycodeToKeysym\(.*\)unsigned int/XKeycodeToKeysym\1KeyCode/' pTk/Xlib.h
  make
}

package() {
  cd $srcdir/${_cpanname}-$pkgver
  make install DESTDIR=$pkgdir
  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete

  # license
  install -D -m644 pTk/license.terms \
                   ${startdir}/pkg/usr/share/licenses/${pkgname}/tk.license
  install -D -m644 pTk/Tix.license \
                   ${startdir}/pkg/usr/share/licenses/${pkgname}/tix.license
}