Make this build and install under Mac OS X. I doubt this is the best way

to handle this, but it is good (and simple!) enough for now.  It'd be
improved by moving some more files around and trying to make it more
consistent with "regular" installs.

The problem is that the build results are completely different under OS X
than those produced in other systems.

Not bumping PKGREVISION because this was unbuildable before.
This commit is contained in:
jmmv 2006-12-03 22:18:16 +00:00
parent 1a1294c4b5
commit 63d38e2f2d
7 changed files with 147 additions and 5 deletions

View file

@ -0,0 +1,16 @@
===========================================================================
$NetBSD: MESSAGE.Darwin,v 1.1 2006/12/03 22:18:16 jmmv Exp $
Bochs has been installed into ${PREFIX}/share/libexec/bochs.
You can find there an application bundle (bochs.app) that you can copy to
/Applications if you want to.
There is also a sample configuration file in that location. Note that you
can use the $BXSHARE variable in your own configuration files to specify
the location of the system BIOSes. This variable will be automatically set
to the appropriate location by Bochs when executed.
For your convenience, a 'bochs' helper script has also been installed and
should be available through your PATH as a regular command-line utility.
===========================================================================

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.45 2006/06/25 18:00:05 wiz Exp $
# $NetBSD: Makefile,v 1.46 2006/12/03 22:18:16 jmmv Exp $
DISTNAME= bochs-2.2.1
PKGREVISION= 1
@ -59,11 +59,32 @@ BOCHS_MAINDIR= ${PREFIX}/share/bochs
BOCHS_BIOSDIR= ${BOCHS_MAINDIR}/bios
BOCHS_FONTDIR= ${BOCHS_MAINDIR}/xfonts
.if ${OPSYS} == "Darwin"
INSTALL_MAKE_FLAGS+= prefix=${PREFIX}/libexec/bochs
MESSAGE_SRC= ${.CURDIR}/MESSAGE.Darwin
PLIST_SRC= ${.CURDIR}/PLIST.Darwin
post-configure:
${MV} ${WRKSRC}/.bochsrc ${WRKSRC}/.bochsrc.BAK
${SED} -e 's@XXXPREFIXXXX@$$BXSHARE@' \
< ${WRKSRC}/.bochsrc.BAK > ${WRKSRC}/.bochsrc
post-build:
{ ${ECHO} '#! ${SH}'; \
${ECHO} 'exec ${PREFIX}/libexec/bochs/bochs.app/Contents/MacOS/bochs'\
'"$$@"'; } >${WRKDIR}/bochs.sh
post-install:
${INSTALL_SCRIPT} ${WRKDIR}/bochs.sh ${PREFIX}/bin/bochs
${LN} -fs ${PREFIX}/libexec/bochs/bxcommit ${PREFIX}/bin/bxcommit
${LN} -fs ${PREFIX}/libexec/bochs/bximage ${PREFIX}/bin/bximage
.else
.include "../../mk/x11.buildlink3.mk"
post-configure:
${MV} ${WRKSRC}/.bochsrc ${WRKSRC}/.bochsrc.BAK
${SED} -e 's@XXXPREFIXXXX@${PREFIX}@' \
< ${WRKSRC}/.bochsrc.BAK > ${WRKSRC}/.bochsrc
.endif
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,48 @@
@comment $NetBSD: PLIST.Darwin,v 1.1 2006/12/03 22:18:16 jmmv Exp $
bin/bochs
bin/bxcommit
bin/bximage
libexec/bochs/BIOS-bochs-2-processors
libexec/bochs/BIOS-bochs-4-processors
libexec/bochs/BIOS-bochs-8-processors
libexec/bochs/BIOS-bochs-latest
libexec/bochs/CHANGES.txt
libexec/bochs/COPYING.txt
libexec/bochs/README.txt
libexec/bochs/TODO.txt
libexec/bochs/VGABIOS-elpin-2.40
libexec/bochs/VGABIOS-elpin-LICENSE.txt
libexec/bochs/VGABIOS-lgpl-README.txt
libexec/bochs/VGABIOS-lgpl-latest
libexec/bochs/VGABIOS-lgpl-latest-cirrus
libexec/bochs/VGABIOS-lgpl-latest-cirrus-debug
libexec/bochs/VGABIOS-lgpl-latest-debug
libexec/bochs/bochs.app/.build
libexec/bochs/bochs.app/Contents/Info.plist
libexec/bochs/bochs.app/Contents/MacOS/bochs
libexec/bochs/bochs.app/Contents/PkgInfo
libexec/bochs/bochs.app/Contents/Resources/bochs-icn.icns
libexec/bochs/bochs.app/Contents/Resources/bochs.rsrc
libexec/bochs/bochs.app/Contents/pbdevelopment.plist
libexec/bochs/bochs.scpt
libexec/bochs/bochsrc-sample.txt
libexec/bochs/bxcommit
libexec/bochs/bximage
libexec/bochs/keymaps/sdl-pc-de.map
libexec/bochs/keymaps/sdl-pc-us.map
libexec/bochs/keymaps/x11-pc-be.map
libexec/bochs/keymaps/x11-pc-da.map
libexec/bochs/keymaps/x11-pc-de.map
libexec/bochs/keymaps/x11-pc-es.map
libexec/bochs/keymaps/x11-pc-fr.map
libexec/bochs/keymaps/x11-pc-it.map
libexec/bochs/keymaps/x11-pc-ru.map
libexec/bochs/keymaps/x11-pc-se.map
libexec/bochs/keymaps/x11-pc-uk.map
libexec/bochs/keymaps/x11-pc-us.map
@dirrm libexec/bochs/keymaps
@dirrm libexec/bochs/bochs.app/Contents/Resources
@dirrm libexec/bochs/bochs.app/Contents/MacOS
@dirrm libexec/bochs/bochs.app/Contents
@dirrm libexec/bochs/bochs.app
@dirrm libexec/bochs

