%define name BasiliskII-jit %define version 1.0 %define mon_version 3.0 %define mon_snapshot 20020325 %define release 0.5mdk %define snapshot 25032002 %define sheepnet 0 %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 1 Summary: A free, portable Mac II emulator Name: %{name} Version: %{version} Release: %{release} PreReq: /usr/sbin/update-alternatives Source0: http://gwenole.beauchesne.online.fr/basilisk2/files/BasiliskII_jit_src_%{snapshot}.tar.bz2 Source1: BasiliskII-jit.16.png.bz2 Source2: BasiliskII-jit.32.png.bz2 Source3: BasiliskII-jit.48.png.bz2 Source4: cxmon-%{mon_version}-%{mon_snapshot}.tar.bz2 Source5: kernel-version.sh Patch0: BasiliskII-jit-keycodes.patch.bz2 Patch1: BasiliskII-jit-no-modversions.patch.bz2 Patch2: BasiliskII-jit-manpage.patch.bz2 Patch3: BasiliskII-jit-debug-hwbases.patch.bz2 Patch4: BasiliskII-1.0-sheepnet.patch.bz2 Patch5: BasiliskII-jit-1.0-makej-fixes.patch.bz2 Patch6: BasiliskII-jit-1.0-gcc32workaround.patch.bz2 License: GPL URL: http://gwenole.beauchesne.online.fr/basilisk2/ Group: Emulators ExclusiveArch: %{ix86} BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRequires: gcc-cpp, gcc-c++ BuildRequires: XFree86-devel, XFree86-libs, XFree86-static-libs BuildRequires: libesound0-devel, libgtk+1.2-devel, libaudiofile0-devel BuildRequires: libesound0, libaudiofile0, libbinutils2, libgtk+1.2, libglib1.2 %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 - Ethernet driver - Serial drivers - SCSI Manager (old-style) emulation - Emulates extended ADB keyboard and 3-button mouse This version includes the UAE JIT ("just in time") compiler, which speeds up the emulator by a factor of 10-15x with respect to the plain version. %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 %patch0 -p1 -b .keycodes %patch1 -p1 -b .modversions %if %{DebugHWBases} %patch3 -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 %patch4 -p1 -b .sheep %patch5 -p1 -b .makej-fixes %patch6 -p1 -b .gcc32workaround # Fixup man page if [ "%{name}" = "BasiliskII-jit" ]; then %patch2 -p1 -b .jit mv ./src/Unix/BasiliskII.1 ./src/Unix/BasiliskII-jit.1 fi %build cd ./src/Unix # Use moderate optimization flags (i.e. disable most of RPM_OPT_FLAGS) OPT_FLAGS="-O2 -pipe" CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" JIT_DEBUG= %if %{JITDebug} JIT_DEBUG="--with-mon --enable-jit-debug" %endif %configure --enable-jit-compiler --enable-fpe=ieee --datadir=%{_datadir}/%{name} $JIT_DEBUG %make APP=%{name} %if %sheepnet # build sheep_net module cd Linux/NetDriver make %endif %install rm -rf $RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/bin install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/lib install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1 %if %sheepnet install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/misc \ $RPM_BUILD_ROOT/lib/modules/%{kernel_version}smp/misc \ $RPM_BUILD_ROOT/lib/modules/%{kernel_version}enterprise/misc %endif cd ./src/Unix %makeinstall APP=%{name} %if %sheepnet # install the sheep_net module cd ./Linux/NetDriver install -m 644 sheep_net-up.o \ $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/misc/sheep_net.o install -m 644 sheep_net-smp.o \ $RPM_BUILD_ROOT/lib/modules/%{kernel_version}smp/misc/sheep_net.o install -m 644 sheep_net-enterprise.o \ $RPM_BUILD_ROOT/lib/modules/%{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 - JIT"\ icon="%{name}.png"\ longtitle="A Macintosh Emulator"\ needs="x11"\ section="Applications/Emulators" EOF %clean rm -rf $RPM_BUILD_ROOT %post %update_menus update-alternatives --install %{_bindir}/basilisk2 basilisk2 %{_bindir}/%{name} 20 \ --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 %doc TODO.JIT ChangeLog.JIT %{_mandir}/man1/%{name}.1* # %{_bindir}/%{name} # data %dir %{_datadir}/%{name} %{_datadir}/%{name}/fbdevices %{_datadir}/%{name}/keycodes # mdk icons %{_miconsdir}/%{name}.png* %{_iconsdir}/%{name}.png* %{_liconsdir}/%{name}.png* # mdk menus %{_menudir}/%{name} %if %sheepnet %files sheepnet %defattr(-,root,root) %{_datadir}/%{name}-sheepnet/Makefile %{_datadir}/%{name}-sheepnet/sheep_net.c /lib/modules/%{kernel_version}/misc/* %files sheepnet-smp %defattr(-,root,root) %{_datadir}/%{name}-sheepnet/Makefile %{_datadir}/%{name}-sheepnet/sheep_net.c /lib/modules/%{kernel_version}smp/misc/* %files sheepnet-enterprise %defattr(-,root,root) %{_datadir}/%{name}-sheepnet/Makefile %{_datadir}/%{name}-sheepnet/sheep_net.c /lib/modules/%{kernel_version}enterprise/misc/* %endif %changelog * Thu Sep 12 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.5mdk - Patch5: Parallel make fixes - Patch6: Workaround gcc3.2 oddities in post asm template reloads * Wed Aug 28 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.4mdk - disabled sheep_net modules (now into kernel packages). * Wed Jul 24 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0-0.3mdk - rebuild for new readline * Thu Jul 11 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.2mdk - Enabled sheep_net module. * Mon Mar 25 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.1mdk - Update to CVS snapshot 2002/03/25: - Don't switch depth on startup and load default XPRAM values - Workaround JIT FPU bug where fmul instructions would be badly generated in longish blocks (say 107 instructions!). e.g. FPU tests in Speedometer 3.23 - Fix IEEE FPU core where illegal instructions would be generated for FSMOVE et al. while emulating a 68040 - Really merge cpu core with uae-0.8.21: - xBCD fixes by Maik Qualmann, with some additional flag fixes by Bernd - Ignore T0 bit if not emulating a 68020+ - Fix MOVE16 instructions - Trace mode fixes (Bernd Roesch & Bernd Schmidt) - Reintegrate PTEST and PFLUSH instructions back as no-ops * Wed Mar 13 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-6mdk - Rebuild against latest XF4.2 libraries - Disable debugging of HWBases - Update to CVS snapshot 2002/03/13, which brings: - Minor optimizations to the mid-layer (and_l_ri, rotate/immediate insns) - Avoid name clashes for FP types (s/fp_/fpu_/) - Fix asm constraints for FPU_DEBUG * Tue Jan 15 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-5mdk - Dadouize menu icons - Source4: Add cxmon builtin for the runtime disassemblers for the m68k->x86 JIT compiler. Add "jitdebug" as a new prefs item. - Remove Patch4: I integrated it into upstream CVS - Update to CVS snapshot 2002/01/07, which brings: - Fix typos in the FPU core (define NaN instead of NAN) - Merge with AmigaXL JIT sources as of 2001/12/06 - Enable separate BlockInfos allocation. i.e. move block info data out of the translation cache meant to hold only x86 instructions. - Fix again fflags_into_flags_internal() when %%eax can clobber condition codes. This is needed for alternate code generation for fucomi instructions that don't exist on non-P6+ cores. * Thu Dec 27 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-4mdk - Patch4: Add support for large files. Tested with a 3 GB hard disk image on IA-32. * Thu Dec 20 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-3mdk - Disable most of RPM_OPT_FLAGS, lower optimizations to -O2 - Patch3: Print out (debug) information while patching HW Base Addresses - Patch1: Regenerate to shorten X server match string to "Mandrake" - Update to CVS snapshot 2001/12/20, which brings: - Fix code generation for shift/rotate instructions - Fix condition codes handling for BFINS instructions * Mon Aug 20 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-2mdk - Update to CVS snapshot 2001/08/20, which brings: - Runtime depth switching - Runtime resolution switching - A little fix to the register allocator - Compilation fixes with gcc-3.0.1 - Set "basilisk2" as an alternative name for the binary and the man page - Patch2: fixup man page * Tue Jun 5 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-1mdk - release 0.9 - fixed table68k: NEGX may use X & Z flags - cache_tags[] is now a 64K-entries table - added mdk menus and icons * Mon Apr 9 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-0.6mdk - sanitized specfile (s/Copyright/License, BuildRequires, etc.) - updated to CVS snapshot 09042001 * Fri Mar 30 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-0.5mdk - removed cross-compiled binary for Jvaqbjf... * Fri Mar 30 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9-0.4mdk - updated sources to CVS snapshot 30032001 - fixed FMOVEM code translator again (solves Photoshop hangs at startup) - removed buguous^Wincomplete FREM code translator (solves "free rotation" feature of ClarisWorks) - disabled modversions in sheep_net (patch1) - fixed previous ChangeLog * 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" (patch0) - updated common and JIT sources 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 - bug fix in FPU code generator for P6+ cores - GUI prefs editor for JIT prefs items * Wed Feb 22 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.9-0.2mdk - fixed doc. * Wed Feb 21 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.9-0.1mdk - updated to snapshot 16022001. - disabled -ffast-math and lowered optimization to -O2, to avoid gcc 2.96.X problems. - removed sheep_net module (for now). * Wed Jan 24 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.8-17mdk - updated to snapshot 14012001. * Wed Dec 20 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.8-16mdk - initial release with JIT (UAE) included. - more macros. * 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