diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-06-17 18:29:25 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-06-17 18:29:25 +0000 |
commit | 7b941ed21dfcc63c825847856c5f54b97256e44a (patch) | |
tree | 0e1ccd7d428ba282de7316001cf7811011748146 /media-libs/libdts | |
parent | Use emake instead of make for install (diff) | |
download | gentoo-2-7b941ed21dfcc63c825847856c5f54b97256e44a.tar.gz gentoo-2-7b941ed21dfcc63c825847856c5f54b97256e44a.tar.bz2 gentoo-2-7b941ed21dfcc63c825847856c5f54b97256e44a.zip |
Add patch to fix strict aliasing breakages.
(Portage version: 2.1.1_pre1)
Diffstat (limited to 'media-libs/libdts')
-rw-r--r-- | media-libs/libdts/ChangeLog | 8 | ||||
-rw-r--r-- | media-libs/libdts/files/digest-libdts-0.0.2-r4 | 3 | ||||
-rw-r--r-- | media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch | 61 | ||||
-rw-r--r-- | media-libs/libdts/libdts-0.0.2-r4.ebuild | 39 |
4 files changed, 110 insertions, 1 deletions
diff --git a/media-libs/libdts/ChangeLog b/media-libs/libdts/ChangeLog index f056fee2c458..efe03a078cad 100644 --- a/media-libs/libdts/ChangeLog +++ b/media-libs/libdts/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/libdts # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libdts/ChangeLog,v 1.30 2006/05/31 18:48:38 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libdts/ChangeLog,v 1.31 2006/06/17 18:29:25 flameeyes Exp $ + +*libdts-0.0.2-r4 (17 Jun 2006) + + 17 Jun 2006; Diego Pettenò <flameeyes@gentoo.org> + +files/libdts-0.0.2-strict-aliasing.patch, +libdts-0.0.2-r4.ebuild: + Add patch to fix strict aliasing breakages. 31 May 2006; Diego Pettenò <flameeyes@gentoo.org> libdts-0.0.2-r3.ebuild: Create the m4 directory so that it doesn't fail if visibility patch is not diff --git a/media-libs/libdts/files/digest-libdts-0.0.2-r4 b/media-libs/libdts/files/digest-libdts-0.0.2-r4 new file mode 100644 index 000000000000..4870747344da --- /dev/null +++ b/media-libs/libdts/files/digest-libdts-0.0.2-r4 @@ -0,0 +1,3 @@ +MD5 a1c0dac95d7031498c2d19d7a3107469 libdts-0.0.2.tar.gz 295185 +RMD160 c7b904465244b887e6b62f997bcf043d241cf2ce libdts-0.0.2.tar.gz 295185 +SHA256 ef552cedb9addd5c54a1d5adf49c2b5d6932606e7161443bd88a524a9a477595 libdts-0.0.2.tar.gz 295185 diff --git a/media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch b/media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch new file mode 100644 index 000000000000..6db9bd90e9a6 --- /dev/null +++ b/media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch @@ -0,0 +1,61 @@ +Index: libdts-0.0.2/libdts/bitstream.h +=================================================================== +--- libdts-0.0.2.orig/libdts/bitstream.h ++++ libdts-0.0.2/libdts/bitstream.h +@@ -28,22 +28,38 @@ + + #else + +-# define swab32(x)\ +-((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) | \ +- (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3])) ++static inline uint32_t swab32(uint32_t x) { ++ union { ++ uint32_t x32; ++ uint16_t x8[4]; ++ } u; ++ u.x32 = x; ++ return u.x8[0] << 24 | u.x8[1] << 16 | u.x8[2] << 8 | u.x8[3]; ++} + + #endif + + #ifdef WORDS_BIGENDIAN + +-# define swable32(x)\ +-((((uint8_t*)&x)[0] << 16) | (((uint8_t*)&x)[1] << 24) | \ +- (((uint8_t*)&x)[2]) | (((uint8_t*)&x)[3] << 8)) ++static inline uint32_t swable32(uint32_t x) { ++ union { ++ uint32_t x32; ++ uint16_t x8[4]; ++ } u; ++ u.x32 = x; ++ return u.x8[0] << 16 | u.x8[1] << 24 | u.x8[2] | u.x8[3] << 8; ++} + + #else + +-# define swable32(x)\ +-((((uint16_t*)&x)[0] << 16) | (((uint16_t*)&x)[1])) ++static inline uint32_t swable32(uint32_t x) { ++ union { ++ uint32_t x32; ++ uint16_t x16[2]; ++ } u; ++ u.x32 = x; ++ return u.x16[0] << 16 | u.x16[1]; ++} + + #endif + +Index: libdts-0.0.2/libao/Makefile.am +=================================================================== +--- libdts-0.0.2.orig/libao/Makefile.am ++++ libdts-0.0.2/libao/Makefile.am +@@ -1,4 +1,4 @@ +-AM_CFLAGS = $(OPT_CFLAGS) ++AM_CFLAGS = $(OPT_CFLAGS) -fno-strict-aliasing + + noinst_LIBRARIES = libao.a + libao_a_SOURCES = audio_out.c audio_out_null.c audio_out_float.c \ diff --git a/media-libs/libdts/libdts-0.0.2-r4.ebuild b/media-libs/libdts/libdts-0.0.2-r4.ebuild new file mode 100644 index 000000000000..e541f95d6739 --- /dev/null +++ b/media-libs/libdts/libdts-0.0.2-r4.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libdts/libdts-0.0.2-r4.ebuild,v 1.1 2006/06/17 18:29:25 flameeyes Exp $ + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="library for decoding DTS Coherent Acoustics streams used in DVD" +HOMEPAGE="http://www.videolan.org/dtsdec.html" +SRC_URI="http://www.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="oss debug" +RESTRICT="test" + +src_unpack() { + unpack ${A} + cd "${S}" + mkdir "${S}/m4" + + epatch "${FILESDIR}/${P}-strict-aliasing.patch" + epatch "${FILESDIR}/${P}-libtool.patch" + epatch "${FILESDIR}/${P}-freebsd.patch" + [[ $(gcc-major-version)$(gcc-minor-version) -ge 41 ]] && \ + epatch "${FILESDIR}/${P}-visibility.patch" + + AT_M4DIR="m4" eautoreconf +} + +src_compile() { + econf $(use_enable oss) $(use_enable debug) || die + emake OPT_CFLAGS="" || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc AUTHORS ChangeLog NEWS README TODO doc/libdts.txt +} |