Bug 41082 - New port: emulators/dosbox - emulator of a PC running DOS
Summary: New port: emulators/dosbox - emulator of a PC running DOS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-28 10:20 UTC by Knyghtmare
Modified: 2003-05-01 23:19 UTC (History)
0 users

See Also:


Attachments
dosbox.shar (4.15 KB, text/plain)
2002-07-28 10:20 UTC, Knyghtmare
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Knyghtmare 2002-07-28 10:20:01 UTC
     DOSBox is an emulator of a PC with dos.
The main focus of this project is emulating old dos games using the 
local file system for files.
Comment 1 stijn 2002-09-03 08:22:36 UTC
Hi,

Here's an updated shar of the port that
- updates dosbox to 0.55
- fixes the TAB/space whitespace problem
- removes the patches in favor of REINPLACE_CMD
- adds a patch for the newly needed dosbox.lang

portlint -a does not complain on this port.

Thanks for doing the port, it saved me some time :)

--Stijn

--------------------------- BEGIN SHAR -------------------------------------

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	dosbox
#	dosbox/Makefile
#	dosbox/distinfo
#	dosbox/pkg-comment
#	dosbox/pkg-plist
#	dosbox/pkg-descr
#	dosbox/files
#	dosbox/files/patch-src::misc::messages.cpp
#
echo c - dosbox
mkdir -p dosbox > /dev/null 2>&1
echo x - dosbox/Makefile
sed 's/^X//' >dosbox/Makefile << 'END-of-dosbox/Makefile'
X# New ports collection makefile for:   dosbox
X# Date created:        28 July 2002
X# Whom:                Tom Carrick <knyghtmare@knyghtmare.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	dosbox
XPORTVERSION=	0.55
XCATEGORIES=	emulators
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
X
XMAINTAINER=	knyghtmare@knyghtmare.com
X
XLIB_DEPENDS=	SDL-1.1.4:${PORTSDIR}/devel/sdl12
X
XSDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config
X
XGNU_CONFIGURE=	yes
XCONFIGURE_ENV=	SDL_CONFIG="${SDL_CONFIG}"
X
XUSE_REINPLACE=	yes
X
Xpre-patch:
X	${REINPLACE_CMD} -e 's#<SDL/#<SDL11/#' ${WRKSRC}/include/timer.h \
X		${WRKSRC}/src/gui/sdlmain.cpp ${WRKSRC}/src/hardware/mixer.cpp
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/src/dosbox ${PREFIX}/bin/dosbox
X	${MKDIR} ${PREFIX}/share/dosbox
X	${INSTALL_DATA} ${WRKSRC}/src/dosbox.lang ${PREFIX}/share/dosbox
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${PREFIX}/share/doc/dosbox
X	${INSTALL_DATA} ${WRKSRC}/NEWS ${PREFIX}/share/doc/dosbox
X	${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/dosbox
X.endif
X
Xpost-install:
X	@${ECHO_CMD} "================================================="
X	@${ECHO_CMD} "Be sure to read the README for usage instructions"
X	@${ECHO_CMD} "located in ${PREFIX}/share/doc/dosbox by default"
X	@${ECHO_CMD} "================================================="
X
X.include <bsd.port.mk>
END-of-dosbox/Makefile
echo x - dosbox/distinfo
sed 's/^X//' >dosbox/distinfo << 'END-of-dosbox/distinfo'
XMD5 (dosbox-0.55.tar.gz) = b3daf143cb27f9d43b0683c39e26951a
END-of-dosbox/distinfo
echo x - dosbox/pkg-comment
sed 's/^X//' >dosbox/pkg-comment << 'END-of-dosbox/pkg-comment'
XAn emulator of a PC with DOS
END-of-dosbox/pkg-comment
echo x - dosbox/pkg-plist
sed 's/^X//' >dosbox/pkg-plist << 'END-of-dosbox/pkg-plist'
Xbin/dosbox
Xshare/dosbox/dosbox.lang
X@dirrm share/dosbox
X%%PORTDOCS%%share/doc/dosbox/NEWS
X%%PORTDOCS%%share/doc/dosbox/README
X%%PORTDOCS%%@dirrm share/doc/dosbox
END-of-dosbox/pkg-plist
echo x - dosbox/pkg-descr
sed 's/^X//' >dosbox/pkg-descr << 'END-of-dosbox/pkg-descr'
XDOSBox is an emulator of a PC with dos.
XThe main focus of this project is emulating old dos games using the
Xlocal file system for files.
X
XCurrently emulated is:
X
Xo CPU:286/386 realmode
Xo GFX:VGA/EGS/CGA
Xo SND:PC-Speaker/Tandy 3-Voice/Adlib/SoundBlaster
Xo MSC:Keyboard/Mouse
Xo DOS:Director FileSystem/XMS/EMS
X
XWWW: http://dosbox.zophar.net/
END-of-dosbox/pkg-descr
echo c - dosbox/files
mkdir -p dosbox/files > /dev/null 2>&1
echo x - dosbox/files/patch-src::misc::messages.cpp
sed 's/^X//' >dosbox/files/patch-src::misc::messages.cpp << 'END-of-dosbox/files/patch-src::misc::messages.cpp'
X--- src/misc/messages.cpp.orig	Tue Jul 30 15:13:10 2002
X+++ src/misc/messages.cpp	Tue Sep  3 09:09:20 2002
X@@ -102,6 +102,6 @@
X 	first_message=0;
X 	char filein[CROSS_LEN];
X 	strcpy(filein,dosbox_basedir);
X-	strcat(filein,"dosbox.lang");
X+	strcat(filein,"../share/dosbox/dosbox.lang");
X 	LoadMessageFile(filein);
X }
END-of-dosbox/files/patch-src::misc::messages.cpp
exit

