aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2014-08-09 16:03:35 +0800
committerjoerg <joerg@FreeBSD.org>2014-08-09 16:03:35 +0800
commit4694a5fb0dd6124b9d3a045e549c966b01078a2c (patch)
tree21e07c623f3043bc8d2213f609b11451fdb8ebec /emulators
parent40c8c9c618b132e39f3b78841106d6c1317d9e1e (diff)
downloadfreebsd-ports-gnome-4694a5fb0dd6124b9d3a045e549c966b01078a2c.tar.gz
freebsd-ports-gnome-4694a5fb0dd6124b9d3a045e549c966b01078a2c.tar.zst
freebsd-ports-gnome-4694a5fb0dd6124b9d3a045e549c966b01078a2c.zip
Add stage support.
Fix a bug when running in a 64-bit environment that made it crash immediately.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/pcemu/Makefile19
-rw-r--r--emulators/pcemu/files/patch-aa28
-rw-r--r--emulators/pcemu/files/patch-af19
-rw-r--r--emulators/pcemu/files/patch-ag31
-rw-r--r--emulators/pcemu/pkg-plist5
5 files changed, 53 insertions, 49 deletions
diff --git a/emulators/pcemu/Makefile b/emulators/pcemu/Makefile
index 2c0a7e09a826..b9dbd7482920 100644
--- a/emulators/pcemu/Makefile
+++ b/emulators/pcemu/Makefile
@@ -5,21 +5,11 @@ PORTNAME= pcemu
PORTVERSION= 1.01b
PORTREVISION= 3
CATEGORIES= emulators
-#
-# This could in theory become a chicken-and-egg problem. Anyway,
-# wcarchive is well connected, and the distfile hasn't been changed
-# for years now.
-MASTER_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/
-#
-# interface business GmbH is not so well connected, but Joerg's got
-# direct access there.
-MASTER_SITES+= ftp://ftp.interface-business.de/pub/outgoing/
-#
-# This is the original master site, but better use a well-connected server
-MASTER_SITES+= ftp://ftp.cs.bris.ac.uk/pub/users/hedley/
+MASTER_SITES= ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= joerg
DISTNAME= pcemu1.01alpha
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= joerg@FreeBSD.org
COMMENT= 8086 PC emulator, by David Hedley
BUILD_DEPENDS= bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf
@@ -27,8 +17,7 @@ RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
USE_XORG= x11 xext
-MAKE_ENV= FILESDIR=${FILESDIR}
+MAKE_ENV= FILESDIR=${FILESDIR} STAGEDIR=${STAGEDIR}
MAKE_ARGS= CC="${CC}"
-NO_STAGE= yes
.include <bsd.port.mk>
diff --git a/emulators/pcemu/files/patch-aa b/emulators/pcemu/files/patch-aa
index a572a0b609f3..83e45b843220 100644
--- a/emulators/pcemu/files/patch-aa
+++ b/emulators/pcemu/files/patch-aa
@@ -40,22 +40,22 @@
+
+ #mode 0666 is required for DriveA, alas
+ install: pcemu bootstrapper
-+ -mkdir ${LOCALPREFIX}/lib/pcemu \
-+ ${LOCALPREFIX}/lib/pcemu/doc \
-+ ${LOCALPREFIX}/lib/pcemu/font \
-+ ${LOCALPREFIX}/lib/pcemu/C \
-+ ${LOCALPREFIX}/bin
-+ install -c -s -o bin -g bin pcemu ${LOCALPREFIX}/bin/
++ -mkdir -p ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu \
++ ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/doc \
++ ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/font \
++ ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/C \
++ ${STAGEDIR}/${LOCALPREFIX}/bin
++ install -c -s -o bin -g bin pcemu ${STAGEDIR}/${LOCALPREFIX}/bin/
+ install -c -m 666 bootstrap/display.bin \
-+ ${LOCALPREFIX}/lib/pcemu/DriveA
++ ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/DriveA
+ install -c -m 644 BUGS CHANGES README TODO bootstrap/README.FreeBSD \
+ programs/lredir.readme \
-+ ${LOCALPREFIX}/lib/pcemu/doc/
-+ rm -f ${LOCALPREFIX}/lib/pcemu/doc/report.ps.gz
-+ gzip --best < report.ps > ${LOCALPREFIX}/lib/pcemu/doc/report.ps.gz
-+ rm -f ${LOCALPREFIX}/lib/pcemu/font/vga.pcf.Z
-+ bdftopcf vga.bdf | compress > ${LOCALPREFIX}/lib/pcemu/font/vga.pcf.Z
-+ mkfontdir ${LOCALPREFIX}/lib/pcemu/font
++ ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/doc/
++ rm -f ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/doc/report.ps.gz
++ gzip --best < report.ps > ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/doc/report.ps.gz
++ rm -f ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/font/vga.pcf.Z
++ bdftopcf vga.bdf | compress > ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/font/vga.pcf.Z
++ mkfontdir ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/font
+ install -c -m 644 programs/vga50.com programs/config.sys \
+ programs/dumpdisk.exe programs/lredir.exe programs/emufs.sys \
-+ ${LOCALPREFIX}/lib/pcemu/C
++ ${STAGEDIR}/${LOCALPREFIX}/lib/pcemu/C
diff --git a/emulators/pcemu/files/patch-af b/emulators/pcemu/files/patch-af
deleted file mode 100644
index 4bfbd8d72795..000000000000
--- a/emulators/pcemu/files/patch-af
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Makefile.orig Sun Apr 16 23:46:57 1995
---- Makefile Sun Apr 16 23:47:16 1995
-***************
-*** 97,103 ****
-
- #mode 0666 is required for DriveA, alas
- install: pcemu bootstrapper
-! -mkdir ${LOCALPREFIX}/lib/pcemu \
- ${LOCALPREFIX}/lib/pcemu/doc \
- ${LOCALPREFIX}/lib/pcemu/font \
- ${LOCALPREFIX}/lib/pcemu/C \
---- 97,103 ----
-
- #mode 0666 is required for DriveA, alas
- install: pcemu bootstrapper
-! -mkdir -p ${LOCALPREFIX}/lib/pcemu \
- ${LOCALPREFIX}/lib/pcemu/doc \
- ${LOCALPREFIX}/lib/pcemu/font \
- ${LOCALPREFIX}/lib/pcemu/C \
diff --git a/emulators/pcemu/files/patch-ag b/emulators/pcemu/files/patch-ag
new file mode 100644
index 000000000000..6df5a2cf632b
--- /dev/null
+++ b/emulators/pcemu/files/patch-ag
@@ -0,0 +1,31 @@
+--- xstuff.c~ 2014-08-09 05:59:27.430098652 +0200
++++ xstuff.c 2014-08-09 09:31:04.953397768 +0200
+@@ -20,6 +20,7 @@
+ #include <X11/Xatom.h>
+ #include <X11/keysym.h>
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #include "icon.h"
+ #include "xstuff.h"
+--- mfs.h~ 2014-08-09 05:59:27.458114679 +0200
++++ mfs.h 2014-08-09 09:28:43.352221269 +0200
+@@ -364,7 +364,7 @@
+ /* ### Split next difinition into read (..._r) and write (..._w) ### */
+ #define cds_rootlen_r(cds) (Read2Bytes(u_short,&cds[cds_rootlen_off]))
+ #define cds_rootlen_w(cds,x) (Write2Bytes(&cds[cds_rootlen_off], x))
+-#define drive_cds(dd) ((cds_t)(((int)cds_base)+(cds_record_size*(dd))))
++#define drive_cds(dd) ((cds_t)(((char *)cds_base)+(cds_record_size*(dd))))
+
+ #define CDS_FLAG_REMOTE 0x8000
+ #define CDS_FLAG_READY 0x4000
+--- mfs.c~ 2014-08-09 05:59:27.413113444 +0200
++++ mfs.c 2014-08-09 09:30:14.864291464 +0200
+@@ -519,6 +519,7 @@
+
+
+ struct mydirect *dos_readdir(DIR *);
++int calculate_drive_pointers(int dd);
+
+ #if DOSEMU
+ int
diff --git a/emulators/pcemu/pkg-plist b/emulators/pcemu/pkg-plist
index ce12d51da7ca..6c80c7d5e995 100644
--- a/emulators/pcemu/pkg-plist
+++ b/emulators/pcemu/pkg-plist
@@ -15,4 +15,7 @@ lib/pcemu/C/dumpdisk.exe
lib/pcemu/C/lredir.exe
lib/pcemu/C/emufs.sys
lib/pcemu/DriveA
-@unexec rm -rf %D/lib/pcemu
+@dirrmtry lib/pcemu/C
+@dirrmtry lib/pcemu/doc
+@dirrmtry lib/pcemu/font
+@dirrmtry lib/pcemu