Author: musuruan
Update of /cvs/nonfree/rpms/meka/F-13
In directory se02.es.rpmfusion.net:/tmp/cvs-serv17762/F-13
Modified Files:
.cvsignore sources
Added Files:
meka-0.72-buffer_overflow.patch meka-0.72-rpmopt.patch
meka-0.73-execstack.patch meka-0.73-gcc45.patch
meka-0.73-noseal.patch meka.desktop meka.sh meka.spec
Log Message:
First import
meka-0.72-buffer_overflow.patch:
meka.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE meka-0.72-buffer_overflow.patch ---
diff -dur meka.orig/srcs/meka.h meka/srcs/meka.h
--- meka.orig/srcs/meka.h 2007-05-08 20:47:24.000000000 +0200
+++ meka/srcs/meka.h 2007-05-25 19:26:05.000000000 +0200
@@ -144,9 +144,9 @@
// Max path length
// FIXME: Portable way to obtain this at compilation stage?
-#define FILENAME_LEN (512)
+//#define FILENAME_LEN (512)
//#define FILENAME_LEN MAXPATHLEN
-//#define FILENAME_LEN PATH_MAX
+#define FILENAME_LEN PATH_MAX
OPT_TYPE opt;
TGFX_TYPE tgfx;
meka-0.72-rpmopt.patch:
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- NEW FILE meka-0.72-rpmopt.patch ---
--- meka.orig/srcs/Makefile 2005-09-25 17:15:24.000000000 +0200
+++ meka/srcs/Makefile 2006-12-16 14:11:46.000000000 +0100
@@ -280,6 +286,7 @@
#-----------------------------------------------------
# Compiler Flags
#-----------------------------------------------------
+RPMFLAGS =
CFLAGS = $(INCLUDES) $(DEFINES)
ifeq ($(SYSTEM), win32)
@@ -291,7 +298,7 @@
# UNIX/MS-DOS
# RELEASE build
ifeq ($(BUILD), release)
-CFLAGS += -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops
-fomit-frame-pointer
+CFLAGS += ${RPMFLAGS}
endif
# DEBUG build
ifeq ($(BUILD), debug)
meka-0.73-execstack.patch:
eagle.asm | 4 ++++
hq2x16.asm | 4 ++++
hq2x32.asm | 4 ++++
mappersa.asm | 4 ++++
videoasm.asm | 4 ++++
5 files changed, 20 insertions(+)
--- NEW FILE meka-0.73-execstack.patch ---
diff -dur meka.orig/srcs/eagle.asm meka/srcs/eagle.asm
--- meka.orig/srcs/eagle.asm 2007-07-29 20:58:28.000000000 +0200
+++ meka/srcs/eagle.asm 2008-08-22 17:39:10.000000000 +0200
@@ -1523,3 +1523,7 @@
_tripline3 resb 8
_dlx resb 32
+%ifidn __OUTPUT_FORMAT__,elf32
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+
diff -dur meka.orig/srcs/hq2x16.asm meka/srcs/hq2x16.asm
--- meka.orig/srcs/hq2x16.asm 2007-07-29 20:58:29.000000000 +0200
+++ meka/srcs/hq2x16.asm 2008-08-22 17:38:32.000000000 +0200
@@ -1936,3 +1936,7 @@
dd ..@cross8, ..@flag0, ..@flag0, ..@flag0,
dd ..@flag0, ..@flag0, ..@flag0, ..@flag0
+%ifidn __OUTPUT_FORMAT__,elf32
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+
diff -dur meka.orig/srcs/hq2x32.asm meka/srcs/hq2x32.asm
--- meka.orig/srcs/hq2x32.asm 2007-07-29 20:58:29.000000000 +0200
+++ meka/srcs/hq2x32.asm 2008-08-22 17:39:56.000000000 +0200
@@ -1934,3 +1934,7 @@
dd ..@cross8, ..@crossN, ..@crossN, ..@crossN,
dd ..@crossN, ..@crossN, ..@crossN, ..@crossN
+%ifidn __OUTPUT_FORMAT__,elf32
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+
diff -dur meka.orig/srcs/mappersa.asm meka/srcs/mappersa.asm
--- meka.orig/srcs/mappersa.asm 2008-06-12 22:22:15.000000000 +0200
+++ meka/srcs/mappersa.asm 2008-08-22 17:38:55.000000000 +0200
@@ -173,3 +173,7 @@
END
+%ifidn __OUTPUT_FORMAT__,elf32
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+
diff -dur meka.orig/srcs/videoasm.asm meka/srcs/videoasm.asm
--- meka.orig/srcs/videoasm.asm 2007-07-29 20:58:29.000000000 +0200
+++ meka/srcs/videoasm.asm 2008-08-22 17:56:49.000000000 +0200
@@ -495,3 +495,7 @@
;------------------------------------------------------------------------------
+%ifidn __OUTPUT_FORMAT__,elf32
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+
meka-0.73-gcc45.patch:
blit.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- NEW FILE meka-0.73-gcc45.patch ---
diff -durN meka.orig/srcs/blit.c meka/srcs/blit.c
--- meka.orig/srcs/blit.c 2007-05-27 04:45:48.000000000 +0200
+++ meka/srcs/blit.c 2010-11-20 15:35:52.286493356 +0100
@@ -230,8 +230,10 @@
const u32 color_mod_g = ((color_org >> 5 ) & 0x3F) *
blit_cfg.tv_mode_factor;
const u32 color_mod_b = ((color_org >> 11) & 0x1F) *
blit_cfg.tv_mode_factor;
const u16 color_mod = (color_mod_r) | (color_mod_g << 5) | (color_mod_b <<
11);
- *((u16 *)pdst1)++ = color_org;
- *((u16 *)pdst2)++ = color_mod;
+ *((u16 *)pdst1) = color_org;
+ *pdst1 += sizeof(u16);
+ *((u16 *)pdst2) = color_mod;
+ *pdst2 += sizeof(u16);
}
}
Blit_Fullscreen_Misc();
meka-0.73-noseal.patch:
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE meka-0.73-noseal.patch ---
diff -dur meka/srcs/Makefile meka.noseal/srcs/Makefile
--- meka/srcs/Makefile 2008-03-15 23:38:10.000000000 +0100
+++ meka.noseal/srcs/Makefile 2008-08-22 15:01:52.000000000 +0200
@@ -88,7 +88,7 @@
MKDIR = mkdir
#--- Definitions
DEF_OS = -DARCH_UNIX -DX86_ASM -DASM_SYMBOLS_REQUIRE_UNDERSCORE
-INC_OS = -Ilibs -I../include # This may require an
update
+INC_OS = -Ilibs -I../include -I../libs/seal/include # This may require an update
X86_ASM = yes
#--- Libraries
LIB_OS = -Llibs -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L../lib # This may require
an update
@@ -184,7 +184,7 @@
endif
ifeq ($(SYSTEM), unix)
-LIB_SOUND = -lseal
+OBJ_SOUND += $(OD)/sound/null_seal.o
endif
ifeq ($(SYSTEM), macosx)
--- NEW FILE meka.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Meka
Comment=Multi machine emulator for MS-DOS, MS-Windows and GNU/Linux
Exec=meka
Icon=meka
Terminal=true
Type=Application
Categories=Game;Emulator;
--- NEW FILE meka.sh ---
#!/bin/sh
GAME=meka
VERSION=0.73
GAME_LOCALDIR=$HOME/.$GAME
GAME_DATADIR=/usr/share/$GAME
GAME_EXECUTABLE=/usr/libexec/$GAME/$GAME
GAME_DOCDIR=/usr/share/doc/$GAME-$VERSION
mkdir -p $GAME_LOCALDIR
cd $GAME_LOCALDIR
# Create link to game file
ln -sf $GAME_EXECUTABLE $GAME
# Create links to files which are not (usually) modified by users
for file in meka.{dat,msg,nam,pat,thm}; do
ln -sf $GAME_DATADIR/$file $file
done
# Copy files which can be modified by users
for file in meka.{blt,inp}; do
test -e $file || cp -a $GAME_DATADIR/$file $file
done
# Create links to doc files
for file in {changes.txt,compat.txt,debugger.txt,mekanix.txt,meka.txt,multi.txt}; do
ln -sf $GAME_DOCDIR/$file $file
done
exec ./$GAME "$@"
--- NEW FILE meka.spec ---
%define pkgdate 2010-05-30
%define pkgversion %(echo %version|sed s/\\\\\.//g)
Name: meka
Version: 0.73
Release: 4%{?dist}
Summary: Sega 8-bit machine emulator
Group: Applications/Emulators
License: MEKA and non-commercial
URL:
http://www.smspower.org/meka/
Source0:
http://www.smspower.org/meka/releases/%{name}-%{pkgdate}-srcs-v%{pkgversi...
Source1: %{name}.sh
Source2: %{name}.desktop
Patch0: %{name}-0.72-rpmopt.patch
Patch1: %{name}-0.72-buffer_overflow.patch
#
http://www.smspower.org/forums/viewtopic.php?t=12699
Patch2: %{name}-0.73-execstack.patch
#
http://www.smspower.org/forums/viewtopic.php?t=10848
#
http://www.smspower.org/forums/viewtopic.php?t=12699
Patch3: %{name}-0.73-noseal.patch
#
http://www.smspower.org/forums/viewtopic.php?t=12699
Patch4: %{name}-0.73-gcc45.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# This is package contains ix86 asm code
ExclusiveArch: i686
BuildRequires: allegro-devel
BuildRequires: nasm
BuildRequires: libpng-devel
BuildRequires: libXpm-devel
BuildRequires: libXxf86dga-devel
BuildRequires: libXxf86vm-devel
BuildRequires: libXext-devel
BuildRequires: ImageMagick
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
%description
MEKA is a multi machine emulator, originally started as a Sega Master System
emulator, and generally very oriented toward Z80-based Sega 8-bit systems.
MEKA officially emulates the following systems:
- Sega Game 1000 / SG-1000 / Japan, Oceania
- Sega Computer 3000 / SC-3000 / Japan, Oceania, Europe
- Super Control Station / SF-7000 / Japan, Oceania, Europe
- Sega Mark III / MK3 / Japan
+ FM Unit Extension / MK3+FM / Japan
- Sega Master System / SMS / World Wide
- Sega Game Gear / GG / World Wide
- ColecoVision / COLECO / America, Europe
- Othello Multivision / OMV / Japan
You can play other systems on it only if you are smart enough to figure how.
And if you are, I doubt you will want to play Nintendo games. So forget it.
%prep
%setup -q -c
# Fix CFLAGS in Makefilie
%patch0 -p1
# Fix buffer overflows
%patch1 -p1
# Patch not to require an executable stack
%patch2 -p1
# Patch not to require libseal (audio is severly broken)
%patch3 -p1
# Patch to compile with gcc 4.5
%patch4 -p1
# Remove pre-built lib files
find -name '*.lib' -exec rm -f '{}' \;
# Fix end-of-line-encoding
sed -i 's/\r//' *.txt
# Fix char encondigs
for i in *.txt; do
iconv --from=ISO-8859-1 --to=UTF-8 $i > $i.utf8
mv $i.utf8 $i
done
%build
cd srcs
# make doesn't compile with %%{?_smp_mflags}
make RPMFLAGS="%{optflags}"
%install
rm -rf %{buildroot}
install -d %{buildroot}/%{_bindir}
install -m 755 %{SOURCE1} %{buildroot}/%{_bindir}/meka
install -d %{buildroot}/%{_libexecdir}/meka
install -m 755 meka %{buildroot}/%{_libexecdir}/meka
install -d %{buildroot}/%{_datadir}/meka
install -m 644 meka.{blt,dat,inp,msg,nam,pat,thm} %{buildroot}/%{_datadir}/meka
# install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install \
--dir %{buildroot}%{_datadir}/applications \
%{SOURCE2}
# install icons
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32}/apps
convert -delete 1 srcs/mekaw.ico \
%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
convert -delete 0 srcs/mekaw.ico \
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%clean
rm -rf %{buildroot}
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%defattr(-,root,root,-)
%{_bindir}/meka
%{_libexecdir}/meka
%{_datadir}/meka
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%doc changes.txt compat.txt debugger.txt history.txt mekanix.txt
%doc meka.txt multi.txt sources.txt tech.txt TODO.txt
%changelog
* Sat Dec 11 2010 Andrea Musuruane <musuruan(a)gmail.com> 0.73-4
- Fixed license
* Sat Dec 04 2010 Andrea Musuruane <musuruan(a)gmail.com> 0.73-3
- Changed summary
- Removed pre-built lib files
- Fixed execstack patch
- Fixed consistent use of macros
- Minor changes
* Sat Nov 20 2010 Andrea Musuruane <musuruan(a)gmail.com> 0.73-2
- Added a patch to compile with gcc4.5
* Sun Jun 13 2010 Andrea Musuruane <musuruan(a)gmail.com> 0.73-1
- New upstream release
* Thu Jul 30 2009 Andrea Musuruane <musuruan(a)gmail.com> 0.73-0.1.20080619
- First release
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/meka/F-13/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 12 Dec 2010 01:07:56 -0000 1.1
+++ .cvsignore 31 Dec 2010 18:37:16 -0000 1.2
@@ -0,0 +1 @@
+meka-2010-05-30-srcs-v073.zip
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/meka/F-13/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 12 Dec 2010 01:07:56 -0000 1.1
+++ sources 31 Dec 2010 18:37:16 -0000 1.2
@@ -0,0 +1 @@
+15d7201bb3de0d2e4c4683be57e614bc meka-2010-05-30-srcs-v073.zip