diff options
Diffstat (limited to 'main/faac')
-rw-r--r-- | main/faac/APKBUILD | 16 | ||||
-rw-r--r-- | main/faac/fix-libc-internals.patch | 89 |
2 files changed, 101 insertions, 4 deletions
diff --git a/main/faac/APKBUILD b/main/faac/APKBUILD index 8c571953ae..c1981e474a 100644 --- a/main/faac/APKBUILD +++ b/main/faac/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=faac pkgver=1.28 -pkgrel=8 +pkgrel=9 pkgdesc="FAAC is an AAC audio encoder." url="http://www.audiocoding.com/" arch="all" @@ -11,6 +11,7 @@ depends= makedepends="autoconf automake libtool" source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz automake.patch + fix-libc-internals.patch " prepare() { @@ -22,16 +23,16 @@ prepare() { esac done #taken from http://bugs.sourcemage.org/show_bug.cgi?id=15263 - if [ "$ALPINE_LIBC" = "eglibc" ]; then + if [ "$ALIBC" = "eglibc" ]; then sed -i \ "s/^\(.*strcasestr\)/\/\/ This is in libc and conflicts: \1 /" \ common/mp4v2/mpeg4ip.h fi + ./bootstrap || return 1 } build() { cd "$srcdir"/$pkgname-$pkgver - ./bootstrap || return 1 ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -48,4 +49,11 @@ package() { "$pkgdir"/usr/share/licenses/faac/COPYING.kiss_fft } md5sums="80763728d392c7d789cde25614c878f6 faac-1.28.tar.gz -5a52db11e04cce0a7a32bc8565a7aa60 automake.patch" +5a52db11e04cce0a7a32bc8565a7aa60 automake.patch +b42dcaea1ef043f27f729730b292708f fix-libc-internals.patch" +sha256sums="c5141199f4cfb17d749c36ba8cfe4b25f838da67c22f0fec40228b6b9c3d19df faac-1.28.tar.gz +360f48a026644e8955c1a16228bdebb9f6281203b131d7e7e766ca3cb46d39a6 automake.patch +3ad6d6d84324757ad86a01e489c0c6e63b9f7bc279d6c2514c09efbd927dafa3 fix-libc-internals.patch" +sha512sums="0ef721ad28835e95cad41afc0cb6130e1ebb634cb6dd4b40f649bc2269b7bb5bf2887f6d8f023c74628d521f8bdf55b4dd070f972ecff162a5fe0384e026235b faac-1.28.tar.gz +364199eaf71cb4d8423545b086b24b16120e50f6944d1cdc54482c4639507c5a0156090315c39d749eb396cc029ef751c63cdec93a195fc25fee9b4f9c55ccaa automake.patch +c370cb5f2cca8676dc0b025774e7ac53d5021e97a809a13ef5d54bcd108ed96e667bbd1a98c8fc8071821a5e423f69275f09e0cc8c65d7c9401d0ff2cd77fd74 fix-libc-internals.patch" diff --git a/main/faac/fix-libc-internals.patch b/main/faac/fix-libc-internals.patch new file mode 100644 index 0000000000..b28645a6f2 --- /dev/null +++ b/main/faac/fix-libc-internals.patch @@ -0,0 +1,89 @@ +--- faac-1.28.orig/common/mp4v2/mp4file_io.cpp ++++ faac-1.28/common/mp4v2/mp4file_io.cpp +@@ -34,13 +34,11 @@ + } + return fpos; + } else { +- fpos_t fpos; +- if (fgetpos(pFile, &fpos) < 0) { ++ off_t off = ftello(pFile); ++ if (off == -1) { + throw new MP4Error(errno, "MP4GetPosition"); + } +- uint64_t ret; +- FPOS_TO_VAR(fpos, uint64_t, ret); +- return ret; ++ return off; + } + } else { + return m_memoryBufferPosition; +@@ -56,9 +54,7 @@ + throw new MP4Error("setting position via Virtual I/O", "MP4SetPosition"); + } + } else { +- fpos_t fpos; +- VAR_TO_FPOS(fpos, pos); +- if (fsetpos(pFile, &fpos) < 0) { ++ if (fseeko(pFile, pos, SEEK_SET) < 0) { + throw new MP4Error(errno, "MP4SetPosition"); + } + } +--- faac-1.28.orig/common/mp4v2/mp4util.h ++++ faac-1.28/common/mp4v2/mp4util.h +@@ -23,6 +23,10 @@ + #define __MP4_UTIL_INCLUDED__ + #include <assert.h> + ++#ifndef __STRING ++#define __STRING(x) #x ++#endif ++ + #ifndef ASSERT + #define ASSERT(expr) \ + if (!(expr)) { \ +--- faac-1.28.orig/common/mp4v2/mpeg4ip.h ++++ faac-1.28/common/mp4v2/mpeg4ip.h +@@ -153,14 +153,6 @@ + #define TO_U64(a) (a##LLU) + #endif + +-#ifdef HAVE_FPOS_T___POS +-#define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((fpos).__pos) +-#define VAR_TO_FPOS(fpos, var) (fpos).__pos = (var) +-#else +-#define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(fpos) +-#define VAR_TO_FPOS(fpos, var) (fpos) = (var) +-#endif +- + #define FOPEN_READ_BINARY "r" + #define FOPEN_WRITE_BINARY "w" + #define UINT64_TO_DOUBLE(a) ((double)(a)) +--- faac-1.28.orig/common/mp4v2/virtual_io.cpp ++++ faac-1.28/common/mp4v2/virtual_io.cpp +@@ -38,21 +38,18 @@ + + int FILE_SetPosition(void *user, u_int64_t position) + { +- FILE *fp = (FILE *)user; +- fpos_t fpos; +- VAR_TO_FPOS(fpos, position); +- return fsetpos(fp, &fpos); ++ return fseeko((FILE *) user, position, SEEK_SET); + } + + int FILE_GetPosition(void *user, u_int64_t *position) + { + FILE *fp = (FILE *)user; +- fpos_t fpos; +- if (fgetpos(fp, &fpos) < 0) { ++ off_t off; ++ off = ftello(fp); ++ if (off == -1) { + throw new MP4Error(errno, "MP4GetPosition"); + } +- +- FPOS_TO_VAR(fpos, u_int64_t, *position); ++ *position = off; + return 0; + } + |