summaryrefslogtreecommitdiff
path: root/community/python2-tagpy
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/python2-tagpy
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/python2-tagpy')
-rw-r--r--community/python2-tagpy/PKGBUILD56
-rw-r--r--community/python2-tagpy/taglib1.7.patch37
2 files changed, 93 insertions, 0 deletions
diff --git a/community/python2-tagpy/PKGBUILD b/community/python2-tagpy/PKGBUILD
new file mode 100644
index 000000000..5da870be5
--- /dev/null
+++ b/community/python2-tagpy/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 94045 2013-07-13 12:36:26Z svenstaro $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Callan Barrett <wizzomafizzo@gmail.com>
+# Contributor: Scott Horowitz <stonecrest@gmail.com>
+
+pkgname=python2-tagpy
+pkgver=0.94.8
+pkgrel=4
+pkgdesc='Python bindings for TagLib'
+arch=('x86_64' 'i686')
+url='http://pypi.python.org/pypi/tagpy'
+license=('MIT')
+depends=('python2' 'taglib' 'boost-libs')
+makedepends=('python2-distribute' 'boost')
+replaces=('tagpy')
+conflicts=('tagpy')
+source=("http://pypi.python.org/packages/source/t/tagpy/tagpy-$pkgver.tar.gz"
+ 'taglib1.7.patch')
+sha256sums=('56eab8dd81510f8af18e19375a0ffd5cd25c8e555104be46a92c3dc08634a0dc'
+ 'f6cc34f8d4d1186270943cd7e1ad3c9478ae7064ab9b2cddf7760d493295cd26')
+
+prepare() {
+ cd "tagpy-$pkgver"
+
+ patch -p1 -i "$srcdir/taglib1.7.patch"
+ sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ $(find . -name '*.py')
+}
+
+build() {
+ cd "tagpy-$pkgver"
+
+ ./configure.py \
+ --taglib-lib-dir=/usr/lib/ \
+ --taglib-inc-dir=/usr/include/taglib/ \
+ --boost-inc-dir=/usr/include/boost/ \
+ --boost-lib-dir=/usr/lib/ \
+ --boost-python-libname=boost_python
+ python2 setup.py build
+}
+
+check(){
+ cd "tagpy-$pkgver"
+
+ python2 setup.py test
+}
+
+package(){
+ cd "tagpy-$pkgver"
+
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/python2-tagpy/taglib1.7.patch b/community/python2-tagpy/taglib1.7.patch
new file mode 100644
index 000000000..df1d6e886
--- /dev/null
+++ b/community/python2-tagpy/taglib1.7.patch
@@ -0,0 +1,37 @@
+From: Andreas Kloeckner <inform@tiker.net>
+Date: Tue, 25 Dec 2012 19:36:42 +0000 (+0100)
+Subject: Update tagpy for TagLib 1.7 compatibility. (patch by unknown Gentoo user, via Lars...
+X-Git-Tag: v2013.1~6
+X-Git-Url: http://git.tiker.net/tagpy.git/commitdiff_plain/d0759c0ec7d24ae8d1af395a1032521eb00b4d1f?hp=c2801c31493f77d7c33d20fa20f0b298b0f322ef
+
+Update tagpy for TagLib 1.7 compatibility. (patch by unknown Gentoo user, via Lars Wendler)
+---
+
+diff --git a/src/wrapper/id3.cpp b/src/wrapper/id3.cpp
+index a76f7ef..5c08ae1 100644
+--- a/src/wrapper/id3.cpp
++++ b/src/wrapper/id3.cpp
+@@ -79,6 +79,10 @@ namespace
+ MF_OL(setVolumeAdjustment, 1, 2);
+ MF_OL(setPeakVolume, 1, 2);
+
++ #if (TAGPY_TAGLIB_HEX_VERSION >= 0x10700)
++ MF_OL(render, 0, 1)
++ #endif
++
+ // -------------------------------------------------------------
+ // MPEG
+ // -------------------------------------------------------------
+@@ -212,7 +216,11 @@ void exposeID3()
+ .DEF_SIMPLE_METHOD(removeFrame)
+ .DEF_SIMPLE_METHOD(removeFrames)
+
+- .DEF_SIMPLE_METHOD(render)
++ #if (TAGPY_TAGLIB_HEX_VERSION >= 0x10700)
++ .DEF_OVERLOADED_METHOD(render, ByteVector (cl::*)(int) const)
++ #else
++ .DEF_SIMPLE_METHOD(render)
++ #endif
+ ;
+ }
+