summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2004-07-01 00:11:30 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2004-07-01 00:11:30 +0000
commit855b5c01c8df88a4f1aee0d74590e776370bd32d (patch)
tree62883c00aafc92ebfe94d0553f14b70283762b72 /media-libs
parentVersion bump; added snortsam support (Manifest recommit) (diff)
downloadgentoo-2-855b5c01c8df88a4f1aee0d74590e776370bd32d.tar.gz
gentoo-2-855b5c01c8df88a4f1aee0d74590e776370bd32d.tar.bz2
gentoo-2-855b5c01c8df88a4f1aee0d74590e776370bd32d.zip
Added logic to detect a bad asound.h (missing __user) and die so the user can fix it. This doesn't break alsa-lib, but it breaks packages that use the alsa driver includes, I I believe this is the best place to do the test rather than in every user app. This closes bug #54533.
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/alsa-lib/ChangeLog12
-rw-r--r--media-libs/alsa-lib/Manifest21
-rw-r--r--media-libs/alsa-lib/alsa-lib-1.0.5-r2.ebuild (renamed from media-libs/alsa-lib/alsa-lib-1.0.5-r1.ebuild)61
-rw-r--r--media-libs/alsa-lib/files/digest-alsa-lib-1.0.5-r2 (renamed from media-libs/alsa-lib/files/digest-alsa-lib-1.0.5-r1)0
-rw-r--r--media-libs/alsa-lib/files/fix-asound_h.patch13
-rw-r--r--media-libs/alsa-lib/files/test-asound_h.c7
6 files changed, 84 insertions, 30 deletions
diff --git a/media-libs/alsa-lib/ChangeLog b/media-libs/alsa-lib/ChangeLog
index 1dd79bb424a7..5e3bbc821a1a 100644
--- a/media-libs/alsa-lib/ChangeLog
+++ b/media-libs/alsa-lib/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for media-libs/alsa-lib
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/ChangeLog,v 1.71 2004/06/24 22:56:06 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/ChangeLog,v 1.72 2004/07/01 00:11:30 eradicator Exp $
+
+*alsa-lib-1.0.5-r2 (30 Jun 2004)
+
+ 30 Jun 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ +files/fix-asound_h.patch, +files/test-asound_h.c,
+ -alsa-lib-1.0.5-r1.ebuild, +alsa-lib-1.0.5-r2.ebuild:
+ Added logic to detect a bad asound.h (missing __user) and die so the user can
+ fix it. This doesn't break alsa-lib, but it breaks packages that use the alsa
+ driver includes, I I believe this is the best place to do the test rather than
+ in every user app. This closes bug #54533.
24 Jun 2004; Jeremy Huddleston <eradicator@gentoo.org>
alsa-lib-1.0.5.ebuild:
diff --git a/media-libs/alsa-lib/Manifest b/media-libs/alsa-lib/Manifest
index 61ab373e0f63..139b3dbecdd6 100644
--- a/media-libs/alsa-lib/Manifest
+++ b/media-libs/alsa-lib/Manifest
@@ -1,22 +1,25 @@
-MD5 822d0bc40f450fe449fd3696fc9f7929 alsa-lib-0.9.8.ebuild 1593
-MD5 60fc35531ccd53d40142f143fde436ae alsa-lib-1.0.5-r1.ebuild 2604
+MD5 a185d4ca92c9f7a80c7693021623c18e ChangeLog 10419
MD5 254c79635ef61e45065aded4fae31c03 alsa-lib-0.5.10b.ebuild 692
-MD5 60e98bd5e8fe3c26aa3162a591ddb58e alsa-lib-1.0.5.ebuild 1718
+MD5 8e7f026293191e3faa009647bb0e4175 alsa-lib-0.9.0_rc2.ebuild 1140
+MD5 dea0904751d196b2ca4f02f855cc720c alsa-lib-0.9.2.ebuild 1113
+MD5 822d0bc40f450fe449fd3696fc9f7929 alsa-lib-0.9.8.ebuild 1593
MD5 e8eae57f9cf5714ea55b1e0553b442f2 alsa-lib-1.0.2.ebuild 1621
MD5 30c24770677d9b2cd942438b6e46761e alsa-lib-1.0.3b-r2.ebuild 1329
-MD5 dea0904751d196b2ca4f02f855cc720c alsa-lib-0.9.2.ebuild 1113
MD5 2236aa4afa6a060c354d1b7e0d90b1e8 alsa-lib-1.0.4.ebuild 1714
-MD5 a185d4ca92c9f7a80c7693021623c18e ChangeLog 10419
+MD5 60e98bd5e8fe3c26aa3162a591ddb58e alsa-lib-1.0.5.ebuild 1718
MD5 e1147a642867b3b3ea43518a1376f6d2 metadata.xml 250
-MD5 8e7f026293191e3faa009647bb0e4175 alsa-lib-0.9.0_rc2.ebuild 1140
-MD5 446ddecdcb2f56eec8683f1294749061 files/digest-alsa-lib-1.0.5-r1 67
+MD5 60fc35531ccd53d40142f143fde436ae alsa-lib-1.0.5-r1.ebuild 2604
+MD5 60fc35531ccd53d40142f143fde436ae alsa-lib-1.0.5-r2.ebuild 2604
+MD5 48e9478afe2656cd4869ebaa951f2348 files/test-asound.c 54
MD5 7866cccb2308203280e2a4382cbddee4 files/alsa-lib-1.0.3b-rate-capture.patch 565
MD5 190a6c4ffe2eef20e3095ab70ea34941 files/configure.diff 586
-MD5 9070048b85478705fe11a7938a70c419 files/digest-alsa-lib-0.9.0_rc2 70
-MD5 11b938c643aab1b11054f43fdc15f703 files/digest-alsa-lib-1.0.3b-r2 68
MD5 e015f7b1e3c316cf8c9dbbd0bf77a5a7 files/digest-alsa-lib-0.5.10b 69
+MD5 9070048b85478705fe11a7938a70c419 files/digest-alsa-lib-0.9.0_rc2 70
MD5 3a81898f3853065f59af943b3e1f4df2 files/digest-alsa-lib-0.9.2 67
MD5 8a3190d9f23acedd006359afb79f60bc files/digest-alsa-lib-0.9.8 67
MD5 ebf9199686eb993db91c807d7fd90dcb files/digest-alsa-lib-1.0.2 67
+MD5 11b938c643aab1b11054f43fdc15f703 files/digest-alsa-lib-1.0.3b-r2 68
MD5 fb12c702eb134e6b86366ccf8aa6153d files/digest-alsa-lib-1.0.4 67
MD5 446ddecdcb2f56eec8683f1294749061 files/digest-alsa-lib-1.0.5 67
+MD5 446ddecdcb2f56eec8683f1294749061 files/digest-alsa-lib-1.0.5-r1 67
+MD5 446ddecdcb2f56eec8683f1294749061 files/digest-alsa-lib-1.0.5-r2 67
diff --git a/media-libs/alsa-lib/alsa-lib-1.0.5-r1.ebuild b/media-libs/alsa-lib/alsa-lib-1.0.5-r2.ebuild
index d02b07348553..01eb019383aa 100644
--- a/media-libs/alsa-lib/alsa-lib-1.0.5-r1.ebuild
+++ b/media-libs/alsa-lib/alsa-lib-1.0.5-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/alsa-lib-1.0.5-r1.ebuild,v 1.2 2004/06/24 22:56:06 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/alsa-lib-1.0.5-r2.ebuild,v 1.1 2004/07/01 00:11:30 eradicator Exp $
inherit libtool
@@ -25,6 +25,46 @@ MY_P=${P/_rc/rc}
SRC_URI="mirror://alsaproject/lib/${MY_P}.tar.bz2"
S=${WORKDIR}/${MY_P}
+pkg_setup() {
+ # This is kinda hackish, so if someone else has a better idea,
+ # feel free to implement it. We need to detect if /usr/include/sound
+ # exists. If it does, then we leave it alone. If it doesn't, we
+ # assume virtual/alsa was satisfied by 2.6 sources and setup a symlink.
+ # If they emerge alsa-driver, then the real dir with overwrite the symlink.
+
+ if ! [ -e /usr/include/sound ]; then
+ if [ -d /usr/src/linux/include/sound ]; then
+ ln -s /usr/src/linux/include/sound /usr/include/sound
+ else
+ eerror "You don't seem to have valid alsa (driver) headers installed at /usr/include/sound."
+ eerror "and I couldn't find any at /usr/src/linux/include/sound to use either. Please"
+ eerror "emerge alsa-driver or setup /usr/src/linux to point to a valid 2.6.x kernel"
+ eerror "then run ln -s /usr/src/linux/include/sound /usr/include/sound"
+ fi
+ fi
+
+ einfon "Checking sound headers for broken asound.h ... "
+ if ! gcc -c ${FILESDIR}/test-asound_h.c -o ${T}/test1.o &> /dev/null; then
+ echo "yes"
+ eerror "Your version of:"
+ eerror " /usr/include/sound/asound.h"
+ eerror "is broken (from a user space perspective). Please apply"
+ eerror "the following patch:"
+ echo
+ eerror "*******************************************************"
+ cat ${FILESDIR}/fix-asound_h.patch
+ eerror "*******************************************************"
+ echo
+ eerror "Youu should be able to do this by issuing the following commands:"
+ eerror "cd /usr/include/sound"
+ eerror "patch -p0 < ${FILESDIR}/fix-asound_h.patch"
+ echo
+ die "Broken sound/asound.h header included in kernel sources!"
+ else
+ echo "no"
+ fi
+}
+
src_unpack() {
unpack ${A}
@@ -71,22 +111,3 @@ src_install() {
make DESTDIR="${D}" install || die "make install failed"
fi
}
-
-pkg_postinst() {
- # This is kinda hackish, so if someone else has a better idea,
- # feel free to implement it. We need to detect if /usr/include/sound
- # exists. If it does, then we leave it alone. If it doesn't, we
- # assume virtual/alsa was satisfied by 2.6 sources and setup a symlink.
- # If they emerge alsa-driver, then the real dir with overwrite the symlink.
-
- if ! [ -e /usr/include/sound ]; then
- if [ -d /usr/src/linux/include/sound ]; then
- ln -s /usr/src/linux/include/sound /usr/include/sound
- else
- eerror "You don't seem to have valid alsa (driver) headers installed at /usr/include/sound."
- eerror "and I couldn't find any at /usr/src/linux/include/sound to use either. Please"
- eerror "emerge alsa-driver or setup /usr/src/linux to point to a valid 2.6.x kernel"
- eerror "then run ln -s /usr/src/linux/include/sound /usr/include/sound"
- fi
- fi
-}
diff --git a/media-libs/alsa-lib/files/digest-alsa-lib-1.0.5-r1 b/media-libs/alsa-lib/files/digest-alsa-lib-1.0.5-r2
index 358b269dffe0..358b269dffe0 100644
--- a/media-libs/alsa-lib/files/digest-alsa-lib-1.0.5-r1
+++ b/media-libs/alsa-lib/files/digest-alsa-lib-1.0.5-r2
diff --git a/media-libs/alsa-lib/files/fix-asound_h.patch b/media-libs/alsa-lib/files/fix-asound_h.patch
new file mode 100644
index 000000000000..50ccefb9195d
--- /dev/null
+++ b/media-libs/alsa-lib/files/fix-asound_h.patch
@@ -0,0 +1,13 @@
+--- asound.h.orig 2004-06-30 15:18:14.131997218 -0700
++++ asound.h 2004-06-30 15:19:05.599888165 -0700
+@@ -61,6 +61,10 @@
+ #include <sys/types.h>
+ #endif
+
++#ifndef __user
++#define __user
++#endif
++
+ /*
+ * protocol version
+ */
diff --git a/media-libs/alsa-lib/files/test-asound_h.c b/media-libs/alsa-lib/files/test-asound_h.c
new file mode 100644
index 000000000000..903952090dea
--- /dev/null
+++ b/media-libs/alsa-lib/files/test-asound_h.c
@@ -0,0 +1,7 @@
+#include <sound/asound.h>
+
+int main()
+{
+ return 0;
+}
+