summaryrefslogtreecommitdiffstats
path: root/extra/p5-tk/Pkgfile
blob: de93b19f0f54dea4b7198669e4c25c2ebbd30dc0 (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
# Description: Connecteur perl pour tk
# URL: http://search.cpan.org/~ni-s/Tk-804.027/
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: tk, p5-x11-protocol
# Run on: tk,p5-x11-protocol

name=p5-tk
version=804.029
release=2
source=(http://search.cpan.org/CPAN/authors/id/S/SR/SREZIC/Tk-$version.tar.gz)

build() {
	unset MAKEFLAGS
	cd Tk-$version

	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

	perl Makefile.PL 
	make OPTIMIZE="${CFLAGS}"
	make DESTDIR=$PKG install
	find $PKG \
		-name perllocal.pod \
		-o -name .packlist | xargs rm
	find $PKG -empty | xargs rmdir -p ||:
	chown -R root:root $PKG
}