View file

@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.18 2005/11/26 06:15:00 ben Exp $
$NetBSD: distinfo,v 1.19 2006/12/03 22:18:16 jmmv Exp $
SHA1 (bochs-2.2.1.tar.gz) = 72a59872189ab4b206c09c6ccfb83fe0ee988b8e
RMD160 (bochs-2.2.1.tar.gz) = 2cf906281a71cc6db546da715852ac98aab074cc
Size (bochs-2.2.1.tar.gz) = 3785329 bytes
SHA1 (patch-aa) = a6888ff31c879e3ba96297ddfe2f38f6ed723918
SHA1 (patch-ad) = 03191808449d6bee665046f242ec3356614021f4
SHA1 (patch-ab) = f9eeb7356503fcd3ab01e5381e0fa2fdc6e78a58
SHA1 (patch-ac) = ab21b4c2c38d798e24244163b2c447430e012e8e
SHA1 (patch-ad) = e305a33c204d9957d9da4048dddb194fff76dc12
SHA1 (patch-ae) = b8092c73b77adebc054e7adf4a773206af726bf5

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.8 2006/12/03 22:18:16 jmmv Exp $
--- iodev/cdrom.cc.orig 2006-12-03 20:55:44.000000000 +0100
+++ iodev/cdrom.cc
@@ -109,7 +109,7 @@ extern "C" {
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <dev/disk.h>
+#include <sys/disk.h>
#include <errno.h>
#include <paths.h>
#include <sys/param.h>

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ac,v 1.7 2006/12/03 22:18:16 jmmv Exp $
--- configure.orig 2006-12-03 20:30:34.000000000 +0100
+++ configure
@@ -34338,7 +34338,7 @@ fi
*-pc-windows* | *-pc-winnt* | *-pc-cygwin* | *-pc-mingw32*)
NETLOW_OBJS="$NETLOW_OBJS eth_win32.o"
;;
- *-macosx* | *-darwin*)
+ *-doesntwork-macosx* | *-doesntwork-darwin*)
NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
cat >>confdefs.h <<\_ACEOF
#define HAVE_TUNTAP 1

View file

@ -1,6 +1,6 @@
$NetBSD: patch-ad,v 1.7 2005/11/26 06:15:00 ben Exp $
$NetBSD: patch-ad,v 1.8 2006/12/03 22:18:16 jmmv Exp $
--- Makefile.in.orig 2005-07-06 13:28:23.000000000 -0700
--- Makefile.in.orig 2005-07-06 22:28:23.000000000 +0200
+++ Makefile.in
@@ -71,8 +71,8 @@ RMDIR=rmdir
TAR=tar
@ -13,3 +13,32 @@ $NetBSD: patch-ad,v 1.7 2005/11/26 06:15:00 ben Exp $
ZIP=zip
UNIX2DOS=unix2dos
LIBTOOL=@LIBTOOL@
@@ -574,7 +574,7 @@ RINCLUDES=/System/Library/Frameworks/Car
REZ_ARGS=-append -i $RINCLUDES -d SystemSevenOrLater=1 -useDF
STANDALONE_LIBDIR=`pwd`/$(APP)/Contents/$(APP_PLATFORM)/lib
OSACOMPILE=/usr/bin/osacompile
-SETFILE=/Developer/Tools/Setfile
+SETFILE=/Developer/Tools/SetFile
# On a MacOS X machine, you run rez, osacompile, and setfile to
# produce the script executable, which has both a data fork and a
@@ -651,18 +651,15 @@ $(APP)/.build_plugins: $(APP)/.build boc
$(LIBTOOL) --finish $(STANDALONE_LIBDIR);
touch $(APP)/.build_plugins
-install_macosx: all download_dlx @INSTALL_DOCBOOK_VAR@
+install_macosx: all @INSTALL_DOCBOOK_VAR@
-mkdir -p $(prefix)
for i in $(INSTALL_LIST_MACOSX); do if test -e $$i; then $(CPMAC) -r $$i $(prefix); else $(CPMAC) -r $(srcdir)/$$i $(prefix); fi; done
$(CPMAC) $(srcdir)/.bochsrc $(prefix)/bochsrc-sample.txt
-mkdir $(prefix)/keymaps
$(CPMAC) $(srcdir)/gui/keymaps/*.map $(prefix)/keymaps
- cat $(DLXLINUX_TAR) | (cd $(prefix) && tar xzvf -)
- dlxrc=$(prefix)/dlxlinux/bochsrc.txt; mv "$$dlxrc" "$$dlxrc.orig" && sed < "$$dlxrc.orig" 's/\/usr\/local\/bochs\/latest/../' > "$$dlxrc" && rm -f "$$dlxrc.orig"
mv $(prefix)/README $(prefix)/README.orig
cat $(srcdir)/build/macosx/README.macosx-binary $(prefix)/README.orig > $(prefix)/README
rm -f $(prefix)/README.orig
- $(CPMAC) $(SCRIPT_EXEC) $(prefix)/dlxlinux
for i in $(TEXT_FILE_LIST); do mv $(prefix)/$$i $(prefix)/$$i.txt; done
###########################################