Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0ffae4e7e | ||
|
|
b216363b28 | ||
|
|
d9abad8a47 | ||
|
|
548ada8fb2 | ||
|
|
a93e4e0f81 |
9 changed files with 198 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
simh-3.8.1-noroms.tar.gz
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: simh
|
||||
# $Id$
|
||||
NAME := simh
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
15
simh-3.8.0-gcc.patch
Normal file
15
simh-3.8.0-gcc.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- simh/makefile 2008-06-06 15:00:46.000000000 +0300
|
||||
+++ simh-mod/makefile 2008-12-24 11:39:05.000000000 +0200
|
||||
@@ -12,10 +12,10 @@
|
||||
OS_CCDEFS = -lrt -lm -D_GNU_SOURCE
|
||||
endif
|
||||
endif
|
||||
- CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I .
|
||||
+ CC = gcc -std=gnu89 -U__STRICT_ANSI__ -g $(OS_CCDEFS) $(OPT) -I .
|
||||
ifeq ($(USE_NETWORK),)
|
||||
else
|
||||
- NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a
|
||||
+ NETWORK_OPT = -DUSE_NETWORK -lpcap
|
||||
endif
|
||||
else
|
||||
#Win32 Environments
|
||||
12
simh-3.8.1-altair-segfault.patch
Normal file
12
simh-3.8.1-altair-segfault.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -Naur simh-3.8.1/ALTAIR/altair_dsk.c simh-3.8.1-mod/ALTAIR/altair_dsk.c
|
||||
--- simh-3.8.1/ALTAIR/altair_dsk.c 2005-08-26 21:47:22.000000000 +0300
|
||||
+++ simh-3.8.1-mod/ALTAIR/altair_dsk.c 2009-11-14 21:22:23.000000000 +0200
|
||||
@@ -325,6 +325,8 @@
|
||||
cur_sect[cur_disk]);*/
|
||||
pos = DSK_TRACSIZE * cur_track[cur_disk];
|
||||
pos += DSK_SECTSIZE * cur_sect[cur_disk];
|
||||
+ if ((uptr == NULL) || (uptr->fileref == NULL))
|
||||
+ return 0;
|
||||
rtn = fseek(uptr -> fileref, pos, 0);
|
||||
rtn = fread(dskbuf, 137, 1, uptr -> fileref);
|
||||
cur_byte[cur_disk] = 1;
|
||||
44
simh-3.8.1-ppc-defines.patch
Normal file
44
simh-3.8.1-ppc-defines.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
diff -Naur simh-3.8.1/BIN/pdp1 simh-3.8.1-mod/BIN/pdp1
|
||||
\ No newline at end of file
|
||||
diff -Naur simh-3.8.1/BIN/pdp11 simh-3.8.1-mod/BIN/pdp11
|
||||
\ No newline at end of file
|
||||
diff -Naur simh-3.8.1/BIN/pdp15 simh-3.8.1-mod/BIN/pdp15
|
||||
\ No newline at end of file
|
||||
diff -Naur simh-3.8.1/BIN/pdp4 simh-3.8.1-mod/BIN/pdp4
|
||||
\ No newline at end of file
|
||||
diff -Naur simh-3.8.1/BIN/pdp7 simh-3.8.1-mod/BIN/pdp7
|
||||
\ No newline at end of file
|
||||
diff -Naur simh-3.8.1/BIN/pdp8 simh-3.8.1-mod/BIN/pdp8
|
||||
\ No newline at end of file
|
||||
diff -Naur simh-3.8.1/BIN/pdp9 simh-3.8.1-mod/BIN/pdp9
|
||||
\ No newline at end of file
|
||||
diff -Naur simh-3.8.1/NOVA/eclipse_cpu.c simh-3.8.1-mod/NOVA/eclipse_cpu.c
|
||||
--- simh-3.8.1/NOVA/eclipse_cpu.c 2008-05-21 11:07:52.000000000 +0300
|
||||
+++ simh-3.8.1-mod/NOVA/eclipse_cpu.c 2010-01-09 16:28:08.000000000 +0200
|
||||
@@ -365,7 +365,7 @@
|
||||
|
||||
int32 XCT_mode = 0; /* 1 if XCT mode */
|
||||
int32 XCT_inst = 0; /* XCT instruction */
|
||||
-int32 PPC = -1;
|
||||
+int32 _PPC = -1;
|
||||
int32 AMASK = 077777;
|
||||
|
||||
struct ndev dev_table[64]; /* dispatch table */
|
||||
@@ -850,14 +850,14 @@
|
||||
}
|
||||
|
||||
if ((PC < 1 || PC > 077777) && Debug_Flags) {
|
||||
- if (PPC != -1) { /* Don't break on 1st instruction */
|
||||
- printf("\n<<Invalid PC=%o from %o>>\n\r", PC, PPC);
|
||||
+ if (_PPC != -1) { /* Don't break on 1st instruction */
|
||||
+ printf("\n<<Invalid PC=%o from %o>>\n\r", PC, _PPC);
|
||||
reason = STOP_IBKPT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
-PPC = PC;
|
||||
+_PPC = PC;
|
||||
|
||||
if (Debug_Flags) {
|
||||
if (!Tron) {
|
||||
13
simh-generate-tarball.sh
Executable file
13
simh-generate-tarball.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
VERSION=$1
|
||||
MAJOR=${VERSION:0:1}
|
||||
MINOR=${VERSION:2:1}
|
||||
PATCH=${VERSION:4:1}
|
||||
|
||||
unzip -o simhv$MAJOR$MINOR-$PATCH.zip -d simh-$VERSION
|
||||
rm simh-$VERSION/VAX/ka655*
|
||||
rm -Rf simh-$VERSION/Ibm1130
|
||||
sed -i -e "s/ ibm1130 / /" simh-$VERSION/makefile
|
||||
|
||||
tar -czvf simh-$VERSION-noroms.tar.gz simh-$VERSION
|
||||
112
simh.spec
Normal file
112
simh.spec
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
Name: simh
|
||||
Version: 3.8.1
|
||||
Release: 6%{?dist}
|
||||
Summary: A highly portable, multi-system emulator
|
||||
|
||||
Group: Applications/Emulators
|
||||
#The licensing is mostly MIT, but there is also some GPL+ (literally, v1+) code
|
||||
#in there, notably in AltairZ80/.
|
||||
#(each target is compiled into its own binary, so only AltairZ80 is GPL+)
|
||||
License: MIT and GPL+
|
||||
|
||||
URL: http://simh.trailing-edge.com/
|
||||
Source0: simh-%{version}-noroms.tar.gz
|
||||
# we use
|
||||
# this script to remove the roms binary and patented code before shipping it.
|
||||
# Download the upstream tarball and invoke this script while in the
|
||||
# tarball's directory:
|
||||
# ./simh-generate-tarball.sh 3.8.1
|
||||
Source1: simh-generate-tarball.sh
|
||||
|
||||
# prefer default gnu89 (ISO C90) as C99 is not fully supported by cc
|
||||
# and add fedora optflags
|
||||
Patch0: simh-3.8.0-gcc.patch
|
||||
Patch1: simh-3.8.1-altair-segfault.patch
|
||||
Patch2: simh-3.8.1-ppc-defines.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: libpcap-devel, dos2unix
|
||||
#Requires:
|
||||
|
||||
%description
|
||||
SIMH is a historical computer simulation system. It consists of simulators
|
||||
for many different computers, all written around a common user
|
||||
interface package and set of supporting libraries.
|
||||
SIMH can be used to simulate any computer system for which sufficient detail
|
||||
is available, but the focus to date has been on simulating computer systems
|
||||
of historic interest.
|
||||
|
||||
SIMH implements simulators for:
|
||||
|
||||
* Data General Nova, Eclipse
|
||||
* Digital Equipment Corporation PDP-1, PDP-4, PDP-7, PDP-8, PDP-9, PDP-10,
|
||||
PDP-11, PDP-15, VAX
|
||||
* GRI Corporation GRI-909, GRI-99
|
||||
* IBM 1401, 1620, 7090/7094, System 3
|
||||
* Interdata (Perkin-Elmer) 16b and 32b systems
|
||||
* Hewlett-Packard 2114, 2115, 2116, 2100, 21MX, 1000
|
||||
* Honeywell H316/H516
|
||||
* MITS Altair 8800, with both 8080 and Z80
|
||||
* Royal-Mcbee LGP-30, LGP-21
|
||||
* Scientific Data Systems SDS 940
|
||||
|
||||
%prep
|
||||
%setup -qn %{name}-%{version}
|
||||
%patch0 -p1 -b .gcc
|
||||
%patch1 -p1 -b .altair-segfault
|
||||
%patch2 -p1 -b .ppc-defines
|
||||
|
||||
|
||||
%build
|
||||
mkdir -p BIN
|
||||
make %{?_smp_mflags} -e OPT="%{optflags}" USE_NETWORK=1
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
for i in `ls BIN/`; do
|
||||
install -p -m 755 BIN/$i $RPM_BUILD_ROOT%{_bindir}/simh-$i
|
||||
done
|
||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
||||
for i in `find -iname "*.txt"`; do dos2unix -k $i; done
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/*
|
||||
%doc ALTAIR/altair.txt NOVA/eclipse.txt 0readme_38.txt 0readme_ethernet.txt
|
||||
%doc HP2100/hp2100_diag.txt I7094/i7094_bug_history.txt Interdata/id_diag.txt
|
||||
%doc PDP1/pdp1_diag.txt PDP10/pdp10_bug_history.txt PDP18B/pdp18b_diag.txt
|
||||
%doc S3/haltguide.txt S3/readme_s3.txt S3/system3.txt SDS/sds_diag.txt
|
||||
%doc VAX/vax780_bug_history.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Jan 09 2010 Lucian Langa <cooly@gnome.eu.org> - 3.8.1-6
|
||||
- add ppc defines patch
|
||||
|
||||
* Sat Jan 09 2010 Lucian Langa <cooly@gnome.eu.org> - 3.8.1-5
|
||||
- fix altair segfault
|
||||
|
||||
* Tue Nov 17 2009 Lucian Langa <cooly@gnome.eu.org> - 3.8.1-4
|
||||
- add correct source
|
||||
|
||||
* Fri Nov 13 2009 Lucian Langa <cooly@gnome.eu.org> - 3.8.1-3
|
||||
- update description
|
||||
|
||||
* Sun Nov 08 2009 Lucian Langa <cooly@gnome.eu.org> - 3.8.1-2
|
||||
- add correct generate script
|
||||
|
||||
* Wed Oct 08 2009 Lucian Langa <cooly@gnome.eu.org> - 3.8.1-1
|
||||
- remove separate docs
|
||||
- misc cleanups
|
||||
- new upstream release
|
||||
|
||||
* Wed Dec 24 2008 Lucian Langa <cooly@gnome.eu.org> - 3.8.0-1
|
||||
- initial spec file
|
||||
|
||||
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
3bca3f2b82392b89dc2f63900e6cfda5 simh-3.8.1-noroms.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue