rpms/xmris/devel 0001-Fix-xm-exiting-with-a-BadFont-error.patch, NONE, 1.1 0002-Fix-timer-signal-handling-under-Linux.patch, NONE, 1.1 0003-Adjust-Imakefile-for-modern-systems.patch, NONE, 1.1 0004-Catch-the-window-being-deleted.patch, NONE, 1.1 0005-Fix-compiling-of-flock-code-under-Linux.patch, NONE, 1.1 0006-Fix-key-presses-getting-lost.patch, NONE, 1.1 0007-Change-key-binding-defaults-to-something-sane.patch, NONE, 1.1 0008-Fix-compiler-warnings.patch, NONE, 1.1 0009-Remove-TRANSPUTER-stuff.patch, NONE,
by jwrdegoede
Author: jwrdegoede
Update of /cvs/free/rpms/xmris/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv21163/devel
Modified Files:
.cvsignore sources
Added Files:
0001-Fix-xm-exiting-with-a-BadFont-error.patch
0002-Fix-timer-signal-handling-under-Linux.patch
0003-Adjust-Imakefile-for-modern-systems.patch
0004-Catch-the-window-being-deleted.patch
0005-Fix-compiling-of-flock-code-under-Linux.patch
0006-Fix-key-presses-getting-lost.patch
0007-Change-key-binding-defaults-to-something-sane.patch
0008-Fix-compiler-warnings.patch
0009-Remove-TRANSPUTER-stuff.patch
0010-Remove-USELOCKFILE-stuff.patch
0011-Remove-seteuid-stuff.patch 0012-Drop-dir-option.patch
0013-Drop-support-for-global-personal-file.patch
0014-Some-renames.patch
0015-Open-score-files-only-once-and-keep-them-open-till-t.patch
0016-Open-the-global-score-file-asap-and-drop-special-rig.patch
0017-Set-class-to-Xmsit-Xmris-depending-on-how-we-re-laun.patch
0018-Install-manpages-into-section-6-rather-then-1.patch
0019-Add-.desktop-files.patch xmris.png xmris.spec xmsit.png
Log Message:
initial xmris import
0001-Fix-xm-exiting-with-a-BadFont-error.patch:
defcom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- NEW FILE 0001-Fix-xm-exiting-with-a-BadFont-error.patch ---
>From 2e28187cbb718044cd963d7290f2a4611c305a9a Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon, 29 Nov 2010 22:34:51 +0100
Subject: [PATCH 01/20] Fix xm* exiting with a BadFont error
---
defcom.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/defcom.c b/defcom.c
index 8f354dd..f8a59b5 100644
--- a/defcom.c
+++ b/defcom.c
@@ -265,7 +265,7 @@ XtResource resources[] =
#endif /* TRANSPUTER */
#endif /* XMRED */
{XtNfont, XtCFont, XtRFont, sizeof(Font),
- XtOffsetOf(DATA, font), XtRImmediate, (XtPointer)FONT_NAME},
+ XtOffsetOf(DATA, font), XtRString, (XtPointer)FONT_NAME},
{XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof(Boolean),
XtOffsetOf(DATA, swap), XtRImmediate, (XtPointer)False},
{"monochrome", "Monochrome", XtRBoolean, sizeof(Boolean),
--
1.7.5
0002-Fix-timer-signal-handling-under-Linux.patch:
timer.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- NEW FILE 0002-Fix-timer-signal-handling-under-Linux.patch ---
>From 10e609fae72b30ee7763e95f202d3ecad13685e6 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon, 29 Nov 2010 23:26:44 +0100
Subject: [PATCH 02/20] Fix timer signal handling under Linux
---
timer.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/timer.c b/timer.c
index 4f56727..c8fa2c1 100644
--- a/timer.c
+++ b/timer.c
@@ -75,7 +75,7 @@
* signal_release returns the block mask to what it was before signal_hold
*/
#ifndef TRANSPUTER
-#ifdef POSIX
+#if defined POSIX || defined linux
# define MASK sigset_t
# define signal_hold(signal, maskp) \
{\
@@ -85,7 +85,11 @@
sigprocmask(SIG_BLOCK, &temp, (maskp)); \
}
# define signal_release(maskp) sigprocmask(SIG_SETMASK, maskp, (MASK *)NULL)
-# define signal_pause(maskp) sigpause(*(maskp))
+# ifdef linux
+# define signal_pause(maskp) sigsuspend(maskp)
+# else
+# define signal_pause(maskp) sigpause(*(maskp))
+# endif
#else
# ifdef __hpux /* hpux is a weird mixture of BSD & SYSV */
/* don't know if this is right */
--
1.7.5
0003-Adjust-Imakefile-for-modern-systems.patch:
Imakefile | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
--- NEW FILE 0003-Adjust-Imakefile-for-modern-systems.patch ---
>From e9da98bfc559f227fe7784f227ff631e2a774c3f Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon, 29 Nov 2010 23:18:26 +0100
Subject: [PATCH 03/20] Adjust Imakefile for modern systems
---
Imakefile | 27 ++++++++++++---------------
1 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/Imakefile b/Imakefile
index 43345c6..a6c6842 100644
--- a/Imakefile
+++ b/Imakefile
@@ -31,10 +31,10 @@ install.man :: @@\
XCOMM compiler options
XCOMM
#if HasGcc
-EXTRACCOPTIONS = -Wall -Wpointer-arith -Wwrite-strings -Wtraditional
+EXTRACCOPTIONS = -Wall -Wpointer-arith -Wno-write-strings
#endif /* HasGcc */
#if defined(LinuxArchitecture)
-#define STATICDEBUG -static
+#define STATICDEBUG
XCOMM XINTL=-lXintl
#else
#define STATICDEBUG
@@ -61,7 +61,7 @@ TIME =
XCOMM TIME = -DUSETIME
XCOMM don't you have lockf or flock?
LOCK =
-LOCK = -DUSELOCKFILE
+XCOMM LOCK = -DUSELOCKFILE
XCOMM game defaults, you probably only want to alter the SCORE
XCOMM
@@ -69,9 +69,9 @@ XCOMM
/* #define thefont "-*-courier-*-r-*-*-18-*-*-*-m-*-*-*" */
XCOMM where is the high score file?
XCOMM SCORE = $(LOCAL)/lib/$(APP)
-SCORE = /var/lib/games/$(APP)
-/* to install default gardens not in app_defaults/$(APP)
-/* #define InstallDefaultGardens $(SCORE)/gardens */
+SCORE = /var/games/$(APP)
+/* to install default gardens not in /usr/share/$(APP) */
+/* #define InstallDefaultGardens $(DESTDIR)/usr/share/$(APP) */
XCOMM The following defines are needed for some implementations and/or sites.
XCOMM It is xmkmf's job to get these right in the first place.
@@ -91,7 +91,8 @@ XCOMM install parameters
XCOMM
XCOMM owner and access rights for executable & score directory
XCOMM these are set for a setuid xmris
-OWNER = -o games
+XCOMM OWNER = -o games
+OWNER =
INSTSCOREFLAGS = $(OWNER) -m 755
INSTMRISFLAGS = $(OWNER) $(INSTUIDFLAGS)
XCOMM normal install locations
@@ -115,7 +116,7 @@ FONT = thefont
#ifndef InstallDefaultGardens
#ifdef InstallAppDefFiles
-#define InstallDefaultGardens $(DESTDIR)/$(XAPPLOADDIR)/$(APP)
+#define InstallDefaultGardens $(DESTDIR)/usr/share/$(APP)
#endif
#endif
@@ -213,10 +214,6 @@ XCOMM using alltarget can cause gnumake to try and make a target called all.
XCOMM the reason is the All Target macro has no rules, so gnumake tries
XCOMM to find an implicit one. Other makes just give up.
all :: initialize
- @echo "NOTE:You might get lots of warnings about discarding const from"
- @echo "NOTE:pointer target type. Ignore these. It's because the X header"
- @echo "NOTE:files aren't const correct. Fiddle with XrmOptionDescRec in"
- @echo "NOTE:Xresource.h and String in Intrinsic.h by adding an _Xconst."
@#keep gnumake happy
all :: xmris xmred
@@ -238,9 +235,9 @@ NormalProgramTarget(xmris,$(MRISOBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),)
InstallProgramWithFlags(xmris,$(THEBINDIR),$(INSTMRISFLAGS))
-install :: $(THEBINDIR)/xmris
- $(RM) $(THEBINDIR)/xmsit
- $(LN) ./xmris $(THEBINDIR)/xmsit
+install :: $(DESTDIR)$(THEBINDIR)/xmris
+ $(RM) $(DESTDIR)$(THEBINDIR)/xmsit
+ $(LN) xmris $(DESTDIR)$(THEBINDIR)/xmsit
XCOMM xmred build
NormalProgramTarget(xmred,$(MREDOBJS) $(WIDGETOBJS),$(DEPLIBS),$(LOCAL_LIBRARIES) -lm,)
--
1.7.5
0004-Catch-the-window-being-deleted.patch:
xmris.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
--- NEW FILE 0004-Catch-the-window-being-deleted.patch ---
>From 5ffc5a653acb6f4d9747f98d05e3a86119baeb9f Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon, 29 Nov 2010 22:28:49 +0100
Subject: [PATCH 04/20] Catch the window being deleted
This fixes the keyboard repeat getting fsck-ed up when quiting using
the window delete button on the title bar / alt+f4 while playing the game.
This patch comes from the Mandriva SRPM, thanks guys!
---
xmris.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/xmris.c b/xmris.c
index 77cd0ea..22fa1af 100644
--- a/xmris.c
+++ b/xmris.c
@@ -55,6 +55,8 @@ static VOIDFUNC action_pause
PROTOARG((Widget, XEvent *, String *, Cardinal *));
static VOIDFUNC action_unmap
PROTOARG((Widget, XEvent *, String *, Cardinal *));
+static VOIDFUNC action_quit
+ PROTOARG((Widget, XEvent *, String *, Cardinal *));
static VOIDFUNC age_scores PROTOARG((VOIDARG));
static PROTOANIMATE(animate_death);
static PROTOANIMATE(animate_pause);
@@ -75,6 +77,7 @@ static XtActionsRec actions[] =
{"map", action_map},
{"unmap", action_unmap},
{"expose", action_expose},
+ {"quit", action_quit},
};
/*}}}*/
/*{{{ static char CONST garden_translations[] =*/
@@ -96,6 +99,7 @@ static char CONST toplevel_translations[] =
"\
<MapNotify>:map()\n\
<UnmapNotify>:unmap()\n\
+<Message>WM_PROTOCOLS: quit()\n\
";
/*}}}*/
/*}}}*/
@@ -116,6 +120,22 @@ ARGSEP Cardinal *num_params
return;
}
/*}}}*/
+/*{{{ void action_quit(widget, event, params, num_params)*/
+static VOIDFUNC action_quit
+FUNCARG((widget, event, params, num_params),
+ Widget widget
+ARGSEP XEvent *event
+ARGSEP String *params
+ARGSEP Cardinal *num_params
+)
+{
+#ifdef DEBUGEVENTLOOP
+ fprintf(stderr, "action_quit(0x%lx)\n", XtWindow(widget));
+#endif /* DEBUGEVENTLOOP */
+ set_key_default();
+ global.quit = 1;
+}
+/*}}}*/
/*{{{ void action_keypress(widget, event, params, num_params)*/
static VOIDFUNC action_keypress
FUNCARG((widget, event, params, num_params),
@@ -1235,6 +1255,7 @@ ARGSEP char CONST **argv
)
{
PROTOANIMATE((*animate));
+ Atom wm_delete_window;
myname = *argv ? *argv : "Xmris";
#ifndef TRANSPUTER
@@ -1280,6 +1301,10 @@ ARGSEP char CONST **argv
XtOverrideTranslations(display.toplevel,
XtParseTranslationTable(toplevel_translations));
XtRealizeWidget(display.toplevel);
+ wm_delete_window = XInternAtom(XtDisplay(display.toplevel), "WM_DELETE_WINDOW",
+ False);
+ (void)XSetWMProtocols(XtDisplay(display.toplevel), XtWindow(display.toplevel),
+ &wm_delete_window, 1);
#ifdef DEBUGEVENTLOOP
printf("Toplevel is 0x%lx\n", (long)XtWindow(display.toplevel));
printf("Garden is 0x%lx\n", (long)XtWindow(display.garden));
--
1.7.5
0005-Fix-compiling-of-flock-code-under-Linux.patch:
scoring.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- NEW FILE 0005-Fix-compiling-of-flock-code-under-Linux.patch ---
>From 51f13c5ef15a4a63e5184579ac1ddc8fab03382b Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon, 29 Nov 2010 23:30:59 +0100
Subject: [PATCH 05/20] Fix compiling of flock code under Linux
---
scoring.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/scoring.c b/scoring.c
index 0c61b9b..6f1030f 100644
--- a/scoring.c
+++ b/scoring.c
@@ -38,6 +38,9 @@
/*}}}*/
/*{{{ file locking*/
#ifndef SYSV
+#ifdef linux
+#include <sys/file.h>
+#endif
#define lock_file(stream) flock(fileno(stream), LOCK_EX)
#define unlock_file(stream) flock(fileno(stream), LOCK_UN)
#else
--
1.7.5
0006-Fix-key-presses-getting-lost.patch:
xmris.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- NEW FILE 0006-Fix-key-presses-getting-lost.patch ---
>From 3acb9936eb6ec40de5188c47e5a720d375657ba8 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Tue, 30 Nov 2010 15:00:29 +0100
Subject: [PATCH 06/20] Fix key presses getting lost
Without this patch keypresses get lost when the mouse is outside the window,
but the keyboard focus is on the window.
---
xmris.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/xmris.c b/xmris.c
index 22fa1af..2f6cc62 100644
--- a/xmris.c
+++ b/xmris.c
@@ -91,6 +91,8 @@ static char CONST garden_translations[] =
/*{{{ static char CONST form_translations[] =*/
static char CONST form_translations[] =
"\
+<KeyPress>:keypress()\n\
+<KeyRelease>:keyrelease()\n\
<FocusOut>:pause()\n\
";
/*}}}*/
--
1.7.5
0007-Change-key-binding-defaults-to-something-sane.patch:
Xmris-ad.src | 8 ++++----
defcom.c | 8 ++++----
xmris.man | 22 ++++------------------
3 files changed, 12 insertions(+), 26 deletions(-)
--- NEW FILE 0007-Change-key-binding-defaults-to-something-sane.patch ---
>From dc28065b144dbfa1da8007b4482f8415894eee43 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Tue, 30 Nov 2010 15:55:00 +0100
Subject: [PATCH 07/20] Change key binding defaults to something sane
---
Xmris-ad.src | 8 ++++----
defcom.c | 8 ++++----
xmris.man | 21 ++++-----------------
3 files changed, 12 insertions(+), 25 deletions(-)
diff --git a/Xmris-ad.src b/Xmris-ad.src
index fd94b76..60be0ac 100644
--- a/Xmris-ad.src
+++ b/Xmris-ad.src
@@ -4,10 +4,10 @@
! These are some of the resources you can fiddle with for xmris
! The defaults are shown in the man page.
-*Up: apostrophe
-*Down: slash
-*Left: z
-*Right: x
+*Up: Up
+*Down: Down
+*Left: Left
+*Right: Right
*Throw: space
*Pause: p
*Quit: q
diff --git a/defcom.c b/defcom.c
index f8a59b5..5934c5e 100644
--- a/defcom.c
+++ b/defcom.c
@@ -234,13 +234,13 @@ XtResource resources[] =
{"dir", "Dir", XtRString, sizeof(String),
XtOffsetOf(DATA, dir), XtRString, (XtPointer)SCORE_DIR},
{"up", "Up", XtRKeySym, sizeof(KeySym),
- XtOffsetOf(DATA, keysyms[0]), XtRString, (XtPointer)"apostrophe"},
+ XtOffsetOf(DATA, keysyms[0]), XtRString, (XtPointer)"Up"},
{"down", "Down", XtRKeySym, sizeof(KeySym),
- XtOffsetOf(DATA, keysyms[1]), XtRString, (XtPointer)"slash"},
+ XtOffsetOf(DATA, keysyms[1]), XtRString, (XtPointer)"Down"},
{"left", "Left", XtRKeySym, sizeof(KeySym),
- XtOffsetOf(DATA, keysyms[2]), XtRString, (XtPointer)"z"},
+ XtOffsetOf(DATA, keysyms[2]), XtRString, (XtPointer)"Left"},
{"right", "Right", XtRKeySym, sizeof(KeySym),
- XtOffsetOf(DATA, keysyms[3]), XtRString, (XtPointer)"x"},
+ XtOffsetOf(DATA, keysyms[3]), XtRString, (XtPointer)"Right"},
{"throw", "Throw", XtRKeySym, sizeof(KeySym),
XtOffsetOf(DATA, keysyms[KEY_THROW]), XtRString, (XtPointer)"space"},
{"pause", "Pause", XtRKeySym, sizeof(KeySym),
diff --git a/xmris.man b/xmris.man
index 0d69f88..1e7c47f 100644
--- a/xmris.man
+++ b/xmris.man
@@ -401,14 +401,14 @@ defaults in '[]'.)
.br
.ne 11
.TP
-.B Xmris.Up: \fIkeysym\fP [apostrophe]
+.B Xmris.Up: \fIkeysym\fP [Up]
.PD 0
.TP
-.B Xmris.Down: \fIkeysym\fP [slash]
+.B Xmris.Down: \fIkeysym\fP [Down]
.TP
-.B Xmris.Left: \fIkeysym\fP [z]
+.B Xmris.Left: \fIkeysym\fP [Left]
.TP
-.B Xmris.Right: \fIkeysym\fP [x]
+.B Xmris.Right: \fIkeysym\fP [Right]
.TP
.B Xmris.Throw: \fIkeysym\fP [space]
.TP
@@ -493,19 +493,6 @@ Set the number of distinct colours allocated from the colour map.
.B Xmris.Static: \fI{yes, no}\fP [no]
Do not use dynamic background colors.
.PP
-For example, if you want to use the arrow keys, the following will work
-.br
-.ne 6
-.IP
-Xmris.Up: Up
-.br
-Xmris.Down: Down
-.br
-Xmris.Left: Left
-.br
-Xmris.Right: Right
-.br
-.PP
In addition, you have the normal resources such as '*Font'.
.PP
Normally the cursor is invisible in the Mr Is window. You can force
--
1.7.5
0008-Fix-compiler-warnings.patch:
Drag.c | 3 +--
Icon.c | 3 +--
PixmapList.c | 23 ++++++++++-------------
control.c | 35 +++++++++++++++++------------------
dialogs.c | 8 ++++----
makemred.c | 2 +-
makemris.c | 4 ++--
menubar.c | 12 ++++++------
player.c | 4 ++--
scram.c | 3 +--
10 files changed, 45 insertions(+), 52 deletions(-)
--- NEW FILE 0008-Fix-compiler-warnings.patch ---
>From 383d6b1c86c0697f422e169499ba84c1231f7df5 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri, 29 Apr 2011 16:14:33 +0200
Subject: [PATCH 08/20] Fix compiler warnings
---
Drag.c | 3 +--
Icon.c | 3 +--
PixmapList.c | 23 ++++++++++-------------
control.c | 35 +++++++++++++++++------------------
dialogs.c | 8 ++++----
makemred.c | 2 +-
makemris.c | 4 ++--
menubar.c | 12 ++++++------
player.c | 4 ++--
scram.c | 2 +-
10 files changed, 45 insertions(+), 51 deletions(-)
diff --git a/Drag.c b/Drag.c
index 32e863b..6376614 100644
--- a/Drag.c
+++ b/Drag.c
@@ -510,9 +510,8 @@ FUNCARG((widget),
int x, y;
unsigned border;
unsigned depth;
- Status status;
- status = XGetGeometry(XtDisplay(widget), widget->drag.pixmap, &root,
+ XGetGeometry(XtDisplay(widget), widget->drag.pixmap, &root,
&x, &y, &widget->drag.width, &widget->drag.height, &border, &depth);
}
else
diff --git a/Icon.c b/Icon.c
index 215c979..d54a239 100644
--- a/Icon.c
+++ b/Icon.c
@@ -620,9 +620,8 @@ FUNCARG((widget),
int x, y;
unsigned border;
unsigned depth;
- Status status;
- status = XGetGeometry(XtDisplay(widget), widget->icon.pixmap, &root,
+ XGetGeometry(XtDisplay(widget), widget->icon.pixmap, &root,
&x, &y, &widget->icon.width, &widget->icon.height, &border, &depth);
}
else
diff --git a/PixmapList.c b/PixmapList.c
index ab128fa..aeb7155 100644
--- a/PixmapList.c
+++ b/PixmapList.c
@@ -1199,9 +1199,8 @@ ARGSEP PixmapInfo *pi
int x, y;
unsigned border;
unsigned depth;
- Status status;
- status = XGetGeometry(XtDisplay(plw), pi->pixmap,
+ XGetGeometry(XtDisplay(plw), pi->pixmap,
&root, &x, &y, (unsigned int *)&pi->width,
(unsigned int *)&pi->height, &border, &depth);
}
@@ -1359,12 +1358,12 @@ ARGSEP XtPointer call
int length;
plw = (PixmapListWidget)client;
- if(!(int)call)
+ if(!(long)call)
return;
length = plw->pixmap_list.orient == XtorientVertical ?
plw->core.height : plw->core.width;
start = length / 2;
- if((int)call > 0)
+ if((long)call > 0)
start = -start;
start -= plw->pixmap_list.orient == XtorientVertical ?
plw->pixmap_list.y : plw->pixmap_list.x;
@@ -1410,23 +1409,21 @@ FUNCARG((plw),
* our geometry changes
*/
{
- float shown, top;
+ union { float f; XtArgVal xav; } shown, top;
Arg args[2];
if(!plw->pixmap_list.scroll)
return;
- shown = (float)(plw->pixmap_list.orient == XtorientVertical ?
+ shown.f = (float)(plw->pixmap_list.orient == XtorientVertical ?
plw->core.height + 1 : plw->core.width + 1) /
(float)plw->pixmap_list.length;
- if(shown > (float)1.0)
- shown = (float)1.0;
- top = (float)(plw->pixmap_list.orient == XtorientVertical ?
+ if(shown.f > (float)1.0)
+ shown.f = (float)1.0;
+ top.f = (float)(plw->pixmap_list.orient == XtorientVertical ?
-plw->pixmap_list.y : -plw->pixmap_list.x) /
(float)plw->pixmap_list.length;
- XtSetArg(args[0], XtNtopOfThumb, sizeof(float) > sizeof(XtArgVal) ?
- (XtArgVal)&top : *(XtArgVal *)&top);
- XtSetArg(args[1], XtNshown, sizeof(float) > sizeof(XtArgVal) ?
- (XtArgVal)&shown : *(XtArgVal *)&shown);
+ XtSetArg(args[0], XtNtopOfThumb, top.xav);
+ XtSetArg(args[1], XtNshown, shown.xav);
XtSetValues(plw->pixmap_list.scroll, args, 2);
return;
}
diff --git a/control.c b/control.c
index 8261ad4..d5059b4 100644
--- a/control.c
+++ b/control.c
@@ -373,7 +373,7 @@ ARGSEP XtPointer call
{
int delta;
- delta = (int)call ? (int)call < 0 ? -1 : 1 : 0;
+ delta = (long)call ? (long)call < 0 ? -1 : 1 : 0;
if((delta >= 0 || state.counts[5]) && (delta <= 0 ||
state.counts[5] != APPLE_LIMIT))
adjust_count(5, delta);
@@ -431,7 +431,7 @@ ARGSEP XtPointer call
IconCallback *call_data;
int option;
- option = state.button[(unsigned)client];
+ option = state.button[(unsigned long)client];
call_data = (IconCallback *)call;
if(option == OPTION_APPLES)
select_apple(call_data->selection);
@@ -454,13 +454,13 @@ ARGSEP XtPointer call
{
if(state.edit)
{
- state.edit->board->colors = (unsigned)client;
+ state.edit->board->colors = (unsigned long)client;
paint_garden_icon(state.edit);
paint_garden_image();
repaint_garden_icon();
changed_flag |= state.change;
}
- set_icon_color((unsigned)client);
+ set_icon_color((unsigned long)client);
return;
}
/*}}}*/
@@ -477,13 +477,13 @@ ARGSEP XtPointer call
{
if(state.edit)
{
- state.edit->board->fill = (unsigned)client;
+ state.edit->board->fill = (unsigned long)client;
paint_garden_icon(state.edit);
paint_garden_image();
repaint_garden_icon();
changed_flag |= state.change;
}
- set_icon_fill((unsigned)client);
+ set_icon_fill((unsigned long)client);
return;
}
/*}}}*/
@@ -498,9 +498,9 @@ ARGSEP XtPointer call
* change the display mode and update the garden
*/
{
- if(state.mode != (unsigned)client)
+ if(state.mode != (unsigned long)client)
{
- state.mode = (unsigned)client;
+ state.mode = (unsigned long)client;
paint_garden_icon(state.edit);
paint_garden_image();
repaint_garden_icon();
@@ -525,7 +525,7 @@ ARGSEP XtPointer call
IconCallback *call_data;
unsigned option;
- option = (unsigned)client;
+ option = (unsigned long)client;
call_data = (IconCallback *)call;
if(option == OPTION_APPLES)
if(select_apple(call_data->selection))
@@ -802,36 +802,35 @@ FUNCARG((root),
/*{{{ set option callback*/
for(gptr = &gizmos[GIZMO_OPTIONS + OPTIONS - 1], ix = OPTIONS;
ix--; gptr--)
- XtAddCallback(gptr->widget, XtNcallback, command_option, (XtPointer)ix);
+ XtAddCallback(gptr->widget, XtNcallback, command_option, (XtPointer)(unsigned long)ix);
/*}}}*/
/*{{{ set fill callback*/
for(gptr = &gizmos[GIZMO_FILLS + FILLS - 1], ix = FILLS; ix--; gptr--)
- XtAddCallback(gptr->widget, XtNcallback, command_fill, (XtPointer)ix);
+ XtAddCallback(gptr->widget, XtNcallback, command_fill, (XtPointer)(unsigned long)ix);
/*}}}*/
/*{{{ set color callback*/
for(gptr = &gizmos[GIZMO_COLORS + BACKGROUNDS - 1], ix = BACKGROUNDS;
ix--; gptr--)
- XtAddCallback(gptr->widget, XtNcallback, command_color, (XtPointer)ix);
+ XtAddCallback(gptr->widget, XtNcallback, command_color, (XtPointer)(unsigned long)ix);
/*}}}*/
/*{{{ set mode callback*/
for(gptr = &gizmos[GIZMO_DISPLAY_BASE + MODES - 1], ix = MODES;
ix--; gptr--)
- XtAddCallback(gptr->widget, XtNcallback, command_mode, (XtPointer)ix);
+ XtAddCallback(gptr->widget, XtNcallback, command_mode, (XtPointer)(unsigned long)ix);
/*}}}*/
/*{{{ set button callback*/
for(gptr = &gizmos[GIZMO_BUTTONS + BUTTONS - 1], ix = BUTTONS;
ix--; gptr--)
- XtAddCallback(gptr->widget, XtNcallback, command_button, (XtPointer)ix);
+ XtAddCallback(gptr->widget, XtNcallback, command_button, (XtPointer)(unsigned long)ix);
/*}}}*/
/*{{{ setup apple scrollbar*/
{
- float shown;
+ union { float f; XtArgVal xav; } shown;
Arg arg[1];
gptr = &gizmos[GIZMO_TOTAL_WARNINGS + 5];
- shown = (float)1.0;
- XtSetArg(arg[0], XtNshown, sizeof(float) > sizeof(XtArgVal) ?
- (XtArgVal)&shown : *(XtArgVal *)&shown);
+ shown.f = (float)1.0;
+ XtSetArg(arg[0], XtNshown, shown.xav);
XtSetValues(gptr->widget, arg, 1);
XtAddCallback(gptr->widget, XtNjumpProc, apple_jump, (XtPointer)NULL);
XtAddCallback(gptr->widget, XtNscrollProc, apple_scroll, (XtPointer)NULL);
diff --git a/dialogs.c b/dialogs.c
index 43410b5..9d864e4 100644
--- a/dialogs.c
+++ b/dialogs.c
@@ -87,7 +87,7 @@ ARGSEP Cardinal *argc
for(optr = dialog_options; optr->text; optr ++)
if(!strcmp(optr->text, *argv))
{
- dialog_option(widget, (XtPointer)optr->option, (XtPointer)NULL);
+ dialog_option(widget, (XtPointer)(unsigned long)optr->option, (XtPointer)NULL);
break;
}
return;
@@ -135,7 +135,7 @@ ARGSEP XtPointer call
widget = XtParent(widget);
if(!widget)
/* EMPTY */;
- else if((unsigned)client == DIALOG_CLEAR)
+ else if((unsigned long)client == DIALOG_CLEAR)
{
Widget text;
@@ -160,7 +160,7 @@ ARGSEP XtPointer call
if(dptr->dialog == widget)
{
dptr->selection |=
- (unsigned)client & dptr->options;
+ (unsigned long)client & dptr->options;
if(dptr->selection && dptr->up)
{
dptr->up = 0;
@@ -320,7 +320,7 @@ FUNCARG((root),
if(optr->option & (1 << count))
{
XawDialogAddButton(dptr->dialog, optr->text,
- dialog_option, (XtPointer)(1 << count));
+ dialog_option, (XtPointer)(unsigned long)(1 << count));
break;
}
}
diff --git a/makemred.c b/makemred.c
index 18aa078..ee1f7a1 100644
--- a/makemred.c
+++ b/makemred.c
@@ -492,7 +492,7 @@ ARGSEP String *argv
/* EMPTY */;
display.toplevel = XtAppInitialize(&display.context, "Xmris",
options, (Cardinal)(ptr - options),
- (Cardinal *)&argc, (String *)argv,
+ &argc, (String *)argv,
(String *)fallback_resources,
toplevel_args, XtNumber(toplevel_args));
if(argc > 1)
diff --git a/makemris.c b/makemris.c
index 9ea2bb5..4bf8d20 100644
--- a/makemris.c
+++ b/makemris.c
@@ -282,7 +282,7 @@ ARGSEP String *argv
/* EMPTY */;
display.toplevel = XtAppInitialize(&display.context, "Xmris",
options, (Cardinal)(ptr - options),
- (Cardinal *)&argc, (String *)argv,
+ &argc, (String *)argv,
(String *)NULL, toplevel_args, XtNumber(toplevel_args));
}
if(argc > 1)
@@ -309,7 +309,7 @@ ARGSEP String *argv
/*{{{ some more setup*/
{
XtResource CONST *ptr;
- char CONST *dir;
+ char *dir;
XtAppSetTypeConverter(display.context, XtRString, XtRKeySym,
convert_string2keysym, (XtConvertArgRec *)NULL, 0, XtCacheNone,
diff --git a/menubar.c b/menubar.c
index 616a70c..57db711 100644
--- a/menubar.c
+++ b/menubar.c
@@ -147,7 +147,7 @@ ARGSEP XtPointer call
char CONST *error;
int insert;
- if((unsigned)client == GIZMO_FILE_LOAD - GIZMO_FILE_BASE)
+ if((unsigned long)client == GIZMO_FILE_LOAD - GIZMO_FILE_BASE)
{
if(!check_saved(CHANGED_ANY))
return;
@@ -166,7 +166,7 @@ ARGSEP XtPointer call
dialog = DIALOG_FILE_ERROR;
title = "Cannot load";
menu_filename(result);
- if((unsigned)client == GIZMO_FILE_LOAD - GIZMO_FILE_BASE)
+ if((unsigned long)client == GIZMO_FILE_LOAD - GIZMO_FILE_BASE)
free_descriptors();
error = load_boards(filename, insert);
}
@@ -174,7 +174,7 @@ ARGSEP XtPointer call
break;
}
while(error);
- if((unsigned)client == GIZMO_FILE_LOAD - GIZMO_FILE_BASE)
+ if((unsigned long)client == GIZMO_FILE_LOAD - GIZMO_FILE_BASE)
changed_flag = 0;
return;
}
@@ -234,7 +234,7 @@ ARGSEP XtPointer call
char CONST *error;
XtVaGetValues(widget, XtNlabel, &title, NULL);
- dialog = filename && *filename && (unsigned)client ==
+ dialog = filename && *filename && (unsigned long)client ==
GIZMO_FILE_SAVE - GIZMO_FILE_BASE ? -1 : DIALOG_FILENAME;
error = NULL;
option = DIALOG_NONE;
@@ -475,10 +475,10 @@ FUNCARG((root),
create_gizmos(root, gizmos, XtNumber(gizmos));
for(ix = XtNumber(file_callbacks); ix--;)
XtAddCallback(gizmos[GIZMO_FILE_BASE + ix].widget,
- XtNcallback, file_callbacks[ix], (XtPointer)ix);
+ XtNcallback, file_callbacks[ix], (XtPointer)(unsigned long)ix);
for(ix = XtNumber(garden_callbacks); ix--;)
XtAddCallback(gizmos[GIZMO_GARDEN_BASE + ix].widget,
- XtNcallback, garden_callbacks[ix], (XtPointer)ix);
+ XtNcallback, garden_callbacks[ix], (XtPointer)(unsigned long)ix);
menu_filename(NULL);
menu_total(0);
return;
diff --git a/player.c b/player.c
index 560fb1d..944393f 100644
--- a/player.c
+++ b/player.c
@@ -8,8 +8,8 @@ extern VOIDFUNC bounce_ball FUNCARGVOID
* bouncing the ball is rather involved
*/
{
- COORD tl;
- COORD br;
+ COORD tl = { 0, 0 };
+ COORD br = { 0, 0 };
CELL *cptr;
CELL *optr;
diff --git a/scram.c b/scram.c
index 62546e7..7d34d33 100644
--- a/scram.c
+++ b/scram.c
@@ -113,7 +113,7 @@ ARGSEP BITMAP *bitmap /* bitmap ptr */
FILE *stream;
unsigned state;
char line[128];
- SIZE place;
+ SIZE place = { 0, 0 };
unsigned extra;
stream = fopen(name, "r");
--
1.7.5
0009-Remove-TRANSPUTER-stuff.patch:
common.h | 4 ---
defcom.c | 6 -----
scoring.c | 49 ------------------------------------------
scram.c | 4 ---
timer.c | 71 --------------------------------------------------------------
xmris.c | 2 -
xmris.h | 12 ----------
7 files changed, 148 deletions(-)
--- NEW FILE 0009-Remove-TRANSPUTER-stuff.patch ---
>From 361a5e7c3ebfbbe7fecbdbdd9d5f7497679f3be1 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri, 29 Apr 2011 17:17:12 +0200
Subject: [PATCH 09/20] Remove TRANSPUTER stuff
This is not used (never defined by any makefiles) and obfuscates the code
needlessly. Removing this is a preparation step for cleaning up the highscore
support for dropping setgid rights directly on start, rather then using
unsafe seteg/uid tricks.
---
common.h | 4 ---
defcom.c | 6 -----
scoring.c | 49 ------------------------------------------
scram.c | 4 ---
timer.c | 71 -------------------------------------------------------------
xmris.c | 2 -
xmris.h | 11 ---------
7 files changed, 0 insertions(+), 147 deletions(-)
diff --git a/common.h b/common.h
index e1fd8dd..0babbce 100644
--- a/common.h
+++ b/common.h
@@ -16,9 +16,7 @@
#include <errno.h>
#include <ctype.h>
#include <time.h>
-#ifndef TRANSPUTER
#include <unistd.h>
-#endif /* TRANSPUTER */
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
@@ -294,9 +292,7 @@ typedef struct Data
Boolean username; /* use username of user */
Boolean nodynamic; /* don't take advantage of dynamic visuals */
Boolean nodisplay; /* don't open the display, even to get X resources */
-#ifndef TRANSPUTER
Boolean busywait; /* do busy waiting */
-#endif /* TRANSPUTER */
#endif /* XMRED */
Boolean gender; /* he or she? */
int distinct; /* distinct colors allocated */
diff --git a/defcom.c b/defcom.c
index 5934c5e..9715fe9 100644
--- a/defcom.c
+++ b/defcom.c
@@ -219,9 +219,7 @@ XrmOptionDescRec options[] =
{"-username",".username", XrmoptionNoArg, (XtPointer)XtEyes},
{"-realname",".username", XrmoptionNoArg, (XtPointer)XtEno},
{"-static", ".static", XrmoptionNoArg, (XtPointer)XtEyes},
-#ifndef TRANSPUTER
{"-busywait", ".busywait", XrmoptionNoArg, (XtPointer)XtEyes},
-#endif /* TRANSPUTER */
#endif /* XMRED */
{NULL}
};
@@ -259,10 +257,8 @@ XtResource resources[] =
XtOffsetOf(DATA, username), XtRImmediate, (XtPointer)False},
{"static", "Static", XtRBoolean, sizeof(Boolean),
XtOffsetOf(DATA, nodynamic), XtRImmediate, (XtPointer)False},
-#ifndef TRANSPUTER
{"busywait", "Busywait", XtRBoolean, sizeof(Boolean),
XtOffsetOf(DATA, busywait), XtRImmediate, (XtPointer)False},
-#endif /* TRANSPUTER */
#endif /* XMRED */
{XtNfont, XtCFont, XtRFont, sizeof(Font),
XtOffsetOf(DATA, font), XtRString, (XtPointer)FONT_NAME},
@@ -394,9 +390,7 @@ HELP CONST help[] =
{"Remove user's scores", "-remove", "", "<name>"},
{"Do not open display", "+display", "", ""},
{"Store date format change", "-format", "", ""},
-#ifndef TRANSPUTER
{"Force busywaiting", "-busywait", "Busywait:yes", ""},
-#endif /* TRANSPUTER */
#endif /* XMRED */
{NULL}
};
diff --git a/scoring.c b/scoring.c
index 6f1030f..b63c2b6 100644
--- a/scoring.c
+++ b/scoring.c
@@ -26,15 +26,11 @@
/*}}}*/
#include "xmris.h"
/*{{{ other includes*/
-#ifdef TRANSPUTER
-#include <iocntrl.h>
-#else
#include <pwd.h>
#include <sys/stat.h>
#ifdef USELOCKFILE
#include <fcntl.h>
#endif /* USELOCKFILE */
-#endif /* TRANSPUTER */
/*}}}*/
/*{{{ file locking*/
#ifndef SYSV
@@ -131,9 +127,6 @@ ARGSEP uid_t uid
* so that we pick up the new scores
*/
{
-#ifdef TRANSPUTER
- return 1; /* assume that it has changed */
-#else
static time_t last_time[2];
struct stat buffer;
unsigned changed;
@@ -151,7 +144,6 @@ ARGSEP uid_t uid
if(real_uid != current_uid)
set_euid((current_uid = real_uid));
return changed;
-#endif /* TRANSPUTER */
}
/*}}}*/
/*{{{ void get_lock(name, flag, uid)*/
@@ -172,34 +164,6 @@ ARGSEP uid_t uid
{
FILE *stream;
-#ifdef TRANSPUTER
- if(locking_file && !locks)
- /*{{{ attempt file lock*/
- {
- unsigned count;
- FILE *lock;
-
- for(count = 3; count; count--)
- {
- lock = fopen(locking_file, "r");
- if(lock)
- {
- fclose(lock);
- sleep(1);
- }
- else
- {
- lock = fopen(locking_file, "w");
- if(lock)
- fclose(lock);
- else
- perror(locking_file);
- break;
- }
- }
- }
- /*}}}*/
-#else
#ifdef USELOCKFILE
if(locking_file && !locks)
/*{{{ attempt exclusive file lock*/
@@ -235,7 +199,6 @@ ARGSEP uid_t uid
#endif /* USELOCKFILE */
if(uid != current_uid)
set_euid((current_uid = uid));
-#endif /* TRANSPUTER */
stream = fopen(name, flag & 1 ? "w+" : "r+");
if(!stream && !(flag & 2))
perror(name);
@@ -244,10 +207,8 @@ ARGSEP uid_t uid
locks++;
else if(locking_file && !locks)
{
-#ifndef TRANSPUTER
if(current_uid != effective_uid)
set_euid((current_uid = effective_uid));
-#endif /* TRANSPUTER */
unlink(locking_file);
}
#else
@@ -260,12 +221,10 @@ ARGSEP uid_t uid
}
/*}}}*/
#endif /* USELOCKFILE */
-#ifndef TRANSPUTER
if(stream && flag & 4 && effective_uid == real_uid)
chmod(name, 0666); /* not everyone has fchmod */
if(current_uid != real_uid)
set_euid((current_uid = real_uid));
-#endif /* TRANSPUTER */
return stream;
}
/*}}}*/
@@ -284,15 +243,11 @@ FUNCARG((stream),
locks--;
if(locking_file && locks)
{
-#ifndef TRANSPUTER
if(current_uid != effective_uid)
set_euid((current_uid = effective_uid));
-#endif
unlink(locking_file);
-#ifndef TRANSPUTER
if(current_uid != real_uid)
set_euid((current_uid = real_uid));
-#endif /* TRANSPUTER */
}
#else
rewind(stream);
@@ -342,7 +297,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
user = NULL;
home = NULL;
reallife = NULL;
-#ifndef TRANSPUTER
/*{{{ read passwd information*/
{
struct passwd *ptr;
@@ -409,7 +363,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
}
}
/*}}}*/
-#endif
scoring.mine.score = 0;
/*{{{ set username*/
{
@@ -720,7 +673,6 @@ FUNCARG((insert),
personal = 0;
truename = home = NULL;
-#ifndef TRANSPUTER
/*{{{ find name & home*/
{
struct passwd *ptr;
@@ -733,7 +685,6 @@ FUNCARG((insert),
}
}
/*}}}*/
-#endif /* TRANSPUTER */
/*{{{ search*/
for(found = index = 0; index != 2; index++)
{
diff --git a/scram.c b/scram.c
index 7d34d33..d68cf03 100644
--- a/scram.c
+++ b/scram.c
@@ -25,11 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#ifdef TRANSPUTER
-#include <iocntrl.h>
-#else
#include <unistd.h>
-#endif /* TRANSPUTER */
/*}}}*/
#define SUFFIXMONO ".bw"
#define SUFFIXCOLOR ".rgb"
diff --git a/timer.c b/timer.c
index c8fa2c1..028f8f0 100644
--- a/timer.c
+++ b/timer.c
@@ -54,12 +54,8 @@
*/
/*}}}*/
#include "xmris.h"
-#ifdef TRANSPUTER
-#include <process.h>
-#else
#include <sys/time.h>
#include <signal.h>
-#endif
#ifdef SVR4
#ifndef SYSV
#define SYSV
@@ -74,7 +70,6 @@
* reblocks the signal
* signal_release returns the block mask to what it was before signal_hold
*/
-#ifndef TRANSPUTER
#if defined POSIX || defined linux
# define MASK sigset_t
# define signal_hold(signal, maskp) \
@@ -125,7 +120,6 @@
# endif /* SYSV */
# endif /* __hpux */
#endif /* POSIX */
-#endif /* TRANSPUTER */
/*}}}*/
/*{{{ get current time*/
/* TICKTIME specifies how many microseconds in each timer tick
@@ -133,14 +127,6 @@
* BUSYWAIT is set if the timer is precise enough for busywait code
* to work
*/
-#ifdef TRANSPUTER
-# define gettick(ptr) (*(ptr) = ProcTime())
-# define TICKTIME (unsigned long)64
-# define tickdelta(later, earlier) ProcTimeMinus(later, earlier)
-# define tickafter(later, earlier) ProcTimerAfter(later, earlier)
-# define tickadd(time, interval) ProcTimePlus(time, interval)
- typedef int tick_t;
-#else
# ifdef USETIME
# define gettick(ptr) (*(ptr) = time((time_t *)NULL))
# define TICKTIME (unsigned long)1000000
@@ -181,17 +167,12 @@
(tickdelta(later, earlier) < ~(~(unsigned long)0 >> 1))
typedef unsigned long tick_t;
# endif /* USETIME */
-#endif /* TRANSPUTER */
/*}}}*/
/*{{{ timer*/
static struct
{
VOIDFUNC (*handler) PROTOARG((int)); /* original handler */
unsigned long usec; /* interval time in usec */
-#ifdef TRANSPUTER
- tick_t delay; /* tickdelay waiting */
- tick_t timeout; /* when the next one should timeout */
-#else
struct itimerval interval; /* internal interval time */
unsigned VOLATILE elapsed; /* timer elapsed */
unsigned VOLATILE waiting; /* waiting for the interrupt */
@@ -201,7 +182,6 @@ static struct
tick_t timeout; /* timeout */
tick_t delay; /* interval delay */
#endif /* BUSYWAIT */
-#endif /* TRANSPUTER */
unsigned state; /* timing state */
tick_t game; /* start of game tick */
tick_t start; /* timing start */
@@ -226,26 +206,11 @@ static unsigned next;
/*}}}*/
#endif
/*{{{ prototypes*/
-#ifndef TRANSPUTER
static VOIDFUNC timer_alarm PROTOARG((int));
-#endif /* TRANSPUTER */
#ifndef NDEBUG
static VOIDFUNC timer_debug PROTOARG((char CONST *));
#endif
/*}}}*/
-#ifdef TRANSPUTER
-/*{{{ void sleep(delay)*/
-extern VOIDFUNC sleep
-FUNCARG((delay),
- unsigned delay
-)
-{
- ProcWait((int)(delay * (1000000 / TICKTIME)));
- return;
-}
-/*}}}*/
-#endif /* TRANSPUTER */
-#ifndef TRANSPUTER
/*{{{ void timer_alarm(sig)*/
static VOIDFUNC timer_alarm
/* ARGSUSED */
@@ -297,14 +262,12 @@ FUNCARG((sig),
return;
}
/*}}}*/
-#endif /* TRANSPUTER */
/*{{{ void timer_close()*/
extern VOIDFUNC timer_close FUNCARGVOID
/*
* closes the timer stuff
*/
{
-#ifndef TRANSPUTER
if(data.busywait == False)
{
MASK mask;
@@ -322,7 +285,6 @@ extern VOIDFUNC timer_close FUNCARGVOID
signal(SIGALRM, timer.handler);
#endif /* USESIGSET */
}
-#endif /* TRANSPUTER */
return;
}
/*}}}*/
@@ -354,10 +316,6 @@ extern VOIDFUNC timer_open FUNCARGVOID
* and starting the first tick
*/
{
-#ifdef TRANSPUTER
- assert(ProcGetPriority());
- gettick(&timer.timeout);
-#else
if(data.busywait != False)
# ifdef BUSYWAIT
{
@@ -382,7 +340,6 @@ extern VOIDFUNC timer_open FUNCARGVOID
#endif /* USESIGSET */
timer.waiting = 0;
timer.elapsed = 1;
-#endif /* TRANSPUTER */
#ifndef NDEBUG
timer_debug("Init");
#endif
@@ -418,14 +375,10 @@ ARGSEP unsigned state
assert(t1 || t2);
}
timer.usec = tick;
-#ifdef TRANSPUTER
- timer.delay = (tick_t)(tick / TICKTIME);
-#else
#ifdef BUSYWAIT
timer.delay = (tick_t)(tick / TICKTIME);
#endif /* BUSYWAIT */
timer.interval.it_value.tv_usec = tick;
-#endif /* TRASNPUTER */
}
value = timer.state;
switch(state)
@@ -501,27 +454,6 @@ extern VOIDFUNC timer_wait FUNCARGVOID
{
int point;
-#ifdef TRANSPUTER
- /*{{{ wait for it*/
- {
- tick_t now;
-
- gettick(&now);
- if(timeafter(now, timer.timeout))
- {
- point = 1;
- timer.timeout = now;
- timer.missed++;
- }
- else
- {
- point = -1;
- ProcAfter(timer.timeout);
- }
- timer.timeout = tickadd(timer.timeout, timer.delay);
- }
- /*}}}*/
-#else
{
MASK mask;
@@ -585,7 +517,6 @@ extern VOIDFUNC timer_wait FUNCARGVOID
}
/*}}}*/
#endif /* BUSYWAIT */
-#endif /* TRANSPUTER */
if(timer.state != TIMING_ON)
/* EMPTY */;
else if(!timer.count)
@@ -603,7 +534,6 @@ extern VOIDFUNC timer_wait FUNCARGVOID
usec = (unsigned long)tickdelta(timer.stop, timer.start) * TICKTIME;
dilation = (unsigned)(usec / FRAME_RATIO_UPDATE *
FRAME_SCALE / timer.usec);
-#ifndef TRANSPUTER
#ifdef BUSYWAIT
if(!timer.busywait && dilation * 100 < FRAME_SCALE * 97)
{
@@ -613,7 +543,6 @@ extern VOIDFUNC timer_wait FUNCARGVOID
timer.busywait = 1;
}
#endif /* BUSYWAIT */
-#endif /* TRANSPUTER */
if(dilation <= FRAME_SCALE)
dilation = FRAME_SCALE;
else if(timer.missed <= (global.dilation == FRAME_SCALE ?
diff --git a/xmris.c b/xmris.c
index 2f6cc62..d79815a 100644
--- a/xmris.c
+++ b/xmris.c
@@ -1260,13 +1260,11 @@ ARGSEP char CONST **argv
Atom wm_delete_window;
myname = *argv ? *argv : "Xmris";
-#ifndef TRANSPUTER
real_uid = getuid();
effective_uid = geteuid();
if(real_uid != effective_uid)
set_euid(real_uid);
current_uid = real_uid;
-#endif /* TRANSPUTER */
open_toolkit(argc, (String *)argv);
init_scores();
/*{{{ help?*/
diff --git a/xmris.h b/xmris.h
index ac4fd50..9918502 100644
--- a/xmris.h
+++ b/xmris.h
@@ -13,25 +13,17 @@
#define FUNCANIMATE(name, arg) PROTOVOID(*name(arg)) PROTOVOID(*arg);
#endif
/*}}}*/
-#ifdef TRANSPUTER
-#undef USELOCKFILE
-#define USELOCKFILE
-#endif /* TRANSPUTER */
/*{{{ check score*/
#ifndef SCORE_DIR
#error No default score directory
#endif /* SCORE_DIR */
/*}}}*/
/*{{{ set_euid*/
-#ifdef TRANSPUTER
-typedef int uid_t;
-#else
#ifdef __hpux
#define set_euid(euid) setresuid((uid_t)-1, euid, (uid_t)-1)
#else
#define set_euid(euid) seteuid(euid)
#endif /* __hpux */
-#endif /* TRANSPUTER */
/*}}}*/
/*{{{ defines*/
/*{{{ board sizes*/
@@ -564,9 +556,6 @@ extern VOIDFUNC high_score PROTOARG((unsigned long, unsigned, unsigned long));
extern VOIDFUNC init_scores PROTOARG((VOIDARG));
/*}}}*/
/*{{{ timer*/
-#ifdef TRANSPUTER
-extern VOIDFUNC sleep PROTOARG((unsigned));
-#endif /* TRANSPUTER */
extern VOIDFUNC timer_close PROTOARG((VOIDARG));
extern VOIDFUNC timer_open PROTOARG((VOIDARG));
extern unsigned timer_set PROTOARG((unsigned long, unsigned));
--
1.7.5
0010-Remove-USELOCKFILE-stuff.patch:
Imakefile | 5 --
Makefile.std | 5 --
scoring.c | 102 -----------------------------------------------------------
xmris.man | 15 --------
4 files changed, 3 insertions(+), 124 deletions(-)
--- NEW FILE 0010-Remove-USELOCKFILE-stuff.patch ---
>From 4f1962e509a1338bd607937b6e55f9a82023d6ba Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri, 29 Apr 2011 17:19:05 +0200
Subject: [PATCH 10/20] Remove USELOCKFILE stuff
Removing this is a preparation step for cleaning up the highscore
support for dropping setgid rights directly on start, rather then using
unsafe seteg/uid tricks. In this mode using a separate lockfile is not
supported.
---
Imakefile | 5 +--
Makefile.std | 5 +--
scoring.c | 102 ----------------------------------------------------------
xmris.man | 14 +-------
4 files changed, 3 insertions(+), 123 deletions(-)
diff --git a/Imakefile b/Imakefile
index a6c6842..ad062d7 100644
--- a/Imakefile
+++ b/Imakefile
@@ -59,9 +59,6 @@ XCOMM
XCOMM don't you have gettimeofday?
TIME =
XCOMM TIME = -DUSETIME
-XCOMM don't you have lockf or flock?
-LOCK =
-XCOMM LOCK = -DUSELOCKFILE
XCOMM game defaults, you probably only want to alter the SCORE
XCOMM
@@ -121,7 +118,7 @@ FONT = thefont
#endif
DEFINES = $(EXTRACCOPTIONS) -DFONT_NAME='$(FONT)' $(NDEBUG) \
- -DSCORE_DIR='"$(SCORE)"' $(LOCK) $(TIME) $(KNR) -DSCROLLBARBUGFIX
+ -DSCORE_DIR='"$(SCORE)"' $(TIME) $(KNR) -DSCROLLBARBUGFIX
LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XINTL) $(XLIB) $(MATHSLIB)
DEPLIBS = $(DEPXLIB)
diff --git a/Makefile.std b/Makefile.std
index 72d1ba9..39b8935 100644
--- a/Makefile.std
+++ b/Makefile.std
@@ -434,9 +434,6 @@ KNR =
# don't you have gettimeofday?
TIME =
# TIME = -DUSETIME
-# don't you have lockf or flock?
-LOCK =
-LOCK = -DUSELOCKFILE
# game defaults, you probably only want to alter the SCORE
#
@@ -488,7 +485,7 @@ COFLAGS = -l
RCSFLAGS =
DEFINES = $(EXTRACCOPTIONS) -DFONT_NAME='$(FONT)' $(NDEBUG) \
- -DSCORE_DIR='"$(SCORE)"' $(LOCK) $(TIME) $(KNR) -DSCROLLBARBUGFIX
+ -DSCORE_DIR='"$(SCORE)"' $(TIME) $(KNR) -DSCROLLBARBUGFIX
LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB) $(MATHSLIB)
DEPLIBS = $(DEPXLIB)
diff --git a/scoring.c b/scoring.c
index b63c2b6..015dd43 100644
--- a/scoring.c
+++ b/scoring.c
@@ -1,36 +1,8 @@
/* Copyright (C) 1993, 1992 Nathan Sidwell */
-/* RCS $Id: scoring.c 1.2 Tue, 16 Mar 1999 11:28:16 +0000 nathan $ */
-/*{{{ file locking problems*/
-/*
- * USELOCKFILE file locking as suggested by
- * Daniel Edward Lovinger <del+(a)cmu.edu>
- * With lockf (or flock), we just use the kernel's locking stuff to lock the
- * entire score file while we read, or update it. But some distributed
- * file systems don't support it and some are broken (SunOS 4.1).
- * USELOCKFILE uses uses open(O_CREAT | O_EXCL) to create
- * a lock file in the same directory as the xmris high score file, with
- * the name "xmris.lock".
- * The personal score files are either in the score file directory
- * with names "xmris-<name>", or in the user's home directory with name
- * ".xmris.scores".
- * In order to work correctly, if xmris is set_euid'd to get the access
- * permissions to the high score directory, we keep juggling
- * the effective user id between the set_euid'd one and the real uid.
- * This ensures that xmris can open the display on servers which use
- * magic cookie and access control (like openwindows), and that the
- * personal file has the correct attributes when created in the user's
- * home directory.
- *
- * Some systems have flock (BSD), and some have lockf (SYSV).
- */
-/*}}}*/
#include "xmris.h"
/*{{{ other includes*/
#include <pwd.h>
#include <sys/stat.h>
-#ifdef USELOCKFILE
-#include <fcntl.h>
-#endif /* USELOCKFILE */
/*}}}*/
/*{{{ file locking*/
#ifndef SYSV
@@ -53,10 +25,6 @@ static int personal_make = 2;
static uid_t personal_uid = -1; /* uid for personal file */
static char date_format[4] = " ";
static char *alternate = NULL; /* alternative name */
-#ifdef USELOCKFILE
-static char *locking_file = NULL; /* lock file name */
-static unsigned locks; /* number of locks open */
-#endif /* USELOCKFILE */
static HIGH_SCORE *CONST tables[] =
{scoring.high, scoring.today, scoring.personal};
/*}}}*/
@@ -164,54 +132,11 @@ ARGSEP uid_t uid
{
FILE *stream;
-#ifdef USELOCKFILE
- if(locking_file && !locks)
- /*{{{ attempt exclusive file lock*/
- {
- unsigned count;
- int filed;
-
- for(count = 3; count;)
- {
- if(current_uid != effective_uid)
- set_euid((current_uid = effective_uid));
- filed = open(locking_file, O_CREAT | O_EXCL, 0666);
- if(filed >= 0)
- break;
- if(errno == EINTR)
- continue;
- else if(errno == EEXIST)
- {
- sleep(1);
- if(!file_changed(name, uid))
- count--;
- }
- else
- {
- perror(locking_file);
- break;
- }
- }
- if(filed >= 0)
- close(filed);
- }
- /*}}}*/
-#endif /* USELOCKFILE */
if(uid != current_uid)
set_euid((current_uid = uid));
stream = fopen(name, flag & 1 ? "w+" : "r+");
if(!stream && !(flag & 2))
perror(name);
-#ifdef USELOCKFILE
- if(stream)
- locks++;
- else if(locking_file && !locks)
- {
- if(current_uid != effective_uid)
- set_euid((current_uid = effective_uid));
- unlink(locking_file);
- }
-#else
if(stream)
/*{{{ get lock on the file*/
while(lock_file(stream))
@@ -220,7 +145,6 @@ ARGSEP uid_t uid
continue;
}
/*}}}*/
-#endif /* USELOCKFILE */
if(stream && flag & 4 && effective_uid == real_uid)
chmod(name, 0666); /* not everyone has fchmod */
if(current_uid != real_uid)
@@ -238,22 +162,9 @@ FUNCARG((stream),
*/
{
fflush(stream);
-#ifdef USELOCKFILE
- fclose(stream);
- locks--;
- if(locking_file && locks)
- {
- if(current_uid != effective_uid)
- set_euid((current_uid = effective_uid));
- unlink(locking_file);
- if(current_uid != real_uid)
- set_euid((current_uid = real_uid));
- }
-#else
rewind(stream);
unlock_file(stream);
fclose(stream);
-#endif /* USELOCKFILE */
return;
}
/*}}}*/
@@ -394,19 +305,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
dirlen = data.dir ? strlen(data.dir) : 0;
if(dirlen && data.dir[dirlen - 1] == '/')
dirlen--;
-#ifdef USELOCKFILE
- /*{{{ lock file?*/
- if(dirlen)
- {
- locking_file = malloc(dirlen + 12);
- if(locking_file)
- {
- strcpy(locking_file, data.dir);
- strcpy(&locking_file[dirlen], "/xmris.lock");
- }
- }
- /*}}}*/
-#endif /* USELOCKFILE */
/*{{{ score directory?*/
if(dirlen)
{
diff --git a/xmris.man b/xmris.man
index 1e7c47f..fab41d3 100644
--- a/xmris.man
+++ b/xmris.man
@@ -866,14 +866,6 @@ file to 666 if creating it.
.br
.ne 3
.TP
-.B .../xmris.lock
-In some systems, where lockf or flock doesn't work, this temporary file
-is used to perform the locking. The directory containing it must be
-writable by Mr Is. This can be done by chmoding the directory, or
-by setuiding Mr Is appropriately.
-.br
-.ne 4
-.TP
.PD 0
.B .../xmris-<name>
.TP
@@ -888,7 +880,7 @@ to move it to the score directory. Mr Is
will attempt to create the personal files in the score directory. If this
cannot be done, the personal score file is placed in the home directory. In
order to create the personal score file in the score directory, Mr Is will
-have to have the correct access rights, as with the lock file. A setuid Mr Is
+have to have the correct access rights. A setuid Mr Is
will juggle the effective uid correctly for accessing both the score directory
and the users' home directories.
.br
@@ -923,10 +915,6 @@ Some of the garden files.
.BR xmred (6)
.SH ERRORS
.PP
-If you use a lock file, rather than lockf, and an error occurs
-creating the lock file, a message is printed on stderr, and file
-locking is not done for that access. Subsequent accesses may be alright.
-.PP
If an error occurs opening the score file, a message is printed on
stderr, and the score file is disabled. Personal score files will
be generated in the users' home directories.
--
1.7.5
0011-Remove-seteuid-stuff.patch:
scoring.c | 60 ++++++++++++++++++++++--------------------------------------
xmris.c | 5 -----
xmris.h | 10 ----------
xmris.man | 20 +++++---------------
4 files changed, 27 insertions(+), 68 deletions(-)
--- NEW FILE 0011-Remove-seteuid-stuff.patch ---
>From da2715a3b82134d118b032a1db06881d128b564b Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri, 29 Apr 2011 17:52:33 +0200
Subject: [PATCH 11/20] Remove seteuid stuff
Removing this is a preparation step for cleaning up the highscore
support for dropping setgid rights directly on start, rather then using
unsafe seteg/uid tricks.
---
scoring.c | 60 ++++++++++++++++++++++--------------------------------------
xmris.c | 5 -----
xmris.h | 10 ----------
xmris.man | 19 +++++--------------
4 files changed, 27 insertions(+), 67 deletions(-)
diff --git a/scoring.c b/scoring.c
index 015dd43..ede2f07 100644
--- a/scoring.c
+++ b/scoring.c
@@ -22,7 +22,6 @@ static char *score_file = NULL; /* high score file name */
static char *personal_file = NULL; /* personal in high score dir */
static char *personal_home = NULL; /* personal in home dir */
static int personal_make = 2;
-static uid_t personal_uid = -1; /* uid for personal file */
static char date_format[4] = " ";
static char *alternate = NULL; /* alternative name */
static HIGH_SCORE *CONST tables[] =
@@ -30,8 +29,8 @@ static HIGH_SCORE *CONST tables[] =
/*}}}*/
/*{{{ prototypes*/
static unsigned expire PROTOARG((time_t, time_t));
-static unsigned file_changed PROTOARG((char CONST *, uid_t));
-static FILE *get_lock PROTOARG((char CONST *, unsigned, uid_t));
+static unsigned file_changed PROTOARG((char CONST *));
+static FILE *get_lock PROTOARG((char CONST *, unsigned));
static VOIDFUNC get_unlock PROTOARG((FILE *));
static unsigned insert_personal PROTOARG((HIGH_SCORE CONST *));
static unsigned insert_score
@@ -53,9 +52,9 @@ static unsigned long write_table
extern VOIDFUNC check_scores FUNCARGVOID
{
retire_scores();
- if((score_file && file_changed(score_file, effective_uid)) ||
+ if((score_file && file_changed(score_file)) ||
(!personal_make && personal_file &&
- file_changed(personal_file, personal_uid)))
+ file_changed(personal_file)))
load_check_expire_insert(0);
return;
}
@@ -84,11 +83,10 @@ ARGSEP time_t then
then_hour >= 21 && now_hour < 12));
}
/*}}}*/
-/*{{{ void file_changed(name, uid)*/
+/*{{{ void file_changed(name)*/
static unsigned file_changed
-FUNCARG((name, uid),
+FUNCARG((name),
char CONST *name
-ARGSEP uid_t uid
)
/*
* check if a score file has been changed since last I looked,
@@ -100,8 +98,6 @@ ARGSEP uid_t uid
unsigned changed;
assert(name);
- if(uid != current_uid)
- set_euid((current_uid = uid));
if(!stat(name, &buffer))
{
changed = buffer.st_mtime != last_time[name == score_file];
@@ -109,31 +105,24 @@ ARGSEP uid_t uid
}
else
changed = 0;
- if(real_uid != current_uid)
- set_euid((current_uid = real_uid));
return changed;
}
/*}}}*/
-/*{{{ void get_lock(name, flag, uid)*/
+/*{{{ void get_lock(name, flag)*/
static FILE *get_lock
-FUNCARG((name, flag, uid),
+FUNCARG((name, flag),
char CONST *name
ARGSEP unsigned flag
-ARGSEP uid_t uid
)
/*
* open and locks a high score file
* flag & 1 == 0 -> "r+"
* flag & 1 != 0 -> "w+"
* flag & 2 inhibit error message
- * flag & 4 && effective_uid == real_uid set chmod 666
- * uid required to access
*/
{
FILE *stream;
- if(uid != current_uid)
- set_euid((current_uid = uid));
stream = fopen(name, flag & 1 ? "w+" : "r+");
if(!stream && !(flag & 2))
perror(name);
@@ -145,10 +134,6 @@ ARGSEP uid_t uid
continue;
}
/*}}}*/
- if(stream && flag & 4 && effective_uid == real_uid)
- chmod(name, 0666); /* not everyone has fchmod */
- if(current_uid != real_uid)
- set_euid((current_uid = real_uid));
return stream;
}
/*}}}*/
@@ -212,7 +197,7 @@ extern VOIDFUNC init_scores FUNCARGVOID
{
struct passwd *ptr;
- ptr = getpwuid(real_uid);
+ ptr = getpwuid(getuid());
if(ptr)
{
user = ptr->pw_name;
@@ -344,7 +329,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
}
}
/*}}}*/
- personal_uid = effective_uid;
if(data.expire || data.format || data.remove)
data.scores = True;
load_check_expire_insert(0);
@@ -448,7 +432,7 @@ FUNCARG((insert),
/*{{{ score_file?*/
if(score_file)
{
- score_stream = get_lock(score_file, 2, effective_uid);
+ score_stream = get_lock(score_file, 2);
if(score_stream)
do_score = merge_scores(score_stream);
else
@@ -458,7 +442,7 @@ FUNCARG((insert),
/*{{{ personal_file?*/
if(personal_file)
{
- personal_stream = get_lock(personal_file, personal_make, personal_uid);
+ personal_stream = get_lock(personal_file, personal_make);
if(personal_stream)
{
personal_make = 0;
@@ -473,7 +457,7 @@ FUNCARG((insert),
/*{{{ personal_home?*/
if(personal_home)
{
- home_stream = get_lock(personal_home, 2, real_uid);
+ home_stream = get_lock(personal_home, 2);
if(home_stream)
{
merge_personal(home_stream);
@@ -482,7 +466,6 @@ FUNCARG((insert),
personal_file = personal_home;
personal_home = NULL;
personal_make = 0;
- personal_uid = real_uid;
}
else
do_personal = 1;
@@ -534,10 +517,12 @@ FUNCARG((insert),
}
/*}}}*/
/* expire person? */
- if(effective_uid != real_uid)
+ if(getuid() != 0)
{
- if(data.remove || data.format)
- fprintf(stderr, "Not owner");
+ if(data.remove)
+ fprintf(stderr, "Removing a person can only be done by root");
+ if(data.format)
+ fprintf(stderr, "Changing the date format can only be done by root");
data.remove = data.format = NULL;
}
else
@@ -1010,7 +995,7 @@ FUNCARG((insert),
{
if(!score_stream && score_file)
{
- score_stream = get_lock(score_file, 5, effective_uid);
+ score_stream = get_lock(score_file, 5);
if(!score_stream)
score_file = NULL;
}
@@ -1022,7 +1007,7 @@ FUNCARG((insert),
if(do_personal)
{
if(!personal_stream && score_stream && personal_file)
- personal_stream = get_lock(personal_file, 3, personal_uid);
+ personal_stream = get_lock(personal_file, 3);
if(personal_stream)
{
write_personal(personal_stream);
@@ -1033,12 +1018,11 @@ FUNCARG((insert),
else
{
if(!home_stream)
- home_stream = get_lock(personal_home, 1, real_uid);
+ home_stream = get_lock(personal_home, 1);
if(home_stream)
write_personal(home_stream);
else
personal_home = NULL;
- personal_uid = real_uid;
personal_file = personal_home;
personal_home = NULL;
}
@@ -1052,9 +1036,9 @@ FUNCARG((insert),
if(score_stream)
get_unlock(score_stream);
if(do_score && score_file)
- file_changed(score_file, effective_uid);
+ file_changed(score_file);
if(do_personal && personal_file)
- file_changed(personal_file, personal_uid);
+ file_changed(personal_file);
return;
}
/*}}}*/
diff --git a/xmris.c b/xmris.c
index d79815a..b1a0404 100644
--- a/xmris.c
+++ b/xmris.c
@@ -1260,11 +1260,6 @@ ARGSEP char CONST **argv
Atom wm_delete_window;
myname = *argv ? *argv : "Xmris";
- real_uid = getuid();
- effective_uid = geteuid();
- if(real_uid != effective_uid)
- set_euid(real_uid);
- current_uid = real_uid;
open_toolkit(argc, (String *)argv);
init_scores();
/*{{{ help?*/
diff --git a/xmris.h b/xmris.h
index 9918502..1802e87 100644
--- a/xmris.h
+++ b/xmris.h
@@ -18,13 +18,6 @@
#error No default score directory
#endif /* SCORE_DIR */
/*}}}*/
-/*{{{ set_euid*/
-#ifdef __hpux
-#define set_euid(euid) setresuid((uid_t)-1, euid, (uid_t)-1)
-#else
-#define set_euid(euid) seteuid(euid)
-#endif /* __hpux */
-/*}}}*/
/*{{{ defines*/
/*{{{ board sizes*/
#define KNOCK_THROUGH /* how far we go to knock through a new cell */\
@@ -355,9 +348,6 @@ EXTERN struct
unsigned pressed; /* keys we had pressed */
} player;
/*}}}*/
-EXTERN uid_t real_uid; /* who I really am */
-EXTERN uid_t effective_uid; /* who I'm pretending to be */
-EXTERN uid_t current_uid; /* who I currently am */
EXTERN CELL garden[(CELLS_DOWN + CELL_TOP * 2) * CELL_STRIDE];
/*{{{ global*/
EXTERN struct
diff --git a/xmris.man b/xmris.man
index fab41d3..3fe5028 100644
--- a/xmris.man
+++ b/xmris.man
@@ -277,13 +277,9 @@ to use the -dir option too.
.ne 3
.TP
.B \-remove \fIname\fP
-Allows the game's owner to remove someone's scores. The option will only
-work when the real and effective user ids are the same. (ie
-a setuid Mr Is has been run by its owner). After updating the files,
+Allows root to remove someone's scores. After updating the files,
the score tables are listed, and the game does not start. An X display
-will still need to be opened, to read the X resources, which may override
-the default score directory. The +display option may be used to prevent
-this.
+will still be opened. The +display option may be used to prevent this.
.br
.ne 3
.TP
@@ -324,7 +320,7 @@ and a warning is given. The following are valid unambiguous dates, '11jun93'
.ne 3
.TP
.B \-format \fIformat\fP
-Allows the game's owner to set the date format which is stored with the
+Allows root to set the date format which is stored with the
score file, for future use disambiguating dates. The format is
automatically stored if none is set. The format must be a three character
string containing one each of 'D', 'M' and 'Y'.
@@ -859,10 +855,7 @@ following names.
The high score file. The directory is system dependent, and may be
changed by application resource or option.
This file must either exist and be writable to by Mr Is, or the
-directory containing it must be writable by Mr Is. This
-can be done by chmoding the score file or directory, or by
-setuiding Mr Is appropriately. A non-setuid Mr Is will chmod the score
-file to 666 if creating it.
+directory containing it must be writable by Mr Is.
.br
.ne 3
.TP
@@ -880,9 +873,7 @@ to move it to the score directory. Mr Is
will attempt to create the personal files in the score directory. If this
cannot be done, the personal score file is placed in the home directory. In
order to create the personal score file in the score directory, Mr Is will
-have to have the correct access rights. A setuid Mr Is
-will juggle the effective uid correctly for accessing both the score directory
-and the users' home directories.
+have to have the correct access rights.
.br
.ne 5
.TP
--
1.7.5
0012-Drop-dir-option.patch:
Imakefile | 33 +++------------------------------
Makefile.std | 35 +++--------------------------------
README | 10 ----------
Xmris-ad.src | 1 -
common.h | 1 -
defcom.c | 5 -----
draw.c | 4 ----
makemris.c | 6 ------
scoring.c | 15 ++++++---------
xmris.h | 8 --------
xmris.man | 29 +++++------------------------
11 files changed, 17 insertions(+), 130 deletions(-)
--- NEW FILE 0012-Drop-dir-option.patch ---
>From ff2baedb64e331b3a3742be72461d37307257c11 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Sat, 30 Apr 2011 12:43:03 +0200
Subject: [PATCH 12/20] Drop -dir option
Allowing the user to specify the directory in which files will be created
using elevated rights, seems like a bad idea.
---
Imakefile | 33 +++------------------------------
Makefile.std | 35 +++--------------------------------
README | 10 ----------
Xmris-ad.src | 1 -
common.h | 1 -
defcom.c | 5 -----
draw.c | 4 ----
makemris.c | 6 ------
scoring.c | 15 ++++++---------
xmris.h | 8 --------
xmris.man | 28 +++++-----------------------
11 files changed, 17 insertions(+), 129 deletions(-)
diff --git a/Imakefile b/Imakefile
index ad062d7..dcf93c8 100644
--- a/Imakefile
+++ b/Imakefile
@@ -60,13 +60,10 @@ XCOMM don't you have gettimeofday?
TIME =
XCOMM TIME = -DUSETIME
-XCOMM game defaults, you probably only want to alter the SCORE
+XCOMM game defaults, you probably do not want to alter these
XCOMM
/* You must specify a fixed width font that exists. */
/* #define thefont "-*-courier-*-r-*-*-18-*-*-*-m-*-*-*" */
-XCOMM where is the high score file?
-XCOMM SCORE = $(LOCAL)/lib/$(APP)
-SCORE = /var/games/$(APP)
/* to install default gardens not in /usr/share/$(APP) */
/* #define InstallDefaultGardens $(DESTDIR)/usr/share/$(APP) */
@@ -90,14 +87,10 @@ XCOMM owner and access rights for executable & score directory
XCOMM these are set for a setuid xmris
XCOMM OWNER = -o games
OWNER =
-INSTSCOREFLAGS = $(OWNER) -m 755
INSTMRISFLAGS = $(OWNER) $(INSTUIDFLAGS)
XCOMM normal install locations
THEBINDIR = $(BINDIR)
THEMANDIR = $(MANDIR)
-XCOMM for open access you want 777 and $(INSTPGMFLAGS),
-XCOMM (the personal score files go in users' home dirs.)
-XCOMM INSTSCOREFLAGS = -m 777
XCOMM INSTMRISFLAGS = $(INSTPGMFLAGS)
XCOMM If you're not installing in the default locations
XCOMM DESTDIR =
@@ -118,7 +111,7 @@ FONT = thefont
#endif
DEFINES = $(EXTRACCOPTIONS) -DFONT_NAME='$(FONT)' $(NDEBUG) \
- -DSCORE_DIR='"$(SCORE)"' $(TIME) $(KNR) -DSCROLLBARBUGFIX
+ $(TIME) $(KNR) -DSCROLLBARBUGFIX
LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XINTL) $(XLIB) $(MATHSLIB)
DEPLIBS = $(DEPXLIB)
@@ -260,24 +253,7 @@ XCOMM application resource files
InstallAppDefaults(Xmris)
Xmris.ad : Xmris-ad.src
- sed -e 's@SCORE@$(SCORE)@' -e s@FONT@$(FONT)@ < Xmris-ad.src > Xmris.ad
-
-XCOMM score directory install
-install ::
- MakeDir($(SCORE))
- @#not all $(INSTALL) have a -d flag, have to do it explicitly
- @echo installing $(INSTSCOREFLAGS) $(SCORE)
- @set -- $(INSTSCOREFLAGS) ; \
- while [ $$# -ne 0 ] ; \
- do \
- case "$$1" in \
- "-o") shift ; chown $$1 $(SCORE) ; echo owner is $$1 ;; \
- "-m") shift ; chmod $$1 $(SCORE) ;; \
- "-g") shift ; chgrp $$1 $(SCORE) ; echo group is $$1 ;; \
- *) echo unknown option '$$1' ;; \
- esac ; \
- shift ; \
- done
+ sed -e s@FONT@$(FONT)@ < Xmris-ad.src > Xmris.ad
#ifdef InstallDefaultGardens
XCOMM install default gardens
@@ -848,9 +824,6 @@ initialize :
@if [ `ls -t Makefile Imakefile | sed '2,$$d'` = Imakefile ] ; then \
echo Warning:Makefile is older than Imakefile ; \
fi
- @if [ ! -d `echo '$(SCORE)' | sed 's=/[^/]*$$=='` ] ; then \
- echo The parent of $(SCORE) does not exist ; \
- fi
@if [ $(FONT) = "" ] ; then true ; \
elif echo $(FONT) | grep -c -- '-m-.*-.*-.*$$' > /dev/null ; then \
if [ "$(XLSFONTS)" = "" -o "$(DISPLAY)" = "" ] ; then \
diff --git a/Makefile.std b/Makefile.std
index 39b8935..84fdd8e 100644
--- a/Makefile.std
+++ b/Makefile.std
@@ -435,13 +435,9 @@ KNR =
TIME =
# TIME = -DUSETIME
-# game defaults, you probably only want to alter the SCORE
+# game defaults, you probably do not want to alter these
#
-# where is the high score file?
-# SCORE = $(LOCAL)/lib/$(APP)
-SCORE = $(LIBDIR)/$(APP)
-
# The following defines are needed for some implementations and/or sites.
# It is xmkmf's job to get these right in the first place.
# If you have to declare any of these, X may not be installed correctly.
@@ -462,14 +458,10 @@ SCORE = $(LIBDIR)/$(APP)
# owner and access rights for executable & score directory
# these are set for a setuid xmris
OWNER = -o games
-INSTSCOREFLAGS = $(OWNER) -m 755
INSTMRISFLAGS = $(OWNER) $(INSTUIDFLAGS)
# normal install locations
THEBINDIR = $(BINDIR)
THEMANDIR = $(MANDIR)
-# for open access you want 777 and $(INSTPGMFLAGS),
-# (the personal score files go in users' home dirs.)
-# INSTSCOREFLAGS = -m 777
# INSTMRISFLAGS = $(INSTPGMFLAGS)
# If you're not installing in the default locations
# DESTDIR =
@@ -485,7 +477,7 @@ COFLAGS = -l
RCSFLAGS =
DEFINES = $(EXTRACCOPTIONS) -DFONT_NAME='$(FONT)' $(NDEBUG) \
- -DSCORE_DIR='"$(SCORE)"' $(TIME) $(KNR) -DSCROLLBARBUGFIX
+ $(TIME) $(KNR) -DSCROLLBARBUGFIX
LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB) $(MATHSLIB)
DEPLIBS = $(DEPXLIB)
@@ -665,25 +657,7 @@ install:: Xmris.ad
$(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) Xmris.ad $(DESTDIR)$(XAPPLOADDIR)/Xmris
Xmris.ad : Xmris-ad.src
- sed -e 's@SCORE@$(SCORE)@' -e s@FONT@$(FONT)@ < Xmris-ad.src > Xmris.ad
-
-# score directory install
-install ::
- @if [ -d $(SCORE) ]; then set +x; \
- else (set -x; $(MKDIRHIER) $(SCORE)); fi
- @#not all $(INSTALL) have a -d flag, have to do it explicitly
- @echo installing $(INSTSCOREFLAGS) $(SCORE)
- @set -- $(INSTSCOREFLAGS) ; \
- while [ $$# -ne 0 ] ; \
- do \
- case "$$1" in \
- "-o") shift ; chown $$1 $(SCORE) ; echo owner is $$1 ;; \
- "-m") shift ; chmod $$1 $(SCORE) ;; \
- "-g") shift ; chgrp $$1 $(SCORE) ; echo group is $$1 ;; \
- *) echo unknown option '$$1' ;; \
- esac ; \
- shift ; \
- done
+ sed -e s@FONT@$(FONT)@ < Xmris-ad.src > Xmris.ad
# install default gardens
install :: $(GARDENS)
@@ -1257,9 +1231,6 @@ initialize :
@if [ `ls -t Makefile Imakefile | sed '2,$$d'` = Imakefile ] ; then \
echo Warning:Makefile is older than Imakefile ; \
fi
- @if [ ! -d `echo '$(SCORE)' | sed 's=/[^/]*$$=='` ] ; then \
- echo The parent of $(SCORE) does not exist ; \
- fi
@if [ $(FONT) = "" ] ; then true ; \
elif echo $(FONT) | grep -c -- '-m-.*-.*-.*$$' > /dev/null ; then \
if [ "$(XLSFONTS)" = "" -o "$(DISPLAY)" = "" ] ; then \
diff --git a/README b/README
index f6c80b0..58dc90a 100644
--- a/README
+++ b/README
@@ -29,16 +29,6 @@ the define USETIME, this will give less accurate timing. Also
gettimeofday may or may not need a timezone argument, this is checked
by the system type in timer.c.
-Set SCORE to the name of the high score directory.
-The score file uses lockf or flock by default, this doesn't work
-on some distributed filing systems. If so,
-define USELOCKFILE, and a lock file is used to do the locking with
-open(O_CREAT | O_EXCL). The name of the lock file is xmris.lock.
-For this to work the high score directory must be writeable, which
-is not the case with lockf. Personal high score files are also put
-in this directory, if xmris can create them there, otherwise they
-will be put in the users' home directory.
-
You may need to force static linking, and not use shared libraries, or
store a library load path with the binary with the linker -R option.
The EXTRA_LOAD_FLAGS can be used for this. (This may be necessary for
diff --git a/Xmris-ad.src b/Xmris-ad.src
index 60be0ac..6368076 100644
--- a/Xmris-ad.src
+++ b/Xmris-ad.src
@@ -13,7 +13,6 @@
*Quit: q
*Iconize: i
*Keyboard: k
-*Dir: SCORE
*ReverseVideo: no
*Monochrome: no
*Gender: he
diff --git a/common.h b/common.h
index 0babbce..b146a47 100644
--- a/common.h
+++ b/common.h
@@ -280,7 +280,6 @@ typedef struct Data
{
Font font; /* font to use */
#ifndef XMRED
- String dir; /* score directory */
String expire; /* expiration */
String remove; /* removal */
String boards; /* board definitions */
diff --git a/defcom.c b/defcom.c
index 9715fe9..1c63cbc 100644
--- a/defcom.c
+++ b/defcom.c
@@ -193,7 +193,6 @@ CommandOptionDesc command_options[] =
{"-remove", 1, XtOffsetOf(DATA, remove)},
{"-nodisplay",0, XtOffsetOf(DATA, nodisplay)},
{"+display", 0, XtOffsetOf(DATA, nodisplay)},
- {"-dir", 1, XtOffsetOf(DATA, dir)},
#endif /* XMRED */
{NULL}
};
@@ -228,9 +227,6 @@ XrmOptionDescRec options[] =
XtResource resources[] =
{
#ifndef XMRED
- /* dir must be first */
- {"dir", "Dir", XtRString, sizeof(String),
- XtOffsetOf(DATA, dir), XtRString, (XtPointer)SCORE_DIR},
{"up", "Up", XtRKeySym, sizeof(KeySym),
XtOffsetOf(DATA, keysyms[0]), XtRString, (XtPointer)"Up"},
{"down", "Down", XtRKeySym, sizeof(KeySym),
@@ -371,7 +367,6 @@ HELP CONST help[] =
{"Modern sprites", "-msit", "Gender:she", ""},
#ifndef XMRED
{"Random apples", "-random", "Random:yes", ""},
- {"High score directory", "-dir", "Dir:", "<directory>"},
{"Use username in score", "-username", "UserName:yes", ""},
{"Use realname in score", "-realname", "UserName:no", ""},
#endif /* XMRED */
diff --git a/draw.c b/draw.c
index ea0f65d..fcf5401 100644
--- a/draw.c
+++ b/draw.c
@@ -1039,10 +1039,6 @@ ARGSEP char CONST *parent
if(!lib)
lib = XtResolvePathname(display.display, "app-defaults/xmris",
name, FILE_SUFFIX, NULL, NULL, 0, NULL);
- if(!lib && data.dir)
- lib = XtResolvePathname(display.display, data.dir, name,
- FILE_SUFFIX, "%T/%N:%T/%N%S:%T/gardens/%N:%T/gardens/%N%S",
- NULL, 0, NULL);
if(lib)
{
XtFree(filename);
diff --git a/makemris.c b/makemris.c
index 4bf8d20..95046d7 100644
--- a/makemris.c
+++ b/makemris.c
@@ -309,7 +309,6 @@ ARGSEP String *argv
/*{{{ some more setup*/
{
XtResource CONST *ptr;
- char *dir;
XtAppSetTypeConverter(display.context, XtRString, XtRKeySym,
convert_string2keysym, (XtConvertArgRec *)NULL, 0, XtCacheNone,
@@ -320,13 +319,10 @@ ARGSEP String *argv
(void (*)PROTOARG((XtAppContext, XrmValue *, XtPointer,
XrmValue *, Cardinal *)))NULL);
display.display = XtDisplay(display.toplevel);
- dir = data.dir;
for(ptr = resources; *(char CONST **)ptr; ptr++)
/* EMPTY */;
XtGetApplicationResources(display.toplevel, (XtPointer)&data,
resources, (Cardinal)(ptr - resources), (Arg *)NULL, 0);
- if(dir)
- data.dir = dir;
gettoplevelresources();
XtVaSetValues(display.toplevel,
XtNtitle, (XtArgVal)names[data.gender != False],
@@ -340,8 +336,6 @@ ARGSEP String *argv
}
}
/*}}}*/
- if(!data.dir)
- data.dir = (char *)resources[0].default_addr;
}
/*}}}*/
return;
diff --git a/scoring.c b/scoring.c
index ede2f07..2e93b30 100644
--- a/scoring.c
+++ b/scoring.c
@@ -17,6 +17,7 @@
#endif /* SYSV */
/*}}}*/
/*{{{ static*/
+static CONST char *score_dir = "/var/games";
static CONST char date_formats[4] = "DMY";
static char *score_file = NULL; /* high score file name */
static char *personal_file = NULL; /* personal in high score dir */
@@ -287,25 +288,22 @@ extern VOIDFUNC init_scores FUNCARGVOID
scoring.alternate = alternate;
}
/*}}}*/
- dirlen = data.dir ? strlen(data.dir) : 0;
- if(dirlen && data.dir[dirlen - 1] == '/')
- dirlen--;
/*{{{ score directory?*/
- if(dirlen)
{
size_t nlen;
+ dirlen = strlen(score_dir);
score_file = malloc(dirlen + 14);
if(score_file)
{
- strcpy(score_file, data.dir);
+ strcpy(score_file, score_dir);
strcpy(&score_file[dirlen], "/xmris.score");
}
nlen = strlen(user);
personal_file = malloc(dirlen + 8 + nlen);
if(personal_file)
{
- strcpy(personal_file, data.dir);
+ strcpy(personal_file, score_dir);
strcpy(&personal_file[dirlen], "/xmris-");
strcpy(&personal_file[dirlen + 7], user);
}
@@ -591,16 +589,15 @@ FUNCARG((insert),
/*{{{ try personal files too*/
{
/*{{{ score directory?*/
- if(data.dir)
{
size_t dirlen;
char *file;
- dirlen = strlen(data.dir);
+ dirlen = strlen(score_dir);
file = malloc(dirlen + 8 + strlen(data.remove));
if(file)
{
- strcpy(file, data.dir);
+ strcpy(file, score_dir);
strcpy(&file[dirlen], "/xmris-");
strcpy(&file[dirlen + 7], data.remove);
if(!unlink(file))
diff --git a/xmris.h b/xmris.h
index 1802e87..1e696c5 100644
--- a/xmris.h
+++ b/xmris.h
@@ -13,11 +13,6 @@
#define FUNCANIMATE(name, arg) PROTOVOID(*name(arg)) PROTOVOID(*arg);
#endif
/*}}}*/
-/*{{{ check score*/
-#ifndef SCORE_DIR
- #error No default score directory
-#endif /* SCORE_DIR */
-/*}}}*/
/*{{{ defines*/
/*{{{ board sizes*/
#define KNOCK_THROUGH /* how far we go to knock through a new cell */\
@@ -41,9 +36,6 @@
#define SCORE_SCALE 1024 /* precision of score scaling */
/*}}}*/
/*{{{ score file*/
-#ifndef SCORE_DIR
-#define SCORE_DIR NULL
-#endif /* SCORE_DIR */
#define SCORE_THRESHOLD 10000 /* minimum score for fame */
#define SCORE_ROUND 5 /* scores are rounded */
#define HIGH_SCORES (CELLS_DOWN - 2)
diff --git a/xmris.man b/xmris.man
index 3fe5028..f108e24 100644
--- a/xmris.man
+++ b/xmris.man
@@ -231,17 +231,12 @@ is still being used for the initial part of the frame delay.
.br
.ne 3
.TP
-.B \-dir \fIscore-directory\fP
-Specify a different score directory.
-.br
-.ne 4
-.TP
.PD 0
.B \-username
.TP
.B \-realname
.PD
-The name for the score file can be either the username or the real name.
+The name inside the score file can be either the username or the real name.
These options select which to use. The default is to use the real name.
If the real name is unobtainable, the username will
be used anyway. If the current score file has an entry by the other
@@ -257,10 +252,8 @@ the Mr Is subdirectory of app-defaults. These are explained below.
.ne 3
.TP
.B \-scores
-List the high scores to stdout. Does not start the game. Note that this
-will still need to open an X display, in order to read the X resources
-(which may affect the score directory). If you don't want the defaults
-read, use the +display option too.
+List the high scores to stdout. Does not start the game. An X display
+will still be opened. The +display option may be used to prevent this.
.br
.ne 4
.TP
@@ -422,11 +415,6 @@ sensitive.
.br
.ne 3
.TP
-.B Xmris.Dir: \fIscore-directory\fP
-The name of the high score directory.
-.br
-.ne 3
-.TP
.B Xmris.UserName: \fI{yes, no}\fP [no]
Selects whether the username or real name should be used for your entry
in the high score table.
@@ -851,9 +839,8 @@ following names.
.br
.ne 3
.TP
-.B .../xmris.score
-The high score file. The directory is system dependent, and may be
-changed by application resource or option.
+.B /var/games/xmris.score
+The high score file.
This file must either exist and be writable to by Mr Is, or the
directory containing it must be writable by Mr Is.
.br
@@ -888,12 +875,7 @@ See X for information about how these are searched.
.br
.ne 6
.TP
-.PD 0
.B .../app-defaults/xmris/<gardens>
-.TP
-.B <score-dir>/<gardens>
-.TP
-.B <score-dir>/gardens/<gardens>
.PD
Search path for loadable gardens. The suffix ".gdn" is appended to the
filename, if required.
--
1.7.5
0013-Drop-support-for-global-personal-file.patch:
scoring.c | 91 +++++---------------------------------------------------------
xmris.man | 15 ----------
2 files changed, 9 insertions(+), 97 deletions(-)
--- NEW FILE 0013-Drop-support-for-global-personal-file.patch ---
>From 256730c26c8369518d131d9b85a871907cf3f7bc Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Sat, 30 Apr 2011 16:09:45 +0200
Subject: [PATCH 13/20] Drop support for global personal file
Having it in $home works fine and having support for both just
needlessly complicates the code.
---
scoring.c | 91 +++++-------------------------------------------------------
xmris.man | 14 +---------
2 files changed, 9 insertions(+), 96 deletions(-)
diff --git a/scoring.c b/scoring.c
index 2e93b30..fd2cd77 100644
--- a/scoring.c
+++ b/scoring.c
@@ -20,9 +20,7 @@
static CONST char *score_dir = "/var/games";
static CONST char date_formats[4] = "DMY";
static char *score_file = NULL; /* high score file name */
-static char *personal_file = NULL; /* personal in high score dir */
static char *personal_home = NULL; /* personal in home dir */
-static int personal_make = 2;
static char date_format[4] = " ";
static char *alternate = NULL; /* alternative name */
static HIGH_SCORE *CONST tables[] =
@@ -54,8 +52,7 @@ extern VOIDFUNC check_scores FUNCARGVOID
{
retire_scores();
if((score_file && file_changed(score_file)) ||
- (!personal_make && personal_file &&
- file_changed(personal_file)))
+ (personal_home && file_changed(personal_home)))
load_check_expire_insert(0);
return;
}
@@ -290,8 +287,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
/*}}}*/
/*{{{ score directory?*/
{
- size_t nlen;
-
dirlen = strlen(score_dir);
score_file = malloc(dirlen + 14);
if(score_file)
@@ -299,14 +294,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
strcpy(score_file, score_dir);
strcpy(&score_file[dirlen], "/xmris.score");
}
- nlen = strlen(user);
- personal_file = malloc(dirlen + 8 + nlen);
- if(personal_file)
- {
- strcpy(personal_file, score_dir);
- strcpy(&personal_file[dirlen], "/xmris-");
- strcpy(&personal_file[dirlen + 7], user);
- }
}
/*}}}*/
/*{{{ personal file*/
@@ -421,11 +408,10 @@ FUNCARG((insert),
*/
{
FILE *score_stream;
- FILE *personal_stream;
FILE *home_stream;
unsigned do_score, do_personal;
- score_stream = personal_stream = home_stream = NULL;
+ score_stream = home_stream = NULL;
do_score = do_personal = 0;
/*{{{ score_file?*/
if(score_file)
@@ -437,37 +423,14 @@ FUNCARG((insert),
do_score = 1;
}
/*}}}*/
- /*{{{ personal_file?*/
- if(personal_file)
- {
- personal_stream = get_lock(personal_file, personal_make);
- if(personal_stream)
- {
- personal_make = 0;
- if(personal_home && !unlink(personal_home))
- fprintf(stderr, "Two personal score files, '%s' removed\n",
- personal_home);
- personal_home = NULL;
- do_personal = merge_personal(personal_stream);
- }
- }
- /*}}}*/
/*{{{ personal_home?*/
if(personal_home)
{
home_stream = get_lock(personal_home, 2);
if(home_stream)
- {
- merge_personal(home_stream);
- if(!personal_file)
- {
- personal_file = personal_home;
- personal_home = NULL;
- personal_make = 0;
- }
- else
- do_personal = 1;
- }
+ do_personal = merge_personal(home_stream);
+ else
+ do_personal = 1;
}
/*}}}*/
/*{{{ check alternate*/
@@ -588,27 +551,6 @@ FUNCARG((insert),
do_score |= found;
/*{{{ try personal files too*/
{
- /*{{{ score directory?*/
- {
- size_t dirlen;
- char *file;
-
- dirlen = strlen(score_dir);
- file = malloc(dirlen + 8 + strlen(data.remove));
- if(file)
- {
- strcpy(file, score_dir);
- strcpy(&file[dirlen], "/xmris-");
- strcpy(&file[dirlen + 7], data.remove);
- if(!unlink(file))
- {
- personal = 1;
- found = 1;
- }
- free(file);
- }
- }
- /*}}}*/
/*{{{ home directory?*/
{
if(home)
@@ -1003,39 +945,22 @@ FUNCARG((insert),
/*{{{ write personal?*/
if(do_personal)
{
- if(!personal_stream && score_stream && personal_file)
- personal_stream = get_lock(personal_file, 3);
- if(personal_stream)
- {
- write_personal(personal_stream);
- if(personal_home)
- unlink(personal_home);
- personal_home = NULL;
- }
- else
- {
if(!home_stream)
home_stream = get_lock(personal_home, 1);
if(home_stream)
write_personal(home_stream);
else
personal_home = NULL;
- personal_file = personal_home;
- personal_home = NULL;
- }
- personal_make = 0;
}
/*}}}*/
- if(personal_stream)
- get_unlock(personal_stream);
if(home_stream)
get_unlock(home_stream);
if(score_stream)
get_unlock(score_stream);
if(do_score && score_file)
file_changed(score_file);
- if(do_personal && personal_file)
- file_changed(personal_file);
+ if(do_personal && personal_home)
+ file_changed(personal_home);
return;
}
/*}}}*/
@@ -1103,7 +1028,7 @@ FUNCARG((stream),
if(failed)
{
fprintf(stderr, "%s:Your personal score file '%s' has been corrupted.\n",
- myname, personal_file);
+ myname, personal_home);
scoring.personal[0].score = 0;
}
return failed;
diff --git a/xmris.man b/xmris.man
index f108e24..ae881c0 100644
--- a/xmris.man
+++ b/xmris.man
@@ -846,21 +846,9 @@ directory containing it must be writable by Mr Is.
.br
.ne 3
.TP
-.PD 0
-.B .../xmris-<name>
-.TP
.B ~/.xmris.score
.PD
-One of these files is used to store the personal best scores.
-Mr Is first looks for the personal score file in the score directory and
-then in the home directory. If a personal
-score file cannot be found, Mr Is attempts to create one.
-If the file is found in the user's home directory, Mr Is attempts
-to move it to the score directory. Mr Is
-will attempt to create the personal files in the score directory. If this
-cannot be done, the personal score file is placed in the home directory. In
-order to create the personal score file in the score directory, Mr Is will
-have to have the correct access rights.
+This file is used to store the personal best scores.
.br
.ne 5
.TP
--
1.7.5
0014-Some-renames.patch:
scoring.c | 47 +++++++++++++++++++++++------------------------
1 file changed, 23 insertions(+), 24 deletions(-)
--- NEW FILE 0014-Some-renames.patch ---
>From 5997920c77b25c8ed4a79f44da13436ad05412e5 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Sat, 30 Apr 2011 16:12:48 +0200
Subject: [PATCH 14/20] Some renames
Things make more sense after the previous commit with some vars renamed:
s/personal_home/personal_file/
s/home_stream/personal_stream/
---
scoring.c | 46 +++++++++++++++++++++++-----------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/scoring.c b/scoring.c
index fd2cd77..72f08d6 100644
--- a/scoring.c
+++ b/scoring.c
@@ -20,7 +20,7 @@
static CONST char *score_dir = "/var/games";
static CONST char date_formats[4] = "DMY";
static char *score_file = NULL; /* high score file name */
-static char *personal_home = NULL; /* personal in home dir */
+static char *personal_file = NULL; /* personal in home dir */
static char date_format[4] = " ";
static char *alternate = NULL; /* alternative name */
static HIGH_SCORE *CONST tables[] =
@@ -52,7 +52,7 @@ extern VOIDFUNC check_scores FUNCARGVOID
{
retire_scores();
if((score_file && file_changed(score_file)) ||
- (personal_home && file_changed(personal_home)))
+ (personal_file && file_changed(personal_file)))
load_check_expire_insert(0);
return;
}
@@ -305,11 +305,11 @@ extern VOIDFUNC init_scores FUNCARGVOID
size_t length;
length = strlen(home);
- personal_home = malloc(length + 15);
- if(personal_home)
+ personal_file = malloc(length + 15);
+ if(personal_file)
{
- strcpy(personal_home, home);
- strcpy(&personal_home[length], "/.xmris.score");
+ strcpy(personal_file, home);
+ strcpy(&personal_file[length], "/.xmris.score");
}
}
}
@@ -408,10 +408,10 @@ FUNCARG((insert),
*/
{
FILE *score_stream;
- FILE *home_stream;
+ FILE *personal_stream;
unsigned do_score, do_personal;
- score_stream = home_stream = NULL;
+ score_stream = personal_stream = NULL;
do_score = do_personal = 0;
/*{{{ score_file?*/
if(score_file)
@@ -423,12 +423,12 @@ FUNCARG((insert),
do_score = 1;
}
/*}}}*/
- /*{{{ personal_home?*/
- if(personal_home)
+ /*{{{ personal_file?*/
+ if(personal_file)
{
- home_stream = get_lock(personal_home, 2);
- if(home_stream)
- do_personal = merge_personal(home_stream);
+ personal_stream = get_lock(personal_file, 2);
+ if(personal_stream)
+ do_personal = merge_personal(personal_stream);
else
do_personal = 1;
}
@@ -945,22 +945,22 @@ FUNCARG((insert),
/*{{{ write personal?*/
if(do_personal)
{
- if(!home_stream)
- home_stream = get_lock(personal_home, 1);
- if(home_stream)
- write_personal(home_stream);
+ if(!personal_stream)
+ personal_stream = get_lock(personal_file, 1);
+ if(personal_stream)
+ write_personal(personal_stream);
else
- personal_home = NULL;
+ personal_file = NULL;
}
/*}}}*/
- if(home_stream)
- get_unlock(home_stream);
+ if(personal_stream)
+ get_unlock(personal_stream);
if(score_stream)
get_unlock(score_stream);
if(do_score && score_file)
file_changed(score_file);
- if(do_personal && personal_home)
- file_changed(personal_home);
+ if(do_personal && personal_file)
+ file_changed(personal_file);
return;
}
/*}}}*/
@@ -1028,7 +1028,7 @@ FUNCARG((stream),
if(failed)
{
fprintf(stderr, "%s:Your personal score file '%s' has been corrupted.\n",
- myname, personal_home);
+ myname, personal_file);
scoring.personal[0].score = 0;
}
return failed;
--
1.7.5
0015-Open-score-files-only-once-and-keep-them-open-till-t.patch:
scoring.c | 151 ++++++++++++++++++++++++++++++--------------------------------
xmris.c | 1
xmris.h | 2
3 files changed, 76 insertions(+), 78 deletions(-)
--- NEW FILE 0015-Open-score-files-only-once-and-keep-them-open-till-t.patch ---
>From 1105d6f3df03ffe6f3bd26fc37f8daf092f920e5 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Sun, 1 May 2011 10:59:39 +0200
Subject: [PATCH 15/20] Open score files only once and keep them open till the
program exits
---
scoring.c | 151 ++++++++++++++++++++++++++++++-------------------------------
xmris.c | 1 +
xmris.h | 1 +
3 files changed, 76 insertions(+), 77 deletions(-)
diff --git a/scoring.c b/scoring.c
index 72f08d6..381057b 100644
--- a/scoring.c
+++ b/scoring.c
@@ -17,10 +17,11 @@
#endif /* SYSV */
/*}}}*/
/*{{{ static*/
-static CONST char *score_dir = "/var/games";
static CONST char date_formats[4] = "DMY";
-static char *score_file = NULL; /* high score file name */
+static char *score_file = "/var/games/xmris.score"; /* score file name */
static char *personal_file = NULL; /* personal in home dir */
+static FILE *score_stream = NULL;
+static FILE *personal_stream = NULL;
static char date_format[4] = " ";
static char *alternate = NULL; /* alternative name */
static HIGH_SCORE *CONST tables[] =
@@ -29,7 +30,7 @@ static HIGH_SCORE *CONST tables[] =
/*{{{ prototypes*/
static unsigned expire PROTOARG((time_t, time_t));
static unsigned file_changed PROTOARG((char CONST *));
-static FILE *get_lock PROTOARG((char CONST *, unsigned));
+static unsigned get_lock PROTOARG((FILE *));
static VOIDFUNC get_unlock PROTOARG((FILE *));
static unsigned insert_personal PROTOARG((HIGH_SCORE CONST *));
static unsigned insert_score
@@ -106,33 +107,29 @@ FUNCARG((name),
return changed;
}
/*}}}*/
-/*{{{ void get_lock(name, flag)*/
-static FILE *get_lock
-FUNCARG((name, flag),
- char CONST *name
-ARGSEP unsigned flag
+/*{{{ unsigned get_lock(stream)*/
+static unsigned get_lock
+FUNCARG((stream),
+ FILE *stream
)
/*
- * open and locks a high score file
- * flag & 1 == 0 -> "r+"
- * flag & 1 != 0 -> "w+"
- * flag & 2 inhibit error message
+ * lock the high score file
*/
{
- FILE *stream;
-
- stream = fopen(name, flag & 1 ? "w+" : "r+");
- if(!stream && !(flag & 2))
- perror(name);
- if(stream)
/*{{{ get lock on the file*/
- while(lock_file(stream))
+ while(1)
{
- if(errno == EINTR)
- continue;
+ int res = lock_file(stream);
+ if(res)
+ {
+ if(errno == EINTR)
+ continue;
+ perror("Error locking score file");
+ }
+
+ return res == 0;
}
/*}}}*/
- return stream;
}
/*}}}*/
/*{{{ void get_unlock(stream)*/
@@ -141,14 +138,10 @@ FUNCARG((stream),
FILE *stream
)
/*
- * unlock and close the high score file
+ * unlock the high score file
*/
{
- fflush(stream);
- rewind(stream);
unlock_file(stream);
- fclose(stream);
- return;
}
/*}}}*/
/*{{{ void high_score(score, screen, msec)*/
@@ -186,7 +179,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
char CONST *user;
char CONST *home;
char *reallife;
- size_t dirlen;
user = NULL;
home = NULL;
@@ -287,13 +279,12 @@ extern VOIDFUNC init_scores FUNCARGVOID
/*}}}*/
/*{{{ score directory?*/
{
- dirlen = strlen(score_dir);
- score_file = malloc(dirlen + 14);
- if(score_file)
- {
- strcpy(score_file, score_dir);
- strcpy(&score_file[dirlen], "/xmris.score");
- }
+ score_stream = fopen(score_file, "r+");
+ /* If we cannot open it, try creating it */
+ if(!score_stream)
+ score_stream = fopen(score_file, "w+");
+ if (!score_stream)
+ score_file = NULL;
}
/*}}}*/
/*{{{ personal file*/
@@ -310,6 +301,15 @@ extern VOIDFUNC init_scores FUNCARGVOID
{
strcpy(personal_file, home);
strcpy(&personal_file[length], "/.xmris.score");
+
+ personal_stream = fopen(personal_file, "r+");
+ if(!personal_stream)
+ personal_stream = fopen(personal_file, "w+");
+ if(!personal_stream)
+ {
+ free(personal_file);
+ personal_file = NULL;
+ }
}
}
}
@@ -320,6 +320,24 @@ extern VOIDFUNC init_scores FUNCARGVOID
return;
}
/*}}}*/
+/*{{{ void init_scores()*/
+extern VOIDFUNC cleanup_scores FUNCARGVOID
+/*
+ * Close open score files
+ */
+{
+ if(score_stream)
+ {
+ fclose(score_stream);
+ score_stream = NULL;
+ }
+ if(personal_stream)
+ {
+ fclose(personal_stream);
+ personal_stream = NULL;
+ }
+}
+/*}}}*/
/*{{{ unsigned insert_personal(sptr)*/
static unsigned insert_personal
FUNCARG((sptr),
@@ -407,32 +425,23 @@ FUNCARG((insert),
* write the files back
*/
{
- FILE *score_stream;
- FILE *personal_stream;
- unsigned do_score, do_personal;
-
- score_stream = personal_stream = NULL;
- do_score = do_personal = 0;
- /*{{{ score_file?*/
- if(score_file)
+ unsigned do_score = 0, do_personal = 0;
+ unsigned score_lock = 0, personal_lock = 0;
+
+ if(score_stream)
{
- score_stream = get_lock(score_file, 2);
- if(score_stream)
+ score_lock = get_lock(score_stream);
+ if(score_lock)
do_score = merge_scores(score_stream);
- else
- do_score = 1;
}
- /*}}}*/
- /*{{{ personal_file?*/
- if(personal_file)
+
+ if(personal_stream)
{
- personal_stream = get_lock(personal_file, 2);
- if(personal_stream)
+ personal_lock = get_lock(personal_stream);
+ if(personal_lock)
do_personal = merge_personal(personal_stream);
- else
- do_personal = 1;
}
- /*}}}*/
+
/*{{{ check alternate*/
if(alternate)
{
@@ -930,37 +939,23 @@ FUNCARG((insert),
}
/*}}}*/
/*{{{ write_score?*/
- if(do_score)
+ if(do_score && score_lock)
{
- if(!score_stream && score_file)
- {
- score_stream = get_lock(score_file, 5);
- if(!score_stream)
- score_file = NULL;
- }
- if(score_stream)
- write_scores(score_stream);
+ write_scores(score_stream);
+ file_changed(score_file);
}
/*}}}*/
/*{{{ write personal?*/
- if(do_personal)
+ if(do_personal && personal_lock)
{
- if(!personal_stream)
- personal_stream = get_lock(personal_file, 1);
- if(personal_stream)
- write_personal(personal_stream);
- else
- personal_file = NULL;
+ write_personal(personal_stream);
+ file_changed(personal_file);
}
/*}}}*/
- if(personal_stream)
+ if(personal_lock)
get_unlock(personal_stream);
- if(score_stream)
+ if(score_lock)
get_unlock(score_stream);
- if(do_score && score_file)
- file_changed(score_file);
- if(do_personal && personal_file)
- file_changed(personal_file);
return;
}
/*}}}*/
@@ -1218,6 +1213,7 @@ FUNCARG((stream),
check = 0;
}
fprintf(stream, "+%lu\n", check);
+ fflush(stream);
return;
}
/*}}}*/
@@ -1245,6 +1241,7 @@ FUNCARG((stream),
check = 0;
}
fprintf(stream, "+%lu %s\n", check, date_format);
+ fflush(stream);
return;
}
/*}}}*/
diff --git a/xmris.c b/xmris.c
index b1a0404..f10e3f7 100644
--- a/xmris.c
+++ b/xmris.c
@@ -1348,6 +1348,7 @@ ARGSEP char CONST **argv
assert(monster.normals < 20);
}
timer_close();
+ cleanup_scores();
return 0;
}
/*}}}*/
diff --git a/xmris.h b/xmris.h
index 1e696c5..34969df 100644
--- a/xmris.h
+++ b/xmris.h
@@ -536,6 +536,7 @@ extern unsigned move_player PROTOARG((VOIDARG));
extern VOIDFUNC check_scores PROTOARG((VOIDARG));
extern VOIDFUNC high_score PROTOARG((unsigned long, unsigned, unsigned long));
extern VOIDFUNC init_scores PROTOARG((VOIDARG));
+extern VOIDFUNC cleanup_scores PROTOARG((VOIDARG));
/*}}}*/
/*{{{ timer*/
extern VOIDFUNC timer_close PROTOARG((VOIDARG));
--
1.7.5
0016-Open-the-global-score-file-asap-and-drop-special-rig.patch:
Imakefile | 4 ++--
scoring.c | 42 ++++++++++++++++++++++++++++++++----------
xmris.c | 2 ++
xmris.h | 2 +-
4 files changed, 37 insertions(+), 13 deletions(-)
--- NEW FILE 0016-Open-the-global-score-file-asap-and-drop-special-rig.patch ---
>From 74743124c7cd2ed7ff5e33e436a73d3f0f70ce6a Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Sun, 1 May 2011 11:12:09 +0200
Subject: [PATCH 16/20] Open the global score file asap, and drop special
rights directly after
This completes making the highscore code truely safe for sgid usage.
---
Imakefile | 4 ++--
scoring.c | 42 ++++++++++++++++++++++++++++++++----------
xmris.c | 2 ++
xmris.h | 1 +
4 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/Imakefile b/Imakefile
index dcf93c8..09931d8 100644
--- a/Imakefile
+++ b/Imakefile
@@ -85,9 +85,9 @@ XCOMM install parameters
XCOMM
XCOMM owner and access rights for executable & score directory
XCOMM these are set for a setuid xmris
-XCOMM OWNER = -o games
+XCOMM OWNER = -g games
OWNER =
-INSTMRISFLAGS = $(OWNER) $(INSTUIDFLAGS)
+INSTMRISFLAGS = $(OWNER) $(INSTGIDFLAGS)
XCOMM normal install locations
THEBINDIR = $(BINDIR)
THEMANDIR = $(MANDIR)
diff --git a/scoring.c b/scoring.c
index 381057b..45c14d8 100644
--- a/scoring.c
+++ b/scoring.c
@@ -1,4 +1,5 @@
/* Copyright (C) 1993, 1992 Nathan Sidwell */
+#define _GNU_SOURCE /* for setresuid / setresgid */
#include "xmris.h"
/*{{{ other includes*/
#include <pwd.h>
@@ -169,6 +170,37 @@ ARGSEP unsigned long msec
return;
}
/*}}}*/
+/*{{{ void init_scores_early()*/
+extern VOIDFUNC init_scores_early FUNCARGVOID
+/*
+ * To be called asap from main, open the global highscore file and drop
+ * sgid rights
+ */
+{
+ /* Figure out who we really are. */
+ gid_t realgid = getgid();
+ uid_t realuid = getuid();
+
+ score_stream = fopen(score_file, "r+");
+ /* If we cannot open it, try creating it */
+ if(!score_stream)
+ score_stream = fopen(score_file, "w+");
+ if(!score_stream)
+ score_file = NULL;
+
+ /* This is where we drop our setuid/setgid privileges. */
+ if(setresgid(-1, realgid, realgid) != 0)
+ {
+ perror("Could not drop setgid privileges. Aborting.");
+ exit(1);
+ }
+ if(setresuid(-1, realuid, realuid) != 0)
+ {
+ perror("Could not drop setuid privileges. Aborting.");
+ exit(1);
+ }
+}
+/*}}}*/
/*{{{ void init_scores()*/
extern VOIDFUNC init_scores FUNCARGVOID
/*
@@ -277,16 +309,6 @@ extern VOIDFUNC init_scores FUNCARGVOID
scoring.alternate = alternate;
}
/*}}}*/
- /*{{{ score directory?*/
- {
- score_stream = fopen(score_file, "r+");
- /* If we cannot open it, try creating it */
- if(!score_stream)
- score_stream = fopen(score_file, "w+");
- if (!score_stream)
- score_file = NULL;
- }
- /*}}}*/
/*{{{ personal file*/
{
if(!home)
diff --git a/xmris.c b/xmris.c
index f10e3f7..a38139d 100644
--- a/xmris.c
+++ b/xmris.c
@@ -1259,6 +1259,8 @@ ARGSEP char CONST **argv
PROTOANIMATE((*animate));
Atom wm_delete_window;
+ init_scores_early();
+
myname = *argv ? *argv : "Xmris";
open_toolkit(argc, (String *)argv);
init_scores();
diff --git a/xmris.h b/xmris.h
index 34969df..99af882 100644
--- a/xmris.h
+++ b/xmris.h
@@ -535,6 +535,7 @@ extern unsigned move_player PROTOARG((VOIDARG));
/*{{{ scoring*/
extern VOIDFUNC check_scores PROTOARG((VOIDARG));
extern VOIDFUNC high_score PROTOARG((unsigned long, unsigned, unsigned long));
+extern VOIDFUNC init_scores_early PROTOARG((VOIDARG));
extern VOIDFUNC init_scores PROTOARG((VOIDARG));
extern VOIDFUNC cleanup_scores PROTOARG((VOIDARG));
/*}}}*/
--
1.7.5
0017-Set-class-to-Xmsit-Xmris-depending-on-how-we-re-laun.patch:
Imakefile | 7 ++++++-
makemris.c | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
--- NEW FILE 0017-Set-class-to-Xmsit-Xmris-depending-on-how-we-re-laun.patch ---
>From 07e599150a81a85f327ad8b84102c359da442ed8 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon, 2 May 2011 11:58:04 +0200
Subject: [PATCH 17/20] Set class to Xmsit / Xmris depending on how we're
launched
And also create a separate Xmsit.ad with gender: she so that launching as
xmsit actually gives us msit.
---
Imakefile | 7 ++++++-
makemris.c | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Imakefile b/Imakefile
index 09931d8..31c8550 100644
--- a/Imakefile
+++ b/Imakefile
@@ -209,7 +209,7 @@ all :: initialize
all :: xmris xmred
@#keep gnumake happy
-all :: README.xmris README.xmred Xmris.ad
+all :: README.xmris README.xmred Xmris.ad Xmsit.ad
@#keep gnumake happy
XCOMM rules to make sure the initialize thing is done
@@ -251,10 +251,14 @@ InstallManPage(xmred,$(THEMANDIR))
XCOMM application resource files
InstallAppDefaults(Xmris)
+InstallAppDefaults(Xmsit)
Xmris.ad : Xmris-ad.src
sed -e s@FONT@$(FONT)@ < Xmris-ad.src > Xmris.ad
+Xmsit.ad : Xmris.ad
+ sed -e "s@Gender:\t\the@Gender:\t\tshe@" < Xmris.ad > Xmsit.ad
+
#ifdef InstallDefaultGardens
XCOMM install default gardens
install :: $(GARDENS)
@@ -273,6 +277,7 @@ NormalProgramTarget(scram,$(SCRAMOBJS),,,)
clean ::
$(RM) $(MRISOBJS)
$(RM) Xmris.ad
+ $(RM) Xmsit.ad
$(RM) $(MREDOBJS)
$(RM) $(WIDGETOBJS)
$(RM) $(SCRAMOBJS)
diff --git a/makemris.c b/makemris.c
index 95046d7..6b129c1 100644
--- a/makemris.c
+++ b/makemris.c
@@ -274,13 +274,14 @@ ARGSEP String *argv
if(data.nodisplay == False)
{
XrmOptionDescRec CONST *ptr;
+ const char *myclass = default_gender ? "Xmsit" : "Xmris";
/* as options is an extern of unknown size, I can't use
* XtNumber() to get its size, so I've done it this way
*/
for(ptr = options; *(char CONST **)ptr; ptr++)
/* EMPTY */;
- display.toplevel = XtAppInitialize(&display.context, "Xmris",
+ display.toplevel = XtAppInitialize(&display.context, myclass,
options, (Cardinal)(ptr - options),
&argc, (String *)argv,
(String *)NULL, toplevel_args, XtNumber(toplevel_args));
--
1.7.5
0018-Install-manpages-into-section-6-rather-then-1.patch:
Imakefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE 0018-Install-manpages-into-section-6-rather-then-1.patch ---
>From ce1204bfff0c925002033206659c755ab589adb4 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon, 2 May 2011 12:00:32 +0200
Subject: [PATCH 18/20] Install manpages into section 6 rather then 1
---
Imakefile | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Imakefile b/Imakefile
index 31c8550..b999fda 100644
--- a/Imakefile
+++ b/Imakefile
@@ -90,7 +90,8 @@ OWNER =
INSTMRISFLAGS = $(OWNER) $(INSTGIDFLAGS)
XCOMM normal install locations
THEBINDIR = $(BINDIR)
-THEMANDIR = $(MANDIR)
+THEMANDIR = $(MANSOURCEPATH)6
+MANSUFFIX = 6
XCOMM INSTMRISFLAGS = $(INSTPGMFLAGS)
XCOMM If you're not installing in the default locations
XCOMM DESTDIR =
--
1.7.5
0019-Add-.desktop-files.patch:
xmred.desktop | 9 +++++++++
xmris.desktop | 9 +++++++++
xmsit.desktop | 10 +++++++++-
3 files changed, 27 insertions(+), 1 deletion(-)
--- NEW FILE 0019-Add-.desktop-files.patch ---
>From e9445fb7ea16fdbcfe7577dfbad3544c90670fe8 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Sun, 1 May 2011 17:14:50 +0200
Subject: [PATCH 19/20] Add .desktop files
---
xmred.desktop | 9 +++++++++
xmris.desktop | 9 +++++++++
xmsit.desktop | 9 +++++++++
3 files changed, 27 insertions(+), 0 deletions(-)
create mode 100644 xmred.desktop
create mode 100644 xmris.desktop
create mode 100644 xmsit.desktop
diff --git a/xmred.desktop b/xmred.desktop
new file mode 100644
index 0000000..e60a49f
--- /dev/null
+++ b/xmred.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=X Mr Ed
+Comment=Level Editor for X Mr Is
+Exec=xmred
+Icon=xmris
+Terminal=false
+StartupNotify=false
+Type=Application
+Categories=Game;ArcadeGame;
diff --git a/xmris.desktop b/xmris.desktop
new file mode 100644
index 0000000..6cd97f2
--- /dev/null
+++ b/xmris.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=X Mr Is
+Comment=Maze digging and cherry eating game
+Exec=xmris
+Icon=xmris
+Terminal=false
+StartupNotify=false
+Type=Application
+Categories=Game;ArcadeGame;
diff --git a/xmsit.desktop b/xmsit.desktop
new file mode 100644
index 0000000..e14bdef
--- /dev/null
+++ b/xmsit.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=X Ms It
+Comment=Maze digging and cherry eating game
+Exec=xmsit
+Icon=xmsit
+Terminal=false
+StartupNotify=false
+Type=Application
+Categories=Game;ArcadeGame;
--
1.7.5
--- NEW FILE xmris.spec ---
Name: xmris
Version: 4.0.5
Release: 2%{?dist}
Summary: Maze digging and cherry eating game
Group: Amusements/Games
License: GPL+
URL: http://sourceforge.net/projects/xmris/
Source0: http://downloads.sourceforge.net/xmris/xmris.%{version}.tar.gz
# These were created from screenshots from the game
Source1: xmris.png
Source2: xmsit.png
# Various fixes
Patch1: 0001-Fix-xm-exiting-with-a-BadFont-error.patch
Patch2: 0002-Fix-timer-signal-handling-under-Linux.patch
Patch3: 0003-Adjust-Imakefile-for-modern-systems.patch
Patch4: 0004-Catch-the-window-being-deleted.patch
Patch5: 0005-Fix-compiling-of-flock-code-under-Linux.patch
Patch6: 0006-Fix-key-presses-getting-lost.patch
Patch7: 0007-Change-key-binding-defaults-to-something-sane.patch
Patch8: 0008-Fix-compiler-warnings.patch
# Patches for safe global highscore handling
Patch9: 0009-Remove-TRANSPUTER-stuff.patch
Patch10: 0010-Remove-USELOCKFILE-stuff.patch
Patch11: 0011-Remove-seteuid-stuff.patch
Patch12: 0012-Drop-dir-option.patch
Patch13: 0013-Drop-support-for-global-personal-file.patch
Patch14: 0014-Some-renames.patch
Patch15: 0015-Open-score-files-only-once-and-keep-them-open-till-t.patch
Patch16: 0016-Open-the-global-score-file-asap-and-drop-special-rig.patch
# Misc patches
Patch17: 0017-Set-class-to-Xmsit-Xmris-depending-on-how-we-re-laun.patch
Patch18: 0018-Install-manpages-into-section-6-rather-then-1.patch
Patch19: 0019-Add-.desktop-files.patch
BuildRequires: libXt-devel libXaw-devel groff imake desktop-file-utils
Requires: hicolor-icon-theme
Requires: xorg-x11-fonts-ISO8859-1-75dpi
Requires: xorg-x11-fonts-ISO8859-1-100dpi
%description
You control a gnome, who can walk around a garden, along paths already
marked, or create new paths wherever you wish. You also have a ball,
which can be thrown in the direction you're facing, towards the gnome's
feet. Points are scored for collecting cherries (if you collect eight
cherries without stopping or pushing an apple, you get a bonus),
killing monsters (by squashing them, or throwing the ball at them), and
collecting the prize left when all the monsters have come out of their
den.
%package editor
Summary: Level editor for %{name}
Requires: %{name} = %{version}-%{release}
%description editor
A level editor for %{name}.
%prep
%setup -q -n %{name}.%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%build
xmkmf
make %{?_smp_mflags} CDEBUGFLAGS="$RPM_OPT_FLAGS"
%install
make install install.man DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT/usr/lib/X11/app-defaults
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/games
touch $RPM_BUILD_ROOT%{_localstatedir}/games/%{name}.score
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications xm*.desktop
%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,-)
%doc CHANGES* COPYING-2.0 COPYRIGHT README.xmris
%attr(2755,root,games) %{_bindir}/%{name}
%{_bindir}/xmsit
%{_datadir}/%{name}
%{_datadir}/X11/app-defaults/Xm*
%{_datadir}/applications/xmris.desktop
%{_datadir}/applications/xmsit.desktop
%{_datadir}/icons/hicolor/128x128/apps/xm*.png
%{_mandir}/man6/xmris.6*
%{_mandir}/man6/xmsit.6*
%verify(not md5 size mtime) %config(noreplace) %attr(0664,root,games) %{_localstatedir}/games/%{name}.score
%files editor
%defattr(-,root,root,-)
%doc README.xmred
%{_bindir}/xmred
%{_datadir}/applications/xmred.desktop
%{_mandir}/man6/xmred.6*
%changelog
* Sat May 21 2011 Hans de Goede <j.w.r.degoede(a)gmail.com> 4.0.5-2
- Add missing BuildRequires: libXaw-devel groff
- Change font requires to: xorg-x11-fonts-ISO8859-1-75dpi + 100dpi
* Tue May 3 2011 Hans de Goede <j.w.r.degoede(a)gmail.com> 4.0.5-1
- Initial rpmfusion package
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/xmris/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 7 Jun 2011 15:38:59 -0000 1.1
+++ .cvsignore 23 Jun 2011 20:04:58 -0000 1.2
@@ -0,0 +1 @@
+xmris.4.0.5.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/xmris/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 7 Jun 2011 15:38:59 -0000 1.1
+++ sources 23 Jun 2011 20:04:58 -0000 1.2
@@ -0,0 +1 @@
+108beb6df3cda34f6797605e975345a8 xmris.4.0.5.tar.gz
13 years, 5 months
rpms/audacious-plugins-freeworld/F-15 audacious-plugins-2.5.2-aac-m4a.patch, NONE, 1.1 .cvsignore, 1.10, 1.11 audacious-plugins-2.4-sys-mpg123.patch, 1.1, 1.2 audacious-plugins-freeworld.spec, 1.17, 1.18 sources, 1.10, 1.11 audacious-plugins-2.4-ffaudio-metadata.patch, 1.2, NONE audacious-plugins-2.4-no-avcore.patch, 1.1, NONE
by jwrdegoede
Author: jwrdegoede
Update of /cvs/free/rpms/audacious-plugins-freeworld/F-15
In directory se02.es.rpmfusion.net:/tmp/cvs-serv10092
Modified Files:
.cvsignore audacious-plugins-2.4-sys-mpg123.patch
audacious-plugins-freeworld.spec sources
Added Files:
audacious-plugins-2.5.2-aac-m4a.patch
Removed Files:
audacious-plugins-2.4-ffaudio-metadata.patch
audacious-plugins-2.4-no-avcore.patch
Log Message:
* Wed Jun 22 2011 Hans de Goede <j.w.r.degoede(a)gmail.com> 2.5.2-1
- Update to 2.5.2
- Drop Provides + Obsoletes for upgrade path from livna / freshrpms
audacious-plugins-2.5.2-aac-m4a.patch:
libmp4.c | 12 ------------
1 file changed, 12 deletions(-)
--- NEW FILE audacious-plugins-2.5.2-aac-m4a.patch ---
aac plugin: Starting with a m4a header is not enough to identify an aac file
mp4_is_our_fd gives back false positives due to the m4a header check which
succeeds for m4a files containing for example alac audio, but the aac plugin
cannot handle these files, so this is a false postive.
diff -up audacious-plugins-2.5.2/src/aac/libmp4.c~ audacious-plugins-2.5.2/src/aac/libmp4.c
--- audacious-plugins-2.5.2/src/aac/libmp4.c~ 2011-06-20 03:14:25.000000000 +0200
+++ audacious-plugins-2.5.2/src/aac/libmp4.c 2011-06-22 17:32:17.024868976 +0200
@@ -24,9 +24,6 @@
*/
#define BUFFER_SIZE (FAAD_MIN_STREAMSIZE * 16)
-static const guchar M4A_MAGIC[11] = {0x00, 0x00, 0x00, 0x20, 0x66, 0x74, 0x79,
- 0x70, 0x4D, 0x34, 0x41};
-
static void mp4_about (void);
static void mp4_cleanup (void);
static gint mp4_is_our_fd (const char *, VFSFile *);
@@ -241,15 +238,6 @@ static gboolean is_mp4_aac_file (VFSFile
static gboolean mp4_is_our_fd (const gchar * filename, VFSFile * file)
{
- gchar magic[sizeof M4A_MAGIC];
-
- if (vfs_fread (magic, 1, sizeof magic, file) != sizeof magic)
- return FALSE;
- if (! memcmp (magic, M4A_MAGIC, sizeof magic))
- return TRUE;
-
- if (vfs_fseek (file, 0, SEEK_SET))
- return FALSE;
if (parse_aac_stream (file))
return TRUE;
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/audacious-plugins-freeworld/F-15/.cvsignore,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- .cvsignore 29 Apr 2011 11:33:20 -0000 1.10
+++ .cvsignore 23 Jun 2011 18:28:02 -0000 1.11
@@ -1 +1 @@
-audacious-plugins-2.4.5.tgz
+audacious-plugins-2.5.2.tar.gz
audacious-plugins-2.4-sys-mpg123.patch:
Makefile | 24 ++----------------------
mpg123.c | 2 +-
2 files changed, 3 insertions(+), 23 deletions(-)
Index: audacious-plugins-2.4-sys-mpg123.patch
===================================================================
RCS file: /cvs/free/rpms/audacious-plugins-freeworld/F-15/audacious-plugins-2.4-sys-mpg123.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- audacious-plugins-2.4-sys-mpg123.patch 24 Aug 2010 20:00:48 -0000 1.1
+++ audacious-plugins-2.4-sys-mpg123.patch 23 Jun 2011 18:28:02 -0000 1.2
@@ -40,9 +40,9 @@
--- audacious-plugins-2.4-rc2/src/mpg123/mpg123.c~ 2010-08-13 23:01:12.000000000 +0200
+++ audacious-plugins-2.4-rc2/src/mpg123/mpg123.c 2010-08-24 12:00:25.904713006 +0200
@@ -33,7 +33,7 @@
- #include <audacious/plugin.h>
#include <audacious/audtag.h>
+ #include "config.h"
-#include "libmpg123/mpg123.h"
+#include <mpg123.h>
Index: audacious-plugins-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/audacious-plugins-freeworld/F-15/audacious-plugins-freeworld.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- audacious-plugins-freeworld.spec 29 Apr 2011 11:33:20 -0000 1.17
+++ audacious-plugins-freeworld.spec 23 Jun 2011 18:28:02 -0000 1.18
@@ -3,26 +3,27 @@
# - add BR sidplay2-devel and find a way to make the built sid.so
# plugin an alternative to Fedora's sidplay1 based sid.so
-%global aud_plugin_api %(grep '[ ]*#define[ ]*__AUDACIOUS_PLUGIN_API__' %{_includedir}/audacious/plugin.h | sed 's!.*__AUDACIOUS_PLUGIN_API__[ ]*\\([0-9]\\+\\).*!\\1!')
+%global aud_plugin_api %(grep '[ ]*#define[ ]*_AUD_PLUGIN_VERSION[ ]\\+' %{_includedir}/audacious/plugin.h 2>/dev/null | sed 's!.*_AUD_PLUGIN_VERSION[ ]*\\([0-9]\\+\\).*!\\1!')
+%if 0%{aud_plugin_api} > 0
+%global aud_plugin_dep Requires: audacious(plugin-api) = %{aud_plugin_api}
+%endif
Name: audacious-plugins-freeworld
-Version: 2.4.5
+Version: 2.5.2
Release: 1%{?dist}
Summary: Additional plugins for the Audacious media player
Group: Applications/Multimedia
License: GPLv3
URL: http://audacious-media-player.org/
-Source0: http://distfiles.atheme.org/audacious-plugins-%{version}.tgz
+Source0: http://distfiles.atheme.org/audacious-plugins-%{version}.tar.gz
Source1: audacious-mp3.desktop
Source2: audacious-aac.desktop
Source3: audacious-ffaudio.desktop
Patch0: audacious-plugins-2.4-sys-mpg123.patch
-Patch1: audacious-plugins-2.4-ffaudio-metadata.patch
-Patch2: audacious-plugins-2.4-no-avcore.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1: audacious-plugins-2.5.2-aac-m4a.patch
-BuildRequires: audacious-devel >= %{version}
+BuildRequires: audacious-devel >= 2.5
BuildRequires: zlib-devel, libxml2-devel, desktop-file-utils >= 0.9
BuildRequires: taglib-devel >= 1.4
BuildRequires: libmms-devel, libmpg123-devel
@@ -37,10 +38,6 @@
Requires: %{name}-mms = %{version}-%{release}
Requires: %{name}-ffaudio = %{version}-%{release}
-# obsolete old freshrpms package
-Provides: audacious-plugins-extras = %{version}-%{release}
-Obsoletes: audacious-plugins-extras < %{version}-%{release}
-
%description
Audacious is a media player that currently uses a skinned
user interface based on Winamp 2.x skins. It is based on ("forked off")
@@ -52,17 +49,11 @@
%package mp3
Summary: MP3 playback plugin for Audacious
Group: Applications/Multimedia
-%if %(test -f %{_includedir}/audacious/plugin.h && echo 1 || echo 0)
-Requires: audacious(plugin-api) = %{aud_plugin_api}
-%endif
+%{?aud_plugin_dep}
Requires(post): desktop-file-utils >= 0.9
Requires(postun): desktop-file-utils >= 0.9
-# obsolete old livna package
-Provides: audacious-plugins-nonfree-mp3 = %{version}-%{release}
-Obsoletes: audacious-plugins-nonfree-mp3 < %{version}-%{release}
-
%description mp3
Audacious is a media player that currently uses a skinned
user interface based on Winamp 2.x skins. It is based on ("forked off")
@@ -74,17 +65,11 @@
%package aac
Summary: AAC playback plugin for Audacious
Group: Applications/Multimedia
-%if %(test -f %{_includedir}/audacious/plugin.h && echo 1 || echo 0)
-Requires: audacious(plugin-api) = %{aud_plugin_api}
-%endif
+%{?aud_plugin_dep}
Requires(post): desktop-file-utils >= 0.9
Requires(postun): desktop-file-utils >= 0.9
-# obsolete old livna package
-Provides: audacious-plugins-nonfree-aac = %{version}-%{release}
-Obsoletes: audacious-plugins-nonfree-aac < %{version}-%{release}
-
%description aac
Audacious is a media player that currently uses a skinned
user interface based on Winamp 2.x skins. It is based on ("forked off")
@@ -96,9 +81,7 @@
%package ffaudio
Summary: FFMpeg/FAAD2 based input plugin for Audacious
Group: Applications/Multimedia
-%if %(test -f %{_includedir}/audacious/plugin.h && echo 1 || echo 0)
-Requires: audacious(plugin-api) = %{aud_plugin_api}
-%endif
+%{?aud_plugin_dep}
Requires(post): desktop-file-utils >= 0.9
Requires(postun): desktop-file-utils >= 0.9
@@ -108,11 +91,6 @@
Obsoletes: audacious-plugins-freeworld-tta <= 2.1
Obsoletes: audacious-plugins-freeworld-wma <= 2.1
-# obsolete old livna packages
-Obsoletes: audacious-plugins-nonfree-alac < %{version}-%{release}
-Obsoletes: audacious-plugins-nonfree-tta < %{version}-%{release}
-Obsoletes: audacious-plugins-nonfree-wma < %{version}-%{release}
-
%description ffaudio
FFMpeg/FAAD2 based input plugin for Audacious.
@@ -120,13 +98,7 @@
%package mms
Summary: MMS stream plugin for Audacious
Group: Applications/Multimedia
-%if %(test -f %{_includedir}/audacious/plugin.h && echo 1 || echo 0)
-Requires: audacious(plugin-api) = %{aud_plugin_api}
-%endif
-
-# obsolete old livna package
-Provides: audacious-plugins-nonfree-mms = %{version}-%{release}
-Obsoletes: audacious-plugins-nonfree-mms < %{version}-%{release}
+%{?aud_plugin_dep}
%description mms
Audacious is a media player that currently uses a skinned
@@ -142,7 +114,6 @@
rm -r src/mpg123/libmpg123
%patch0 -p1
%patch1 -p1
-%patch2 -p1
sed -i '\,^.SILENT:,d' buildsys.mk.in
@@ -160,7 +131,6 @@
%install
-rm -rf $RPM_BUILD_ROOT
make -C src/mpg123 install DESTDIR=$RPM_BUILD_ROOT
make -C src/aac install DESTDIR=$RPM_BUILD_ROOT
make -C src/ffaudio install DESTDIR=$RPM_BUILD_ROOT
@@ -181,10 +151,6 @@
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%post mp3
update-desktop-database %{_datadir}/applications
@@ -206,29 +172,36 @@
%files
%defattr(-,root,root,-)
-%doc COPYING
%files mp3
%defattr(-,root,root,-)
+%doc COPYING
%{_libdir}/audacious/Input/madplug.so
%{_datadir}/applications/livna-audacious-mp3.desktop
%files aac
%defattr(-,root,root,-)
+%doc COPYING
%{_libdir}/audacious/Input/aac.so
%{_datadir}/applications/livna-audacious-aac.desktop
%files ffaudio
%defattr(-,root,root,-)
+%doc COPYING
%{_libdir}/audacious/Input/ffaudio.so
%{_datadir}/applications/audacious-ffaudio.desktop
%files mms
+%doc COPYING
%defattr(-,root,root,-)
%{_libdir}/audacious/Transport/mms.so
%changelog
+* Wed Jun 22 2011 Hans de Goede <j.w.r.degoede(a)gmail.com> 2.5.2-1
+- Update to 2.5.2
+- Drop Provides + Obsoletes for upgrade path from livna / freshrpms
+
* Fri Apr 29 2011 Hans de Goede <j.w.r.degoede(a)gmail.com> 2.4.5-1
- Update to 2.4.5
Index: sources
===================================================================
RCS file: /cvs/free/rpms/audacious-plugins-freeworld/F-15/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources 29 Apr 2011 11:33:21 -0000 1.10
+++ sources 23 Jun 2011 18:28:02 -0000 1.11
@@ -1 +1 @@
-83eff47ca063d9955a77039c1e1c18a3 audacious-plugins-2.4.5.tgz
+d5f109995e4aa3a8b51297c67df6e758 audacious-plugins-2.5.2.tar.gz
--- audacious-plugins-2.4-ffaudio-metadata.patch DELETED ---
--- audacious-plugins-2.4-no-avcore.patch DELETED ---
13 years, 5 months
rpms/bsnes/F-14 bsnes-0.079-gcc46.patch, NONE, 1.1 bsnes-0.079-gtk.patch, NONE, 1.1 bsnes-0.079-systemwide.patch, NONE, 1.1 .cvsignore, 1.29, 1.30 README.bsnes, 1.3, 1.4 bsnes.spec, 1.40, 1.41 sources, 1.29, 1.30 bsnes-0.064-systemlibs.patch, 1.1, NONE bsnes-0.068-newppcelf.patch, 1.1, NONE bsnes-0.068-noppcelfppc64.patch, 1.1, NONE bsnes-0.072-nocheats.patch, 1.1, NONE
by Julian Sikorski
Author: belegdol
Update of /cvs/free/rpms/bsnes/F-14
In directory se02.es.rpmfusion.net:/tmp/cvs-serv453
Modified Files:
.cvsignore README.bsnes bsnes.spec sources
Added Files:
bsnes-0.079-gcc46.patch bsnes-0.079-gtk.patch
bsnes-0.079-systemwide.patch
Removed Files:
bsnes-0.064-systemlibs.patch bsnes-0.068-newppcelf.patch
bsnes-0.068-noppcelfppc64.patch bsnes-0.072-nocheats.patch
Log Message:
* Tue Jun 21 2011 Julian Sikorski <belegdol(a)fedoraproject.org> - 0.079-1
- Updated to 0.079
- Dropped subpackages, they are too small to be worth it
- Updated the Fedora readme
- Added gcc-4.6 and systemwide patches by Themaister
- Try to handle system-wide cheats, filters and shaders properly
- Switched to accuracy profile (slower)
- Switched to gtk ui
bsnes-0.079-gcc46.patch:
snes/chip/icd2/interface/interface.cpp | 2 +-
ui/input/input.cpp | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
--- NEW FILE bsnes-0.079-gcc46.patch ---
diff -up bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp.gcc46 bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp
--- bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp.gcc46 2011-05-08 13:14:20.000000000 +0200
+++ bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp 2011-06-21 00:02:22.972853738 +0200
@@ -101,7 +101,7 @@ bool ICD2::input_poll(unsigned id) {
case 3: data = ~r6007; break;
}
- switch(id) {
+ switch((GameBoy::Input)id) {
case GameBoy::Input::Start: return data & 0x80;
case GameBoy::Input::Select: return data & 0x40;
case GameBoy::Input::B: return data & 0x20;
diff -up bsnes_v079-source/bsnes/ui/input/input.cpp.gcc46 bsnes_v079-source/bsnes/ui/input/input.cpp
--- bsnes_v079-source/bsnes/ui/input/input.cpp.gcc46 2011-03-24 19:33:58.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/input/input.cpp 2011-06-21 00:02:22.971853731 +0200
@@ -82,7 +82,7 @@ void InputMapper::Gamepad::create(const
}
int16_t InputMapper::Gamepad::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::JoypadID)id) {
case SNES::Input::JoypadID::Up: return up.poll();
case SNES::Input::JoypadID::Down: return down.poll() & !up.poll();
case SNES::Input::JoypadID::Left: return left.poll();
@@ -118,7 +118,7 @@ void InputMapper::Mouse::create(const ch
}
int16_t InputMapper::Mouse::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::MouseID)id) {
case SNES::Input::MouseID::X: return x.poll();
case SNES::Input::MouseID::Y: return y.poll();
case SNES::Input::MouseID::Left: return left.poll();
@@ -150,7 +150,7 @@ void InputMapper::SuperScope::create(con
}
int16_t InputMapper::SuperScope::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::SuperScopeID)id) {
case SNES::Input::SuperScopeID::X: return x.poll();
case SNES::Input::SuperScopeID::Y: return y.poll();
case SNES::Input::SuperScopeID::Trigger: return trigger.poll();
@@ -182,7 +182,7 @@ void InputMapper::Justifier::create(cons
}
int16_t InputMapper::Justifier::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::JustifierID)id) {
case SNES::Input::JustifierID::X: return x.poll();
case SNES::Input::JustifierID::Y: return y.poll();
case SNES::Input::JustifierID::Trigger: return trigger.poll();
bsnes-0.079-gtk.patch:
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE bsnes-0.079-gtk.patch ---
diff -up bsnes_v079-source/bsnes/ui/Makefile.gtk bsnes_v079-source/bsnes/ui/Makefile
--- bsnes_v079-source/bsnes/ui/Makefile.gtk 2011-06-22 21:42:22.509169945 +0200
+++ bsnes_v079-source/bsnes/ui/Makefile 2011-06-22 21:42:51.361077057 +0200
@@ -7,11 +7,11 @@ ui_objects += $(if $(call streq,$(platfo
# platform
ifeq ($(platform),x)
-# phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`)
-# link += `pkg-config --libs gtk+-2.0`
+ phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`)
+ link += `pkg-config --libs gtk+-2.0`
- phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`)
- link += `pkg-config --libs QtCore QtGui`
+# phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`)
+# link += `pkg-config --libs QtCore QtGui`
ruby := video.glx video.xv video.sdl
ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
bsnes-0.079-systemwide.patch:
Makefile | 3 ---
general/main-window.cpp | 12 ++++++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
--- NEW FILE bsnes-0.079-systemwide.patch ---
diff -up bsnes_v079-source/bsnes/ui/general/main-window.cpp.systemwide bsnes_v079-source/bsnes/ui/general/main-window.cpp
--- bsnes_v079-source/bsnes/ui/general/main-window.cpp.systemwide 2011-03-15 02:39:33.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/general/main-window.cpp 2011-06-22 20:52:10.609866683 +0200
@@ -412,6 +412,12 @@ void MainWindow::setupFiltersAndShaders(
#endif
files = directory::files(folderPath, "*.filter");
}
+#if defined(PLATFORM_X)
+ if(files.size() == 0) {
+ folderPath = "/usr/lib/bsnes/filters/";
+ files = directory::files(folderPath, "*.filter");
+ }
+#endif
foreach(filename, files) {
settingsVideoFilterName.append({ folderPath, filename });
}
@@ -458,6 +464,12 @@ void MainWindow::setupFiltersAndShaders(
#endif
files = directory::files(folderPath, { "*.", config.video.driver, ".shader" });
}
+#if defined(PLATFORM_X)
+ if(files.size() == 0) {
+ folderPath = "/usr/share/bsnes/shaders/";
+ files = directory::files(folderPath, {"*.", config.video.driver, ".shader" });
+ }
+#endif
foreach(filename, files) {
settingsVideoShaderName.append({ folderPath, filename });
}
diff -up bsnes_v079-source/bsnes/ui/Makefile.systemwide bsnes_v079-source/bsnes/ui/Makefile
--- bsnes_v079-source/bsnes/ui/Makefile.systemwide 2011-03-15 00:58:22.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/Makefile 2011-06-22 20:52:08.648872996 +0200
@@ -96,9 +96,6 @@ ifeq ($(platform),x)
endif
install -D -m 644 data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png
install -D -m 644 data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop
- mkdir -p ~/.config/bsnes
- cp data/cheats.xml ~/.config/bsnes/cheats.xml
- chmod 777 ~/.config/bsnes ~/.config/bsnes/cheats.xml
uninstall:
ifeq ($(platform),x)
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-14/.cvsignore,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- .cvsignore 21 Nov 2010 19:39:52 -0000 1.29
+++ .cvsignore 22 Jun 2011 20:05:33 -0000 1.30
@@ -1 +1 @@
-bsnes_v072.tar.bz2
+bsnes_v079-source.tar.bz2
Index: README.bsnes
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-14/README.bsnes,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README.bsnes 14 Jul 2009 11:35:19 -0000 1.3
+++ README.bsnes 22 Jun 2011 20:05:33 -0000 1.4
@@ -1,18 +1,12 @@
RPM Fusion bsnes package
==============================================================================
-1. Problems with PulseAudio
+RPM Fusion bsnes package is patched to install cheat.xml, filters and shaders
+in system-wide location. If you run into issues using these, please don't
+complain to upstream, but use RPM Fusion bugzilla first.
+
+Moreover, due to [1] newer versions of bsnes are more strict when it comes to
+file formats accepted. The snespurify-qt utility can be used to convert the
+images. They have to be uncompressed.
-There are slight problems with some of the bsnes audio drivers and PulseAudio. Namely, the libao driver will not work, and the OSS driver will not work with padsp. Other drivers work with the default Fedora configuration. Please note that the emulator author recommends using the ALSA driver over the native PulseAudio one due to limitations in the latter. bsnes audio drivers can be changed by going to Settings -> Configuration -> Advanced. Program needs to be restarted for the changes to have effect.
-
-
-2. Using system zlib
-
-This is the post byuu made on zsnes boards when asked to merge the system-zlib patch (it was more complex at that stage, using system libs was optional, but since it was not going to be merged anyway, I decided to make it simpler):
-
-
-I don't really want to add this change to bsnes, no. A system-wide zlib would require a DLL for Windows, and I see no reason to provide a lean, stripped down zlib along with bsnes for Windows users, yet have an option to use the system version for Linux (especially when there is no similar lib for JMA), just to appease a few people with nothing better to do than complain about random garbage.
-
-However, feel free to appease the Fedora development team by changing that in your source tree if you like. My sincere apologies that you'll have to keep backporting the change.
-
-I don't want any part in trying to appease these people. They constantly bring up crap about non-commercial clauses, about using a 64-byte IPLROM, about compiling in support for OSS by default, and now about a massive ~80kb that can be shaved off the bsnes binary by adding extra dependencies to the emulator. Perhaps I should just start offering a raw Linux binary on my website ala nVidia, Macromedia et al.
+[1] http://byuu.org/bsnes/legacy-formats
Index: bsnes.spec
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-14/bsnes.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- bsnes.spec 21 Nov 2010 19:39:52 -0000 1.40
+++ bsnes.spec 22 Jun 2011 20:05:33 -0000 1.41
@@ -1,4 +1,4 @@
-%global vernumber 072
+%global vernumber 079
Name: bsnes
Version: 0.%{vernumber}
@@ -8,12 +8,11 @@
Group: Applications/Emulators
License: GPLv2
URL: http://byuu.org/bsnes/
-Source0: http://bsnes.googlecode.com/files/%{name}_v%{vernumber}.tar.bz2
+Source0: http://bsnes.googlecode.com/files/%{name}_v%{vernumber}-source.tar.bz2
Source2: README.bsnes
-Patch0: bsnes-0.072-nocheats.patch
-Patch1: bsnes-0.068-newppcelf.patch
-Patch2: bsnes-0.068-noppcelfppc64.patch
-Patch3: bsnes-0.064-systemlibs.patch
+Patch0: bsnes-0.079-gcc46.patch
+Patch1: bsnes-0.079-systemwide.patch
+Patch2: bsnes-0.079-gtk.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#bsnes does not use system snes_ntsc because the modified video processing
@@ -21,13 +20,16 @@
#isn't available when the library is built stand alone
BuildRequires: desktop-file-utils
BuildRequires: freealut-devel
+BuildRequires: gtk2-devel
BuildRequires: libao-devel
BuildRequires: libXv-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: SDL-devel
-BuildRequires: qt-devel
Obsoletes: %{name}-pixelshaders < 0.064
+Obsoletes: %{name}-snesfilter < 0.079
+Obsoletes: %{name}-snesreader < 0.079
+Obsoletes: %{name}-supergameboy < 0.079
%description
bsnes is an emulator that began development on 2004-10-14. The purpose of the
@@ -37,77 +39,48 @@
includes speed and game-specific hacks for compatibility. As a result, the
minimum system requirements for bsnes are quite high.
-%package snesfilter
-Summary: Visual filters for %{name}
-Group: Applications/Emulators
-Requires: %{name} = %{version}-%{release}
-
-%description snesfilter
-This subpackage contains various video filters for bsnes.
-
-%package snesreader
-Summary: Compressed ROM images support for %{name}
-Group: Applications/Emulators
-Requires: %{name} = %{version}-%{release}
-
-%description snesreader
-This subpackage enables support for various compressed images, like .zip, .7z,
-.rar and others.
-
-%package supergameboy
-Summary: Super Game Boy emulation for %{name}
-Group: Applications/Emulators
-Requires: %{name} = %{version}-%{release}
-
-%description supergameboy
-This package includes gambatte-based Super Game Boy emulation.
-
%prep
-%setup -qc
-%patch0 -p1 -b .nocheats
-%patch1 -p1 -b .newppcelf
-%patch2 -p1 -b .noppcelfppc64
-%patch3 -p1 -b .systemlibs
+%setup -q -n %{name}_v%{vernumber}-source
+%patch0 -p1 -b .gcc46
+%patch1 -p1 -b .systemwide
+%patch2 -p1 -b .gtk
#fix permissions
find . -type f -not -name \*.sh -exec chmod 644 {} \;
#use system optflags
-for sourcedir in snesfilter snesreader bsnes supergameboy
-do
- pushd $sourcedir
- sed -i "s#-O3#$RPM_OPT_FLAGS#" Makefile
- popd
-done
+sed -i "s/-O3/$RPM_OPT_FLAGS/" bsnes/Makefile
+sed -i "s/-O3/$RPM_OPT_FLAGS -fPIC/" snesfilter/Makefile
+sed -i "s/-O3/$RPM_OPT_FLAGS/" snespurify/cc-gtk.sh
#don't strip the binaries prematurely
-for sourcedir in snesfilter snesreader bsnes supergameboy
-do
- pushd $sourcedir
- sed -i "s/link += -s/link +=/" Makefile
- popd
-done
+sed -i "s/link += -s/link +=/" bsnes/Makefile
+sed -i "s/link := -s/link :=/" snesfilter/Makefile
+sed -i "s/-s //" snespurify/cc-gtk.sh
+
+#use the proper compiler and moc commands
+sed -i "s/g++-4.5/g++/" snespurify/cc-gtk.sh
#install fedora-specific readme
install -pm 644 %{SOURCE2} README.Fedora
-#pulseaudio on fedora 11 is too old
-%if 0%{?fedora} < 12
-sed -i "s(a)audio.pulseaudio @@" bsnes/ui_qt/Makefile
-%endif
+#use proper system-wide paths for filters and cheats.xml
+sed -i 's(a)path.home("cheats.xml")@"/usr/share/bsnes/cheats.xml"@' \
+ bsnes/ui/tools/cheat-database.cpp
+sed -i 's@/usr/lib@%{_libdir}@' bsnes/ui/general/main-window.cpp
%build
-for sourcedir in snesfilter snesreader supergameboy
-do
- pushd $sourcedir
- make %{?_smp_mflags} moc=moc-qt4 compiler=gcc
- popd
-done
-
pushd bsnes
-make %{?_smp_mflags} platform=x compiler=gcc moc=moc-qt4 profile=compatibility ui=ui-qt
+make %{?_smp_mflags} compiler=gcc
+popd
+pushd snesfilter
+make %{?_smp_mflags} compiler=gcc
+popd
+pushd snespurify
+./cc-gtk.sh
+popd
%install
@@ -118,61 +91,39 @@
--delete-original --dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/bsnes.desktop
popd
-install -d $RPM_BUILD_ROOT%{_libdir}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
-for sourcedir in snesfilter snesreader supergameboy
-do
- pushd $sourcedir
- install -pm 755 lib$sourcedir.so $RPM_BUILD_ROOT%{_libdir}/lib$sourcedir.so
- popd
-done
-
+install -pm 644 bsnes/data/cheats.xml $RPM_BUILD_ROOT%{_datadir}/%{name}
+install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/filters
+install -pm 755 snesfilter/out/*.filter $RPM_BUILD_ROOT%{_libdir}/%{name}/filters
+install -pm 755 snespurify/snespurify-gtk $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/shaders
+install -pm 644 snesshader/*.shader $RPM_BUILD_ROOT%{_datadir}/%{name}/shaders
%clean
rm -rf $RPM_BUILD_ROOT
-%post snesfilter -p /sbin/ldconfig
-
-
-%postun snesfilter -p /sbin/ldconfig
-
-
-%if %{with snesreader}
-%post snesreader -p /sbin/ldconfig
-
-
-%postun snesreader -p /sbin/ldconfig
-%endif
-
-
-%post supergameboy -p /sbin/ldconfig
-
-
-%postun supergameboy -p /sbin/ldconfig
-
-
%files
%defattr(-,root,root,-)
-%doc README.Fedora bsnes/ui-qt/data/*.html
+%doc README.Fedora
%{_bindir}/bsnes
+%{_bindir}/snespurify-gtk
+%{_libdir}/bsnes
+%{_datadir}/bsnes
%{_datadir}/pixmaps/bsnes.png
%{_datadir}/applications/rpmfusion-bsnes.desktop
-%files snesfilter
-%defattr(-,root,root,-)
-%{_libdir}/libsnesfilter.so
-
-%files snesreader
-%defattr(-,root,root,-)
-%{_libdir}/libsnesreader.so
-
-%files supergameboy
-%defattr(-,root,root,-)
-%{_libdir}/libsupergameboy.so
-
%changelog
+* Tue Jun 21 2011 Julian Sikorski <belegdol(a)fedoraproject.org> - 0.079-1
+- Updated to 0.079
+- Dropped subpackages, they are too small to be worth it
+- Updated the Fedora readme
+- Added gcc-4.6 and systemwide patches by Themaister
+- Try to handle system-wide cheats, filters and shaders properly
+- Switched to accuracy profile (slower)
+- Switched to gtk ui
+
* Sun Nov 21 2010 Julian Sikorski <belegdol(a)fedoraproject.org> - 0.072-1
- Updated to 0.072
- Dropped gconf patch, added cheats one
Index: sources
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-14/sources,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- sources 21 Nov 2010 19:39:52 -0000 1.29
+++ sources 22 Jun 2011 20:05:33 -0000 1.30
@@ -1 +1 @@
-dcbd0f2a88682fb25d409a8276576983 bsnes_v072.tar.bz2
+22513f713e29824a85a0fe193298f9f2 bsnes_v079-source.tar.bz2
--- bsnes-0.064-systemlibs.patch DELETED ---
--- bsnes-0.068-newppcelf.patch DELETED ---
--- bsnes-0.068-noppcelfppc64.patch DELETED ---
--- bsnes-0.072-nocheats.patch DELETED ---
13 years, 5 months
rpms/bsnes/F-15 bsnes-0.079-gcc46.patch, NONE, 1.1 bsnes-0.079-gtk.patch, NONE, 1.1 bsnes-0.079-systemwide.patch, NONE, 1.1 .cvsignore, 1.29, 1.30 README.bsnes, 1.3, 1.4 bsnes.spec, 1.40, 1.41 sources, 1.29, 1.30 bsnes-0.064-systemlibs.patch, 1.1, NONE bsnes-0.068-newppcelf.patch, 1.1, NONE bsnes-0.068-noppcelfppc64.patch, 1.1, NONE bsnes-0.072-nocheats.patch, 1.1, NONE
by Julian Sikorski
Author: belegdol
Update of /cvs/free/rpms/bsnes/F-15
In directory se02.es.rpmfusion.net:/tmp/cvs-serv32499
Modified Files:
.cvsignore README.bsnes bsnes.spec sources
Added Files:
bsnes-0.079-gcc46.patch bsnes-0.079-gtk.patch
bsnes-0.079-systemwide.patch
Removed Files:
bsnes-0.064-systemlibs.patch bsnes-0.068-newppcelf.patch
bsnes-0.068-noppcelfppc64.patch bsnes-0.072-nocheats.patch
Log Message:
* Tue Jun 21 2011 Julian Sikorski <belegdol(a)fedoraproject.org> - 0.079-1
- Updated to 0.079
- Dropped subpackages, they are too small to be worth it
- Updated the Fedora readme
- Added gcc-4.6 and systemwide patches by Themaister
- Try to handle system-wide cheats, filters and shaders properly
- Switched to accuracy profile (slower)
- Switched to gtk ui
bsnes-0.079-gcc46.patch:
snes/chip/icd2/interface/interface.cpp | 2 +-
ui/input/input.cpp | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
--- NEW FILE bsnes-0.079-gcc46.patch ---
diff -up bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp.gcc46 bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp
--- bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp.gcc46 2011-05-08 13:14:20.000000000 +0200
+++ bsnes_v079-source/bsnes/snes/chip/icd2/interface/interface.cpp 2011-06-21 00:02:22.972853738 +0200
@@ -101,7 +101,7 @@ bool ICD2::input_poll(unsigned id) {
case 3: data = ~r6007; break;
}
- switch(id) {
+ switch((GameBoy::Input)id) {
case GameBoy::Input::Start: return data & 0x80;
case GameBoy::Input::Select: return data & 0x40;
case GameBoy::Input::B: return data & 0x20;
diff -up bsnes_v079-source/bsnes/ui/input/input.cpp.gcc46 bsnes_v079-source/bsnes/ui/input/input.cpp
--- bsnes_v079-source/bsnes/ui/input/input.cpp.gcc46 2011-03-24 19:33:58.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/input/input.cpp 2011-06-21 00:02:22.971853731 +0200
@@ -82,7 +82,7 @@ void InputMapper::Gamepad::create(const
}
int16_t InputMapper::Gamepad::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::JoypadID)id) {
case SNES::Input::JoypadID::Up: return up.poll();
case SNES::Input::JoypadID::Down: return down.poll() & !up.poll();
case SNES::Input::JoypadID::Left: return left.poll();
@@ -118,7 +118,7 @@ void InputMapper::Mouse::create(const ch
}
int16_t InputMapper::Mouse::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::MouseID)id) {
case SNES::Input::MouseID::X: return x.poll();
case SNES::Input::MouseID::Y: return y.poll();
case SNES::Input::MouseID::Left: return left.poll();
@@ -150,7 +150,7 @@ void InputMapper::SuperScope::create(con
}
int16_t InputMapper::SuperScope::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::SuperScopeID)id) {
case SNES::Input::SuperScopeID::X: return x.poll();
case SNES::Input::SuperScopeID::Y: return y.poll();
case SNES::Input::SuperScopeID::Trigger: return trigger.poll();
@@ -182,7 +182,7 @@ void InputMapper::Justifier::create(cons
}
int16_t InputMapper::Justifier::poll(unsigned id) {
- switch(id) {
+ switch((SNES::Input::JustifierID)id) {
case SNES::Input::JustifierID::X: return x.poll();
case SNES::Input::JustifierID::Y: return y.poll();
case SNES::Input::JustifierID::Trigger: return trigger.poll();
bsnes-0.079-gtk.patch:
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE bsnes-0.079-gtk.patch ---
diff -up bsnes_v079-source/bsnes/ui/Makefile.gtk bsnes_v079-source/bsnes/ui/Makefile
--- bsnes_v079-source/bsnes/ui/Makefile.gtk 2011-06-22 21:42:22.509169945 +0200
+++ bsnes_v079-source/bsnes/ui/Makefile 2011-06-22 21:42:51.361077057 +0200
@@ -7,11 +7,11 @@ ui_objects += $(if $(call streq,$(platfo
# platform
ifeq ($(platform),x)
-# phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`)
-# link += `pkg-config --libs gtk+-2.0`
+ phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`)
+ link += `pkg-config --libs gtk+-2.0`
- phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`)
- link += `pkg-config --libs QtCore QtGui`
+# phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`)
+# link += `pkg-config --libs QtCore QtGui`
ruby := video.glx video.xv video.sdl
ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
bsnes-0.079-systemwide.patch:
Makefile | 3 ---
general/main-window.cpp | 12 ++++++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
--- NEW FILE bsnes-0.079-systemwide.patch ---
diff -up bsnes_v079-source/bsnes/ui/general/main-window.cpp.systemwide bsnes_v079-source/bsnes/ui/general/main-window.cpp
--- bsnes_v079-source/bsnes/ui/general/main-window.cpp.systemwide 2011-03-15 02:39:33.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/general/main-window.cpp 2011-06-22 20:52:10.609866683 +0200
@@ -412,6 +412,12 @@ void MainWindow::setupFiltersAndShaders(
#endif
files = directory::files(folderPath, "*.filter");
}
+#if defined(PLATFORM_X)
+ if(files.size() == 0) {
+ folderPath = "/usr/lib/bsnes/filters/";
+ files = directory::files(folderPath, "*.filter");
+ }
+#endif
foreach(filename, files) {
settingsVideoFilterName.append({ folderPath, filename });
}
@@ -458,6 +464,12 @@ void MainWindow::setupFiltersAndShaders(
#endif
files = directory::files(folderPath, { "*.", config.video.driver, ".shader" });
}
+#if defined(PLATFORM_X)
+ if(files.size() == 0) {
+ folderPath = "/usr/share/bsnes/shaders/";
+ files = directory::files(folderPath, {"*.", config.video.driver, ".shader" });
+ }
+#endif
foreach(filename, files) {
settingsVideoShaderName.append({ folderPath, filename });
}
diff -up bsnes_v079-source/bsnes/ui/Makefile.systemwide bsnes_v079-source/bsnes/ui/Makefile
--- bsnes_v079-source/bsnes/ui/Makefile.systemwide 2011-03-15 00:58:22.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/Makefile 2011-06-22 20:52:08.648872996 +0200
@@ -96,9 +96,6 @@ ifeq ($(platform),x)
endif
install -D -m 644 data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png
install -D -m 644 data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop
- mkdir -p ~/.config/bsnes
- cp data/cheats.xml ~/.config/bsnes/cheats.xml
- chmod 777 ~/.config/bsnes ~/.config/bsnes/cheats.xml
uninstall:
ifeq ($(platform),x)
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-15/.cvsignore,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- .cvsignore 21 Nov 2010 19:41:21 -0000 1.29
+++ .cvsignore 22 Jun 2011 20:04:55 -0000 1.30
@@ -1 +1 @@
-bsnes_v072.tar.bz2
+bsnes_v079-source.tar.bz2
Index: README.bsnes
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-15/README.bsnes,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README.bsnes 14 Jul 2009 11:35:19 -0000 1.3
+++ README.bsnes 22 Jun 2011 20:04:55 -0000 1.4
@@ -1,18 +1,12 @@
RPM Fusion bsnes package
==============================================================================
-1. Problems with PulseAudio
+RPM Fusion bsnes package is patched to install cheat.xml, filters and shaders
+in system-wide location. If you run into issues using these, please don't
+complain to upstream, but use RPM Fusion bugzilla first.
+
+Moreover, due to [1] newer versions of bsnes are more strict when it comes to
+file formats accepted. The snespurify-qt utility can be used to convert the
+images. They have to be uncompressed.
-There are slight problems with some of the bsnes audio drivers and PulseAudio. Namely, the libao driver will not work, and the OSS driver will not work with padsp. Other drivers work with the default Fedora configuration. Please note that the emulator author recommends using the ALSA driver over the native PulseAudio one due to limitations in the latter. bsnes audio drivers can be changed by going to Settings -> Configuration -> Advanced. Program needs to be restarted for the changes to have effect.
-
-
-2. Using system zlib
-
-This is the post byuu made on zsnes boards when asked to merge the system-zlib patch (it was more complex at that stage, using system libs was optional, but since it was not going to be merged anyway, I decided to make it simpler):
-
-
-I don't really want to add this change to bsnes, no. A system-wide zlib would require a DLL for Windows, and I see no reason to provide a lean, stripped down zlib along with bsnes for Windows users, yet have an option to use the system version for Linux (especially when there is no similar lib for JMA), just to appease a few people with nothing better to do than complain about random garbage.
-
-However, feel free to appease the Fedora development team by changing that in your source tree if you like. My sincere apologies that you'll have to keep backporting the change.
-
-I don't want any part in trying to appease these people. They constantly bring up crap about non-commercial clauses, about using a 64-byte IPLROM, about compiling in support for OSS by default, and now about a massive ~80kb that can be shaved off the bsnes binary by adding extra dependencies to the emulator. Perhaps I should just start offering a raw Linux binary on my website ala nVidia, Macromedia et al.
+[1] http://byuu.org/bsnes/legacy-formats
Index: bsnes.spec
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-15/bsnes.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- bsnes.spec 21 Nov 2010 19:41:21 -0000 1.40
+++ bsnes.spec 22 Jun 2011 20:04:55 -0000 1.41
@@ -1,4 +1,4 @@
-%global vernumber 072
+%global vernumber 079
Name: bsnes
Version: 0.%{vernumber}
@@ -8,12 +8,11 @@
Group: Applications/Emulators
License: GPLv2
URL: http://byuu.org/bsnes/
-Source0: http://bsnes.googlecode.com/files/%{name}_v%{vernumber}.tar.bz2
+Source0: http://bsnes.googlecode.com/files/%{name}_v%{vernumber}-source.tar.bz2
Source2: README.bsnes
-Patch0: bsnes-0.072-nocheats.patch
-Patch1: bsnes-0.068-newppcelf.patch
-Patch2: bsnes-0.068-noppcelfppc64.patch
-Patch3: bsnes-0.064-systemlibs.patch
+Patch0: bsnes-0.079-gcc46.patch
+Patch1: bsnes-0.079-systemwide.patch
+Patch2: bsnes-0.079-gtk.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#bsnes does not use system snes_ntsc because the modified video processing
@@ -21,13 +20,16 @@
#isn't available when the library is built stand alone
BuildRequires: desktop-file-utils
BuildRequires: freealut-devel
+BuildRequires: gtk2-devel
BuildRequires: libao-devel
BuildRequires: libXv-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: SDL-devel
-BuildRequires: qt-devel
Obsoletes: %{name}-pixelshaders < 0.064
+Obsoletes: %{name}-snesfilter < 0.079
+Obsoletes: %{name}-snesreader < 0.079
+Obsoletes: %{name}-supergameboy < 0.079
%description
bsnes is an emulator that began development on 2004-10-14. The purpose of the
@@ -37,77 +39,48 @@
includes speed and game-specific hacks for compatibility. As a result, the
minimum system requirements for bsnes are quite high.
-%package snesfilter
-Summary: Visual filters for %{name}
-Group: Applications/Emulators
-Requires: %{name} = %{version}-%{release}
-
-%description snesfilter
-This subpackage contains various video filters for bsnes.
-
-%package snesreader
-Summary: Compressed ROM images support for %{name}
-Group: Applications/Emulators
-Requires: %{name} = %{version}-%{release}
-
-%description snesreader
-This subpackage enables support for various compressed images, like .zip, .7z,
-.rar and others.
-
-%package supergameboy
-Summary: Super Game Boy emulation for %{name}
-Group: Applications/Emulators
-Requires: %{name} = %{version}-%{release}
-
-%description supergameboy
-This package includes gambatte-based Super Game Boy emulation.
-
%prep
-%setup -qc
-%patch0 -p1 -b .nocheats
-%patch1 -p1 -b .newppcelf
-%patch2 -p1 -b .noppcelfppc64
-%patch3 -p1 -b .systemlibs
+%setup -q -n %{name}_v%{vernumber}-source
+%patch0 -p1 -b .gcc46
+%patch1 -p1 -b .systemwide
+%patch2 -p1 -b .gtk
#fix permissions
find . -type f -not -name \*.sh -exec chmod 644 {} \;
#use system optflags
-for sourcedir in snesfilter snesreader bsnes supergameboy
-do
- pushd $sourcedir
- sed -i "s#-O3#$RPM_OPT_FLAGS#" Makefile
- popd
-done
+sed -i "s/-O3/$RPM_OPT_FLAGS/" bsnes/Makefile
+sed -i "s/-O3/$RPM_OPT_FLAGS -fPIC/" snesfilter/Makefile
+sed -i "s/-O3/$RPM_OPT_FLAGS/" snespurify/cc-gtk.sh
#don't strip the binaries prematurely
-for sourcedir in snesfilter snesreader bsnes supergameboy
-do
- pushd $sourcedir
- sed -i "s/link += -s/link +=/" Makefile
- popd
-done
+sed -i "s/link += -s/link +=/" bsnes/Makefile
+sed -i "s/link := -s/link :=/" snesfilter/Makefile
+sed -i "s/-s //" snespurify/cc-gtk.sh
+
+#use the proper compiler and moc commands
+sed -i "s/g++-4.5/g++/" snespurify/cc-gtk.sh
#install fedora-specific readme
install -pm 644 %{SOURCE2} README.Fedora
-#pulseaudio on fedora 11 is too old
-%if 0%{?fedora} < 12
-sed -i "s(a)audio.pulseaudio @@" bsnes/ui_qt/Makefile
-%endif
+#use proper system-wide paths for filters and cheats.xml
+sed -i 's(a)path.home("cheats.xml")@"/usr/share/bsnes/cheats.xml"@' \
+ bsnes/ui/tools/cheat-database.cpp
+sed -i 's@/usr/lib@%{_libdir}@' bsnes/ui/general/main-window.cpp
%build
-for sourcedir in snesfilter snesreader supergameboy
-do
- pushd $sourcedir
- make %{?_smp_mflags} moc=moc-qt4 compiler=gcc
- popd
-done
-
pushd bsnes
-make %{?_smp_mflags} platform=x compiler=gcc moc=moc-qt4 profile=compatibility ui=ui-qt
+make %{?_smp_mflags} compiler=gcc
+popd
+pushd snesfilter
+make %{?_smp_mflags} compiler=gcc
+popd
+pushd snespurify
+./cc-gtk.sh
+popd
%install
@@ -118,61 +91,39 @@
--delete-original --dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/bsnes.desktop
popd
-install -d $RPM_BUILD_ROOT%{_libdir}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
-for sourcedir in snesfilter snesreader supergameboy
-do
- pushd $sourcedir
- install -pm 755 lib$sourcedir.so $RPM_BUILD_ROOT%{_libdir}/lib$sourcedir.so
- popd
-done
-
+install -pm 644 bsnes/data/cheats.xml $RPM_BUILD_ROOT%{_datadir}/%{name}
+install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/filters
+install -pm 755 snesfilter/out/*.filter $RPM_BUILD_ROOT%{_libdir}/%{name}/filters
+install -pm 755 snespurify/snespurify-gtk $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/shaders
+install -pm 644 snesshader/*.shader $RPM_BUILD_ROOT%{_datadir}/%{name}/shaders
%clean
rm -rf $RPM_BUILD_ROOT
-%post snesfilter -p /sbin/ldconfig
-
-
-%postun snesfilter -p /sbin/ldconfig
-
-
-%if %{with snesreader}
-%post snesreader -p /sbin/ldconfig
-
-
-%postun snesreader -p /sbin/ldconfig
-%endif
-
-
-%post supergameboy -p /sbin/ldconfig
-
-
-%postun supergameboy -p /sbin/ldconfig
-
-
%files
%defattr(-,root,root,-)
-%doc README.Fedora bsnes/ui-qt/data/*.html
+%doc README.Fedora
%{_bindir}/bsnes
+%{_bindir}/snespurify-gtk
+%{_libdir}/bsnes
+%{_datadir}/bsnes
%{_datadir}/pixmaps/bsnes.png
%{_datadir}/applications/rpmfusion-bsnes.desktop
-%files snesfilter
-%defattr(-,root,root,-)
-%{_libdir}/libsnesfilter.so
-
-%files snesreader
-%defattr(-,root,root,-)
-%{_libdir}/libsnesreader.so
-
-%files supergameboy
-%defattr(-,root,root,-)
-%{_libdir}/libsupergameboy.so
-
%changelog
+* Tue Jun 21 2011 Julian Sikorski <belegdol(a)fedoraproject.org> - 0.079-1
+- Updated to 0.079
+- Dropped subpackages, they are too small to be worth it
+- Updated the Fedora readme
+- Added gcc-4.6 and systemwide patches by Themaister
+- Try to handle system-wide cheats, filters and shaders properly
+- Switched to accuracy profile (slower)
+- Switched to gtk ui
+
* Sun Nov 21 2010 Julian Sikorski <belegdol(a)fedoraproject.org> - 0.072-1
- Updated to 0.072
- Dropped gconf patch, added cheats one
Index: sources
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-15/sources,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- sources 21 Nov 2010 19:41:21 -0000 1.29
+++ sources 22 Jun 2011 20:04:55 -0000 1.30
@@ -1 +1 @@
-dcbd0f2a88682fb25d409a8276576983 bsnes_v072.tar.bz2
+22513f713e29824a85a0fe193298f9f2 bsnes_v079-source.tar.bz2
--- bsnes-0.064-systemlibs.patch DELETED ---
--- bsnes-0.068-newppcelf.patch DELETED ---
--- bsnes-0.068-noppcelfppc64.patch DELETED ---
--- bsnes-0.072-nocheats.patch DELETED ---
13 years, 5 months
rpms/bsnes/devel bsnes-0.079-gtk.patch,NONE,1.1
by Julian Sikorski
Author: belegdol
Update of /cvs/free/rpms/bsnes/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv32214
Added Files:
bsnes-0.079-gtk.patch
Log Message:
- Added the missing patch
bsnes-0.079-gtk.patch:
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE bsnes-0.079-gtk.patch ---
diff -up bsnes_v079-source/bsnes/ui/Makefile.gtk bsnes_v079-source/bsnes/ui/Makefile
--- bsnes_v079-source/bsnes/ui/Makefile.gtk 2011-06-22 21:42:22.509169945 +0200
+++ bsnes_v079-source/bsnes/ui/Makefile 2011-06-22 21:42:51.361077057 +0200
@@ -7,11 +7,11 @@ ui_objects += $(if $(call streq,$(platfo
# platform
ifeq ($(platform),x)
-# phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`)
-# link += `pkg-config --libs gtk+-2.0`
+ phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`)
+ link += `pkg-config --libs gtk+-2.0`
- phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`)
- link += `pkg-config --libs QtCore QtGui`
+# phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`)
+# link += `pkg-config --libs QtCore QtGui`
ruby := video.glx video.xv video.sdl
ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
13 years, 5 months
rpms/bsnes/devel bsnes-0.079-systemwide.patch, NONE, 1.1 README.bsnes, 1.3, 1.4 bsnes.spec, 1.41, 1.42 bsnes-0.072-nocheats.patch, 1.1, NONE bsnes-0.079-crashfix.patch, 1.1, NONE bsnes-0.079-nocheats.patch, 1.1, NONE
by Julian Sikorski
Author: belegdol
Update of /cvs/free/rpms/bsnes/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv32157
Modified Files:
README.bsnes bsnes.spec
Added Files:
bsnes-0.079-systemwide.patch
Removed Files:
bsnes-0.072-nocheats.patch bsnes-0.079-crashfix.patch
bsnes-0.079-nocheats.patch
Log Message:
- Try to handle system-wide cheats, filters and shaders properly
- Switched to accuracy profile (slower)
- Switched to gtk ui
bsnes-0.079-systemwide.patch:
Makefile | 3 ---
general/main-window.cpp | 12 ++++++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
--- NEW FILE bsnes-0.079-systemwide.patch ---
diff -up bsnes_v079-source/bsnes/ui/general/main-window.cpp.systemwide bsnes_v079-source/bsnes/ui/general/main-window.cpp
--- bsnes_v079-source/bsnes/ui/general/main-window.cpp.systemwide 2011-03-15 02:39:33.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/general/main-window.cpp 2011-06-22 20:52:10.609866683 +0200
@@ -412,6 +412,12 @@ void MainWindow::setupFiltersAndShaders(
#endif
files = directory::files(folderPath, "*.filter");
}
+#if defined(PLATFORM_X)
+ if(files.size() == 0) {
+ folderPath = "/usr/lib/bsnes/filters/";
+ files = directory::files(folderPath, "*.filter");
+ }
+#endif
foreach(filename, files) {
settingsVideoFilterName.append({ folderPath, filename });
}
@@ -458,6 +464,12 @@ void MainWindow::setupFiltersAndShaders(
#endif
files = directory::files(folderPath, { "*.", config.video.driver, ".shader" });
}
+#if defined(PLATFORM_X)
+ if(files.size() == 0) {
+ folderPath = "/usr/share/bsnes/shaders/";
+ files = directory::files(folderPath, {"*.", config.video.driver, ".shader" });
+ }
+#endif
foreach(filename, files) {
settingsVideoShaderName.append({ folderPath, filename });
}
diff -up bsnes_v079-source/bsnes/ui/Makefile.systemwide bsnes_v079-source/bsnes/ui/Makefile
--- bsnes_v079-source/bsnes/ui/Makefile.systemwide 2011-03-15 00:58:22.000000000 +0100
+++ bsnes_v079-source/bsnes/ui/Makefile 2011-06-22 20:52:08.648872996 +0200
@@ -96,9 +96,6 @@ ifeq ($(platform),x)
endif
install -D -m 644 data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png
install -D -m 644 data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop
- mkdir -p ~/.config/bsnes
- cp data/cheats.xml ~/.config/bsnes/cheats.xml
- chmod 777 ~/.config/bsnes ~/.config/bsnes/cheats.xml
uninstall:
ifeq ($(platform),x)
Index: README.bsnes
===================================================================
RCS file: /cvs/free/rpms/bsnes/devel/README.bsnes,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README.bsnes 14 Jul 2009 11:35:19 -0000 1.3
+++ README.bsnes 22 Jun 2011 20:01:55 -0000 1.4
@@ -1,18 +1,12 @@
RPM Fusion bsnes package
==============================================================================
-1. Problems with PulseAudio
+RPM Fusion bsnes package is patched to install cheat.xml, filters and shaders
+in system-wide location. If you run into issues using these, please don't
+complain to upstream, but use RPM Fusion bugzilla first.
+
+Moreover, due to [1] newer versions of bsnes are more strict when it comes to
+file formats accepted. The snespurify-qt utility can be used to convert the
+images. They have to be uncompressed.
-There are slight problems with some of the bsnes audio drivers and PulseAudio. Namely, the libao driver will not work, and the OSS driver will not work with padsp. Other drivers work with the default Fedora configuration. Please note that the emulator author recommends using the ALSA driver over the native PulseAudio one due to limitations in the latter. bsnes audio drivers can be changed by going to Settings -> Configuration -> Advanced. Program needs to be restarted for the changes to have effect.
-
-
-2. Using system zlib
-
-This is the post byuu made on zsnes boards when asked to merge the system-zlib patch (it was more complex at that stage, using system libs was optional, but since it was not going to be merged anyway, I decided to make it simpler):
-
-
-I don't really want to add this change to bsnes, no. A system-wide zlib would require a DLL for Windows, and I see no reason to provide a lean, stripped down zlib along with bsnes for Windows users, yet have an option to use the system version for Linux (especially when there is no similar lib for JMA), just to appease a few people with nothing better to do than complain about random garbage.
-
-However, feel free to appease the Fedora development team by changing that in your source tree if you like. My sincere apologies that you'll have to keep backporting the change.
-
-I don't want any part in trying to appease these people. They constantly bring up crap about non-commercial clauses, about using a 64-byte IPLROM, about compiling in support for OSS by default, and now about a massive ~80kb that can be shaved off the bsnes binary by adding extra dependencies to the emulator. Perhaps I should just start offering a raw Linux binary on my website ala nVidia, Macromedia et al.
+[1] http://byuu.org/bsnes/legacy-formats
Index: bsnes.spec
===================================================================
RCS file: /cvs/free/rpms/bsnes/devel/bsnes.spec,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- bsnes.spec 20 Jun 2011 22:50:44 -0000 1.41
+++ bsnes.spec 22 Jun 2011 20:01:55 -0000 1.42
@@ -11,8 +11,8 @@
Source0: http://bsnes.googlecode.com/files/%{name}_v%{vernumber}-source.tar.bz2
Source2: README.bsnes
Patch0: bsnes-0.079-gcc46.patch
-Patch1: bsnes-0.079-crashfix.patch
-Patch2: bsnes-0.079-nocheats.
+Patch1: bsnes-0.079-systemwide.patch
+Patch2: bsnes-0.079-gtk.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#bsnes does not use system snes_ntsc because the modified video processing
@@ -20,11 +20,11 @@
#isn't available when the library is built stand alone
BuildRequires: desktop-file-utils
BuildRequires: freealut-devel
+BuildRequires: gtk2-devel
BuildRequires: libao-devel
BuildRequires: libXv-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: SDL-devel
-BuildRequires: qt-devel
Obsoletes: %{name}-pixelshaders < 0.064
Obsoletes: %{name}-snesfilter < 0.079
@@ -43,9 +43,8 @@
%prep
%setup -q -n %{name}_v%{vernumber}-source
%patch0 -p1 -b .gcc46
-%patch1 -p1 -b .crashfix
-%patch2 -p1 -b .nocheats
-
+%patch1 -p1 -b .systemwide
+%patch2 -p1 -b .gtk
#fix permissions
find . -type f -not -name \*.sh -exec chmod 644 {} \;
@@ -53,20 +52,24 @@
#use system optflags
sed -i "s/-O3/$RPM_OPT_FLAGS/" bsnes/Makefile
sed -i "s/-O3/$RPM_OPT_FLAGS -fPIC/" snesfilter/Makefile
-sed -i "s/-O3/$RPM_OPT_FLAGS/" snespurify/cc-qt.sh
+sed -i "s/-O3/$RPM_OPT_FLAGS/" snespurify/cc-gtk.sh
#don't strip the binaries prematurely
sed -i "s/link += -s/link +=/" bsnes/Makefile
sed -i "s/link := -s/link :=/" snesfilter/Makefile
-sed -i "s/-s //" snespurify/cc-qt.sh
+sed -i "s/-s //" snespurify/cc-gtk.sh
#use the proper compiler and moc commands
-sed -i "s/g++-4.5/g++/" snespurify/cc-qt.sh
-sed -i "s/moc/moc-qt4/" snespurify/cc-qt.sh
+sed -i "s/g++-4.5/g++/" snespurify/cc-gtk.sh
#install fedora-specific readme
install -pm 644 %{SOURCE2} README.Fedora
+#use proper system-wide paths for filters and cheats.xml
+sed -i 's(a)path.home("cheats.xml")@"/usr/share/bsnes/cheats.xml"@' \
+ bsnes/ui/tools/cheat-database.cpp
+sed -i 's@/usr/lib@%{_libdir}@' bsnes/ui/general/main-window.cpp
+
%build
pushd bsnes
@@ -76,7 +79,7 @@
make %{?_smp_mflags} compiler=gcc
popd
pushd snespurify
-./cc-qt.sh
+./cc-gtk.sh
popd
@@ -90,9 +93,9 @@
popd
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
install -pm 644 bsnes/data/cheats.xml $RPM_BUILD_ROOT%{_datadir}/%{name}
-install -d $RPM_BUILD_ROOT%{_libexecdir}/%{name}/filters
-install -pm 755 snesfilter/out/*.filter $RPM_BUILD_ROOT%{_libexecdir}/%{name}/filters
-install -pm 755 snespurify/snespurify-qt $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/filters
+install -pm 755 snesfilter/out/*.filter $RPM_BUILD_ROOT%{_libdir}/%{name}/filters
+install -pm 755 snespurify/snespurify-gtk $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/shaders
install -pm 644 snesshader/*.shader $RPM_BUILD_ROOT%{_datadir}/%{name}/shaders
@@ -104,8 +107,8 @@
%defattr(-,root,root,-)
%doc README.Fedora
%{_bindir}/bsnes
-%{_bindir}/snespurify-qt
-%{_libexecdir}/bsnes
+%{_bindir}/snespurify-gtk
+%{_libdir}/bsnes
%{_datadir}/bsnes
%{_datadir}/pixmaps/bsnes.png
%{_datadir}/applications/rpmfusion-bsnes.desktop
@@ -116,7 +119,10 @@
- Updated to 0.079
- Dropped subpackages, they are too small to be worth it
- Updated the Fedora readme
-- Added patches by Themaister
+- Added gcc-4.6 and systemwide patches by Themaister
+- Try to handle system-wide cheats, filters and shaders properly
+- Switched to accuracy profile (slower)
+- Switched to gtk ui
* Sun Nov 21 2010 Julian Sikorski <belegdol(a)fedoraproject.org> - 0.072-1
- Updated to 0.072
--- bsnes-0.072-nocheats.patch DELETED ---
--- bsnes-0.079-crashfix.patch DELETED ---
--- bsnes-0.079-nocheats.patch DELETED ---
13 years, 5 months
rpms/sonic-visualiser-freeworld/F-15 sonic-visualiser-1.8-gcc46.patch, NONE, 1.1 sonic-visualiser-1.8-implicit-dso.patch, NONE, 1.1
by Michel Alexandre Salim
Author: salimma
Update of /cvs/free/rpms/sonic-visualiser-freeworld/F-15
In directory se02.es.rpmfusion.net:/tmp/cvs-serv20146
Added Files:
sonic-visualiser-1.8-gcc46.patch
sonic-visualiser-1.8-implicit-dso.patch
Log Message:
add patches
sonic-visualiser-1.8-gcc46.patch:
ResizeableBitset.h | 1 +
1 file changed, 1 insertion(+)
--- NEW FILE sonic-visualiser-1.8-gcc46.patch ---
--- sonic-visualiser-1.8/svcore/base/ResizeableBitset.h.gcc46 2011-04-08 17:56:35.000000000 +0200
+++ sonic-visualiser-1.8/svcore/base/ResizeableBitset.h 2011-05-31 22:56:21.853692417 +0200
@@ -17,6 +17,7 @@
#define _RESIZEABLE_BITMAP_H_
#include <vector>
+#include <cstddef>
#include <stdint.h>
class ResizeableBitset {
sonic-visualiser-1.8-implicit-dso.patch:
sonic-visualiser.pro | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE sonic-visualiser-1.8-implicit-dso.patch ---
--- sonic-visualiser-1.8/sonic-visualiser/sonic-visualiser.pro.implicit-dso 2011-04-08 17:56:20.000000000 +0200
+++ sonic-visualiser-1.8/sonic-visualiser/sonic-visualiser.pro 2011-05-31 23:11:17.157498460 +0200
@@ -23,7 +23,7 @@
contains(DEFINES, BUILD_STATIC):LIBS -= -ljack
-LIBS = -L../svapp -L../svgui -L../svcore -lsvapp -lsvgui -lsvcore $$LIBS
+LIBS = -L../svapp -L../svgui -L../svcore -lsvapp -lsvgui -lsvcore -lX11 $$LIBS
PRE_TARGETDEPS += ../svapp/libsvapp.a \
../svgui/libsvgui.a \
13 years, 5 months
rpms/sonic-visualiser-freeworld/F-14 sonic-visualiser-1.8-gcc46.patch, NONE, 1.1 sonic-visualiser-1.8-implicit-dso.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 sonic-visualiser-freeworld.desktop, 1.1, 1.2 sonic-visualiser-freeworld.spec, 1.3, 1.4 sources, 1.4, 1.5 sonic-visualiser-1.5-alsa.patch, 1.1, NONE sonic-visualiser-1.5-gcc44.patch, 1.1, NONE
by Michel Alexandre Salim
Author: salimma
Update of /cvs/free/rpms/sonic-visualiser-freeworld/F-14
In directory se02.es.rpmfusion.net:/tmp/cvs-serv19289
Modified Files:
.cvsignore sonic-visualiser-freeworld.desktop
sonic-visualiser-freeworld.spec sources
Added Files:
sonic-visualiser-1.8-gcc46.patch
sonic-visualiser-1.8-implicit-dso.patch
Removed Files:
sonic-visualiser-1.5-alsa.patch
sonic-visualiser-1.5-gcc44.patch
Log Message:
* Tue Jun 21 2011 Michel Salim <salimma(a)fedoraproject.org> - 1.8-1
- Update to 1.8
sonic-visualiser-1.8-gcc46.patch:
ResizeableBitset.h | 1 +
1 file changed, 1 insertion(+)
--- NEW FILE sonic-visualiser-1.8-gcc46.patch ---
--- sonic-visualiser-1.8/svcore/base/ResizeableBitset.h.gcc46 2011-04-08 17:56:35.000000000 +0200
+++ sonic-visualiser-1.8/svcore/base/ResizeableBitset.h 2011-05-31 22:56:21.853692417 +0200
@@ -17,6 +17,7 @@
#define _RESIZEABLE_BITMAP_H_
#include <vector>
+#include <cstddef>
#include <stdint.h>
class ResizeableBitset {
sonic-visualiser-1.8-implicit-dso.patch:
sonic-visualiser.pro | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE sonic-visualiser-1.8-implicit-dso.patch ---
--- sonic-visualiser-1.8/sonic-visualiser/sonic-visualiser.pro.implicit-dso 2011-04-08 17:56:20.000000000 +0200
+++ sonic-visualiser-1.8/sonic-visualiser/sonic-visualiser.pro 2011-05-31 23:11:17.157498460 +0200
@@ -23,7 +23,7 @@
contains(DEFINES, BUILD_STATIC):LIBS -= -ljack
-LIBS = -L../svapp -L../svgui -L../svcore -lsvapp -lsvgui -lsvcore $$LIBS
+LIBS = -L../svapp -L../svgui -L../svcore -lsvapp -lsvgui -lsvcore -lX11 $$LIBS
PRE_TARGETDEPS += ../svapp/libsvapp.a \
../svgui/libsvgui.a \
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-14/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 13 Jun 2010 21:09:41 -0000 1.4
+++ .cvsignore 21 Jun 2011 21:28:20 -0000 1.5
@@ -1 +1 @@
-sonic-visualiser-1.7.2.tar.bz2
+sonic-visualiser-1.8.tar.gz
Index: sonic-visualiser-freeworld.desktop
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-14/sonic-visualiser-freeworld.desktop,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sonic-visualiser-freeworld.desktop 13 Jan 2010 03:07:15 -0000 1.1
+++ sonic-visualiser-freeworld.desktop 21 Jun 2011 21:28:23 -0000 1.2
@@ -1,12 +1,9 @@
[Desktop Entry]
Name=Sonic Visualiser (Freeworld)
-GenericName=Audio visualization tool
-Comment=Audio visualization tool
-Categories=AudioVideo;Viewer;Player;X-DigitalProcessing;
-Encoding=UTF-8
+GenericName=Audio visualisation tool
Exec=sonic-visualiser-freeworld %U
-Icon=sonic-visualiser-freeworld
-MimeType=application/x-flac;audio/x-flac;audio/wav;audio/x-wav;audio/x-pn-wav;audio/x-mp3;application/x-ogg;application/ogg;audio/ogg;
-StartupNotify=true
Terminal=false
Type=Application
+Icon=sonic-visualiser-freeworld
+Categories=Audio;AudioVideo;
+MimeType=application/x-sonicvisualiser;application/x-sonicvisualiser-layer;application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg;
Index: sonic-visualiser-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-14/sonic-visualiser-freeworld.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sonic-visualiser-freeworld.spec 13 Jun 2010 21:09:41 -0000 1.3
+++ sonic-visualiser-freeworld.spec 21 Jun 2011 21:28:23 -0000 1.4
@@ -1,15 +1,15 @@
Name: sonic-visualiser-freeworld
-Version: 1.7.2
+Version: 1.8
Release: 1%{?dist}
Summary: A program for viewing and exploring audio data
Group: Applications/Multimedia
License: GPLv2+
URL: http://www.sonicvisualiser.org/
-Source0: http://downloads.sourceforge.net/sv1/sonic-visualiser-%{version}.tar.bz2
+Source0: http://downloads.sourceforge.net/sv1/sonic-visualiser-%{version}.tar.gz
Source1: sonic-visualiser-freeworld.desktop
-Patch0: sonic-visualiser-1.5-gcc44.patch
-Patch1: sonic-visualiser-1.5-alsa.patch
+Patch0: sonic-visualiser-1.8-gcc46.patch
+Patch1: sonic-visualiser-1.8-implicit-dso.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: qt4-devel vamp-plugin-sdk-devel
@@ -17,13 +17,13 @@
BuildRequires: alsa-lib-devel jack-audio-connection-kit-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: redland-devel rubberband-devel
-BuildRequires: libmad-devel
+BuildRequires: libmad-devel
BuildRequires: liboggz-devel libfishsound-devel liblo-devel
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
%description
-Sonic Visualiser is an application for viewing and analysing the
+Sonic Visualiser is an application for viewing and analyzing the
contents of music audio files.
The aim of Sonic Visualiser is to be the first program you reach for
@@ -39,15 +39,15 @@
%prep
%setup -q -n sonic-visualiser-%{version}
-# https://sourceforge.net/tracker/?func=detail&aid=2715387&group_id=162924&...
-%patch0 -p1 -b .gcc44
-# https://sourceforge.net/tracker/?func=detail&aid=2715381&group_id=162924&...
-%patch1 -p1 -b .alsa
+%patch0 -p1 -b .gcc46
+%patch1 -p1 -b .implicit-dso
%build
-qmake-qt4
-make %{?_smp_mflags}
+%configure
+#qmake-qt4
+#make {?_smp_mflags}
+make
%install
@@ -55,14 +55,15 @@
# install does nothing right now
# make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
-install -m 755 -p sv/sonic-visualiser \
+install -m 755 -p sonic-visualiser/sonic-visualiser \
$RPM_BUILD_ROOT%{_bindir}/%{name}
# desktop file and icon
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
-install -m 644 -p sv/icons/sv-48x48.png \
- $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
-desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
- %{SOURCE1}
+for s in 16 22 24 32 48 64 128; do
+ mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps
+ install -m 644 -p sonic-visualiser/icons/sv-${s}x${s}.png \
+ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png
+done
+desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1}
%clean
@@ -71,12 +72,14 @@
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+update-desktop-database &> /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
+update-desktop-database &> /dev/null || :
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
@@ -84,19 +87,45 @@
%files
%defattr(-,root,root,-)
-%doc COPYING README README.OSC
+%doc sonic-visualiser/CHANGELOG sonic-visualiser/COPYING sonic-visualiser/README sonic-visualiser/README.OSC
%{_bindir}/sonic-visualiser-freeworld
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*.png
%changelog
-* Sun Jun 13 2010 Michel Salim <salimma(a)fedoraproject.org> - 1.7.2-1
-- Update to 1.7.2
+* Tue Jun 21 2011 Michel Salim <salimma(a)fedoraproject.org> - 1.8-1
+- Update to 1.8
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7.2-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Tue Jul 20 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.7.2-2
+- Rebuild against new liblo-0.26
+
+* Wed Jun 02 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 1.7.2-1
+- Updated to 1.7.2
+- Release Notes:
+- (reference: https://sourceforge.net/projects/sv1/files/sonic-visualiser/1.7.2/CHANGEL...)
+- The time-value layer now has an origin line and an option to
+ show derivatives (change from one point to the next) rather than
+ raw values
+- A crash when pressing Play straight after New Session has been
+ fixed
+- Builds with latest liboggz
+
+* Wed Jun 02 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 1.7.1-2
+- Bump for new liboggz lib
* Wed Jan 13 2010 Michel Salim <salimma(a)fedoraproject.org> - 1.7.1-1
- Update to 1.7.1
+* Sun Jan 03 2010 Rex Dieter <rdieter(a)fedoraproject.org> - 1.6-6
+- rebuild (redland)
+
+* Sun Jan 03 2010 Rex Dieter <rdieter(a)fedoraproject.org> - 1.6-5
+- rebuild (rasqal/redland)
+
* Wed Sep 23 2009 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.6-4
- Update desktop file according to F-12 FedoraStudio feature
Index: sources
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-14/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources 13 Jun 2010 21:09:41 -0000 1.4
+++ sources 21 Jun 2011 21:28:23 -0000 1.5
@@ -1 +1 @@
-06b31cd07eee708d33aba46cb2d20fe2 sonic-visualiser-1.7.2.tar.bz2
+ad676d0b4cf5b8561306487f52642862 sonic-visualiser-1.8.tar.gz
--- sonic-visualiser-1.5-alsa.patch DELETED ---
--- sonic-visualiser-1.5-gcc44.patch DELETED ---
13 years, 5 months
rpms/sonic-visualiser-freeworld/F-15 .cvsignore, 1.4, 1.5 sonic-visualiser-freeworld.desktop, 1.1, 1.2 sonic-visualiser-freeworld.spec, 1.3, 1.4 sources, 1.4, 1.5 sonic-visualiser-1.5-alsa.patch, 1.1, NONE sonic-visualiser-1.5-gcc44.patch, 1.1, NONE
by Michel Alexandre Salim
Author: salimma
Update of /cvs/free/rpms/sonic-visualiser-freeworld/F-15
In directory se02.es.rpmfusion.net:/tmp/cvs-serv18972
Modified Files:
.cvsignore sonic-visualiser-freeworld.desktop
sonic-visualiser-freeworld.spec sources
Removed Files:
sonic-visualiser-1.5-alsa.patch
sonic-visualiser-1.5-gcc44.patch
Log Message:
* Tue Jun 21 2011 Michel Salim <salimma(a)fedoraproject.org> - 1.8-1
- Update to 1.8
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-15/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 13 Jun 2010 21:09:41 -0000 1.4
+++ .cvsignore 21 Jun 2011 21:25:19 -0000 1.5
@@ -1 +1 @@
-sonic-visualiser-1.7.2.tar.bz2
+sonic-visualiser-1.8.tar.gz
Index: sonic-visualiser-freeworld.desktop
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-15/sonic-visualiser-freeworld.desktop,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sonic-visualiser-freeworld.desktop 13 Jan 2010 03:07:15 -0000 1.1
+++ sonic-visualiser-freeworld.desktop 21 Jun 2011 21:25:19 -0000 1.2
@@ -1,12 +1,9 @@
[Desktop Entry]
Name=Sonic Visualiser (Freeworld)
-GenericName=Audio visualization tool
-Comment=Audio visualization tool
-Categories=AudioVideo;Viewer;Player;X-DigitalProcessing;
-Encoding=UTF-8
+GenericName=Audio visualisation tool
Exec=sonic-visualiser-freeworld %U
-Icon=sonic-visualiser-freeworld
-MimeType=application/x-flac;audio/x-flac;audio/wav;audio/x-wav;audio/x-pn-wav;audio/x-mp3;application/x-ogg;application/ogg;audio/ogg;
-StartupNotify=true
Terminal=false
Type=Application
+Icon=sonic-visualiser-freeworld
+Categories=Audio;AudioVideo;
+MimeType=application/x-sonicvisualiser;application/x-sonicvisualiser-layer;application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg;
Index: sonic-visualiser-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-15/sonic-visualiser-freeworld.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sonic-visualiser-freeworld.spec 13 Jun 2010 21:09:41 -0000 1.3
+++ sonic-visualiser-freeworld.spec 21 Jun 2011 21:25:19 -0000 1.4
@@ -1,15 +1,15 @@
Name: sonic-visualiser-freeworld
-Version: 1.7.2
+Version: 1.8
Release: 1%{?dist}
Summary: A program for viewing and exploring audio data
Group: Applications/Multimedia
License: GPLv2+
URL: http://www.sonicvisualiser.org/
-Source0: http://downloads.sourceforge.net/sv1/sonic-visualiser-%{version}.tar.bz2
+Source0: http://downloads.sourceforge.net/sv1/sonic-visualiser-%{version}.tar.gz
Source1: sonic-visualiser-freeworld.desktop
-Patch0: sonic-visualiser-1.5-gcc44.patch
-Patch1: sonic-visualiser-1.5-alsa.patch
+Patch0: sonic-visualiser-1.8-gcc46.patch
+Patch1: sonic-visualiser-1.8-implicit-dso.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: qt4-devel vamp-plugin-sdk-devel
@@ -17,13 +17,13 @@
BuildRequires: alsa-lib-devel jack-audio-connection-kit-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: redland-devel rubberband-devel
-BuildRequires: libmad-devel
+BuildRequires: libmad-devel
BuildRequires: liboggz-devel libfishsound-devel liblo-devel
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
%description
-Sonic Visualiser is an application for viewing and analysing the
+Sonic Visualiser is an application for viewing and analyzing the
contents of music audio files.
The aim of Sonic Visualiser is to be the first program you reach for
@@ -39,15 +39,15 @@
%prep
%setup -q -n sonic-visualiser-%{version}
-# https://sourceforge.net/tracker/?func=detail&aid=2715387&group_id=162924&...
-%patch0 -p1 -b .gcc44
-# https://sourceforge.net/tracker/?func=detail&aid=2715381&group_id=162924&...
-%patch1 -p1 -b .alsa
+%patch0 -p1 -b .gcc46
+%patch1 -p1 -b .implicit-dso
%build
-qmake-qt4
-make %{?_smp_mflags}
+%configure
+#qmake-qt4
+#make {?_smp_mflags}
+make
%install
@@ -55,14 +55,15 @@
# install does nothing right now
# make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
-install -m 755 -p sv/sonic-visualiser \
+install -m 755 -p sonic-visualiser/sonic-visualiser \
$RPM_BUILD_ROOT%{_bindir}/%{name}
# desktop file and icon
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
-install -m 644 -p sv/icons/sv-48x48.png \
- $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
-desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
- %{SOURCE1}
+for s in 16 22 24 32 48 64 128; do
+ mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps
+ install -m 644 -p sonic-visualiser/icons/sv-${s}x${s}.png \
+ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png
+done
+desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1}
%clean
@@ -71,12 +72,14 @@
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+update-desktop-database &> /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
+update-desktop-database &> /dev/null || :
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
@@ -84,19 +87,45 @@
%files
%defattr(-,root,root,-)
-%doc COPYING README README.OSC
+%doc sonic-visualiser/CHANGELOG sonic-visualiser/COPYING sonic-visualiser/README sonic-visualiser/README.OSC
%{_bindir}/sonic-visualiser-freeworld
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*.png
%changelog
-* Sun Jun 13 2010 Michel Salim <salimma(a)fedoraproject.org> - 1.7.2-1
-- Update to 1.7.2
+* Tue Jun 21 2011 Michel Salim <salimma(a)fedoraproject.org> - 1.8-1
+- Update to 1.8
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7.2-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Tue Jul 20 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.7.2-2
+- Rebuild against new liblo-0.26
+
+* Wed Jun 02 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 1.7.2-1
+- Updated to 1.7.2
+- Release Notes:
+- (reference: https://sourceforge.net/projects/sv1/files/sonic-visualiser/1.7.2/CHANGEL...)
+- The time-value layer now has an origin line and an option to
+ show derivatives (change from one point to the next) rather than
+ raw values
+- A crash when pressing Play straight after New Session has been
+ fixed
+- Builds with latest liboggz
+
+* Wed Jun 02 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 1.7.1-2
+- Bump for new liboggz lib
* Wed Jan 13 2010 Michel Salim <salimma(a)fedoraproject.org> - 1.7.1-1
- Update to 1.7.1
+* Sun Jan 03 2010 Rex Dieter <rdieter(a)fedoraproject.org> - 1.6-6
+- rebuild (redland)
+
+* Sun Jan 03 2010 Rex Dieter <rdieter(a)fedoraproject.org> - 1.6-5
+- rebuild (rasqal/redland)
+
* Wed Sep 23 2009 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.6-4
- Update desktop file according to F-12 FedoraStudio feature
Index: sources
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/F-15/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources 13 Jun 2010 21:09:41 -0000 1.4
+++ sources 21 Jun 2011 21:25:19 -0000 1.5
@@ -1 +1 @@
-06b31cd07eee708d33aba46cb2d20fe2 sonic-visualiser-1.7.2.tar.bz2
+ad676d0b4cf5b8561306487f52642862 sonic-visualiser-1.8.tar.gz
--- sonic-visualiser-1.5-alsa.patch DELETED ---
--- sonic-visualiser-1.5-gcc44.patch DELETED ---
13 years, 5 months
rpms/sonic-visualiser-freeworld/devel sonic-visualiser-freeworld.spec, 1.4, 1.5
by Michel Alexandre Salim
Author: salimma
Update of /cvs/free/rpms/sonic-visualiser-freeworld/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv14393
Modified Files:
sonic-visualiser-freeworld.spec
Log Message:
fix build directory name
Index: sonic-visualiser-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/sonic-visualiser-freeworld/devel/sonic-visualiser-freeworld.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sonic-visualiser-freeworld.spec 21 Jun 2011 20:42:45 -0000 1.4
+++ sonic-visualiser-freeworld.spec 21 Jun 2011 20:58:57 -0000 1.5
@@ -38,7 +38,7 @@
%prep
-%setup -q
+%setup -q -n sonic-visualiser-%{version}
%patch0 -p1 -b .gcc46
%patch1 -p1 -b .implicit-dso
13 years, 5 months