Blob Blame History Raw
Name:           bochs
Version:        2.3.6
Release:        2%{?dist}
Summary:        Portable x86 PC emulator
Group:          Applications/Emulators
License:        LGPLv2+
URL:            http://bochs.sourceforge.net/
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1:        http://bochs.sourceforge.net/guestos/dlxlinux4.tar.gz
Patch0:         %{name}-nonet-build.patch
Patch1:         %{name}-config.patch
Patch2:         %{name}-wx28.patch
Patch3:         bochs-2.3.6-gcc43.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  docbook-utils
BuildRequires:  libXt-devel
BuildRequires:  libXpm-devel
BuildRequires:  ncurses-devel
BuildRequires:  SDL-devel
BuildRequires:  readline-devel
#BuildRequires:  wxGTK-devel
%ifarch %{ix86} x86_64
BuildRequires:  svgalib-devel
%endif

%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        debugger
Summary:        Bochs with builtin debugger
Group:          Applications/Emulators
Requires:       %{name} = %{version}-%{release}

%description    debugger
Special version of bochs compiled with the builtin debugger.


%package        gdb
Summary:        Bochs with support for debugging with gdb
Group:          Applications/Emulators
Requires:       %{name} = %{version}-%{release}

%description    gdb
Special version of bochs compiled with a gdb stub so that the software running
inside the emulator can be debugged with gdb.


%package        dlxlinux
Summary:        DLX Linux hard disk image for Bochs
Group:          Applications/Emulators
Requires:       %{name} >= 2.0

%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 <http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html>.  DLX was
created by Erich and Hannes Boehm.


%prep
%setup -q
%patch0 -p0 -z .nonet
%patch2 -p1 -z .wx28
%patch3 -p1 -z .gcc43
cp -p %{SOURCE1} .
# Fix up some man page paths.
sed -i \
  -e 's|/usr/local/share/doc/bochs/|%{_docdir}/%{name}-%{version}/|' \
  -e 's|/usr/local/share/|%{_datadir}/|' \
  doc/man/*.*
# remove executable bits from sources to make rpmlint happy with the debuginfo
chmod -x `find -name '*.cc' -o -name '*.h' -o -name '*.inc'`
# Fix CHANGES encoding
iconv -f ISO_8859-2 -t UTF8 CHANGES > CHANGES.tmp
mv CHANGES.tmp CHANGES


%build
%ifarch %{ix86} x86_64
ARCH_CONFIGURE_FLAGS=--with-svga
%endif
# Note: the CPU level, MMX et al affect what the emulator will emulate, they
# are not properties of the build target architecture.
# Note2: passing --enable-pcidev will change bochs license from LGPLv2+ to
# LGPLv2 (and requires a kernel driver to be usefull)
CONFIGURE_FLAGS=" \
  --enable-plugins \
  --enable-ne2000 \
  --enable-pci \
  --enable-all-optimizations \
  --enable-vbe \
  --enable-clgd54xx \
  --enable-3dnow \
  --enable-sb16=linux \
  --with-x11 \
  --with-nogui \
  --with-term \
  --with-rfb \
  --with-sdl \
  --without-wx \
  $ARCH_CONFIGURE_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS -DPARANOID"

%configure $CONFIGURE_FLAGS --enable-x86-debugger --enable-debugger
make %{?_smp_mflags}
mv bochs bochs-debugger
make dist-clean

%configure $CONFIGURE_FLAGS --enable-x86-debugger --enable-gdb-stub
make %{?_smp_mflags}
mv bochs bochs-gdb
make dist-clean

%configure $CONFIGURE_FLAGS
make %{?_smp_mflags}

make unpack_dlx
# This needs to be done after "make unpack_dlx".
patch -p0 < %{PATCH1}
sed -i -e 's/\r//' dlxlinux/readme.txt dlxlinux/bochsrc.txt


%install
rm -rf $RPM_BUILD_ROOT _installed-docs
make install install_dlx DESTDIR=$RPM_BUILD_ROOT
install -m 755 bochs-debugger bochs-gdb $RPM_BUILD_ROOT%{_bindir}
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 debugger
%defattr(-,root,root,-)
%{_bindir}/bochs-debugger

%files gdb
%defattr(-,root,root,-)
%{_bindir}/bochs-gdb

%files dlxlinux
%defattr(-,root,root,-)
%{_bindir}/bochs-dlx
%{_mandir}/man1/bochs-dlx.1*
%{_datadir}/bochs/dlxlinux/


%changelog
* Fri Jan 11 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-2
- Fix compilation with gcc 4.3

* Mon Dec 24 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-1
- New upstream release 2.3.6

* Sun Sep 16 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.5-1
- New upstream release 2.3.5

* Wed Aug 22 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-7
- Fix CVE-2007-2894 (really fix bz 241799)

* Sun Aug  5 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-6
- Update License tag for new Licensing Guidelines compliance

* Wed Jul 18 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-5
- Fix CVE-2007-2893 (bz 241799)

* Mon Dec 18 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-4
- rebuilt without wxGTK as wxGTK is even more broken with wxGTK 2.8 then it
  was with 2.6

* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 2.3-3
 - rebuilt for unwind info generation, broken in gcc-4.1.1-21

* Fri Sep 22 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-2
- Add -debugger and -gdb sub packages which contain special versions of
  bochs compiled with the buildin debugger resp. the gdb-stub (bz 206508)

* Sun Aug 27 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-1
- New upstream version 2.3 (final)

* Thu Aug 10 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-0.1.pre3
- New upstream version 2.3.pre3

* Mon Jul 17 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-0.1.pre2
- New upstream version 2.3.pre2
- Drop upstreamed wx26 patch

* Wed Feb 15 2006 Hans de Goede <j.w.r.degoede@hhs.nl> - 2.2.6-1
- New upstream version 2.2.6
- Rebuild for new gcc4.1 and glibc
- Remove --enable-pae as that requires a CPU level of 6 with the new version
- Remove a few configure switches which are identical to the
  upstream defaults and thus don't do anything
- Add --enable-clgd54xx
- Add --with-svga which adds support for svgalib as display (x86(_64) only)
- Fix compile with wxGTK-2.6 and unconditionalize wxGTK build

* Fri Dec 16 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2.1-2
- Adapt to modular X.
- Fix build with g++ 4.1.0.
- Conditionalize wxGTK build and default it to off (build failures w/2.6.x).
- Use sed instead of dos2unix and perl during build.

* Sat Jul  9 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2.1-1
- 2.2.1, precision patch applied upstream.

* Sun May 29 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2-2
- Try to fix x86_64 build.

* Sat May 28 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2-1
- 2.2, buildpaths and fpu-regparms patches applied upstream, pthread and
  ncurses linking hacks no longer needed.
- Use upstream default display library, wx is clunky with wxGTK2 2.4.x.
- Enable 3DNow! emulation and the SDL display library.

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 2.1.1-3
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.1.1-2
- rebuilt

* Sun Dec  5 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1.1-1
- Update to 2.1.1.
- Enable PAE and 4M pages support.
- Loosen version in dlxlinux to main dependency.
- BuildRequire ncurses-devel instead of ncurses-c++-devel for FC3.
- Apply upstream fpu-regparm patch to fix the build on FC3.

* Fri Jan 16 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1-0.fdr.2
- Fix RFB linking, force pthreads.
- dos2unix some -dlxlinux files.

* Mon Jan 12 2004 Ville Skyttä <ville.skytta at iki.fi> - 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ä <ville.skytta at iki.fi> - 0:2.1-0.fdr.0.3.pre2
- Update to 2.1pre2.

* Tue Oct 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1-0.fdr.0.2.pre1
- Remove .cvsignore from docs.

* Sat Oct 11 2003 Ville Skyttä <ville.skytta at iki.fi> - 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ä <ville.skytta at iki.fi> - 0:2.0.2-0.fdr.3
- List wanted GUIs explicitly, exclude svgalib (bug 306).

* Wed May 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0.2-0.fdr.2
- Rebuild with wxGTK2.

* Tue May 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0.2-0.fdr.1
- First Fedora release, based on upstream SRPM.