Author: musuruan
Update of /cvs/nonfree/rpms/yapeSDL/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv24144/devel
Modified Files:
.cvsignore sources
Added Files:
yapeSDL-0.32.4-gcc4_cflags.patch yapeSDL-0.32.4-homedir.patch
yapeSDL-0.32.4-loadfile.patch yapeSDL.spec
Log Message:
First import
yapeSDL-0.32.4-gcc4_cflags.patch:
--- NEW FILE yapeSDL-0.32.4-gcc4_cflags.patch ---
--- Makefile
+++ Makefile
@@ -13,7 +13,7 @@
headers = $(objects:.o=.h)
CC = g++
-cflags = -O3 -finline -frerun-loop-opt -Winline `sdl-config --cflags`
+cflags = $(RPM_OPT_FLAGS) -finline-functions -Winline `sdl-config --cflags`
libs = `sdl-config --libs`
#SDL_CFLAGS := $(shell sdl-config --cflags)
--- interface.cpp
+++ interface.cpp
@@ -109,7 +109,7 @@
strcpy( cfilename, "*.prg");
set_color( COLOR(0,0), COLOR(1,5) );
- res = (int ) ad_find_first_file((char *) cfilename);
+ res = (int )(long) ad_find_first_file((char *) cfilename);
while(res) {
strcpy( cfilename, (char *) ad_return_current_filename());
//texttoscreen(100,100+(nf<<3), cfilename);
--- main.cpp
+++ main.cpp
@@ -185,6 +185,8 @@
}
//-----------------------------------------------------------------------------
+#define min(a,b) ( ((a)<(b)) ? (a) : (b) )
+#define max(a,b) ( ((a)>(b)) ? (a) : (b) )
void init_palette(void)
{
--- sound.cpp
+++ sound.cpp
@@ -138,6 +138,8 @@
int i;
float j,k;
+ ted = (MEM *) p;
+
MixingFreq = 44100;//44100 22050 11025
FragmentSize = MixingFreq / 50;
BufferLength = 2*FragmentSize;//2*FragmentSize 2048 4096 in Windows version...
@@ -202,7 +204,6 @@
Sound = 1;
//SDL_PauseAudio(1);
- ted = (MEM *) p;
}
inline void render_audio(unsigned int nrsamples, Uint8 *buffer)
--- tape.h
+++ tape.h
@@ -34,7 +34,7 @@
void (TAP::*write_encode)();
public:
- TAP::TAP();
+ TAP();
MEM *mem;
char tapefilename[256];
bool attach_tap();
yapeSDL-0.32.4-homedir.patch:
--- NEW FILE yapeSDL-0.32.4-homedir.patch ---
diff -durN yape.orig/archdep.cpp yape/archdep.cpp
--- yape.orig/archdep.cpp 2001-07-22 23:47:00.000000000 +0200
+++ yape/archdep.cpp 2008-02-17 17:17:31.000000000 +0100
@@ -49,7 +49,7 @@
int ad_makedirs(char *path)
{
strcpy(temp,path);
- strcat(temp, "/yape");
+ strcat(temp, "/.yape");
CreateDirectory(temp, NULL);
return 1;
@@ -108,7 +108,7 @@
strcpy( homedir , getenv( "HOME" ));
//strcpy( filter, filefilter);
- strcat( homedir, "/yape" );
+ strcat( homedir, "/.yape" );
chdir ( homedir );
dirp = opendir( homedir );
//fprintf( stderr, "reading from %s\n", homedir);
@@ -136,7 +136,7 @@
int ad_makedirs(char *path)
{
strcpy(temp,path);
- strcat(temp, "/yape");
+ strcat(temp, "/.yape");
mkdir(temp, 0777);
return 1;
@@ -146,7 +146,7 @@
{
strcpy( temp, tmpchr);
- strcat( temp, "/yape/yape.conf");
+ strcat( temp, "/.yape/yape.conf");
return temp;
}
diff -durN yape.orig/README.SDL yape/README.SDL
--- yape.orig/README.SDL 2004-08-31 20:07:31.000000000 +0200
+++ yape/README.SDL 2008-02-17 17:17:45.000000000 +0100
@@ -78,7 +78,7 @@
LALT + W : toggle between unlimited speed and 50 Hz frame rate (original speed)
Internal disk LOAD/SAVE operations are supported to the current
- file system directory, which is usually '/home/<username>/yape'.
+ file system directory, which is usually '/home/<username>/.yape'.
Any PRG files you may wish to load, should go there.
This means that an exact filename match will load
yapeSDL-0.32.4-loadfile.patch:
--- NEW FILE yapeSDL-0.32.4-loadfile.patch ---
diff -durN yape.orig/main.cpp yape/main.cpp
--- yape.orig/main.cpp 2004-08-03 23:52:38.000000000 +0200
+++ yape/main.cpp 2008-02-17 22:00:26.000000000 +0100
@@ -637,6 +637,8 @@
fprintf(stderr,"Error loading settings or no .ini file present...\n");
//-------------------------------------------------------------------------
+ timeelapsed = time_elapsed();
+ ted8360->cpuptr = machine;
// if we have a command line parameter
if (argv[1]!='\0') {
printf("Parameter 1 :%s\n", argv[1]);
@@ -647,12 +649,9 @@
g_TotFrames++;
}
// and then try to load the parameter as file
- load_file(argv[1]);
start_file(argv[1]);
}
//--------------------------------------------------------------
- timeelapsed = time_elapsed();
- ted8360->cpuptr = machine;
for (;;) {
// hook into the emulation loop if active
if (g_bActive) {
--- NEW FILE yapeSDL.spec ---
Name: yapeSDL
Version: 0.32.4
Release: 2%{?dist}
Summary: YAPE, yet another plus/4 emulator
Group: Applications/Emulators
License: GPLv2+
URL:
http://yape.plus4.net/
Source:
http://yape.homeserver.hu/download/%{name}-%{version}.tar.gz
# OpenSUSE
Patch0: %{name}-0.32.4-gcc4_cflags.patch
# FreeBSD
Patch1: %{name}-0.32.4-homedir.patch
# Andrea Musuruane
Patch2: %{name}-0.32.4-loadfile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel >= 0:1.2
%description
YAPE is a rather decent plus/4 emulator. It has been developed for
several years by now and it is available in Windows and
multiplatform editions, although the latter lags several versions
behind the first.
%prep
%setup -q -c -n %{name}-%{version}
%patch0 -p0
%patch1 -p1
%patch2 -p1
# Fix end-of-line-encoding
sed -i 's/\r//' *.{cpp,h} Changes README.SDL copying
# Fix UTF-8 encoding
iconv --from=ISO-8859-1 --to=UTF-8 README.SDL > README.SDL.utf8
mv README.SDL.utf8 README.SDL
# Fix spurious executable permissions
chmod 644 *.{cpp,h} Changes README.SDL copying
%build
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
install -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 yape %{buildroot}%{_bindir}/
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc Changes copying README.SDL
%defattr(-,root,root,0755)
%{_bindir}/yape
%changelog
* Tue Feb 26 2008 Andrea Musuruane <musuruan(a)gmail.com> 0.32.4-2
- Minor cleanup
* Sun Jan 27 2008 Andrea Musuruane <musuruan(a)gmail.com> 0.32.4-1
- Initial RPM release
- Used a patch from OpenSUSE to compile with GCC4 and to use RPM_OPT_FLAGS
- Used a patch from FreeBSD to change homedir to .yape
- Made a patch to fix loading tap and prg files supplied in the command line
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/yapeSDL/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Jun 2008 16:17:14 -0000 1.1
+++ .cvsignore 26 Jul 2008 14:18:00 -0000 1.2
@@ -0,0 +1 @@
+yapeSDL-0.32.4.tar.gz
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/yapeSDL/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Jun 2008 16:17:14 -0000 1.1
+++ sources 26 Jul 2008 14:18:00 -0000 1.2
@@ -0,0 +1 @@
+b2b7a180d2c7893805f820f80f59ad30 yapeSDL-0.32.4.tar.gz