View | Details | Raw Unified | Return to bug 241135 | Differences between
and this patch

Collapse All | Expand All

(-)bsvc/Makefile (-28 / +14 lines)
Lines 1-39 Link Here
1
# Created by: tenser@spitfire.ecsel.psu.edu
1
# Created by: tenser@spitfire.ecsel.psu.edu
2
# $FreeBSD: head/emulators/bsvc/Makefile 418840 2016-07-20 15:33:20Z mat $
2
# $FreeBSD: $
3
3
4
PORTNAME=	bsvc
4
PORTNAME=	bsvc
5
PORTVERSION=	2.1
5
DISTVERSIONPREFIX=	v
6
PORTREVISION=	3
6
DISTVERSION=	2.4.6
7
CATEGORIES=	emulators tk
7
CATEGORIES=     emulators tk
8
MASTER_SITES=	SUNSITE/system/emulators
9
DISTFILES=	${DISTNAME}-src${EXTRACT_SUFX}
10
8
11
MAINTAINER=	ports@FreeBSD.org
9
MAINTAINER=	cross@gajendra.net
12
COMMENT=	Extensible hardware simulation framework with MC68K support
10
COMMENT=	Extensible hardware simulation framework with MC68K support
13
11
14
WRKSRC=		${WRKDIR}/${DISTNAME}/src
12
LICENSE=	LGPL21
15
MAKE_ENV=	PROJECT_BASE=${STAGEDIR}${PREFIX} WRKSRC=${WRKSRC} WISH=${WISH}
16
13
17
USES=		tk
14
USES=		tk gmake
18
MAKE_JOBS_UNSAFE=	yes
19
15
20
pre-patch:
16
USE_GITHUB=	yes
21
	@${CP} ${WRKSRC}/Makefile.Linux ${WRKSRC}/Makefile
17
GH_ACCOUNT=	BSVC
18
USE_CSTD=	c11
19
USE_CXXSTD=	c++11
22
20
23
post-patch:
21
WRKSRC_SUBDIR=	src
24
22
MAKEFILE=	Makefile.BSD
25
.for cfile in codegen.c listing.c object.c main.c
23
MAKE_ARGS+=	WISH=wish${TK_VER}
26
	@${REINPLACE_CMD} -e 's|exit()|exit(1)|g' ${WRKSRC}/Assemblers/68kasm/${cfile}
27
.endfor
28
	@${REINPLACE_CMD} -e 's|^#endif.*$$|#endif|g' \
29
		${WRKSRC}/Assemblers/68kasm/instlookup.c
30
31
	@${FIND} ${WRKSRC} -name "*.[ch]xx" -exec \
32
		${REINPLACE_CMD} -e \
33
			's/iostream\.h/iostream/; \
34
			 s/strstream\.h/strstream/; \
35
			 s/fstream\.h/fstream/' \{\} \;
36
	@${FIND} ${WRKSRC} -name Makefile -exec \
37
		${REINPLACE_CMD} -e 's/make/${MAKE}/' \{\} \;
38
24
39
.include <bsd.port.mk>
25
.include <bsd.port.mk>
(-)bsvc/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (bsvc-2.1-src.tar.gz) = 78b925af31cc1a1d76fcb68390ab6aa9bcbcd555032c4fe2641571a29cc444d5
1
TIMESTAMP = 1571145972
2
SIZE (bsvc-2.1-src.tar.gz) = 629638
2
SHA256 (BSVC-bsvc-v2.4.6_GH0.tar.gz) = 4bc2da5c9769114eb99da72fe46344f86885e3d2ee3e134c66748882cb1a5d0e
3
SIZE (BSVC-bsvc-v2.4.6_GH0.tar.gz) = 607745
(-)bsvc/files/patch-Assemblers__68kasm__assemble.c (-19 lines)
Lines 1-19 Link Here
1
--- ./Assemblers/68kasm/assemble.c.orig	1998-11-09 04:39:28.000000000 +0100
2
+++ ./Assemblers/68kasm/assemble.c	2012-08-24 12:34:05.509913887 +0200
3
@@ -62,6 +62,8 @@
4
 extern FILE *listFile;		/* Listing file */
