summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorryoon <ryoon>2011-09-22 05:37:49 +0000
committerryoon <ryoon>2011-09-22 05:37:49 +0000
commit6aa15900e7bb679b7e25d6e0bd24f4bd0b3827c7 (patch)
treecf8169ad47470941b79e7a6f80c7492ae6e37d75 /emulators
parente4b7210252b457d3f3e1566a214e0d616763f656 (diff)
downloadpkgsrc-6aa15900e7bb679b7e25d6e0bd24f4bd0b3827c7.tar.gz
Restore missing patches. It is my mistake.
* patch-aa is for tap detection bug. * patch-bb is for build on NetBSD 4. The patch-aa requires bump of PKGREVISION. Pointed out by Sergey Svishchev in private e-mail.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/Makefile3
-rw-r--r--emulators/qemu/distinfo4
-rw-r--r--emulators/qemu/patches/patch-aa57
-rw-r--r--emulators/qemu/patches/patch-bb21
4 files changed, 83 insertions, 2 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 18f1f07162c..a77ac4e36b1 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.82 2011/09/12 10:59:15 ryoon Exp $
+# $NetBSD: Makefile,v 1.83 2011/09/22 05:37:49 ryoon Exp $
DISTNAME= qemu-0.15.0
+PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://wiki.qemu.org/download/
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index 841eaf363fe..92a3d3e419f 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.69 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: distinfo,v 1.70 2011/09/22 05:37:49 ryoon Exp $
SHA1 (qemu-0.15.0.tar.gz) = 57a7269b58544054a90b158225fce05fe1d04a85
RMD160 (qemu-0.15.0.tar.gz) = f33048765e48e1dc6413ef079df99944b2329211
Size (qemu-0.15.0.tar.gz) = 9577243 bytes
+SHA1 (patch-aa) = ca39d409081cd7d9f038d580c5b90ffca46948ec
SHA1 (patch-ao) = 610e77fd51595f0f77b82a745d0a546712f6442d
SHA1 (patch-ba) = c8ad6502b0693cc22a79f89d2935d962066b5d91
+SHA1 (patch-bb) = 17255a240062acfe87401c2168158687f2ebcd20
SHA1 (patch-dd) = 20637d652963c94c5fe7999f27c31c7fd8864e43
SHA1 (patch-ed) = 7a77ba9b33d654c9f8278d69f81a2fc06e17a7d3
SHA1 (patch-ef) = f26f1b860cca477d5e80c9cb2755c8dc6fa593ac
diff --git a/emulators/qemu/patches/patch-aa b/emulators/qemu/patches/patch-aa
new file mode 100644
index 00000000000..48a79defe4d
--- /dev/null
+++ b/emulators/qemu/patches/patch-aa
@@ -0,0 +1,57 @@
+$NetBSD: patch-aa,v 1.10 2011/09/22 05:37:49 ryoon Exp $
+
+* fixes a bug with tap device detection
+
+--- net/tap-bsd.c.orig 2011-08-08 18:28:42.000000000 +0000
++++ net/tap-bsd.c
+@@ -28,6 +28,8 @@
+ #include "qemu-error.h"
+
+ #ifdef __NetBSD__
++#include <sys/ioctl.h>
++#include <net/if.h>
+ #include <net/if_tap.h>
+ #endif
+
+@@ -40,8 +42,12 @@
+ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
+ {
+ int fd;
++#ifdef TAPGIFNAME
++ struct ifreq ifr;
++#else
+ char *dev;
+ struct stat s;
++#endif
+
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
+ /* if no ifname is given, always start the search from tap0/tun0. */
+@@ -77,14 +83,26 @@ int tap_open(char *ifname, int ifname_si
+ #else
+ TFR(fd = open("/dev/tap", O_RDWR));
+ if (fd < 0) {
+- fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n");
++ fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation: %s\n", strerror(errno));
+ return -1;
+ }
+ #endif
+
+- fstat(fd, &s);
++#ifdef TAPGIFNAME
++ if (ioctl (fd, TAPGIFNAME, (void*)&ifr) < 0) {
++ fprintf(stderr, "warning: could not open get tap name: %s\n",
++ strerror(errno));
++ return -1;
++ }
++ pstrcpy(ifname, ifname_size, ifr.ifr_name);
++#else
++ if (fstat(fd, &s) < 0) {
++ fprintf(stderr, "warning: could not stat /dev/tap: no virtual network emulation: %s\n", strerror(errno));
++ return -1;
++ }
+ dev = devname(s.st_rdev, S_IFCHR);
+ pstrcpy(ifname, ifname_size, dev);
++#endif
+
+ if (*vnet_hdr) {
+ /* BSD doesn't have IFF_VNET_HDR */
diff --git a/emulators/qemu/patches/patch-bb b/emulators/qemu/patches/patch-bb
new file mode 100644
index 00000000000..79eb0e6ffe3
--- /dev/null
+++ b/emulators/qemu/patches/patch-bb
@@ -0,0 +1,21 @@
+$NetBSD: patch-bb,v 1.3 2011/09/22 05:37:49 ryoon Exp $
+
+* fix build on NetBSD/4.0.1.
+
+--- scripts/signrom.sh.orig 2011-08-08 18:28:42.000000000 +0000
++++ scripts/signrom.sh
+@@ -26,12 +26,12 @@ test "$1" -a "$2" || exit 1
+ sum=0
+
+ # find out the file size
+-x=`dd if="$1" bs=1 count=1 skip=2 2>/dev/null | od -t u1 -A n`
++x=`dd if="$1" bs=1 count=1 skip=2 2>/dev/null | od -t u1 | sed -e 's/^[0-9]* *//' -e 's/^00*\([0-9]\)/\1/'`
+ #size=`expr $x \* 512 - 1`
+ size=$(( $x * 512 - 1 ))
+
+ # now get the checksum
+-nums=`od -A n -t u1 -v -N $size "$1"`
++nums=`od -t u1 -v "$1" | sed -e 's/^[0-9]* *//' -e 's/^00*\([0-9]\)/\1/' -e 's/ 00*\([0-9]\)/ \1/g'`
+ for i in ${nums}; do
+ # add each byte's value to sum
+ sum=`expr \( $sum + $i \) % 256`