--------------------------- END SHAR -------------------------------------
Comment 2 stijn 2002-09-03 08:38:15 UTC
Bah, didn't test enough before submitting. Apply the following patch to the
port directory after unpacking the previous shar to prevent dosbox from
bombing out.

Sorry for the confusion.

--Stijn

diff -ur dosbox/Makefile dosbox.new/Makefile
--- dosbox/Makefile	Tue Sep  3 09:36:23 2002
+++ dosbox.new/Makefile	Tue Sep  3 09:29:18 2002
@@ -22,9 +22,11 @@
 
 USE_REINPLACE=	yes
 
-pre-patch:
+post-patch:
 	${REINPLACE_CMD} -e 's#<SDL/#<SDL11/#' ${WRKSRC}/include/timer.h \
 		${WRKSRC}/src/gui/sdlmain.cpp ${WRKSRC}/src/hardware/mixer.cpp
+	${REINPLACE_CMD} -e "s#@@PREFIX@@#${PREFIX}#" \
+		${WRKSRC}/src/misc/messages.cpp
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/dosbox ${PREFIX}/bin/dosbox
diff -ur dosbox/files/patch-src::misc::messages.cpp dosbox.new/files/patch-src::misc::messages.cpp
--- dosbox/files/patch-src::misc::messages.cpp	Tue Sep  3 09:36:23 2002
+++ dosbox.new/files/patch-src::misc::messages.cpp	Tue Sep  3 09:29:34 2002
@@ -1,10 +1,12 @@
 --- src/misc/messages.cpp.orig	Tue Jul 30 15:13:10 2002
-+++ src/misc/messages.cpp	Tue Sep  3 09:09:20 2002
-@@ -102,6 +102,6 @@
++++ src/misc/messages.cpp	Tue Sep  3 09:29:12 2002
+@@ -101,7 +101,7 @@
+ 	/* Load the messages from "dosbox.lang file" */
  	first_message=0;
  	char filein[CROSS_LEN];
- 	strcpy(filein,dosbox_basedir);
+-	strcpy(filein,dosbox_basedir);
 -	strcat(filein,"dosbox.lang");
-+	strcat(filein,"../share/dosbox/dosbox.lang");
++	strcpy(filein,"@@PREFIX@@/share/dosbox/dosbox.lang");
++/*	strcat(filein,"dosbox.lang"); */
  	LoadMessageFile(filein);
  }
Comment 3 Knyghtmare 2002-09-03 10:37:38 UTC
Thanks for cleaning up the port and updating it. Seems to run fine, and
the dosbox.lang fix is better than what I thought of.

For what it's worth, the whitespace problem was most likely due to my
mail being screwed and having to submit it via the WWW script.

Due to the nature of dosbox, I'm unsure if it would run on alpha (and
would need ONLY_FOR_ARCHS= i386). However, I think I'm just being
paranoid, it should work since it uses SDL, right?
Comment 4 Munechika Sumikawa freebsd_committer freebsd_triage 2003-05-01 23:18:51 UTC
State Changed
From-To: open->closed

Commited, thanks.