5
 extern char listFlag;
6
 
7
+void assemble(char *line, int *errorPtr);
8
+
9
 
10
 processFile()
11
 {
12
@@ -106,6 +108,7 @@
13
 }
14
 
15
 
16
+void
17
 assemble(line, errorPtr)
18
 char *line;
19
 int *errorPtr;
(-)bsvc/files/patch-Assemblers__68kasm__build.c (-18 lines)
Lines 1-18 Link Here
1
--- ./Assemblers/68kasm/build.c.orig	1998-11-09 04:39:28.000000000 +0100
2
+++ ./Assemblers/68kasm/build.c	2012-08-24 12:31:42.849913226 +0200
3
@@ -58,6 +58,7 @@
4
  *
5
  ***********************************************************************/
6
 
7
+void
8
 move(mask, size, source, dest, errorPtr)
9
 int mask, size;
10
 opDescriptor *source, *dest;
11
@@ -216,6 +217,7 @@
12
  ***********************************************************************/
13
 
14
 
15
+void
16
 immedInst(mask, size, source, dest, errorPtr)
17
 int mask, size;
18
 opDescriptor *source, *dest;
(-)bsvc/files/patch-Assemblers__68kasm__directive.c (-50 lines)
Lines 1-50 Link Here
1
--- ./Assemblers/68kasm/directive.c.orig	1998-11-09 04:39:28.000000000 +0100
2
+++ ./Assemblers/68kasm/directive.c	2012-08-24 12:30:34.710913465 +0200
3
@@ -53,6 +53,7 @@
4
  *
5
  ***********************************************************************/
6
 
7
+void
8
 org(size, label, op, errorPtr)
9
 int size;
10
 char *label, *op;
11
@@ -115,6 +116,7 @@
12
  *
13
  ***********************************************************************/
14
 
15
+void
16
 equ(size, label, op, errorPtr)
17
 int size;
18
 char *label, *op;
19
@@ -157,6 +159,7 @@
20
  *
21
  ***********************************************************************/
22
 
23
+void
24
 set(size, label, op, errorPtr)
25
 int size;
26
 char *label, *op;
27
@@ -210,6 +213,7 @@
28
  *
29
  ***********************************************************************/
30
 
31
+void
32
 dc(size, label, op, errorPtr)
33
 int size;
34
 char *label, *op;
35
@@ -319,6 +323,7 @@
36
  *
37
  ***********************************************************************/
38
 
39
+void
40
 dcb(size, label, op, errorPtr)
41
 int size;
42
 char *label, *op;
43
@@ -385,6 +390,7 @@
44
  *
45
  ***********************************************************************/
46
 
47
+void
48
 ds(size, label, op, errorPtr)
49
 int size;
50
 char *label, *op;
(-)bsvc/files/patch-Assemblers__68kasm__listing.c (-10 lines)
Lines 1-10 Link Here
1
--- ./Assemblers/68kasm/listing.c.orig	2012-08-24 12:25:01.061915000 +0200
2
+++ ./Assemblers/68kasm/listing.c	2012-08-24 12:32:19.960913679 +0200
3
@@ -108,6 +108,7 @@
4
 }
5
 
6
 
7
+void
8
 listObj(data, size)
9
 int data, size;
10
 {
(-)bsvc/files/patch-Assemblers__68kasm__movem.c (-18 lines)
Lines 1-18 Link Here
1
--- ./Assemblers/68kasm/movem.c.orig	1998-11-09 04:39:28.000000000 +0100
2
+++ ./Assemblers/68kasm/movem.c	2012-08-24 12:28:10.639913796 +0200
3
@@ -62,6 +62,7 @@
4
 char *evalList();
5
 
6
 
7
+void
8
 movem(size, label, op, errorPtr)
9
 int size;
10
 char *label, *op;
11
@@ -167,6 +168,7 @@
12
 }
