| 1 | # Description: SDL perl extension. |
| 2 | # URL: http://search.cpan.org/~dgoehrig/SDL_Perl-2.1.3/ |
| 3 | # Packager: Younes Hafri, ycrux at club-internet dot fr |
| 4 | # Maintainer: Danny Rawlins, monster dot romster at gmail dot com |
| 5 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu |
| 6 | # Depends on: sdl_image sdl_net sdl_ttf |
| 7 | |
| 8 | name=p5-sdl |
| 9 | version=1.20.0 |
| 10 | release=1 |
| 11 | source=(http://zarb.org/~gc/t/SDL_perl-$version.tar.gz) |
| 12 | |
| 13 | build() { |
| 14 | cd SDL_perl-$version |
| 15 | |
| 16 | ./configure --build=$CHOST \ |
| 17 | --host=$CTARGET \ |
| 18 | --prefix=/usr |
| 19 | |
| 20 | export INC="$DEFAULT_CFLAGS -I$CLFS/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_SDL_NET -DHAVE_SDL_TTF -DHAVE_SDL_IMAGE" |
| 21 | |
| 22 | make AR="$AR" CC="$CC" LD="$CC" INC="$INC" CFLAGS="$CFLAGS" OPTIMIZE="$CFLAGS" |
| 23 | make DESTDIR=$PKG install AR="$AR" CC="$CC" INC="$INC" CFLAGS="$CFLAGS" |
| 24 | |
| 25 | # Remove perlcrap |
| 26 | find $PKG -type f \( \ |
| 27 | -name '.packlist' -o \ |
| 28 | -name '*.bs' -o \ |
| 29 | -name 'autosplit.ix' -o \ |
| 30 | -name 'perllocal.pod' \) -delete |
| 31 | |
| 32 | # Remove empty directories |
| 33 | find $PKG -depth -empty -delete |
| 34 | } |