diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-07-25 14:27:00 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-07-25 14:27:00 +0000 |
commit | f919e3cd3d129820c4d4a6ecee4b4655634ba6b0 (patch) | |
tree | 827c99da745910003ddba9031eb6546f4a826072 /media-libs/libvisual | |
parent | version bump (diff) | |
download | gentoo-2-f919e3cd3d129820c4d4a6ecee4b4655634ba6b0.tar.gz gentoo-2-f919e3cd3d129820c4d4a6ecee4b4655634ba6b0.tar.bz2 gentoo-2-f919e3cd3d129820c4d4a6ecee4b4655634ba6b0.zip |
Revision bump with Fedora patchset for PowerPC. USE="static-libs" and remove useless libtool archive.
(Portage version: 2.2.0_alpha46/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/libvisual')
4 files changed, 184 insertions, 2 deletions
diff --git a/media-libs/libvisual/ChangeLog b/media-libs/libvisual/ChangeLog index 5df7ef12310d..02d0bd26a889 100644 --- a/media-libs/libvisual/ChangeLog +++ b/media-libs/libvisual/ChangeLog @@ -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 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 index 000000000000..19aa579aa110 --- /dev/null +++ b/media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch @@ -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 index 000000000000..5d04f30335a4 --- /dev/null +++ b/media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch @@ -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 index 000000000000..f30fd6d492a2 --- /dev/null +++ b/media-libs/libvisual/libvisual-0.4.0-r2.ebuild @@ -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 {} + +} |