diff options
author | Juergen Lock <nox@FreeBSD.org> | 2010-05-10 20:03:56 +0000 |
---|---|---|
committer | Juergen Lock <nox@FreeBSD.org> | 2010-05-10 20:03:56 +0000 |
commit | b418f601b35b14a12414db7ab685fe3a9eda6556 (patch) | |
tree | b1ca9daf8006add3cf5a6cb3ea87c58e6fcb93cb | |
parent | 85e35f68f519dd3093ccb86ca380a8cd371e4271 (diff) | |
download | ports-b418f601b35b14a12414db7ab685fe3a9eda6556.tar.gz ports-b418f601b35b14a12414db7ab685fe3a9eda6556.zip |
Notes
-rw-r--r-- | emulators/qemu-devel/Makefile | 3 | ||||
-rw-r--r-- | emulators/qemu-devel/distinfo | 6 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-audio-ossaudio.c | 110 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-vl.c | 21 |
4 files changed, 24 insertions, 116 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index 6ed508211d4a..7d31169e3a88 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -6,8 +6,7 @@ # PORTNAME= qemu -PORTVERSION= 0.12.3 -PORTREVISION= 2 +PORTVERSION= 0.12.4 CATEGORIES= emulators MASTER_SITES= ${MASTER_SITE_SAVANNAH}:release \ ${MASTER_SITE_LOCAL}:snapshot \ diff --git a/emulators/qemu-devel/distinfo b/emulators/qemu-devel/distinfo index ca531c245475..269b23bddad8 100644 --- a/emulators/qemu-devel/distinfo +++ b/emulators/qemu-devel/distinfo @@ -1,3 +1,3 @@ -MD5 (qemu/qemu-0.12.3.tar.gz) = d215e4568650e8019816397174c090e1 -SHA256 (qemu/qemu-0.12.3.tar.gz) = 3ce26f8fb0a59418b2064a26bac4b40ea4e493acbc3df7ad5932635477fade4b -SIZE (qemu/qemu-0.12.3.tar.gz) = 4693581 +MD5 (qemu/qemu-0.12.4.tar.gz) = 93e6b134dff89b2799f57b7d9e0e0fc5 +SHA256 (qemu/qemu-0.12.4.tar.gz) = 1a29a5b5151162d1de035c4926d1a1dbffee4a145ef61ee865d6b82aaea0602e +SIZE (qemu/qemu-0.12.4.tar.gz) = 4697077 diff --git a/emulators/qemu-devel/files/patch-audio-ossaudio.c b/emulators/qemu-devel/files/patch-audio-ossaudio.c deleted file mode 100644 index 3b590c4808d6..000000000000 --- a/emulators/qemu-devel/files/patch-audio-ossaudio.c +++ /dev/null @@ -1,110 +0,0 @@ ---- a/audio/ossaudio.c -+++ b/audio/ossaudio.c -@@ -38,6 +38,10 @@ - #define AUDIO_CAP "oss" - #include "audio_int.h" - -+#if defined OSS_GETVERSION && defined SNDCTL_DSP_POLICY -+#define USE_DSP_POLICY -+#endif -+ - typedef struct OSSVoiceOut { - HWVoiceOut hw; - void *pcm_buf; -@@ -236,14 +240,39 @@ static void oss_dump_info (struct oss_pa - } - #endif - -+#ifdef USE_DSP_POLICY -+static int oss_get_version (int fd, int *version, const char *typ) -+{ -+ if (ioctl (fd, OSS_GETVERSION, &version)) { -+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -+ /* -+ * Looks like atm (20100109) FreeBSD knows OSS_GETVERSION -+ * since 7.x, but currently only on the mixer device (or in -+ * the Linuxolator), and in the native version that part of -+ * the code is in fact never reached so the ioctl fails anyway. -+ * Until this is fixed, just check the errno and if its what -+ * FreeBSD's sound drivers return atm assume they are new enough. -+ */ -+ if (errno == EINVAL) { -+ *version = 0x040000; -+ return 0; -+ } -+#endif -+ oss_logerr2 (errno, typ, "Failed to get OSS version\n"); -+ return -1; -+ } -+ return 0; -+} -+#endif -+ - static int oss_open (int in, struct oss_params *req, - struct oss_params *obt, int *pfd) - { - int fd; -- int version; - int oflags = conf.exclusive ? O_EXCL : 0; - audio_buf_info abinfo; - int fmt, freq, nchannels; -+ int setfragment = 1; - const char *dspname = in ? conf.devpath_in : conf.devpath_out; - const char *typ = in ? "ADC" : "DAC"; - -@@ -281,27 +310,30 @@ static int oss_open (int in, struct oss_ - goto err; - } - -- if (ioctl (fd, OSS_GETVERSION, &version)) { -- oss_logerr2 (errno, typ, "Failed to get OSS version\n"); -- version = 0; -- } -+#ifdef USE_DSP_POLICY -+ if (conf.policy >= 0) { -+ int version; - -- if (conf.debug) { -- dolog ("OSS version = %#x\n", version); -- } -+ if (!oss_get_version (fd, &version, typ)) { -+ if (conf.debug) { -+ dolog ("OSS version = %#x\n", version); -+ } - --#ifdef SNDCTL_DSP_POLICY -- if (conf.policy >= 0 && version >= 0x040000) { -- int policy = conf.policy; -- if (ioctl (fd, SNDCTL_DSP_POLICY, &policy)) { -- oss_logerr2 (errno, typ, "Failed to set timing policy to %d\n", -- conf.policy); -- goto err; -+ if (version >= 0x040000) { -+ int policy = conf.policy; -+ if (ioctl (fd, SNDCTL_DSP_POLICY, &policy)) { -+ oss_logerr2 (errno, typ, -+ "Failed to set timing policy to %d\n", -+ conf.policy); -+ goto err; -+ } -+ setfragment = 0; -+ } - } - } -- else - #endif -- { -+ -+ if (setfragment) { - int mmmmssss = (req->nfrags << 16) | ctz32 (req->fragsize); - if (ioctl (fd, SNDCTL_DSP_SETFRAGMENT, &mmmmssss)) { - oss_logerr2 (errno, typ, "Failed to set buffer length (%d, %d)\n", -@@ -857,7 +889,7 @@ static struct audio_option oss_options[] - .valp = &conf.exclusive, - .descr = "Open device in exclusive mode (vmix wont work)" - }, --#ifdef SNDCTL_DSP_POLICY -+#ifdef USE_DSP_POLICY - { - .name = "POLICY", - .tag = AUD_OPT_INT, diff --git a/emulators/qemu-devel/files/patch-vl.c b/emulators/qemu-devel/files/patch-vl.c index 890da597f323..f27241c0a067 100644 --- a/emulators/qemu-devel/files/patch-vl.c +++ b/emulators/qemu-devel/files/patch-vl.c @@ -1,9 +1,28 @@ Index: qemu/vl.c -@@ -57,6 +57,7 @@ +@@ -57,6 +57,8 @@ #include <sys/stat.h> #if defined(__FreeBSD__) || defined(__DragonFly__) #include <libutil.h> +#include <sys/param.h> ++#include <sys/sysctl.h> #else #include <util.h> #endif +@@ -3368,10 +3369,13 @@ static char *find_datadir(const char *ar + } + #elif defined(__FreeBSD__) + { +- int len; +- len = readlink("/proc/curproc/file", buf, sizeof(buf) - 1); +- if (len > 0) { +- buf[len] = 0; ++ static int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; ++ size_t len = sizeof(buf) - 1; ++ ++ *buf = '\0'; ++ if (!sysctl(mib, sizeof(mib)/sizeof(*mib), buf, &len, NULL, 0) && ++ *buf) { ++ buf[sizeof(buf) - 1] = '\0'; + p = buf; + } + } |