author | Eric Bélanger
<eric@archlinux.org> 2013-10-28 02:49:10 UTC |
committer | Eric Bélanger
<eric@archlinux.org> 2013-10-28 02:49:10 UTC |
parent | 079039073bb2a1b64b25b6dcb4fd281aa9821fb6 |
PKGBUILD | +17 | -12 |
libofa-0.9.3-gcc-4.7.patch | +22 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index 8db88bf..095cbfa 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,38 +3,43 @@ pkgname=libofa pkgver=0.9.3 -pkgrel=4 +pkgrel=5 pkgdesc="An open-source audio fingerprint by MusicIP" arch=('i686' 'x86_64') url="http://code.google.com/p/musicip-libofa/" license=('GPL2' 'custom') depends=('expat' 'curl' 'fftw') -makedepends=('pkgconfig') -options=('!libtool') source=("http://musicip-libofa.googlecode.com/files/$pkgname-$pkgver.tar.gz" 'gcc-4.patch' 'gcc4.3.patch' 'gcc4.5.patch' - 'libofa-0.9.3-curl-7.21.patch') + 'libofa-0.9.3-curl-7.21.patch' + 'libofa-0.9.3-gcc-4.7.patch') md5sums=('51507d2c4b432bd2755f48d58471696e' 'a6f78b90bd0f4354d022a71c3e58ef6c' 'dd57db13770b8f8d196e8a3d3a50e713' 'c245363368d0e6fa2b4676364b81b74f' - '2e1579d74613cfbb1799d0ab5f1a4cba') + '2e1579d74613cfbb1799d0ab5f1a4cba' + 'a53a0104f9b5bba220322c6d0b68bf96') + +prepare() { + cd ${pkgname}-${pkgver} + patch -p0 -i "${srcdir}/gcc-4.patch" + patch -p1 -i "${srcdir}/gcc4.3.patch" + patch -p1 -i "${srcdir}/gcc4.5.patch" + patch -p1 -i "${srcdir}/libofa-0.9.3-gcc-4.7.patch" + patch -p1 -i "${srcdir}/libofa-0.9.3-curl-7.21.patch" +} build() { - cd "${srcdir}/${pkgname}-${pkgver}" - patch -p0 -i ${srcdir}/gcc-4.patch - patch -p1 -i ${srcdir}/gcc4.3.patch - patch -p1 -i ${srcdir}/gcc4.5.patch - patch -p1 -i ${srcdir}/libofa-0.9.3-curl-7.21.patch + cd ${pkgname}-${pkgver} ./configure --prefix=/usr make } package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make DESTDIR=${pkgdir} install + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/libofa-0.9.3-gcc-4.7.patch b/libofa-0.9.3-gcc-4.7.patch new file mode 100644 index 0000000..c5ab098 --- /dev/null +++ b/libofa-0.9.3-gcc-4.7.patch @@ -0,0 +1,22 @@ +diff -up libofa-0.9.3/examples/uselame.cpp.gcc47 libofa-0.9.3/examples/uselame.cpp +--- libofa-0.9.3/examples/uselame.cpp.gcc47 2012-01-14 09:35:24.343146853 -0600 ++++ libofa-0.9.3/examples/uselame.cpp 2012-01-14 09:35:49.956826634 -0600 +@@ -12,6 +12,7 @@ + #else + #include <sys/wait.h> + #endif ++#include <unistd.h> + + AudioData *loadWaveFile(char *file); + +diff -up libofa-0.9.3/examples/wavefile.cpp.gcc47 libofa-0.9.3/examples/wavefile.cpp +--- libofa-0.9.3/examples/wavefile.cpp.gcc47 2012-01-14 09:35:24.344146841 -0600 ++++ libofa-0.9.3/examples/wavefile.cpp 2012-01-14 16:00:54.414981160 -0600 +@@ -11,6 +11,7 @@ + #include "io.h" + #endif + #include <fcntl.h> ++#include <unistd.h> + + static bool readBytes(int fd, unsigned char *buf, int size) { + int ct = 0;