Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 93465dc0da87291754d164510e8cd541 > files > 7

BasiliskII-1.0-0.20060501.2mdv2007.0.src.rpm

%define	name		BasiliskII
%define version		1.0
%define snapshot	20060501
%define release		%mkrel 0.%{snapshot}.2
%define mon_version	3.0
%define mon_snapshot	20030206
%define jit_arches	%{ix86} x86_64
# Current Mandrakelinux kernels have sheepnet driver integrated for
# both Basilisk II and MOL purposes
%define sheepnet	0
%define moduledir	/lib/modules
%define kernel_version	%(/bin/bash %{SOURCE5})
%define kver 		%(/bin/bash %{SOURCE5} | sed -e 's/-/./')

# (gb) use '%' instead of '$' so that the shell command is actually
# evaluated instead of being simply propagated in textual form
%define	modversion	%(uname -r)

# Define to print out some (debug) information when patching HW Bases
%define DebugHWBases	0

# Define to enable JIT_DEBUG
%define JITDebug	0

# Extract Mandriva Linux name
%if %{mdkversion} >= 1010
%define mdk_distro_file	/etc/release
%else
%define mdk_distro_file	/etc/mandrake-release
%endif
%define mdk_distro	%(perl -ne '/^([.\\w\\s]+) release/ and print $1' < %{mdk_distro_file})
 
Summary:		A free, portable Mac 68k emulator
Name:			%{name}
Version:		%{version}
Release:		%{release}
PreReq:			/usr/sbin/update-alternatives
Source0:		http://iphcip1.physik.uni-mainz.de/~cbauer/BasiliskII-%{version}-%{snapshot}.tar.bz2
Source1:		BasiliskII.16.png.bz2
Source2:		BasiliskII.32.png.bz2
Source3:		BasiliskII.48.png.bz2
Source4:		cxmon-%{mon_version}-%{mon_snapshot}.tar.bz2
Source5:		kernel-version.sh
Patch1:			BasiliskII-jit-debug-hwbases.patch.bz2
Patch2:			BasiliskII-1.0-sheepnet.patch.bz2
License:		GPL
URL:			http://www.gibix.net/projects/basilisk2/
Group:			Emulators
BuildRoot:		%{_tmppath}/%{name}-%{version}-buildroot
BuildRequires:		gcc-c++
BuildRequires:		libesound-devel libgtk+2.0-devel
Obsoletes:		BasiliskII-jit
Provides:		BasiliskII-jit

%description
Basilisk II is an Open Source 68k Macintosh emulator. That is, it enables
you to run 68k MacOS software on you computer, even if you are using a
different operating system. However, you still need a copy of MacOS and
a Macintosh ROM image to use Basilisk II (of course MacOS and Mac ROM
are not included in this package).

Some features of Basilisk II:
  - Emulates either a Mac Classic (which runs MacOS 0.x thru 7.5)
    or a Mac II series machine (which runs MacOS 7.x, 8.0 and 8.1),
    depending on the ROM being used
  - Color video display
  - CD quality sound output
  - Floppy disk driver (only 1.44MB disks supported)
  - Driver for HFS partitions and hardfiles
  - CD-ROM driver with basic audio functions
  - Easy file exchange with the host OS via a "Host Directory Tree" icon
    on the Mac desktop
  - Copy and paste text between MacOS and the host OS (X11 clipboard)
  - Ethernet driver
  - Serial drivers
  - SCSI Manager (old-style) emulation
  - Emulates extended ADB keyboard and 3-button mouse
%ifarch %{jit_arches}
This version also features a JIT ("Just In Time") compiler, which
speeds up the emulator by a factor of 10-15x with respect to the plain
version.
%endif

%if %{sheepnet}
%package sheepnet
Summary:	Basilisk II network module
Group:		System/Kernel and hardware
Requires:	%{name} = %{version}
Requires:	kernel-%{kver}

%description sheepnet
This package contains the sheep_net kernel module for
Ethernet networking under Basilisk II, suitable for
kernel %{kernel_version}.

%package sheepnet-smp
Summary:	Basilisk II network module
Group:		System/Kernel and hardware
Requires:	%{name} = %{version}
Requires:	kernel-smp-%{kver}

