summaryrefslogtreecommitdiff
path: root/community/dumb/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/dumb/PKGBUILD
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/dumb/PKGBUILD')
-rw-r--r--community/dumb/PKGBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/community/dumb/PKGBUILD b/community/dumb/PKGBUILD
new file mode 100644
index 000000000..c30d667a1
--- /dev/null
+++ b/community/dumb/PKGBUILD
@@ -0,0 +1,63 @@
+# $Id: PKGBUILD 83614 2013-02-03 23:11:33Z arodseth $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Chris Brannon <cmbrannon79@gmail.com>
+# Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>
+# Contributor: Bjørn Lindeijer <bjorn lindeijer nl>
+
+pkgname=dumb
+pkgver=0.9.3
+pkgrel=7
+pkgdesc='IT, XM, S3M and MOD player library'
+arch=('x86_64' 'i686')
+license=('custom:dumb' 'GPL')
+url='http://dumb.sourceforge.net/'
+makedepends=('setconf')
+depends=('glibc' 'allegro4')
+source=("http://downloads.sourceforge.net/sourceforge/dumb/$pkgname-$pkgver.tar.gz"
+ 'as-needed.patch'
+ 'CVE-2006-3668.patch')
+sha256sums=('8d44fbc9e57f3bac9f761c3b12ce102d47d717f0dd846657fb988e0bb5d1ea33'
+ 'f7a41576d5dcecad2f9a01cbb0228457b434423046cb67c9a0a720ec87f43fb9'
+ '9f6785435757db725bc73b1c4874b91e80b9277c6fdd2b56e47dae1cfbc968e6')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # Add -fPIC for anything but i686
+ [ "$CARCH" = 'i686' ] || export CFLAGS="${CFLAGS} -fPIC"
+
+ # Patch from Gentoo for CVE-2006-3668
+ patch -p1 < "$srcdir/CVE-2006-3668.patch"
+
+ # Patch from Gentoo for binutils >= 2.22
+ patch -p1 < "$srcdir/as-needed.patch"
+ sed -i '/LDFLAGS :=/d' Makefile
+ cp Makefile Makefile.rdy
+
+ # Make with Allegro support
+ # Upstream's make process is interactive, and we can't simply pass
+ # a here-document to the make command. The best way is to write our
+ # own config.txt, circumventing the interactive configuration step,
+ # as is done in Gentoo's ebuild.
+ cat << EOF > make/config.txt
+include make/unix.inc
+ALL_TARGETS := core core-examples core-headers
+ALL_TARGETS += allegro allegro-examples allegro-headers
+PREFIX := /usr
+EOF
+
+ # Use OFLAGS to be able to set CFLAGS without replacing the -I directives
+ make -j1 OFLAGS="${CFLAGS}"
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ install -d "$pkgdir"/usr/{lib,bin,include}
+ install -Dm644 licence.txt \
+ "$pkgdir/usr/share/licenses/$pkgname/licence.txt"
+ setconf make/config.txt PREFIX "$pkgdir/usr"
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et: