Revision bump with Fedora patchset for PowerPC. USE="static-libs" and remove useless...
authorSamuli Suominen <ssuominen@gentoo.org>
Mon, 25 Jul 2011 14:27:00 +0000 (14:27 +0000)
committerSamuli Suominen <ssuominen@gentoo.org>
Mon, 25 Jul 2011 14:27:00 +0000 (14:27 +0000)
Package-Manager: portage-2.2.0_alpha46/cvs/Linux x86_64

media-libs/libvisual/ChangeLog
media-libs/libvisual/Manifest
media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch [new file with mode: 0644]
media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch [new file with mode: 0644]
media-libs/libvisual/libvisual-0.4.0-r2.ebuild [new file with mode: 0644]

index 5df7ef12310df9f87b50fcd6c3b4130368ba955f..02d0bd26a889f2d4a862560523fe2e896ab7cb1e 100644 (file)
@@ -1,6 +1,15 @@
 # ChangeLog for media-libs/libvisual
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libvisual/ChangeLog,v 1.34 2008/06/29 11:57:14 aballier Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libvisual/ChangeLog,v 1.35 2011/07/25 14:27:00 ssuominen Exp $
+
+*libvisual-0.4.0-r2 (25 Jul 2011)
+
+  25 Jul 2011; Samuli Suominen <ssuominen@gentoo.org>
+  +libvisual-0.4.0-r2.ebuild,
+  +files/libvisual-0.4.0-better-altivec-detection.patch,
+  +files/libvisual-0.4.0-inlinedefineconflict.patch:
+  Revision bump with Fedora patchset for PowerPC. USE="static-libs" and remove
+  useless libtool archive.
 
   29 Jun 2008; Alexis Ballier <aballier@gentoo.org> -libvisual-0.4.0.ebuild:
   remove old
index 823823c520410d47e2e315d0d621931df542f0e8..15188e1de9a3473500cf248c2fbc23aac44a1170 100644 (file)
@@ -1,4 +1,17 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX libvisual-0.4.0-better-altivec-detection.patch 1551 RMD160 262cb84809ced3771a57aa3b57dd3c2b1e71357a SHA1 6f610b9a692a652711a255128b5133ce3a2c54e9 SHA256 a6c3a6eed2fbb79f6f8ad7c36ad9845eb3e0c7c18db05a51f2561f02da1ecc92
+AUX libvisual-0.4.0-inlinedefineconflict.patch 1870 RMD160 11233726547b5afbe0b7b62ffdadf68dac1803a6 SHA1 571acf6067d3c6e396859e4e43f7c1531ae9f18f SHA256 910697188457832d39d8cf73a91009439a5dcc27b373f9c3bb2e1938f4ab85c3
 DIST libvisual-0.4.0.tar.gz 583386 RMD160 df4fda944e84417def2817f248f587dea5b2d8f1 SHA1 bd21d621f1d54134c26138e19eaae46c5aeaec00 SHA256 0b4dfdb87125e129567752089e3c8b54cefed601eef169d2533d8659da8dc1d7
 EBUILD libvisual-0.4.0-r1.ebuild 939 RMD160 6b61df469f1750cf012f3740766701e1573c87da SHA1 826889aff83ee612ee2e03e142dcc22979e5f25a SHA256 952b633eaef70b8f0e4056d082d1d2ab8c7621a59e0353052519c0c21c8171ad
-MISC ChangeLog 4763 RMD160 c292ebbf4e33acec0869d624e53859b1e5b4e05c SHA1 5564c01aaac2d1f6e65ea5205dfc65c3c88f4199 SHA256 0c5a25516ba1108d200786c19bd677b69b2e2ade86c9b1f1a51203d4fc89f81a
+EBUILD libvisual-0.4.0-r2.ebuild 1101 RMD160 4d4c1d160d9309c1e74a507e3b77f6f6ef06539a SHA1 530eb2936c4e0d0069715d8627343510390e15d4 SHA256 28f34642a834db910e5965c5b3295d932297e7a5a1e5248aa686ff4a869e4a71
+MISC ChangeLog 5100 RMD160 984734cc12e6d3451e644c804f7c6bec1a690c31 SHA1 6c1f4c08ece855b64ebab92433a7b128b59c4226 SHA256 e9713afd616de3054830ab683117e32cf34ef0b0fc01cadd655adc9cfb57addb
 MISC metadata.xml 158 RMD160 6842e2189a50bd8a98e84802c38180ac1421c00e SHA1 703cea5a2109d41f7c87993c1f01d418a4c85174 SHA256 dfb5b47e6836db39fb187301dfcff1c2605e91d13d21db160806a563d8c75f9b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iF4EAREIAAYFAk4tfMAACgkQXkR9YqOcLPFGfgEAl1rY0gUZZIwHwrwi0CH9Bq2q