%description sheepnet-smp
This package contains the sheep_net kernel module for
Ethernet networking under Basilisk II, suitable for
kernel %{kernel_version}smp.

%package sheepnet-enterprise
Summary:	Basilisk II network module
Group:		System/Kernel and hardware
Requires:	%{name} = %{version}
Requires:	kernel-enterprise-%{kver}

%description sheepnet-enterprise
This package contains the sheep_net kernel module for
Ethernet networking under Basilisk II, suitable for
kernel %{kernel_version}enterprise.
%endif

%prep
%setup -q -a 4
perl -pi -e 's/^The XFree86 Project, Inc$/%{mdk_distro}/' src/Unix/keycodes
%if %{DebugHWBases}
%patch1 -p1 -b .hwbases
%endif
%if %{JITDebug}
perl -pi -e "s|([ \t]*mon_srcdir)=.*|\1=../../cxmon-%{mon_version}/src|" ./src/Unix/configure ./src/Unix/configure.in
%endif
%patch2 -p1 -b .sheepnet

%build
cd ./src/Unix
# Enable JIT compiler on x86 and x86-64
JIT_OPTIONS=
%ifarch %{jit_arches}
JIT_OPTIONS="--enable-jit-compiler"
%if %{JITDebug}
JIT_OPTIONS="$JIT_OPTIONS --with-mon --enable-jit-debug"
%endif
%endif
%configure2_5x $JIT_OPTIONS --with-gtk=gtk2
make obj
%make

%if %{sheepnet}
# build sheep_net module
cd Linux/NetDriver
make
%endif

%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
%if %{sheepnet}
install -d -m 755 \
  $RPM_BUILD_ROOT%{moduledir}/%{kernel_version}/misc \
  $RPM_BUILD_ROOT%{moduledir}/%{kernel_version}smp/misc \
  $RPM_BUILD_ROOT%{moduledir}/%{kernel_version}enterprise/misc
%endif
cd ./src/Unix
%makeinstall

%if %{sheepnet}
# install the sheep_net module
cd ./Linux/NetDriver
install -m 644 sheep_net-up.o \
  $RPM_BUILD_ROOT%{moduledir}/%{kernel_version}/misc/sheep_net.o
install -m 644 sheep_net-smp.o \
  $RPM_BUILD_ROOT%{moduledir}/%{kernel_version}smp/misc/sheep_net.o
install -m 644 sheep_net-enterprise.o \
  $RPM_BUILD_ROOT%{moduledir}/%{kernel_version}enterprise/misc/sheep_net.o

# (gb) copy sources in case the module has to be rebuilt
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}-sheepnet
install -m 644 Makefile $RPM_BUILD_ROOT/%{_datadir}/%{name}-sheepnet
install -m 644 sheep_net.c $RPM_BUILD_ROOT/%{_datadir}/%{name}-sheepnet
%endif

# mdk icons
mkdir -p $RPM_BUILD_ROOT%{_iconsdir}
mkdir -p $RPM_BUILD_ROOT%{_liconsdir}
mkdir -p $RPM_BUILD_ROOT%{_miconsdir}
bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
bzcat %{SOURCE2} > $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
bzcat %{SOURCE3} > $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png

# mdk menu
mkdir -p $RPM_BUILD_ROOT%{_menudir}
cat > $RPM_BUILD_ROOT%{_menudir}/%{name} << EOF
?package(%{name}):\
    command="%{_bindir}/%{name}"\
    title="Basilisk II"\
    section="More Applications/Emulators"\
    icon="%{name}.png"\
    longtitle="A Macintosh Emulator"\
    needs="x11"
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_menus
update-alternatives --install %{_bindir}/basilisk2 basilisk2 %{_bindir}/%{name} 10 \
	--slave %{_mandir}/man1/basilisk2.1.bz2 basilisk2.1.bz2 %{_mandir}/man1/%{name}.1.bz2

%postun
%clean_menus
[ $1 = 0 ] || exit 0
update-alternatives --remove basilisk2 %{_bindir}/%{name}

%if %{sheepnet}
%post sheepnet
/sbin/depmod -a || :

