Skip to content

Commit

Permalink
nds-libmad: add package
Browse files Browse the repository at this point in the history
  • Loading branch information
ccawley2011 committed Aug 25, 2020
1 parent ed9f56d commit ada0b8c
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
45 changes: 45 additions & 0 deletions nds/libmad/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Maintainer: WinterMute <[email protected]>
# Contributor: Cameron Cawley <[email protected]>

pkgname=nds-libmad
pkgver=0.15.1b
pkgrel=1
pkgdesc='A high-quality MPEG audio decoder. (for Nintendo DS homebrew development)'
arch=('any')
url='https://www.underbit.com'
license=('GPL')
options=(!strip libtool staticlibs)
source=(
"https://sourceforge.net/projects/mad/files/libmad/${pkgver}/libmad-${pkgver}.tar.gz"
"libmad-0.15.1b.patch"
)
sha256sums=(
'bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690'
'2b7c29f4383b6f92b3b33144ce445f9558ff3e3fa4f185cec13d44969c7c9b11'
)
makedepends=('nds-pkg-config' 'devkitpro-pkgbuild-helpers')
groups=('nds-portlibs')

build() {
cd libmad-$pkgver

patch -Np1 -i "$srcdir/libmad-0.15.1b.patch"

source /opt/devkitpro/ndsvars.sh

rm -f Makefile.in aclocal.m4 config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh mad.h missing mkinstalldirs msvc++/Makefile.in
touch AUTHORS NEWS ChangeLog
autoreconf -fi

./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi --disable-shared --enable-static \
--enable-fpm=arm --enable-speed --enable-sso
make
}

package() {
cd libmad-$pkgver

source /opt/devkitpro/ndsvars.sh

make DESTDIR="$pkgdir" install
}
12 changes: 12 additions & 0 deletions nds/libmad/libmad-0.15.1b.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ur libmad-0.15.1b/configure.ac libmad-0.15.1b-patched/configure.ac
--- libmad-0.15.1b/configure.ac 2004-01-23 09:41:32.000000000 +0000
+++ libmad-0.15.1b-patched/configure.ac 2020-08-12 11:51:45.776476110 +0100
@@ -140,7 +140,7 @@
case "$optimize" in
-O|"-O "*)
optimize="-O"
- optimize="$optimize -fforce-mem"
+ optimize="$optimize"
optimize="$optimize -fforce-addr"
: #x optimize="$optimize -finline-functions"
: #- optimize="$optimize -fstrength-reduce"

0 comments on commit ada0b8c

Please sign in to comment.