+a7VMQ4l4ms/CKtMuUEEBAKlnZx0HFWugFqbj9cREHRceGWH7KsIyzNdjH7gsjIXx
+=wZp7
+-----END PGP SIGNATURE-----
diff --git a/media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch b/media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch
new file mode 100644 (file)
index 0000000..19aa579
--- /dev/null
@@ -0,0 +1,71 @@
+http://pkgs.fedoraproject.org/gitweb/?p=libvisual.git;a=tree
+
+--- libvisual/lv_cpu.c
++++ libvisual/lv_cpu.c
+@@ -50,8 +50,19 @@
+ #endif
+ 
+ #if defined(VISUAL_OS_LINUX)
++#if defined(VISUAL_ARCH_POWERPC)
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <stdio.h>
++
++#include <linux/auxvec.h>
++#include <asm/cputable.h>
++#else /* VISUAL_ARCH_POWERPC */
+ #include <signal.h>
+ #endif
++#endif
+ 
+ #if defined(VISUAL_OS_WIN32)
+ #include <windows.h>
+@@ -154,6 +165,46 @@ static void check_os_altivec_support( vo
+       if (err == 0)
+               if (has_vu != 0)
+                       __lv_cpu_caps.hasAltiVec = 1;
++#elif defined (VISUAL_OS_LINUX)
++      static int available = -1;
++      int new_avail = 0;
++      char fname[64];
++      unsigned long buf[64];
++      ssize_t count;
++      pid_t pid;
++      int fd, i;
++
++      if (available != -1)
++              return;
++
++      pid = getpid();
++      snprintf(fname, sizeof(fname)-1, "/proc/%d/auxv", pid);
++
++      fd = open(fname, O_RDONLY);
++      if (fd < 0)
++              goto out;
++more:
++      count = read(fd, buf, sizeof(buf));
++      if (count < 0)
++              goto out_close;
++
++      for (i=0; i < (count / sizeof(unsigned long)); i += 2) {
++              if (buf[i] == AT_HWCAP) {
++                      new_avail = !!(buf[i+1] & PPC_FEATURE_HAS_ALTIVEC);
++                      goto out_close;
++              } else if (buf[i] == AT_NULL) {
++                      goto out_close;
++              }
++      }
++
++      if (count == sizeof(buf))
++              goto more;
++out_close:
++      close(fd);
++out:
++      available = new_avail;
++      if (available)
++              __lv_cpu_caps.hasAltiVec = 1;
+ #else /* !VISUAL_OS_DARWIN */
+       /* no Darwin, do it the brute-force way */
+       /* this is borrowed from the libmpeg2 library */
diff --git a/media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch b/media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch
new file mode 100644 (file)
index 0000000..5d04f30
--- /dev/null
@@ -0,0 +1,60 @@
+http://pkgs.fedoraproject.org/gitweb/?p=libvisual.git;a=tree
+
+--- libvisual/lv_cache.c
++++ libvisual/lv_cache.c
+@@ -32,7 +32,7 @@
+ static int cache_dtor (VisObject *object);
+ static int cache_remove_list_entry (VisCache *cache, VisListEntry **le);
+ 
+-static inline void handle_request_reset (VisCache *cache, VisListEntry *le);
++static lv_inline void handle_request_reset (VisCache *cache, VisListEntry *le);
+ 
+ static int cache_dtor (VisObject *object)
+ {
+@@ -74,7 +74,7 @@
+ }
+ 
+ 
+-static inline void handle_request_reset (VisCache *cache, VisListEntry *le)
++static lv_inline void handle_request_reset (VisCache *cache, VisListEntry *le)
+ {
+       VisCacheEntry *centry;
+ 
+--- libvisual/lv_defines.h
++++ libvisual/lv_defines.h
+@@ -63,13 +63,13 @@
+ 
+ /* Compiler specific optimalization macros */
+ #if __GNUC__ >= 3
+-# define inline                       inline __attribute__ ((always_inline))
++# define lv_inline            inline __attribute__ ((always_inline))
+ # define __malloc             __attribute__ ((malloc))
+ # define __packed             __attribute__ ((packed))
+ # define VIS_LIKELY(x)                __builtin_expect (!!(x), 1)
+ # define VIS_UNLIKELY(x)      __builtin_expect (!!(x), 0)
+ #else
+-# define inline                       /* no inline */
++# define lv_inline            /* no inline */
+ # define __malloc             /* no malloc */
+ # define __packed             /* no packed */
+ # define VIS_LIKELY(x)                (x)
+--- libvisual/lv_time.h
++++ libvisual/lv_time.h
+@@ -101,7 +101,7 @@
+  *
+  * @return Nothing.
+  */
+-static inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
++static lv_inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
+ {
+ #if defined(VISUAL_ARCH_X86) || defined(VISUAL_ARCH_X86_64)
+       __asm __volatile
+@@ -115,7 +115,7 @@
+ }
+ 
+ /* FIXME use uint64_t here, make sure type exists */
+-static inline unsigned long long visual_timer_tsc_get_returned ()
++static lv_inline unsigned long long visual_timer_tsc_get_returned ()
+ {
+       uint32_t lo, hi;
+ 
diff --git a/media-libs/libvisual/libvisual-0.4.0-r2.ebuild b/media-libs/libvisual/libvisual-0.4.0-r2.ebuild
new file mode 100644 (file)
index 0000000..f30fd6d
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libvisual/libvisual-0.4.0-r2.ebuild,v 1.1 2011/07/25 14:27:00 ssuominen Exp $
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Libvisual is an abstraction library that comes between applications and audio visualisation plugins."
+HOMEPAGE="http://libvisual.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0.4"
+KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="debug nls static-libs threads"
+
+RDEPEND="threads? ( dev-libs/glib:2 )"
+DEPEND="${RDEPEND}
+       nls? ( sys-devel/gettext )
+       dev-util/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+       epatch \
+               "${FILESDIR}"/${P}-better-altivec-detection.patch \
+               "${FILESDIR}"/${P}-inlinedefineconflict.patch
+}
+
+src_configure() {
+       econf \
+               $(use_enable static-libs static) \
+               --enable-shared \
+               $(use_enable nls) \
+               $(use_enable threads) \
+               $(use_enable debug)
+}
+
+src_install() {
+       default
+       find "${D}" -name '*.la' -exec rm -f {} +
+}