%postun sheepnet
if [ $1 = 0 ]; then
  if [ x`/sbin/lsmod | grep sheep_net | tr -s " " | cut -f 3 -d " "` == "x0" ]; then
    /sbin/rmmod sheep_net >/dev/null 2>&1
  fi
fi
/sbin/depmod -a || :

%post sheepnet-smp
/sbin/depmod -a || :

%postun sheepnet-smp
if [ $1 = 0 ]; then
  if [ x`/sbin/lsmod | grep sheep_net | tr -s " " | cut -f 3 -d " "` == "x0" ]; then
    /sbin/rmmod sheep_net >/dev/null 2>&1
  fi
fi
/sbin/depmod -a || :

%post sheepnet-enterprise
/sbin/depmod -a || :

%postun sheepnet-enterprise
if [ $1 = 0 ]; then
  if [ x`/sbin/lsmod | grep sheep_net | tr -s " " | cut -f 3 -d " "` == "x0" ]; then
    /sbin/rmmod sheep_net >/dev/null 2>&1
  fi
fi
/sbin/depmod -a || :
%endif

%files
%defattr(-,root,root)
# docs
%doc README TECH TODO COPYING ChangeLog
%{_mandir}/man1/%{name}.1*
#
%{_bindir}/BasiliskII
# data
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/fbdevices
%{_datadir}/%{name}/keycodes
%{_datadir}/%{name}/tunconfig
# mdk icons
%{_miconsdir}/%{name}.png*
%{_iconsdir}/%{name}.png*
%{_liconsdir}/%{name}.png*
# mdk menus
%{_menudir}/%{name}