13
 
14
 
15
+void
16
 reg(size, label, op, errorPtr)
17
 int size;
18
 char *label, *op;
(-)bsvc/files/patch-Tools__xtermpipe__xtermpipe.cxx (-10 lines)
Lines 1-10 Link Here
1
--- ./Tools/xtermpipe/xtermpipe.cxx.orig	2012-08-24 12:25:01.293914000 +0200
2
+++ ./Tools/xtermpipe/xtermpipe.cxx	2012-08-24 12:35:23.714913382 +0200
3
@@ -40,6 +40,7 @@
4
     return(1);
5
 }
6
 
7
+int
8
 main()
9
 {
10
   int read_id, write_id;
(-)bsvc/files/patch-Tools__xtermpipe__xtermpipe.cxx_2 (-11 lines)
Lines 1-11 Link Here
1
--- Tools/xtermpipe/xtermpipe.cxx.orig	Mon Nov  9 12:39:28 1998
2
+++ Tools/xtermpipe/xtermpipe.cxx	Sat Feb 12 11:02:02 2000
3
@@ -31,7 +31,7 @@
4
     select(pipe_id + 1, (int*)&readfds, (int*)&writefds, (int*)&exceptfds,
5
            (void*)0);
6
 # else
7
-    select(pipe_id + 1, &readfds, &writefds, &exceptfds, (void*)0);
8
+    select(pipe_id + 1, &readfds, &writefds, &exceptfds, (struct timeval*)0);
9
 # endif
10
 
11
   if(FD_ISSET(0, &readfds))
(-)bsvc/files/patch-UI__Makefile (-48 lines)
Lines 1-48 Link Here
1
--- UI/Makefile.orig	1998-11-09 04:39:29.000000000 +0100
2
+++ UI/Makefile	2013-11-05 17:30:19.000000000 +0100
3
@@ -20,31 +20,31 @@
4
 	echo '# export TCL_LIBRARY TK_LIBRARY' >> bsvc
5
 	echo 'ARGS=$$*' >> bsvc
6
 	echo 'export ARGS' >> bsvc
7
-	echo 'exec $(WISH) -f $(INSTALL_DIR)/UI/bsvc.tk' >> bsvc
8
+	echo 'exec $(WISH) -f $(PREFIX)/lib/bsvc/bsvc.tk' >> bsvc
9
 	chmod +x bsvc
10
 
11
 bsvc.tk: Makefile
12
 	echo '#!$(WISH) -f' > bsvc.tk
13
-	echo 'set Program(InstallDir) $(INSTALL_DIR)' >> bsvc.tk
14
-	echo 'set Program(BitmapDir) $$Program(InstallDir)/UI/bitmaps' >> bsvc.tk
15
-	echo 'set Program(HelpDir) $$Program(InstallDir)/UI/help' >> bsvc.tk
16
-	echo 'set Program(LibDir) $$Program(InstallDir)/UI' >> bsvc.tk
17
+	echo 'set Program(InstallDir) $(PREFIX)' >> bsvc.tk
18
+	echo 'set Program(BitmapDir) $(PREFIX)/lib/bsvc/bitmaps' >> bsvc.tk
19
+	echo 'set Program(HelpDir) $(PREFIX)/lib/bsvc/help' >> bsvc.tk
20
+	echo 'set Program(LibDir) $(PREFIX)/lib/bsvc' >> bsvc.tk
21
 	echo 'set Program(WWWBrowser) "$(WWW_BROWSER)"' >> bsvc.tk
22
 	echo 'set Program(WWWHomePage) "$(WWW_HOME_PAGE)"' >> bsvc.tk
23
 	echo 'set Program(StopIndicator) C:\\BSVC\\bin\\STOP' >> bsvc.tk
24
 	echo 'if {$$tcl_version >= 7.5 && $$tcl_platform(platform) == "windows"} {' >> bsvc.tk
25
-	echo '  option readfile $$Program(InstallDir)/UI/bsvc.win 40' >> bsvc.tk
26
+	echo '  option readfile $(PREFIX)/lib/bsvc/bsvc.win 40' >> bsvc.tk
27
 	echo '} else {' >> bsvc.tk
28
-	echo '  option readfile $$Program(InstallDir)/UI/bsvc.ad 40' >> bsvc.tk
29
+	echo '  option readfile $(PREFIX)/lib/bsvc/bsvc.ad 40' >> bsvc.tk
30
 	echo '}' >> bsvc.tk
31
-	echo 'source $$Program(InstallDir)/UI/main.tk' >> bsvc.tk
32
+	echo 'source $(PREFIX)/lib/bsvc/main.tk' >> bsvc.tk
33
 
34
 install: bsvc bsvc.tk
35
-	$(MKDIR) $(INSTALL_DIR)/UI
36
-	$(MKDIR) $(INSTALL_DIR)/UI/bitmaps
37
-	$(MKDIR) $(INSTALL_DIR)/UI/help
38
-	$(INSTALL) *.tk *.ad $(INSTALL_DIR)/UI
39
-	$(INSTALL) bitmaps/* $(INSTALL_DIR)/UI/bitmaps
40
-	$(INSTALL) help/* $(INSTALL_DIR)/UI/help
41
+	$(MKDIR) $(PROJECT_BASE)/lib/bsvc
42
+	$(MKDIR) $(PROJECT_BASE)/lib/bsvc/bitmaps
43
+	$(MKDIR) $(PROJECT_BASE)/lib/bsvc/help
44
+	$(INSTALL) *.tk *.ad $(PROJECT_BASE)/lib/bsvc
45
+	$(INSTALL) bitmaps/* $(PROJECT_BASE)/lib/bsvc/bitmaps
46
+	$(INSTALL) help/* $(PROJECT_BASE)/lib/bsvc/help
47
 	$(INSTALL) bsvc $(INSTALL_DIR)
48
 
(-)bsvc/files/patch-sim68000__main.cxx (-10 lines)
Lines 1-10 Link Here
1
--- ./sim68000/main.cxx.orig	2012-08-24 12:25:03.072914000 +0200
2
+++ ./sim68000/main.cxx	2012-08-24 12:37:47.584914549 +0200
3
@@ -19,6 +19,7 @@
4
 #include "devices/DeviceRegistry.hxx"
5
 #include "loader/Loader.hxx"
6
 
7
+int
8
 main()
9
 {
10
   BasicCPU& processor = *(new m68000);
(-)bsvc/files/patch-sim68300__cpu__Makefile (-11 lines)
Lines 1-11 Link Here
1
--- sim68000/cpu/Makefile.orig	Mon Sep  6 21:46:13 1999
2
+++ sim68000/cpu/Makefile	Mon Sep  6 21:46:36 1999
3
@@ -28,7 +28,7 @@
4
 	$(CC) $(INCLUDES) -o instruction instruction.c
5
 
6
 m68000DecodeTable.hxx: instruction instruction.list
7
-	$(PROJECT_BASE)/src/sim68000/cpu/instruction  
8
+	$(WRKSRC)/sim68000/cpu/instruction  
9
 
10
 clean:
11
 	rm -f *.o $(LIBRARY) instruction
(-)bsvc/files/patch-sim68360__cpu__Makefile (-11 lines)
Lines 1-11 Link Here
1
--- sim68360/cpu/Makefile.orig	Mon Sep  6 21:47:20 1999
2
+++ sim68360/cpu/Makefile	Mon Sep  6 21:47:39 1999
3
@@ -31,7 +31,7 @@
4
 	$(CC) $(INCLUDES) -o instruction instruction.c
5
 
6
 cpu32DecodeTable.hxx: instruction instruction.list
7
-	$(PROJECT_BASE)/src/sim68360/cpu/instruction  
8
+	$(WRKSRC)/sim68360/cpu/instruction  
9
 
10
 clean:
11
 	rm -f *.o $(LIBRARY) instruction
(-)bsvc/files/patch-sim68360__main.cxx (-10 lines)
Lines 1-10 Link Here
1
--- ./sim68360/main.cxx.orig	2012-08-24 12:25:01.322915000 +0200
2
+++ ./sim68360/main.cxx	2012-08-24 12:40:04.506914092 +0200
3
@@ -22,6 +22,7 @@
4
 #include "devices/DeviceRegistry.hxx"
5
 #include "loader/Loader.hxx"
6
 
7
+int
8
 main()
9
 {
10
   BasicCPU& processor = *(new cpu32);
(-)bsvc/files/patch-src-Framework-Tools.hxx (-10 lines)
Lines 1-10 Link Here
1
--- Framework/Tools.hxx.orig	Sun Nov  3 12:12:32 2002
2
+++ Framework/Tools.hxx	Sun Nov  3 12:13:28 2002
3
@@ -18,6 +18,7 @@
4
 #define TOOLS_HXX
5
 
6
 #include <string>
7
+#include <ctype.h>
8
 
9
 #ifdef USE_STD
10
   using namespace std;
(-)bsvc/files/patch-src-Makefile (-19 lines)
Lines 1-19 Link Here
1
--- Makefile.orig	Sun Nov  3 13:08:10 2002
2
+++ Makefile	Sun Nov  3 13:08:55 2002
3
@@ -6,12 +6,12 @@
4
 ###############################################################################
5
 
6
 ## C and C++ compiler to use
7
-CC = gcc
8
-CXX = g++
9
+CC ?= gcc
10
+CXX ?= g++
11
 
12
 ## C and C++ compiler flags
13
-CCFLAGS = -O
14
-CXXFLAGS = -O -ansi -Wall -D_G_NO_EXTERN_TEMPLATES
15
+CCFLAGS = $(CFLAGS)
16
+CXXFLAGS += -ansi -D_G_NO_EXTERN_TEMPLATES -DUSE_STD
17
 
18
 ## System Includes
19
 SYS_INCLUDES =
(-)bsvc/files/patch-src-Makefile.common (-55 lines)
Lines 1-55 Link Here
1
--- Makefile.common.orig	Mon Nov  9 04:39:28 1998
2
+++ Makefile.common	Sun Nov  3 12:07:21 2002
3
@@ -12,14 +12,14 @@
4
 ###############################################################################
5
 
6
 ## Base Directory of the BSVC distribution
7
-PROJECT_BASE = /home/bwmott/projects/bsvc/development/bsvc
8
+PROJECT_BASE? = /home/bwmott/projects/bsvc/development/bsvc
9
 
10
 ## Directory to install the BSVC system
11
 INSTALL_DIR = $(PROJECT_BASE)/bin
12
 
13
 ## Name or path and Name of the Tcl/Tk "wish" executable
14
 #WISH        = /usr/bin/wish
15
-WISH         = wish
16
+WISH         ?= wish8.4
17
 
18
 ## Name of WWW Browser and URL of the BSVC Home Page (or blank)
19
 WWW_BROWSER   = 
20
@@ -37,7 +37,7 @@
21
 ######################### END OF CONFIGURATION ################################
22
 
23
 INDEPENDENT_PARMS = PROJECT_BASE='$(PROJECT_BASE)' WISH='$(WISH)' \
24
-	INCLUDES='-I$(PROJECT_BASE)/src/Framework $(SYS_INCLUDE)' \
25
+	INCLUDES='-I$(WRKSRC)/Framework $(SYS_INCLUDE)' \
26
 	LIBS='$(SYS_LIBS)' INSTALL_DIR='$(INSTALL_DIR)' \
27
 	WWW_BROWSER='$(WWW_BROWSER)' WWW_HOME_PAGE='$(WWW_HOME_PAGE)'
28
 
29
@@ -51,7 +51,7 @@
30
 		echo ""; \
31
 		echo "------ Building: $$dir"; \
32
 		cd $$dir; \
33
-		make $(MAKEPARMS) MAKEPARMS="$(MAKEPARMS)" all; \
34
+		$(MAKE) $(MAKEPARMS) MAKEPARMS="$(MAKEPARMS)" all; \
35
 		if [ $$? -eq 0 ] ; \
36
 		then \
37
 			cd ..; \
38
@@ -67,7 +67,7 @@
39
 		echo ""; \
40
 		echo "------ Installing: $$dir"; \
41
 		cd $$dir; \
42
-		make $(MAKEPARMS) MAKEPARMS="$(MAKEPARMS)" install; \
43
+		$(MAKE) $(MAKEPARMS) MAKEPARMS="$(MAKEPARMS)" install; \
44
 		if [ $$? -eq 0 ] ; \
45
 		then \
46
 			cd ..; \
47
@@ -82,7 +82,7 @@
48
 		echo ""; \
49
 		echo "------ Cleaning: $$dir"; \
50
 		cd $$dir; \
51
-		make $(MAKEPARMS) MAKEPARMS="$(MAKEPARMS)" clean; \
52
+		$(MAKE) $(MAKEPARMS) MAKEPARMS="$(MAKEPARMS)" clean; \
53
 		if [ $$? -eq 0 ] ; \
54
 		then \
55
 			cd ..; \
(-)bsvc/files/patch-src-sim68360-loader-Loader.cxx (-11 lines)
Lines 1-11 Link Here
1
--- sim68360/loader/Loader.cxx.orig	Sun Nov  3 12:25:40 2002
2
+++ sim68360/loader/Loader.cxx	Sun Nov  3 12:25:52 2002
3
@@ -26,7 +26,7 @@
4
   string error;
5
 
6
   // Open the file for reading
7
-  #ifdef WIN32
8
+  #ifdef USE_STD
9
     fstream file(filename, ios::in);
10
   #else
11
     fstream file(filename, ios::in | ios::nocreate);
(-)bsvc/pkg-descr (-2 / +4 lines)
Lines 1-4 Link Here
1
BSVC is an extensible simulator framework for microprocessor
1
BSVC is an extensible simulator framework for microprocessor
2
design and testing.  It comes with a simulator and assembler
2
design and testing.  It comes with a simulator and assembler
3
for the Motorola MC68k family of microprocessors, and supplies
3
for the Motorola MC68k family of microprocessors, and provides
4
a graphical user interface for simulation runs.
4
a graphical user interface.
5
6
WWW: https://github.com/BSVC/bsvc
(-)bsvc/pkg-plist (-30 lines)
Lines 1-30 Link Here
1
bin/68kasm
2
bin/xtermpipe
3
bin/bsvc
4
bin/sim68000
5
bin/sim68360
6
lib/bsvc/bitmaps/Down.xbm
7
lib/bsvc/bitmaps/bsvc.gif
8
lib/bsvc/bitmaps/bspin.gif
9
lib/bsvc/bitmaps/wait2.xbm
10
lib/bsvc/bitmaps/wait1.xbm
11
lib/bsvc/bitmaps/wait0.xbm
12
lib/bsvc/bitmaps/wait.xbm
13
lib/bsvc/bitmaps/memicon.xbm
14
lib/bsvc/bitmaps/listicon.xbm
15
lib/bsvc/bitmaps/bsvcicon.xbm
16
lib/bsvc/bitmaps/Up.xbm
17
lib/bsvc/bitmaps/PageUp.xbm
18
lib/bsvc/bitmaps/PageDown.xbm
19
lib/bsvc/bitmaps/wait3.xbm
20
lib/bsvc/help/license
21
lib/bsvc/BtkFile.tk
22
lib/bsvc/tools.tk
23
lib/bsvc/memory.tk
24
lib/bsvc/main.tk
25
lib/bsvc/listing.tk
26
lib/bsvc/license.tk
27
lib/bsvc/device.tk
28
lib/bsvc/bsvc.tk
29
lib/bsvc/breakpt.tk
30
lib/bsvc/bsvc.ad

Return to bug 241135