Add patch to fix strict aliasing breakages.
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 17 Jun 2006 18:29:25 +0000 (18:29 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 17 Jun 2006 18:29:25 +0000 (18:29 +0000)
Package-Manager: portage-2.1.1_pre1

media-libs/libdts/ChangeLog
media-libs/libdts/Manifest
media-libs/libdts/files/digest-libdts-0.0.2-r4 [new file with mode: 0644]
media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch [new file with mode: 0644]
media-libs/libdts/libdts-0.0.2-r4.ebuild [new file with mode: 0644]

index f056fee2c45860391c11cb49258a7042f8597acb..efe03a078caddaa00c1a3cc7192b0f856006550d 100644 (file)
@@ -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
index d077f6c84d21b992923565090b7f49cc422dc205..784008f60eff21349a334ce224d01f0556ef3f29 100644 (file)
@@ -9,6 +9,10 @@ AUX libdts-0.0.2-libtool.patch 3533 RMD160 6c9d90cac92150c8aa710a44be0ed085c5bb4
 MD5 2828f6a30d2829e6df8ba4fc11868140 files/libdts-0.0.2-libtool.patch 3533
 RMD160 6c9d90cac92150c8aa710a44be0ed085c5bb44aa files/libdts-0.0.2-libtool.patch 3533
 SHA256 37fed429417d5d6da1d293ff4ae77f625346a847d3543d21a995caec7f8e751e files/libdts-0.0.2-libtool.patch 3533
+AUX libdts-0.0.2-strict-aliasing.patch 1509 RMD160 9a7b04b70a052f77f751e4f007376a4684a7bf73 SHA1 66ae7d43ac8929ce8bc3a6a65e527edce6e50dd9 SHA256 174b573fbfed530648c0ae02b9be71f09a809153d57e352b6a2e4529a4d47123
+MD5 5c4a39cddfa6a52f241d013356a3285c files/libdts-0.0.2-strict-aliasing.patch 1509
+RMD160 9a7b04b70a052f77f751e4f007376a4684a7bf73 files/libdts-0.0.2-strict-aliasing.patch 1509
+SHA256 174b573fbfed530648c0ae02b9be71f09a809153d57e352b6a2e4529a4d47123 files/libdts-0.0.2-strict-aliasing.patch 1509
 AUX libdts-0.0.2-visibility.patch 6644 RMD160 7416e3b9b493a39a40ec954f5b005a0acab95f4c SHA1 d120370880db1e6778f4d206635319a5a277b70b SHA256 137c5d65f05e98132a72fbd084d4685ea2060ebd1805606cd1845c07c7bcff57
 MD5 1ce9775bdfacf5d2c8a80f7c1601c683 files/libdts-0.0.2-visibility.patch 6644
 RMD160 7416e3b9b493a39a40ec954f5b005a0acab95f4c files/libdts-0.0.2-visibility.patch 6644
@@ -18,10 +22,14 @@ EBUILD libdts-0.0.2-r3.ebuild 1101 RMD160 f3e1bcc07363841507120ae8ba768f3315837e
 MD5 597db5f0c877b649f457ada0d9d06a0b libdts-0.0.2-r3.ebuild 1101
 RMD160 f3e1bcc07363841507120ae8ba768f3315837e67 libdts-0.0.2-r3.ebuild 1101
 SHA256 11c38becd62bd2c4f4e6919dffff1b67013c1567fb34f0469e77a4fd5e426865 libdts-0.0.2-r3.ebuild 1101
-MISC ChangeLog 4563 RMD160 3e395a87bfc78f949d0ca23b93971f7416fd61e1 SHA1 02f96c972276df055c709d3adcf1446f20ca24a0 SHA256 8fac124de9b808d76294c46672801cd22bc1a9424913fa029b01ebcc8a683203
-MD5 43ccf3ccaf3308164eec6f391357d70c ChangeLog 4563
-RMD160 3e395a87bfc78f949d0ca23b93971f7416fd61e1 ChangeLog 4563
-SHA256 8fac124de9b808d76294c46672801cd22bc1a9424913fa029b01ebcc8a683203 ChangeLog 4563
+EBUILD libdts-0.0.2-r4.ebuild 1160 RMD160 09d25cee7f55c6286eb7fdd41753e1e4cdfd2cc0 SHA1 8466e900136154d0e5c4272c1ea3fb6aba768506 SHA256 d7d90a011dcb69cd75382277cb15b5bdb298b0400f19283563153303c8208780
+MD5 c1e12cdecec3de775d058e94e38fb896 libdts-0.0.2-r4.ebuild 1160
+RMD160 09d25cee7f55c6286eb7fdd41753e1e4cdfd2cc0 libdts-0.0.2-r4.ebuild 1160
+SHA256 d7d90a011dcb69cd75382277cb15b5bdb298b0400f19283563153303c8208780 libdts-0.0.2-r4.ebuild 1160
+MISC ChangeLog 4765 RMD160 7df987c68f1b4d7c5cf8ed45da42cedebb9de2fb SHA1 9fdf51328fab2e6b08779845d43d74b6d0c2e5a2 SHA256 732311af90e60e2f6eb19580aa1d5d2ae2ebc646b912da78f0678da8df95f7c6
+MD5 80db86e91847cb598cdce0b07377533c ChangeLog 4765
+RMD160 7df987c68f1b4d7c5cf8ed45da42cedebb9de2fb ChangeLog 4765
+SHA256 732311af90e60e2f6eb19580aa1d5d2ae2ebc646b912da78f0678da8df95f7c6 ChangeLog 4765
 MISC metadata.xml 158 RMD160 6842e2189a50bd8a98e84802c38180ac1421c00e SHA1 703cea5a2109d41f7c87993c1f01d418a4c85174 SHA256 dfb5b47e6836db39fb187301dfcff1c2605e91d13d21db160806a563d8c75f9b
 MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
 RMD160 6842e2189a50bd8a98e84802c38180ac1421c00e metadata.xml 158
@@ -29,10 +37,13 @@ SHA256 dfb5b47e6836db39fb187301dfcff1c2605e91d13d21db160806a563d8c75f9b metadata
 MD5 c468458cb7da1545bdce7b46356f772f files/digest-libdts-0.0.2-r3 238
 RMD160 f0d17eedb1f8e6fef139b41c836f7abadc44d0e2 files/digest-libdts-0.0.2-r3 238
 SHA256 176a7f2a196340998a1f85f5d350eebd5c256dd3a5380cf5ca50aa6987a58970 files/digest-libdts-0.0.2-r3 238
+MD5 c468458cb7da1545bdce7b46356f772f files/digest-libdts-0.0.2-r4 238
+RMD160 f0d17eedb1f8e6fef139b41c836f7abadc44d0e2 files/digest-libdts-0.0.2-r4 238
+SHA256 176a7f2a196340998a1f85f5d350eebd5c256dd3a5380cf5ca50aa6987a58970 files/digest-libdts-0.0.2-r4 238
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.3 (GNU/Linux)
 
-iD8DBQFEfeUkAiZjviIA2XgRAvPXAJ98uFrEyuQBlqw7FeEpncJ5ab5iWACgtpRq
-xW/LOtVlSnilImEEpY8ogAg=
-=V74U
+iD8DBQFElEoUAiZjviIA2XgRAln5AKDm/EzFVoNlbRFbyFCrygKxVunLGgCg4J+o
+sf+g6qmKFc6OP+VLVtlMLII=
+=GVGl
 -----END PGP SIGNATURE-----
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 (file)
index 0000000..4870747
--- /dev/null
@@ -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 (file)
index 0000000..6db9bd9
--- /dev/null
@@ -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 (file)
index 0000000..e541f95
--- /dev/null
@@ -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
+}