Author: thl
Update of /cvs/free/rpms/SheepShaver/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv9692
Modified Files:
.cvsignore sources
Added Files:
SheepShaver-2.2-nostrip.patch SheepShaver-2.3-gcc43.patch
SheepShaver.spec
Log Message:
sync with devel (after importing from freshrpms there)
SheepShaver-2.2-nostrip.patch:
--- NEW FILE SheepShaver-2.2-nostrip.patch ---
diff -up SheepShaver-2.3/src/Unix/Makefile.in.nostrip
SheepShaver-2.3/src/Unix/Makefile.in
--- SheepShaver-2.3/src/Unix/Makefile.in.nostrip 2006-05-08 19:19:45.000000000 +0200
+++ SheepShaver-2.3/src/Unix/Makefile.in 2008-10-18 21:37:07.000000000 +0200
@@ -35,7 +35,7 @@ BLESS = @BLESS@
EXEEXT = @EXEEXT@
KEYCODES = @KEYCODES@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
SLIRP_CFLAGS = @SLIRP_CFLAGS@
SheepShaver-2.3-gcc43.patch:
--- NEW FILE SheepShaver-2.3-gcc43.patch ---
diff -up SheepShaver-2.3/src/Unix/sys_unix.cpp~ SheepShaver-2.3/src/Unix/sys_unix.cpp
--- SheepShaver-2.3/src/Unix/sys_unix.cpp~ 2008-10-18 21:38:50.000000000 +0200
+++ SheepShaver-2.3/src/Unix/sys_unix.cpp 2008-10-18 21:38:50.000000000 +0200
@@ -23,6 +23,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <errno.h>
+#include <limits.h>
#ifdef HAVE_AVAILABILITYMACROS_H
#include <AvailabilityMacros.h>
diff -up SheepShaver-2.3/src/Unix/sigsegv.cpp~ SheepShaver-2.3/src/Unix/sigsegv.cpp
--- SheepShaver-2.3/src/Unix/sigsegv.cpp~ 2008-10-18 23:10:53.000000000 +0200
+++ SheepShaver-2.3/src/Unix/sigsegv.cpp 2008-10-18 23:10:53.000000000 +0200
@@ -2293,7 +2293,8 @@ int main(void)
#define TEST_SKIP_INSTRUCTION(TYPE) do { \
const unsigned long TAG = 0x12345678 | \
(sizeof(long) == 8 ? 0x9abcdef0UL << 31 : 0); \
- TYPE data = *((TYPE *)(page + sizeof(TYPE))); \
+ volatile TYPE data = 0; \
+ data = *((TYPE *)(page + sizeof(TYPE))); \
volatile unsigned long effect = data + TAG; \
if (effect != TAG) \
return 9; \
diff -up SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp~
SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp
--- SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp~ 2008-10-18 21:57:15.000000000
+0200
+++ SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp 2008-10-18 21:57:15.000000000
+0200
@@ -256,7 +256,7 @@ void powerpc_cpu::initialize()
// Initialize block lookup table
#if PPC_DECODE_CACHE || PPC_ENABLE_JIT
- block_cache.initialize();
+ blockcache.initialize();
#endif
// Init cache range invalidate recorder
@@ -540,7 +540,7 @@ void *powerpc_cpu::compile_chain_block(b
const uint32 bpc = sbi->pc;
const uint32 tpc = sbi->li[n].jmp_pc;
- block_info *tbi = block_cache.find(tpc);
+ block_info *tbi = blockcache.find(tpc);
if (tbi == NULL)
tbi = compile_block(tpc);
assert(tbi && tbi->pc == tpc);
@@ -562,7 +562,7 @@ void powerpc_cpu::execute(uint32 entry)
if (execute_depth == 1 || (PPC_ENABLE_JIT && PPC_REENTRANT_JIT)) {
#if PPC_ENABLE_JIT
if (use_jit) {
- block_info *bi = block_cache.find(pc());
+ block_info *bi = blockcache.find(pc());
if (bi == NULL)
bi = compile_block(pc());
for (;;) {
@@ -585,7 +585,7 @@ void powerpc_cpu::execute(uint32 entry)
// Don't check for backward branches here as this
// is now done by generated code. Besides, we will
// get here if the fast cache lookup failed too.
- if ((bi = block_cache.find(pc())) == NULL)
+ if ((bi = blockcache.find(pc())) == NULL)
break;
}
@@ -596,7 +596,7 @@ void powerpc_cpu::execute(uint32 entry)
}
#endif
#if PPC_DECODE_CACHE
- block_info *bi = block_cache.find(pc());
+ block_info *bi = blockcache.find(pc());
if (bi != NULL)
goto pdi_execute;
for (;;) {
@@ -606,7 +606,7 @@ void powerpc_cpu::execute(uint32 entry)
clock_t start_time;
start_time = clock();
#endif
- bi = block_cache.new_blockinfo();
+ bi = blockcache.new_blockinfo();
bi->init(pc());
// Predecode a new block
@@ -656,8 +656,8 @@ void powerpc_cpu::execute(uint32 entry)
bi->min_pc = dpc;
bi->max_pc = entry;
bi->size = di - bi->di;
- block_cache.add_to_cl_list(bi);
- block_cache.add_to_active_list(bi);
+ blockcache.add_to_cl_list(bi);
+ blockcache.add_to_active_list(bi);
decode_cache_p += bi->size;
#if PPC_PROFILE_COMPILE_TIME
compile_time += (clock() - start_time);
@@ -691,7 +691,7 @@ void powerpc_cpu::execute(uint32 entry)
}
}
- if ((bi->pc != pc()) && ((bi = block_cache.find(pc())) == NULL))
+ if ((bi->pc != pc()) && ((bi = blockcache.find(pc())) == NULL))
break;
}
}
@@ -767,8 +767,8 @@ void powerpc_cpu::invalidate_cache()
{
D(bug("Invalidate all cache blocks\n"));
#if PPC_DECODE_CACHE || PPC_ENABLE_JIT
- block_cache.clear();
- block_cache.initialize();
+ blockcache.clear();
+ blockcache.initialize();
spcflags().set(SPCFLAG_JIT_EXEC_RETURN);
#endif
#if PPC_ENABLE_JIT
@@ -811,6 +811,6 @@ void powerpc_cpu::invalidate_cache_range
}
#endif
spcflags().set(SPCFLAG_JIT_EXEC_RETURN);
- block_cache.clear_range(start, end);
+ blockcache.clear_range(start, end);
#endif
}
diff -up SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp~
SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp
--- SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp~ 2008-10-18 21:57:24.000000000
+0200
+++ SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp 2008-10-18 21:57:24.000000000
+0200
@@ -360,7 +360,7 @@ private:
// Block lookup table
typedef powerpc_block_info block_info;
- block_cache< block_info, lazy_allocator > block_cache;
+ block_cache< block_info, lazy_allocator > blockcache;
#if PPC_DECODE_CACHE
// Decode Cache
diff -up SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp~
SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp
--- SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp~ 2008-10-18
21:58:04.000000000 +0200
+++ SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp 2008-10-18
21:59:27.000000000 +0200
@@ -96,7 +96,7 @@ struct powerpc_dyngen_helper {
static uint64 & fp_result_dw() { return CPU->fp_result_dw(); }
static inline void set_cr(int crfd, int v) { CPU->cr().set(crfd, v); }
- static inline powerpc_block_info *find_block(uint32 pc) { return
CPU->block_cache.fast_find(pc); }
+ static inline powerpc_block_info *find_block(uint32 pc) { return
CPU->blockcache.fast_find(pc); }
};
// Semantic action templates
@@ -1268,13 +1268,13 @@ static inline void do_lmw(void)
}
template<>
-static inline void do_lmw<31>(void)
+inline void do_lmw<31>(void)
{
CPU->gpr(31) = vm_read_memory_4(T0);
}
template<>
-static inline void do_lmw<32>(void)
+inline void do_lmw<32>(void)
{
for (uint32 r = PARAM1, ad = T0; r <= 31; r++, ad += 4)
CPU->gpr(r) = vm_read_memory_4(ad);
@@ -1290,13 +1290,13 @@ static inline void do_stmw(void)
}
template<>
-static inline void do_stmw<31>(void)
+inline void do_stmw<31>(void)
{
vm_write_memory_4(T0, CPU->gpr(31));
}
template<>
-static inline void do_stmw<32>(void)
+inline void do_stmw<32>(void)
{
for (uint32 r = PARAM1, ad = T0; r <= 31; r++, ad += 4)
vm_write_memory_4(ad, CPU->gpr(r));
diff -up SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp~
SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp
--- SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp~ 2008-10-18
22:00:22.000000000 +0200
+++ SheepShaver-2.3/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp 2008-10-18
22:00:22.000000000 +0200
@@ -143,7 +143,7 @@ powerpc_cpu::compile_block(uint32 entry_
codegen_context_t cg_context(dg);
cg_context.entry_point = entry_point;
again:
- block_info *bi = block_cache.new_blockinfo();
+ block_info *bi = blockcache.new_blockinfo();
bi->init(entry_point);
bi->entry_point = dg.gen_start();
@@ -1570,11 +1570,11 @@ powerpc_cpu::compile_block(uint32 entry_
#endif
dg.gen_end();
- block_cache.add_to_cl_list(bi);
+ blockcache.add_to_cl_list(bi);
if (is_read_only_memory(bi->pc))
- block_cache.add_to_dormant_list(bi);
+ blockcache.add_to_dormant_list(bi);
else
- block_cache.add_to_active_list(bi);
+ blockcache.add_to_active_list(bi);
#if PPC_PROFILE_COMPILE_TIME
compile_time += (clock() - start_time);
#endif
--- NEW FILE SheepShaver.spec ---
%define date 20060514
%define mon_version 3.2
%define desktop_vendor rpmforge
Summary: Power Macintosh emulator
Name: SheepShaver
Version: 2.3
Release: 0.6.%{date}%{?dist}
License: GPLv2+
Group: Applications/Emulators
URL:
http://www.gibix.net/projects/sheepshaver/
Source0:
http://www.gibix.net/projects/sheepshaver/files/SheepShaver-%{version}-0....
Source1:
http://cxmon.cebix.net/downloads/cxmon-%{mon_version}.tar.gz
Source2: SheepShaver.png
Patch0: SheepShaver-2.2-nostrip.patch
Patch1: SheepShaver-2.3-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gcc-c++, gtk2-devel, esound-devel >= 0.2.8
BuildRequires: desktop-file-utils, readline-devel
%{?_with_sdl:BuildRequires: SDL-devel}
BuildRequires: libXt-devel, libXxf86dga-devel, libXxf86vm-devel
# Other archs need an instruction skipper on well-known invalid
# memory references (e.g. illegal writes to ROM).
ExclusiveArch: i386 ppc x86_64
%description
SheepShaver is a MacOS run-time environment that allows you to run classic
MacOS applications. This means that both Linux and MacOS applications can
run at the same time (usually in a window on the Linux desktop).
If you are using a PowerPC-based system, applications will run at native
speed (i.e. with no emulation involved). There is also a built-in PowerPC
G4 emulator, without MMU support, for non-PowerPC systems.
Available rebuild options :
--without : mon
--with : sdl
%prep
%setup -q -a 1
%patch0 -p1 -b .nostrip
%patch1 -p1 -b .gcc43
%build
pushd src/Unix
%configure \
--datadir=%{_sysconfdir} --enable-ppc-emulator=yes \
%{!?_without_mon: --with-mon=../../cxmon-%{mon_version}/src} \
%{?_with_sdl: --enable-sdl-video --enable-sdl-audio}
%{__mkdir} obj
%{__make} %{?_smp_mflags}
popd
%install
%{__rm} -rf %{buildroot}
%makeinstall -C src/Unix \
datadir="%{buildroot}%{_sysconfdir}"
chmod +x %{buildroot}%{_sysconfdir}/%{name}/tunconfig
# Create the system menu entry
%{__cat} > %{name}.desktop << EOF
[Desktop Entry]
Name=Sheep Shaver
Comment=Power Macintosh Emulator
Exec=SheepShaver
Icon=SheepShaver.png
Terminal=false
Type=Application
Categories=Game;Emulator;
EOF
%{__mkdir_p} %{buildroot}%{_datadir}/applications
desktop-file-install --vendor %{desktop_vendor} \
--dir %{buildroot}%{_datadir}/applications \
%{name}.desktop
%{__install} -D -p -m 0644 %{SOURCE2} \
%{buildroot}%{_datadir}/pixmaps/SheepShaver.png
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-, root, root, 0755)
%doc COPYING NEWS doc/Linux/*
%dir %{_sysconfdir}/SheepShaver/
%config(noreplace) %{_sysconfdir}/SheepShaver/keycodes
%{_sysconfdir}/SheepShaver/tunconfig
%{_bindir}/SheepShaver
%{_datadir}/pixmaps/SheepShaver.png
%{_datadir}/applications/%{desktop_vendor}-%{name}.desktop
%{_mandir}/man1/SheepShaver.1*
%changelog
* Sun Oct 19 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> - 2.3-0.6.20060514
- Use ppc cpu emulator even when running on ppc, as using the native cpu
requires a private implementation of pthreads from:
src/Unix/Linux/sheepthreads.c
which depends on glibc pthread internals which are no longer exposed by
glibc and quite possibly changed
* Sat Oct 18 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> - 2.3-0.5.20060514
- Updated release of cxmon to 3.2
- Fix compilation with gcc-4.3 (tricky, esp. on x86_64)
- Regenerate Patch0, nuke _default_patch_fuzz 2
- Fixup desktop file Categories, so that we show up under the Emulators menu
- Make rpmlint like this package
- Add missing libXxf86dga-devel, libXxf86vm-devel BuildRequires
* Sat Oct 18 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info -
2.3-0.4.20060514
- rebuild for RPM Fusion
- define _default_patch_fuzz 2
- ExclusiveArch: i386 instead of ix86 to prevent plague building this for
athlon and other ix86 archs
- always build for x.org
* Sun Jun 25 2006 Matthias Saou <
http://freshrpms.net/> 2.3-0.3.20060514
- Update to 2.3-0.20060514.1.
- Remove no longer needed stats patch.
* Fri Jan 13 2006 Matthias Saou <
http://freshrpms.net/> 2.3-0.2.20051130
- Add modular xorg build conditional.
* Thu Dec 1 2005 Matthias Saou <
http://freshrpms.net/> 2.3-0.1.20051130
- Update to 2.3 20051130 snapshot.
- Update URLs to
gibix.net.
- Drop no longer relevant misc patch (NET_IF_SHEEPNET change).
- Add --with sdl rebuild option.
- Switch from gtk1 to new gtk2 GUI.
* Sat Apr 21 2005 Matthias Saou <
http://freshrpms.net/> 2.2-0.20050315
- Spec file cleanup, based on the .src.rpm from the SheepShaver website.
- Make cxmon support optionnal with --without mon.
- Add menu entry.
- Disable binary stripping on make install to get a useful debuginfo package.
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/SheepShaver/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 18 Oct 2008 13:44:50 -0000 1.1
+++ .cvsignore 19 Oct 2008 10:12:46 -0000 1.2
@@ -0,0 +1,3 @@
+cxmon-3.2.tar.gz
+SheepShaver-2.3-0.20060514.1.tar.bz2
+SheepShaver.png
Index: sources
===================================================================
RCS file: /cvs/free/rpms/SheepShaver/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 18 Oct 2008 13:44:50 -0000 1.1
+++ sources 19 Oct 2008 10:12:46 -0000 1.2
@@ -0,0 +1,3 @@
+8fb95c58f6c04eace6ae84d0c7b79ca1 cxmon-3.2.tar.gz
+81904c06340fb8101800df864eacedcd SheepShaver-2.3-0.20060514.1.tar.bz2
+22e17876d74a37e1a9f19d2150170cee SheepShaver.png