%if %{sheepnet}
%files sheepnet
%defattr(-,root,root)
%dir %{_datadir}/%{name}-sheepnet
%{_datadir}/%{name}-sheepnet/Makefile
%{_datadir}/%{name}-sheepnet/sheep_net.c
%{moduledir}/%{kernel_version}/misc/*

%files sheepnet-smp
%defattr(-,root,root)
%{_datadir}/%{name}-sheepnet/Makefile
%{_datadir}/%{name}-sheepnet/sheep_net.c
%{moduledir}/%{kernel_version}smp/misc/*

%files sheepnet-enterprise
%defattr(-,root,root)
%{_datadir}/%{name}-sheepnet/Makefile
%{_datadir}/%{name}-sheepnet/sheep_net.c
%{moduledir}/%{kernel_version}enterprise/misc/*
%endif

%changelog
* Thu Jun 15 2006 Lenny Cartier <lenny@mandriva.com> 1.0-0.20060501.2mdv2007.0
- use mkrel

* Tue May  2 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.0-0.20060501.1mdk
- update to CVS snapshot 2006/05/01:
  * Handle up to 1 GB of Mac memory
  * Handle MacOS idle wait ("idlewait" prefs item)
  * Fix a crash with the AppleShare extension
  * Improve SLiRP network emulation performance

* Wed Nov 23 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.0-0.20051122.1mdk
- update to CVS snapshot 2005/11/22:
  * fix support for 4+ GB hard disk images
  * fix a crash when closing the GUI too early
  * fix detection of newer CPUs, fallback to safe settings if necessary
  * add support for full-screen mode in SDL targets
  * move GUI to GTK+2 and make some cosmetic changes (more user-friendly)

* Tue Jun  7 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.0-0.18mdk
- update to CVS snapshot 2005/06/06:
  * add "slirp" fully user network emulation
  * fix translation through constant jumps ("jitinline")

* Tue Mar 22 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.17mdk
- update to CVS snapshot 2005/03/22:
  * sheep_net driver now works on linux kernels 2.6
  * really fix network code to work on 64-bit platforms
  * add support for exchanging text between X11 and MacOS through the clipboard

* Tue Nov  9 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.16mdk
- update to CVS snapshot 2004/11/09
  * SDL: audio and video support, but still prefer X11 outputs
  * JIT: improve BSF emulation on P4 cores
  * JIT: resume and finish port to x86-64 (AMD64, EM64T)
  * JIT: implement 33-bit addressing optimization for 64-bit ports

* Mon Jun  7 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.15mdk
- add TUN/TAP support
- rearrange menu entry to make it 10.0 happy ;-)

* Fri Oct  3 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.14mdk
- Make sure 32-bit program still run correctly on AMD64

* Thu Oct  2 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.13mdk
- Update to CVS snapshot 2003/09/02:
  - Fixes to new code generator for x86 & amd64
  - Import "keyboardtype" support from Win32 version

* Sat Sep 13 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.12mdk
- Disabled parallel building
- Added Patch11 to avoid compilation errors.
- Use %%configure2_5x.

* Sat Aug 02 2003 Michael Scherer <scherer.michael@free.fr> 1.0-0.11mdk
- fix compilation (patch#10, #define log printf).
- clean BuildRequires.
- icons xpm => png

* Thu Mar 13 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.10mdk
- Implement a generic setzflg_l() for Pentium 4, thus permitting to
  re-enable translation of ADDX/SUBX/BTST/BCL/BCHG/BSET instructions.
  i.e. make it faster for P4, although not optimally.

* Thu Mar 13 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.9mdk
- Update to CVS snapshot 2003/03/13:
  - fix align_target() for 0 byte padding requests
  - workaround Pentium 4 change in BSF instructions that now defines
    all flags except only ZF. Yes, manual said others were supposed to
    be undefined but I don't know other means to fastly set ZF and
    only ZF. i.e. Disable translation of ADDX/SUBX/BTST/BCLR/BCHG/BSET
    instructions in that case.

* Wed Mar 12 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.8mdk
- Update to CVS snapshot 2003/03/12:
  - add x86-64 support, start renewing the x86 code generator
  - new prefs options "dsp" and "mixer" to set the OSS device names
    instead of the hardcoded '/dev/dsp' and '/dev/mixer'

* Thu Oct  3 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.7mdk
- Re-enable $RPM_OPT_FLAGS
- Update to CVS snapshot 2002/10/03:
  - Determine loop and jump alignments at runtime according to host CPU
  - Re-enable translation of FMUL instruction as it doesn't serve anything
    to hide the real bug, which is not related to the translation of that
  - Implement sort of basic block inlining. In other words, follow
    constant jumps instructions (e.g. BSR) until some event arises
    (spcflags check). Also make sure the lazy translation cache
    invalidator still works by keeping up a chain of information on
    the block trace to checksum. Well, you'd probably don't see a
    difference, the bottleneck is elswhere. :-/

* Tue Oct  1 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.6mdk
- Update to CVS snapshot 2002/10/01:
  - Fix fullscreen DGA mode with DirectColor visuals
  - Get rid of cpuopti asm-postprocessor as the JIT is fast enough
  - Optimize runtime assembler with shorter equivalents when the
    accumulator (%eax) is referenced along with immediates
  - Misc portability fixes to the FPU ieee core

* Wed Sep 18 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.5mdk
- New snapshot: integrate JIT compiler and make it default on x86

* Tue Sep 17 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.4mdk
- Update to CVS snapshot 2002/09/17:
  - Fix FSCALE implementation
  - Portability fixes to the IEEE fpu core, make it default even on x86

* Fri Sep 13 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.3mdk
- Update to CVS snapshot 2002/09/13:
  - Start merge with B2/JIT tree, new FPU emulation architecture
  - Implement "ignoresegv" feature on Linux/x86, Linux/ppc, Darwin/ppc
  - Serial port baud rates are now set correctly
  - It is now possible to make the serial drivers pipe their
    input/output to programs by using a '|' followed by a command line
    as the modem or printer port setting (instead of a device name
    like '/dev/ttyS0') [Brian Johnson]
  - The option "--config FILE" tells B2 to use a different config file

* Thu Sep 05 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.0-0.2mdk
- rebuild

* Thu Jun 27 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.1mdk
- Update to CVS snapshot 2002/06/22
- Remove ExclusiveArch: since it does even work on IA-64
- Disable most of RPM_OPT_FLAGS, lower optimizations to -O2
- Patch0: Regenerate to shorten X server match string to "Mandrake"

* Mon Aug 20 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-3mdk
- Update to CVS snapshot 2001/08/20, which brings:
  - Bug fixes to runtime depth and resolution switching code
  - Compilation fixes with gcc-3.0.1
  - Disable constants merging since it breaks the FPU emulation core.
    i.e. Add -fno-merge-constants to CXXFLAGS
- Set "basilisk2" as an alternative name for the binary and the man page

* Mon Jul  2 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-2mdk
- updated to CVS snapshot 2001/07/02, which brings:
- runtime resolution switching
- runtime depth switching ({1,2,4,8}-bit on {16,32}-bit displays)

* Tue Jun  5 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-1mdk
- release 0.9
- updated description
- added mdk menus and icons
- added "Conflicts" tag with BasiliskII-jit

* Mon Apr  9 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-0.4mdk
- sanitized specfile (s/Copyright/License, BuildRequires, etc.)
- updated to CVS snapshot 09042001, which brings:
- thread initialization for "serial" emulation
- fix for do_fmod() in i386-optimized FPU core

* Wed Mar 28 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-0.3mdk
- fixed sheep_net module auto-rebuild in %post
- fixed sheep_net module removal in %postun
- shortened ServerVendor matching string to "Linux Mandrake" (patch1)
- updated to CVS snapshot 27032001, which brings:
- updated sheep_net module for 2.4.x kernels but not packaged per Chmou's request
- performance improvements to screen update code
- fix and additions to 68040 emulation (MOVE16 instructions)

* Sun Mar 11 2001 Giuseppe Ghibò <ghibo@mandrakesoft.cm> 0.9-0.2mdk
- Fixed %description according to Randy Kramer suggestion.

* Sun Mar 11 2001 Giuseppe Ghibò <ghibo@mandrakesoft.cm> 0.9-0.1mdk
- updated to snapshot 17022001.
- temporary removed sheep_net module (problems with kernel 2.4 compiling).

* Fri Nov 17 2000 David BAUDENS <baudens@mandrakesoft.com> 0.8-15mdk
- Rebuild with gcc-2.96 & glibc-2.2

* Tue Aug 29 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.8-14mdk
- use of %%{_mandir}.
- updated to new snapshot version 13072000.

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.8-13mdk
- automatically added BuildRequires.

* Sun May 14 2000 David BAUDENS <baudens@mandrakesoft.com> 0.8-12mdk
- Fix unresolved symbol for sheepnet.

* Sat May 13 2000 David BAUDENS <baudens@mandrakesoft.com> 0.8-11mdk
- Don't optimize for i586 when this package is builded for another x86 arch.
- Update kernel version.

* Sat Apr 29 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.8-10mdk
- merged with my previous changes
- rebuild with latest kernel.
- updated keycodes patch.

* Wed Apr  5 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.8-9mdk
- Spec-helper.
- Fix groups.
- Add Prereq kernel for sheepnet pacakge to don't fail on depmod.

* Wed Mar 22 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com>
- updated to 14032000 snapshot.

* Mon Feb 07 2000 Giuseppe Ghibò <ghibo@linux-mandrake.com>
- updated to 0.8-1 (0012000).

* Fri Jan 21 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.8-8mdk
- don't build on alpha.

* Thu Jan 13 2000 Francis Galiegue <francis@mandrakesoft.com>
- reintegrated CFLAGS hack, but made it architecture dependant. Leave only -O2
  for archs other than ix86.

* Tue Jan 11 2000 Francis Galiegue <francis@mandrakesoft.com>
- Removed CFLAGS= in ./configure - non portable

* Mon Jan 03 2000 Giuseppe Ghibò <ghibo@linux-mandrake.com>
- updated to snapshot 22111999.

* Mon Dec 20 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com>
- rebuild for new kernel version.

* Sat Nov 06 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com>
- updated to snapshot 02111999.
 
* Sat Oct 25 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com>
- mandrake adaptions
- removed patch for changing 'keycodes' path
- added patch for 'keycodes' files (XFree86 vendor string)
- split package in main and sheepnet
- added BuildPreReq

* Sun Aug 14 1999 Arne Coucheron <arneco@online.no>
  [250799-2]
- corrected the path definition of the keycode file

* Sun Aug 14 1999 Arne Coucheron <arneco@online.no>
  [250799-1]
- first RPM build