diff --git a/.cvsignore b/.cvsignore index e69de29..9d21e9b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,2 @@ +bochs-2.1.tar.gz +dlxlinux4.tar.gz diff --git a/bochs-buildpaths.patch b/bochs-buildpaths.patch new file mode 100644 index 0000000..3cea9c3 --- /dev/null +++ b/bochs-buildpaths.patch @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2003-10-31 22:50:04.000000000 +0200 ++++ Makefile.in 2003-11-30 00:35:45.000000000 +0200 +@@ -409,7 +409,7 @@ + $(CHMOD) 755 $(DESTDIR)$(sharedir)/dlxlinux + $(GZIP) $(DESTDIR)$(sharedir)/dlxlinux/hd10meg.img + $(CHMOD) 644 $(DESTDIR)$(sharedir)/dlxlinux/* +- for i in bochs-dlx; do cp $(srcdir)/build/linux/$$i $(bindir)/$$i; $(CHMOD) 755 $(DESTDIR)$(bindir)/$$i; done ++ for i in bochs-dlx; do cp $(srcdir)/build/linux/$$i $(DESTDIR)$(bindir)/$$i; $(CHMOD) 755 $(DESTDIR)$(bindir)/$$i; done + + uninstall:: + $(RM) -rf $(DESTDIR)$(sharedir) diff --git a/bochs-config.patch b/bochs-config.patch new file mode 100644 index 0000000..d2fcee2 --- /dev/null +++ b/bochs-config.patch @@ -0,0 +1,34 @@ +--- dlxlinux/bochsrc.txt~ 2002-12-15 00:44:43.000000000 +0200 ++++ dlxlinux/bochsrc.txt 2003-05-20 23:19:50.000000000 +0300 +@@ -22,9 +22,9 @@ + + # default config interface is textconfig. + #config_interface: textconfig +-#config_interface: wx ++config_interface: wx + +-#display_library: x ++display_library: wx + # other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term + + # where do we send log messages? +--- .bochsrc~ 2002-12-21 21:30:48.000000000 +0200 ++++ .bochsrc 2003-05-20 23:21:20.000000000 +0300 +@@ -17,7 +17,7 @@ + # the "wx" display library. + #======================================================================= + #config_interface: textconfig +-#config_interface: wx ++config_interface: wx + + #======================================================================= + # DISPLAY_LIBRARY +@@ -55,7 +55,7 @@ + #display_library: sdl + #display_library: term + #display_library: win32 +-#display_library: wx ++display_library: wx + #display_library: x + + #======================================================================= diff --git a/bochs-dlxreadme.patch b/bochs-dlxreadme.patch new file mode 100644 index 0000000..8253fa7 --- /dev/null +++ b/bochs-dlxreadme.patch @@ -0,0 +1,11 @@ +--- build/linux/bochs-dlx.in~ 2002-08-26 23:39:06.000000000 +0300 ++++ build/linux/bochs-dlx.in 2004-01-12 22:35:29.000000000 +0200 +@@ -32,7 +32,7 @@ + #echo DEBUG: Creating $HOME/.bochsdlx/bochsrc + echo DLXPATH=$DLXPATH > $CONFFILE + . $CONFFILE +- for file in bochsrc.txt README testform.txt; do ++ for file in bochsrc.txt readme.txt testform.txt; do + if [ ! -f $DLXPATH/$file ]; then + echo Copying $DLXINST/$file '->' $DLXPATH/. + cp $DLXINST/$file $DLXPATH/. diff --git a/bochs-gtk2.patch b/bochs-gtk2.patch new file mode 100644 index 0000000..dc1bde6 --- /dev/null +++ b/bochs-gtk2.patch @@ -0,0 +1,34 @@ +--- configure.in~ 2004-01-11 23:17:48.000000000 +0200 ++++ configure.in 2004-01-12 22:12:08.000000000 +0200 +@@ -2047,11 +2047,11 @@ + WX_CXXFLAGS="\`$WX_CONFIG --cxxflags\`" + GUI_LINK_OPTS_WX="\`$WX_CONFIG --libs\`" + # if gtk-config exists, then add it to the cflags. +- gtkconf=`gtk-config --cflags` ++ gtkconf=`pkg-config gtk+-2.0 --cflags` + if test $? = 0; then + # gtk-config was found and returned 0, so it must return valid output +- WX_CFLAGS="$WX_CFLAGS \`gtk-config --cflags\`" +- WX_CXXFLAGS="$WX_CXXFLAGS \`gtk-config --cflags\`" ++ WX_CFLAGS="$WX_CFLAGS \`pkg-config gtk+-2.0 --cflags\`" ++ WX_CXXFLAGS="$WX_CXXFLAGS \`pkg-config gtk+-2.0 --cflags\`" + fi + # GUI_C*FLAGS are added to the compilation of every bochs file, not just + # the files in gui/*.cc. They are not used when building other things +--- configure~ 2004-01-11 22:06:17.000000000 +0200 ++++ configure 2004-01-12 22:12:28.000000000 +0200 +@@ -34560,11 +34560,11 @@ + WX_CXXFLAGS="\`$WX_CONFIG --cxxflags\`" + GUI_LINK_OPTS_WX="\`$WX_CONFIG --libs\`" + # if gtk-config exists, then add it to the cflags. +- gtkconf=`gtk-config --cflags` ++ gtkconf=`pkg-config gtk+-2.0 --cflags` + if test $? = 0; then + # gtk-config was found and returned 0, so it must return valid output +- WX_CFLAGS="$WX_CFLAGS \`gtk-config --cflags\`" +- WX_CXXFLAGS="$WX_CXXFLAGS \`gtk-config --cflags\`" ++ WX_CFLAGS="$WX_CFLAGS \`pkg-config gtk+-2.0 --cflags\`" ++ WX_CXXFLAGS="$WX_CXXFLAGS \`pkg-config gtk+-2.0 --cflags\`" + fi + # GUI_C*FLAGS are added to the compilation of every bochs file, not just + # the files in gui/*.cc. They are not used when building other things diff --git a/bochs-nonet-build.patch b/bochs-nonet-build.patch new file mode 100644 index 0000000..d825c6b --- /dev/null +++ b/bochs-nonet-build.patch @@ -0,0 +1,13 @@ +--- Makefile.in.orig 2003-10-31 22:50:04.000000000 +0200 ++++ Makefile.in 2003-11-30 00:36:20.000000000 +0200 +@@ -393,8 +393,8 @@ + download_dlx: $(DLXLINUX_TAR) + + $(DLXLINUX_TAR): +- $(RM) -f $(DLXLINUX_TAR) +- $(WGET) $(DLXLINUX_TAR_URL) ++# $(RM) -f $(DLXLINUX_TAR) ++# $(WGET) $(DLXLINUX_TAR_URL) + test -f $(DLXLINUX_TAR) + + unpack_dlx: $(DLXLINUX_TAR) diff --git a/bochs.spec b/bochs.spec new file mode 100644 index 0000000..e8c1e1e --- /dev/null +++ b/bochs.spec @@ -0,0 +1,159 @@ +Name: bochs +Version: 2.1 +Release: 0.fdr.2.rh90 +Epoch: 0 +Summary: Bochs Project x86 PC Emulator + +Group: Applications/Emulators +License: LGPL +URL: http://bochs.sourceforge.net/ +Source0: http://download.sourceforge.net/bochs/bochs-2.1.tar.gz +Source1: http://bochs.sourceforge.net/guestos/dlxlinux4.tar.gz +Patch0: %{name}-nonet-build.patch +Patch1: %{name}-buildpaths.patch +Patch2: %{name}-config.patch +Patch3: %{name}-gtk2.patch +Patch4: %{name}-dlxreadme.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: docbook-utils, wxGTK2-devel, ncurses-c++-devel, dos2unix +%{?_with_sdl:BuildRequires: SDL-devel} +%{?_with_debugger:BuildRequires: readline-devel} + +%description +Bochs is a portable x86 PC emulation software package that emulates +enough of the x86 CPU, related AT hardware, and BIOS to run DOS, +Windows '95, Minix 2.0, and other OS's, all on your workstation. + +%package dlxlinux +Summary: DLX Linux hard disk image for Bochs +Group: Applications/Emulators +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description dlxlinux +DLX is a version of Linux which was small enough to distribute along +with the Bochs Windows binary release. Because of its small size, a +limited number of linux commands are available. The official DLX site +is at . DLX was +created by Erich and Hannes Boehm. + + +%prep +%setup -q +%patch0 -p0 +%patch1 -p0 +%patch3 -p0 +%patch4 -p0 +# Fix up some man page paths. +perl -pi -e \ + 's|/usr/local/share/doc/bochs\b|%{_docdir}/%{name}-%{version}| ; + s|/usr/local/share/|%{_datadir}/|' \ + doc/man/*.* +cp -p %{SOURCE1} . + + +%build + +# Force linking with ncurses, otherwise the "term" UI won't work. +export GUI_LINK_OPTS_TERM="-lncurses" + +# Force pthreads, the rfb UI needs them and configure fails to add -lpthread. +export PTHREAD_LIBS=-lpthread +export PTHREAD_CFLAGS=-pthread + +# Notes: +# - The CPU level, MMX et al affect what the emulator will emulate, they +# are not properties of the build target architecture. +# - Using the following options makes the build fail as of 2.1: +# --enable-3dnow --enable-external-debugger +%configure \ + --enable-cdrom \ + --enable-sb16=linux \ + --enable-ne2000 \ + --enable-vbe \ + --enable-all-optimizations \ + --enable-plugins \ + --enable-pci \ + --enable-repeat-speedups \ + --enable-icache \ + --enable-cpu-level=5 \ + --enable-mmx \ + %{?_with_debugger:--enable-debugger} \ + %{?_with_sdl:--with-sdl} \ + --with-x11 \ + --with-nogui \ + --with-term \ + --with-rfb \ + --with-wx + +make %{?_smp_mflags} +make unpack_dlx + +# This needs to be done after "make unpack_dlx". +%{__patch} -p0 < %{PATCH2} +dos2unix dlxlinux/readme.txt dlxlinux/bochsrc.txt + + +%install +rm -rf $RPM_BUILD_ROOT _installed-docs +make install install_dlx DESTDIR=$RPM_BUILD_ROOT +mv $RPM_BUILD_ROOT%{_docdir}/bochs _installed-docs + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc _installed-docs/* README-* +%{_bindir}/bochs +%{_bindir}/bxcommit +%{_bindir}/bximage +# Note: must include *.la in %{_libdir}/bochs/plugins. +%{_libdir}/bochs +%{_mandir}/man1/bochs.1* +%{_mandir}/man1/bxcommit.1* +%{_mandir}/man1/bximage.1* +%{_mandir}/man5/bochsrc.5* +%dir %{_datadir}/bochs +%{_datadir}/bochs/*BIOS* +%{_datadir}/bochs/keymaps + +%files dlxlinux +%defattr(-,root,root,-) +%{_bindir}/bochs-dlx +%{_mandir}/man1/bochs-dlx.1* +%{_datadir}/bochs/dlxlinux + + +%changelog +* Fri Jan 16 2004 Ville Skyttä - 0:2.1-0.fdr.2 +- Fix RFB linking, force pthreads. +- dos2unix some -dlxlinux files. + +* Mon Jan 12 2004 Ville Skyttä - 0:2.1-0.fdr.1 +- Update to 2.1. +- Make sure everything is built with GTK2. +- Add "--with debugger" rpmbuild option. +- Put SDL build behind the "--with sdl" rpmbuild option due to startup crashes. + +* Sun Nov 30 2003 Ville Skyttä - 0:2.1-0.fdr.0.3.pre2 +- Update to 2.1pre2. + +* Tue Oct 21 2003 Ville Skyttä - 0:2.1-0.fdr.0.2.pre1 +- Remove .cvsignore from docs. + +* Sat Oct 11 2003 Ville Skyttä - 0:2.1-0.fdr.0.1.pre1 +- Update to 2.1pre1. +- Enable 3DNow! on athlon. +- Other cosmetic tweaks. + +* Sat Jul 19 2003 Ville Skyttä - 0:2.0.2-0.fdr.3 +- List wanted GUIs explicitly, exclude svgalib (bug 306). + +* Wed May 21 2003 Ville Skyttä - 0:2.0.2-0.fdr.2 +- Rebuild with wxGTK2. + +* Tue May 20 2003 Ville Skyttä - 0:2.0.2-0.fdr.1 +- First Fedora release, based on upstream SRPM. diff --git a/sources b/sources index e69de29..f63ddec 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +30bdb17e11fb416f9d3c6243e02f6e73 bochs-2.1.tar.gz +21c153f5aa391395c35f0c2f660da972 dlxlinux4.tar.gz