aboutsummaryrefslogtreecommitdiff
path: root/emulators/qemu
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2005-05-01 07:39:11 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2005-05-01 07:39:11 +0000
commit12b9c1f2e37d240a7e6efa6085bd868893063753 (patch)
tree9aade102f3af81161e22c7dba39ab8d4c3abcdf5 /emulators/qemu
parent3a7a219d74e851b676e5088b4d3093bf084082e2 (diff)
downloadports-12b9c1f2e37d240a7e6efa6085bd868893063753.tar.gz
ports-12b9c1f2e37d240a7e6efa6085bd868893063753.zip
o Update to 0.7.0. [1]
o Remove hard samba dependency. [2] PR: ports/80486 Submitted by: Jung-uk Kim <jkim@niksun.com> [1] Juergen Lock <nox@jelal.kn-bremen.de> (maintainer) [1] Suggested by: des [2]
Notes
Notes: svn path=/head/; revision=134430
Diffstat (limited to 'emulators/qemu')
-rw-r--r--emulators/qemu/Makefile37
-rw-r--r--emulators/qemu/distinfo4
-rw-r--r--emulators/qemu/files/patch-aa219
-rw-r--r--emulators/qemu/files/patch-ab16
-rw-r--r--emulators/qemu/files/patch-ac2
-rw-r--r--emulators/qemu/files/patch-be20
-rw-r--r--emulators/qemu/files/patch-bh65
-rw-r--r--emulators/qemu/files/patch-block.c71
-rw-r--r--emulators/qemu/files/patch-target-sparc::op_helper.c8
-rw-r--r--emulators/qemu/pkg-message2
10 files changed, 43 insertions, 401 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 4d27ba82553b..8d31b2da7e38 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -6,42 +6,57 @@
#
PORTNAME= qemu
-PORTVERSION= 0.6.2s.20050305
+PORTVERSION= 0.7.0
CATEGORIES= emulators
-MASTER_SITES= http://people.fruitsalad.org/nox/qemu/ \
- http://dad-answers.com/qemu/
-DISTNAME= ${PORTNAME}-snapshot-2005-03-05_23
+MASTER_SITES= http://www.qemu.org/
MAINTAINER= nox@jelal.kn-bremen.de
COMMENT= QEMU CPU Emulator
BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
+.if defined(WITH_SAMBA)
RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba
+.endif
HAS_CONFIGURE= yes
-USE_BZIP2= yes
USE_GMAKE= yes
USE_GETOPT_LONG= yes
USE_SDL= sdl
USE_PERL5= yes
PATCH_STRIP= -p1
-CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC}\ -I${PREFIX}/include
+CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC}
+MAKE_ENV+= BSD_MAKE=${MAKE}
MAN1= qemu.1 qemu-img.1
-ONLY_FOR_ARCHS= i386 amd64 powerpc
+ONLY_FOR_ARCHS= amd64 i386
# gcc34 (system cc on 5.x now) has problems with qemu on amd64
# (doesnt build target-i386/op.c), try the one in ports which is newer
.include <bsd.port.pre.mk>
-.if ${ARCH} == "amd64" && ${OSVERSION} >= 502126
-BROKEN= Does not compile
-CC= gcc34
-CXX= g++34
+.if ${ARCH} == "amd64"
+ARCH= x86_64
+.if ${OSVERSION} >= 502126
BUILD_DEPENDS+= gcc34:${PORTSDIR}/lang/gcc34
GCCVERSION= 030402
+CC= gcc34
.else
USE_GCC= 3.4
.endif
+.else
+USE_GCC= 3.4
+.endif
+
+pre-everything::
+.if !defined(WITH_SAMBA) && !exists(${LOCALBASE}/sbin/smbd)
+ @${ECHO_MSG} "Notice: if you need qemu's -smb option (smb-export local dir to guest)"
+ @${ECHO_MSG} "then you also need samba, you can have this port install it by defining"
+ @${ECHO_MSG} "WITH_SAMBA."
+.endif
+
+pre-patch:
+ @for A in ${ONLY_FOR_ARCHS}; do \
+ ${MKDIR} ${WRKSRC}/bsd/$$A; \
+ done
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index 5f95368e63b7..a02ee0ccb2b1 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,2 +1,2 @@
-MD5 (qemu-snapshot-2005-03-05_23.tar.bz2) = f0ef5e1e3570df94d910d00cc9f62f6e
-SIZE (qemu-snapshot-2005-03-05_23.tar.bz2) = 962774
+MD5 (qemu-0.7.0.tar.gz) = 234e9ace03b00259bb57dc5a9c633056
+SIZE (qemu-0.7.0.tar.gz) = 1211802
diff --git a/emulators/qemu/files/patch-aa b/emulators/qemu/files/patch-aa
index 305e6af8ef11..25eaa72ab235 100644
--- a/emulators/qemu/files/patch-aa
+++ b/emulators/qemu/files/patch-aa
@@ -10,222 +10,3 @@ diff -urd --exclude=CVS ../cvs/qemu/Makefile qemu-0.5.5/Makefile
qemu.1: qemu-doc.texi
./texi2pod.pl $< qemu.pod
-Only in qemu-0.5.5: qemu.1
-diff -urd --exclude=CVS ../cvs/qemu/target-i386/cpu.h qemu-0.5.5/target-i386/cpu.h
---- ../cvs/qemu/target-i386/cpu.h Thu May 20 15:01:56 2004
-+++ qemu-0.5.5/target-i386/cpu.h Sun May 30 05:16:10 2004
-@@ -259,7 +259,7 @@
- CC_OP_NB,
- };
-
--#if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD)
-+#if defined(__i386__) || defined(__x86_64__)
- #define USE_X86LDOUBLE
- #endif
-
-diff -urd --exclude=CVS ../cvs/qemu/target-i386/exec.h qemu-0.5.5/target-i386/exec.h
---- ../cvs/qemu/target-i386/exec.h Sat May 29 12:08:52 2004
-+++ qemu-0.5.5/target-i386/exec.h Sun May 30 05:19:43 2004
-@@ -293,6 +293,22 @@
-
- #endif /* !defined(CONFIG_USER_ONLY) */
-
-+#if defined(_BSD) && defined(USE_X86LDOUBLE)
-+#include <math.h>
-+/*int rintl(long double __x);
-+long int lrintl(long double __x);
-+long long int llrintl(long double __x);
-+long double powl(long double __x, long double __y);
-+long double logl(long double __x);
-+long double tanl(long double __x);
-+long double atan2l(long double __y, long double __x);
-+long double ceill(long double __x);
-+long double floorl(long double __x);
-+long double sqrtl(long double __x);
-+long double sinl(long double __x);
-+long double cosl(long double __x);*/
-+#endif
-+
- #ifdef USE_X86LDOUBLE
- /* use long double functions */
- #define lrint lrintl
-@@ -310,7 +326,7 @@
- #define rint rintl
- #endif
-
--#if !defined(_BSD)
-+#if !defined(_BSD) || defined(USE_X86LDOUBLE)
- extern int lrint(CPU86_LDouble x);
- extern int64_t llrint(CPU86_LDouble x);
- #else
-diff -urd --exclude=CVS ../cvs/qemu/target-i386/op.c qemu-0.5.5/target-i386/op.c
---- ../cvs/qemu/target-i386/op.c Sat May 29 12:08:52 2004
-+++ qemu-0.5.5/target-i386/op.c Sun May 30 05:40:54 2004
-@@ -1304,6 +1304,149 @@
- functions comes from the LGPL'ed x86 emulator found in the Willows
- TWIN windows emulator. */
-
-+#if defined(_BSD) && defined(USE_X86LDOUBLE)
-+
-+CPU86_LDouble rintl(CPU86_LDouble __x) {
-+ CPU86_LDouble __rintres;
-+ __asm__ __volatile__
-+ ("fistp %0"
-+ : "=m" (__rintres) : "t" (__x) : "st");
-+ return __rintres;
-+}
-+
-+int lrintl(CPU86_LDouble __x) {
-+ int __lrintres;
-+ __asm__ __volatile__
-+ ("fistpl %0"
-+ : "=m" (__lrintres) : "t" (__x) : "st");
-+ return __lrintres;
-+}
-+
-+
-+int64_t llrintl(CPU86_LDouble __x) {
-+ int64_t __llrintres;
-+ __asm__ __volatile__
-+ ("fistpll %0"
-+ : "=m" (__llrintres) : "t" (__x) : "st");
-+ return __llrintres;
-+}
-+
-+CPU86_LDouble powl(CPU86_LDouble __x, CPU86_LDouble __y) {
-+ register CPU86_LDouble __value;
-+ register long double __exponent;
-+ __extension__ long long int __p = (long long int) __y;
-+ if (__x == 0.0)
-+ {
-+ if (__y > 0.0)
-+ return __y == (double) __p && (__p & 1) != 0 ? __x : 0.0;
-+ else if (__y < 0.0)
-+ return (__y == (double) __p && (-__p & 1) != 0
-+ ? 1.0 / __x : 1.0 / fabs (__x));
-+ }
-+ if (__y == (double) __p)
-+ {
-+ long double __r = 1.0;
-+ if (__p == 0)
-+ return 1.0;
-+ if (__p < 0)
-+ {
-+ __p = -__p;
-+ __x = 1.0 / __x;
-+ }
-+ while (1)
-+ {
-+ if (__p & 1)
-+ __r *= __x;
-+ __p >>= 1;
-+ if (__p == 0)
-+ return __r;
-+ __x *= __x;
-+ }
-+ /* NOTREACHED */
-+ }
-+ __asm __volatile__
-+ ("fyl2x" : "=t" (__value) : "0" (__x), "u" (1.0) : "st(1)");
-+ __asm __volatile__
-+ ("fmul %%st(1) # y * log2(x)\n\t"
-+ "fst %%st(1)\n\t"
-+ "frndint # int(y * log2(x))\n\t"
-+ "fxch\n\t"
-+ "fsub %%st(1) # fract(y * log2(x))\n\t"
-+ "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t"
-+ : "=t" (__value), "=u" (__exponent) : "0" (__y), "1" (__value));
-+ __value += 1.0;
-+ __asm __volatile__
-+ ("fscale"
-+ : "=t" (__value) : "0" (__value), "u" (__exponent));
-+ return __value;
-+}
-+
-+CPU86_LDouble logl(CPU86_LDouble __x) {
-+ register CPU86_LDouble __result;
-+ __asm __volatile__ ("fldln2; fxch; fyl2x" : "=t" (__result) : "0" (__x) : "st(1)");
-+ return __result;
-+}
-+
-+CPU86_LDouble tanl(CPU86_LDouble __x) {
-+ register CPU86_LDouble __value;
-+ register CPU86_LDouble __value2 __attribute__ ((__unused__));
-+ __asm __volatile__
-+ ("fptan"
-+ : "=t" (__value2), "=u" (__value) : "0" (__x));
-+ return __value;
-+}
-+
-+CPU86_LDouble atan2l(CPU86_LDouble __y, CPU86_LDouble __x) {
-+ register CPU86_LDouble __value;
-+ __asm __volatile__
-+ ("fpatan"
-+ : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)");
-+ return __value;
-+}
-+
-+CPU86_LDouble ceill(CPU86_LDouble __x) {
-+ register CPU86_LDouble __value;
-+ __volatile unsigned short int __cw;
-+ __volatile unsigned short int __cwtmp;
-+ __asm __volatile ("fnstcw %0" : "=m" (__cw));
-+ __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */
-+ __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
-+ __asm __volatile ("frndint" : "=t" (__value) : "0" (__x));
-+ __asm __volatile ("fldcw %0" : : "m" (__cw));
-+ return __value;
-+}
-+
-+CPU86_LDouble floorl(CPU86_LDouble __x) {
-+ register CPU86_LDouble __value;
-+ __volatile unsigned short int __cw;
-+ __volatile unsigned short int __cwtmp;
-+ __asm __volatile ("fnstcw %0" : "=m" (__cw));
-+ __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */
-+ __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
-+ __asm __volatile ("frndint" : "=t" (__value) : "0" (__x));
-+ __asm __volatile ("fldcw %0" : : "m" (__cw));
-+ return __value;
-+}
-+
-+CPU86_LDouble sqrtl(CPU86_LDouble __x) {
-+ register CPU86_LDouble __result;
-+ __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x));
-+ return __result;
-+}
-+
-+CPU86_LDouble sinl(CPU86_LDouble __x) {
-+ register CPU86_LDouble __result;
-+ __asm __volatile__ ("fsin" : "=t" (__result) : "0" (__x));
-+ return __result;
-+}
-+
-+CPU86_LDouble cosl(CPU86_LDouble __x) {
-+ register CPU86_LDouble __result;
-+ __asm __volatile__ ("fcos" : "=t" (__result) : "0" (__x));
-+ return __result;
-+}
-+#endif
-+
- #if defined(__powerpc__)
- extern CPU86_LDouble copysign(CPU86_LDouble, CPU86_LDouble);
-
-diff -urd --exclude=CVS ../cvs/qemu/vl.c qemu-0.5.5/vl.c
---- ../cvs/qemu/vl.c Wed May 26 23:12:06 2004
-+++ qemu-0.5.5/vl.c Sun May 30 05:30:56 2004
-@@ -662,6 +662,14 @@
- case QEMU_TIMER_REALTIME:
- #ifdef _WIN32
- return GetTickCount();
-+#elif defined(_BSD)
-+ {
-+ struct timeval r;
-+ if (!gettimeofday(&r, NULL)) {
-+ return ((CLK_TCK * 1000LL) * (int64_t)r.tv_sec
-+ + ((int64_t)r.tv_usec * CLK_TCK) / 1000) / timer_freq;
-+ }
-+ }
- #else
- {
- struct tms tp;
diff --git a/emulators/qemu/files/patch-ab b/emulators/qemu/files/patch-ab
deleted file mode 100644
index 79b428ba1091..000000000000
--- a/emulators/qemu/files/patch-ab
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: qemu-snapshot-2004-05-30_23-40/target-i386/op.c
-@@ -1307,11 +1307,9 @@
- #if defined(_BSD) && defined(USE_X86LDOUBLE)
-
- CPU86_LDouble rintl(CPU86_LDouble __x) {
-- CPU86_LDouble __rintres;
-- __asm__ __volatile__
-- ("fistp %0"
-- : "=m" (__rintres) : "t" (__x) : "st");
-- return __rintres;
-+ register CPU86_LDouble __result;
-+ __asm __volatile__ ("frndint" : "=t" (__result) : "0" (__x));
-+ return __result;
- }
-
- int lrintl(CPU86_LDouble __x) {
diff --git a/emulators/qemu/files/patch-ac b/emulators/qemu/files/patch-ac
index 3c9a9db2b58b..8adf3dbd9637 100644
--- a/emulators/qemu/files/patch-ac
+++ b/emulators/qemu/files/patch-ac
@@ -4,7 +4,7 @@ Index: qemu/configure
if test -z "$sdl" ; then
-sdl_config="sdl-config"
-+sdl_config="sdl11-config"
++sdl_config="${SDL_CONFIG}"
sdl=no
sdl_static=no
diff --git a/emulators/qemu/files/patch-be b/emulators/qemu/files/patch-be
index 6c9a95892ade..6de47db9eaf9 100644
--- a/emulators/qemu/files/patch-be
+++ b/emulators/qemu/files/patch-be
@@ -1,12 +1,16 @@
Index: qemu/vl.c
-@@ -666,8 +667,8 @@
- {
- struct timeval r;
- if (!gettimeofday(&r, NULL)) {
-- return ((CLK_TCK * 1000LL) * (int64_t)r.tv_sec
-- + ((int64_t)r.tv_usec * CLK_TCK) / 1000) / timer_freq;
+@@ -662,6 +662,14 @@
+ case QEMU_TIMER_REALTIME:
+ #ifdef _WIN32
+ return GetTickCount();
++#elif defined(_BSD)
++ {
++ struct timeval r;
++ if (!gettimeofday(&r, NULL)) {
+ return ((timer_freq * 1000LL) * (int64_t)r.tv_sec
+ + ((int64_t)r.tv_usec * timer_freq) / 1000) / timer_freq;
- }
- }
++ }
++ }
#else
+ {
+ struct tms tp;
diff --git a/emulators/qemu/files/patch-bh b/emulators/qemu/files/patch-bh
index 52dff1c7160e..1218bb4656c5 100644
--- a/emulators/qemu/files/patch-bh
+++ b/emulators/qemu/files/patch-bh
@@ -24,68 +24,3 @@ diff -w -u -d -r1.12 dyngen-exec.h
#undef NULL
#define NULL 0
#ifdef _BSD
-Index: qemu/target-ppc/op_helper.c
-===================================================================
-RCS file: /cvsroot/qemu/qemu/target-ppc/op_helper.c,v
-retrieving revision 1.6
-diff -w -u -d -r1.6 op_helper.c
---- target-ppc/op_helper.c 21 May 2004 12:59:31 -0000 1.6
-+++ target-ppc/op_helper.c 21 May 2004 15:00:49 -0000
-@@ -210,6 +210,22 @@
- }
- /* TODO: update FEX & VX */
- /* Set rounding mode */
-+#ifdef _BSD
-+ switch(env->fpscr[0] & 0x3) {
-+ case 0:
-+ fpsetround(FP_RN);
-+ break;
-+ case 1:
-+ fpsetround(FP_RZ);
-+ break;
-+ case 2:
-+ fpsetround(FP_RP);
-+ break;
-+ case 3:
-+ fpsetround(FP_RM);
-+ break;
-+ }
-+#else
- switch (env->fpscr[0] & 0x3) {
- case 0:
- /* Best approximation (round to nearest) */
-@@ -228,6 +244,7 @@
- fesetround(FE_DOWNWARD);
- break;
- }
-+#endif
- }
-
- void do_fctiw (void)
-@@ -253,9 +270,13 @@
- double d;
- uint64_t i;
- } *p = (void *)&FT1;
-+#ifdef _BSD
-+ int cround = fpgetround();
-+ fpsetround(FP_RZ);
-+#else
- int cround = fegetround();
--
- fesetround(FE_TOWARDZERO);
-+#endif
- if (FT0 > (double)0x7FFFFFFF)
- p->i = 0x7FFFFFFFULL << 32;
- else if (FT0 < -(double)0x80000000)
-@@ -264,7 +285,11 @@
- p->i = 0;
- p->i |= (uint32_t)FT0;
- FT0 = p->d;
-+#ifdef _BSD
-+ fpsetround(cround);
-+#else
- fesetround(cround);
-+#endif
- }
-
- void do_fnmadds (void)
diff --git a/emulators/qemu/files/patch-block.c b/emulators/qemu/files/patch-block.c
deleted file mode 100644
index c924d2d96039..000000000000
--- a/emulators/qemu/files/patch-block.c
+++ /dev/null
@@ -1,71 +0,0 @@
-Index: qemu/block.c
-@@ -21,6 +21,17 @@
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-+
-+#include "config-host.h"
-+
-+#ifdef _BSD
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <sys/ioctl.h>
-+#include <sys/queue.h>
-+#include <sys/disk.h>
-+#endif
-+
- #include "vl.h"
- #include "block_int.h"
-
-@@ -103,14 +103,25 @@
- {
- int fd, ret, score, score_max;
- BlockDriver *drv1, *drv;
-- uint8_t buf[1024];
-+ uint8_t *buf;
-+ size_t bufsize = 1024;
-+ u_int sectorsize = 512;
-
- fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
- if (fd < 0)
- return NULL;
-- ret = read(fd, buf, sizeof(buf));
-+#ifdef DIOCGSECTORSIZE
-+ if (!ioctl(fd, DIOCGSECTORSIZE, &sectorsize) &&
-+ sectorsize > bufsize)
-+ bufsize = sectorsize;
-+#endif
-+ buf = malloc(bufsize);
-+ if (!buf)
-+ return NULL;
-+ ret = read(fd, buf, bufsize);
- if (ret < 0) {
- close(fd);
-+ free(buf);
- return NULL;
- }
- close(fd);
-@@ -124,6 +135,7 @@
- drv = drv1;
- }
- }
-+ free(buf);
- return drv;
- }
-
-@@ -522,6 +533,15 @@
- return -1;
- bs->read_only = 1;
- }
-+#ifdef _BSD
-+ struct stat sb;
-+ if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) {
-+#ifdef DIOCGMEDIASIZE
-+ if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
-+#endif
-+ size = lseek(fd, 0LL, SEEK_END);
-+ } else
-+#endif
- size = lseek(fd, 0, SEEK_END);
- bs->total_sectors = size / 512;
- s->fd = fd;
diff --git a/emulators/qemu/files/patch-target-sparc::op_helper.c b/emulators/qemu/files/patch-target-sparc::op_helper.c
deleted file mode 100644
index e621a1337ad1..000000000000
--- a/emulators/qemu/files/patch-target-sparc::op_helper.c
+++ /dev/null
@@ -1,8 +0,0 @@
---- qemu/target-sparc/op_helper.c.orig Mon Oct 11 02:46:24 2004
-+++ qemu/target-sparc/op_helper.c Thu Oct 28 23:28:57 2004
-@@ -1,5 +1,4 @@
- #include <math.h>
--#include <fenv.h>
- #include "exec.h"
-
- #ifdef USE_INT_TO_FLOAT_HELPERS
diff --git a/emulators/qemu/pkg-message b/emulators/qemu/pkg-message
index 3257ec60f3fe..ad921eceb261 100644
--- a/emulators/qemu/pkg-message
+++ b/emulators/qemu/pkg-message
@@ -16,4 +16,6 @@ its kernel is built with HZ=5000, and FreeBSD's default is 100...
(not included since it needs a patch to emulators/rtc.)
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE
ioctl.)
+- the -smb option (smb-export local dir to guest) needs the net/samba
+port/package installed in addition to qemu.
====