the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: qemu
Version: 1.0.1
Revision: 1
Description: Fast machine emulator and virtualizer
License: GPL
Source: http://wiki.qemu.org/download/%n-%v.tar.gz
Source-MD5: 5efd1091f01e3bc31bfdec27b8edeb00
Distribution: 10.6
BuildDepends: gcc46, glib2-dev, libgettext8-dev, libcurl4, libpng14, libjpeg, cyrus-sasl2-dev, gnutls28
Depends: gcc46-shlibs, glib2-shlibs, libgettext8-shlibs, libcurl4-shlibs, libpng14-shlibs, libjpeg-shlibs, cyrus-sasl2-shlibs, gnutls28-shlibs
PatchFile: %n.patch
PatchFile-MD5: 2f59f3605d61d3bb1a151dd7d6818cc2
PatchScript: <<
#!/bin/sh -ev
# patch configure for 32 bit build on x86_64
if [ "%m" = "i386" ]; then
sed -i.bak 's|-m64|-m32|g' configure
fi
# patch configure for ,issing -arch option in gcc-4
sed -i.bak 's|-arch x86_64||g' configure
# patch for window glitch as proposed by Juan Pineda.
patch -p1 <%{PatchFile}
<<
ConfigureParams: <<
(%m = i386) --cpu=%m \
--extra-cflags=-I%p/include \
--disable-darwin-user \
--disable-bsd-user
<<
CompileScript: <<
#!/bin/sh -ev
mkdir build
cd build
# cocoa.o must be compiled using llvm-gcc
../configure %c
make ui/cocoa.o
# the rest must be compiled using "non-llvm-"gcc
if [ -f /usr/bin/gcc-4.2 ]; then
mygcc="gcc-4.2"
elif [ -f %p/bin/gcc-4 ]; then
mygcc="gcc-4"
fi
../configure --cc=$mygcc --host-cc=$mygcc %c
make
<<
InstallScript: <<
#!/bin/sh -ev
cd build
make install prefix=%i \
sharedir=%i/share/qemu \
datadir=%i/share/qemu \
mandir=%i/share/man \
docdir=%i/share/doc/qemu \
bindir=%i/bin
<<
DocFiles: README* COPYING* TODO VERSION HACKING LICENSE MAINTAINERS
DescDetail: <<
QEMU is a generic and open source machine emulator and virtualizer.
When used as a machine emulator, QEMU can run OSes and programs made for
one machine (e.g. an ARM board) on a different machine (e.g. your own PC).
By using dynamic translation, it achieves very good performance.
When used as a virtualizer, QEMU achieves near native performances by
executing the guest code directly on the host CPU. QEMU supports
virtualization when executing under the Xen hypervisor or using the KVM
kernel module in Linux. When using KVM, QEMU can virtualize x86, server
and embedded PowerPC, and S390 guests.
<<
DescPort: <<
The systems darwin-user and bsd-user crashed. Fixes are unlikely.
Configure needs a patch for the 32 bit build on x86_64.
Bug reports are filed with upstream.
_UINT16 related patch originates from MacPorts and was ported by Jack Howarth.
Former maintainer (10.3): Christian Schroeder
<<
Homepage: http://wiki.qemu.org/Main_Page
Maintainer: Karl-Michael Schindler
diff -ru qemu-0.15.1/ui/cocoa.m qemu-0.15.1-patched/ui/cocoa.m
--- qemu-0.15.1/ui/cocoa.m
+++ qemu-0.15.1-patched/ui/cocoa.m
@@ -811,6 +811,8 @@ QemuCocoaView *cocoaView;
char **argv = (char**)malloc( sizeof(char*)*3 );
+ [sheet close];
+
asprintf(&argv[0], "%s", bin);
asprintf(&argv[1], "-hda");
asprintf(&argv[2], "%s", img);
--- qemu-1.0.1/fpu/softfloat.h.orig 2012-03-18 13:24:01.000000000 -0400
+++ qemu-1.0.1/fpu/softfloat.h 2012-03-18 13:26:01.000000000 -0400
@@ -57,7 +57,9 @@
typedef uint8_t uint8;
typedef int8_t int8;
#ifndef _AIX
+#if !(defined(__APPLE__) && defined(_UINT16))
typedef int uint16;
+#endif
typedef int int16;
#endif
typedef unsigned int uint32;
--- qemu-1.0.1/ui/cocoa.m.orig 2012-03-18 13:24:56.000000000 -0400
+++ qemu-1.0.1/ui/cocoa.m 2012-03-18 13:25:42.000000000 -0400
@@ -22,13 +22,14 @@
* THE SOFTWARE.
*/
-#import
-#include
-
#include "qemu-common.h"
#include "console.h"
#include "sysemu.h"
+#define _UINT16
+#import
+#include
+
#ifndef MAC_OS_X_VERSION_10_4
#define MAC_OS_X_VERSION_10_4 1040
#endif