Bug 183213 - emulators/dosbox: Fix build for FreeBSD 10.0
Summary: emulators/dosbox: Fix build for FreeBSD 10.0
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: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-22 19:50 UTC by Tom Carrick
Modified: 2013-10-23 23:21 UTC (History)
0 users

See Also:


Attachments
file.diff (681 bytes, patch)
2013-10-22 19:50 UTC, Tom Carrick
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Carrick 2013-10-22 19:50:00 UTC
Attached patch to fix building in clang, and thus FreeBSD 10.0

Fix: See patch

Patch attached with submission follows:
How-To-Repeat: Attempt to build port with clang
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-10-22 19:50:08 UTC
Class Changed
From-To: change-request->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Alex Kozlov freebsd_committer freebsd_triage 2013-10-23 19:08:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-10-23 23:15:23 UTC
Author: ak
Date: Wed Oct 23 22:15:15 2013
New Revision: 331434
URL: http://svnweb.freebsd.org/changeset/ports/331434

Log:
  - Fix build with clang on i386 [1]
  - Support STAGEDIR
  - Convert to new LIB_DEPENDS syntax
  - Add LICENSE
  
  PR:	ports/183213 [1]
  Submitted by:	Tom Carrick <knyght@gmail.com> (maintainer) [1]

Added:
  head/emulators/dosbox/files/patch-src-fpu-fpu_instructions_x86.h   (contents, props changed)
Modified:
  head/emulators/dosbox/Makefile

Modified: head/emulators/dosbox/Makefile
==============================================================================
--- head/emulators/dosbox/Makefile	Wed Oct 23 22:12:47 2013	(r331433)
+++ head/emulators/dosbox/Makefile	Wed Oct 23 22:15:15 2013	(r331434)
@@ -10,17 +10,17 @@ MASTER_SITES=	SF
 MAINTAINER=	knyght@gmail.com
 COMMENT=	Emulator of a PC with DOS
 
-LIB_DEPENDS=	png15:${PORTSDIR}/graphics/png
+LICENSE=	GPLv2
+
+LIB_DEPENDS=	libpng15.so:${PORTSDIR}/graphics/png
 
 GNU_CONFIGURE=	yes
 USE_SDL=	sdl net sound
-PLIST_FILES=	bin/dosbox share/pixmaps/dosbox.ico
+PLIST_FILES=	bin/dosbox man/man1/dosbox.1.gz share/pixmaps/dosbox.ico
 PORTDOCS=	NEWS README
 
-MAN1=		dosbox.1
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
-CPPFLAGS+=		-I${LOCALBASE}/include
 CONFIGURE_ARGS+=	--enable-core-inline
 
 DESKTOP_ENTRIES="DOSBox" "${COMMENT}" \
@@ -32,27 +32,18 @@ OPTIONS_RADIO_DEBUGGER=DEBUGGER_ENABLE D
 DEBUGGER_ENABLE_DESC=Enable internal debugger
 DEBUGGER_HEAVY_DESC=Enable internal debugger with extra features
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MDEBUGGER_ENABLE}
-CONFIGURE_ARGS+=	--enable-debug=yes
-.elif ${PORT_OPTIONS:MDEBUGGER_HEAVY}
-CONFIGURE_ARGS+=	--enable-debug=heavy
-.endif
+DEBUGGER_ENABLE_CONFIGURE_ON=	--enable-debug=yes
+DEBUGGER_HEAVY_CONFIGURE_ON=	--enable-debug=heavy
 
 post-patch:
 	@${REINPLACE_CMD} -e 's#\/usr\/share\/doc\/dosbox#${DOCSDIR}#g' \
 		${WRKSRC}/docs/dosbox.1
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/dosbox ${PREFIX}/bin/dosbox
-	${INSTALL_DATA} ${WRKSRC}/src/dosbox.ico ${PREFIX}/share/pixmaps/
-	${INSTALL_MAN} ${WRKSRC}/docs/dosbox.1 ${MAN1PREFIX}/man/man1/
-.if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/NEWS ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-.endif
+	${INSTALL_PROGRAM} ${WRKSRC}/src/dosbox ${STAGEDIR}${PREFIX}/bin/dosbox
+	${INSTALL_DATA} ${WRKSRC}/src/dosbox.ico ${STAGEDIR}${PREFIX}/share/pixmaps/
+	${INSTALL_MAN} ${WRKSRC}/docs/dosbox.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Added: head/emulators/dosbox/files/patch-src-fpu-fpu_instructions_x86.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/dosbox/files/patch-src-fpu-fpu_instructions_x86.h	Wed Oct 23 22:15:15 2013	(r331434)
@@ -0,0 +1,24 @@
+Index: src/fpu/fpu_instructions_x86.h
+@@ -1162,12 +1162,12 @@
+ 
+ static void FPU_FLD_I16(PhysPt addr,Bitu store_to) {
+ 	fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr);
+-	FPUD_LOAD(fild,WORD,)
++	FPUD_LOAD(fild,WORD,s)
+ }
+ 
+ static void FPU_FLD_I16_EA(PhysPt addr) {
+ 	fpu.p_regs[8].m1 = (Bit32u)mem_readw(addr);
+-	FPUD_LOAD_EA(fild,WORD,)
++	FPUD_LOAD_EA(fild,WORD,s)
+ }
+ 
+ static void FPU_FLD_I32(PhysPt addr,Bitu store_to) {
+@@ -1212,7 +1212,7 @@
+ }
+ 
+ static void FPU_FST_I16(PhysPt addr) {
+-	FPUD_STORE(fistp,WORD,)
++	FPUD_STORE(fistp,WORD,s)
+ 	mem_writew(addr,(Bit16u)fpu.p_regs[8].m1);
+ }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Alex Kozlov freebsd_committer freebsd_triage 2013-10-23 23:21:49 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!