Author: jwrdegoede
Update of /cvs/nonfree/rpms/vice/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv22686
Modified Files:
.cvsignore sources
Added Files:
vice-1.19-datadir.patch vice-1.20-monitor-crash.patch
vice-htmlview.patch vice-tmpnam.patch vice.spec x128.desktop
x64.desktop xcbm-ii.desktop xpet.desktop xplus4.desktop
xvic.desktop
Log Message:
* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.22-2
- Release bump for rpmfusion
vice-1.19-datadir.patch:
--- NEW FILE vice-1.19-datadir.patch ---
diff -up vice-1.22/src/arch/unix/archdep.h.foo vice-1.22/src/arch/unix/archdep.h
--- vice-1.22/src/arch/unix/archdep.h.foo 2007-04-29 20:50:17.000000000 +0200
+++ vice-1.22/src/arch/unix/archdep.h 2008-07-25 21:49:40.000000000 +0200
@@ -106,7 +106,7 @@
extern const char *archdep_home_path(void);
/* Define the default system directory (where the ROMs are). */
-#ifdef __NetBSD__
+#if 1
#define LIBDIR PREFIX "/share/vice"
#else
#define LIBDIR PREFIX "/lib/vice"
diff -up vice-1.22/src/arch/unix/x11/gnome/x11ui.c.foo
vice-1.22/src/arch/unix/x11/gnome/x11ui.c
--- vice-1.22/src/arch/unix/x11/gnome/x11ui.c.foo 2007-08-04 15:24:43.000000000 +0200
+++ vice-1.22/src/arch/unix/x11/gnome/x11ui.c 2008-07-25 21:49:40.000000000 +0200
@@ -424,9 +424,9 @@ void archdep_ui_init(int argc, char *arg
gtk_init(&fake_argc, &fake_args);
/* set X11 fontpath */
- if (access(PREFIX "/lib/vice/fonts/fonts.dir", R_OK) == 0)
+ if (access(PREFIX "/share/vice/fonts/fonts.dir", R_OK) == 0)
{
- const char *cmd = "xset fp+ " PREFIX "/lib/vice/fonts";
+ const char *cmd = "xset fp+ " PREFIX "/share/vice/fonts";
if (system(cmd) != 0)
fprintf(stderr, _("Can't add fontpath `%s'.\n"), cmd);
@@ -1404,7 +1404,7 @@ void ui_exit(void)
ui_dispatch_events();
/* remove fontpath, Don't care about result */
- system("xset fp- " PREFIX "/lib/vice/fonts");
+ system("xset fp- " PREFIX "/share/vice/fonts");
lib_free(s);
exit(0);
vice-1.20-monitor-crash.patch:
--- NEW FILE vice-1.20-monitor-crash.patch ---
diff -ur vice-1.20.orig/src/arch/unix/console.c vice-1.20/src/arch/unix/console.c
--- vice-1.20.orig/src/arch/unix/console.c 2006-07-10 18:09:33.000000000 +0200
+++ vice-1.20/src/arch/unix/console.c 2007-03-01 16:43:13.000000000 +0100
@@ -115,6 +115,8 @@
char *p, *ret_sting;
p = readline(prompt);
+ if (!p)
+ return (char *)-1; /* special EOF "address" */
ret_sting = lib_stralloc(p);
free(p);
diff -ur vice-1.20.orig/src/monitor/mon_util.c vice-1.20/src/monitor/mon_util.c
--- vice-1.20.orig/src/monitor/mon_util.c 2006-08-06 17:54:56.000000000 +0200
+++ vice-1.20/src/monitor/mon_util.c 2007-03-01 16:48:42.000000000 +0100
@@ -178,8 +178,8 @@
{
char *p = NULL;
- while (!p && !pchCommandLine) {
- /* as long as we don't have any return value... */
+ while (!p && !pchCommandLine && p != (char*)-1) {
+ /* as long as we don't have any return value and not EOF */
/* make sure to flush the output buffer */
mon_buffer_flush();
@@ -187,6 +187,8 @@
/* get input from the user */
p = uimon_get_in(&pchCommandLine, prompt);
}
+ if (p == (char *)-1)
+ p = NULL;
if (pchCommandLine) {
/* we have an "artificially" generated command line */
diff -ur vice-1.20.orig/src/monitor/monitor.c vice-1.20/src/monitor/monitor.c
--- vice-1.20.orig/src/monitor/monitor.c 2005-04-21 01:45:23.000000000 +0200
+++ vice-1.20/src/monitor/monitor.c 2007-03-01 17:05:00.000000000 +0100
@@ -1473,7 +1473,7 @@
{
mon_stop_output = 0;
if (cmd == NULL) {
- mon_out("\n");
+ exit_mon = 1;
} else {
if (!cmd[0]) {
if (!asm_mode) {
@@ -1547,12 +1547,22 @@
void monitor_startup(void)
{
+ char *in;
char prompt[40];
+ int first_prompt = 1;
monitor_open();
while (!exit_mon) {
make_prompt(prompt);
- monitor_process(uimon_in(prompt));
+ in = uimon_in(prompt);
+ /* special case, if we get an EOF on the first prompt, assume
+ we do not have a valid stdin and complain about it */
+ if (first_prompt && in == NULL)
+ ui_error("Monitor exited due to EOF from console.\n"
+ "If you want to use the monitor start vice from a terminal!");
+
+ monitor_process(in);
+ first_prompt = 0;
}
monitor_close(1);
}
vice-htmlview.patch:
--- NEW FILE vice-htmlview.patch ---
--- vice-1.21/src/arch/unix/x11/ui-resources.c.htmlview 2007-03-03 10:07:37.000000000
+0100
+++ vice-1.21/src/arch/unix/x11/ui-resources.c 2007-03-10 14:44:58.000000000 +0100
@@ -112,7 +112,7 @@
#ifdef MACOSX_SUPPORT
"/usr/bin/open %s",
#else
- "netscape %s",
+ "htmlview %s",
#endif
RES_EVENT_NO, NULL,
&ui_resources.html_browser_command,
vice-tmpnam.patch:
--- NEW FILE vice-tmpnam.patch ---
--- vice-1.20/src/arch/unix/archdep.c.tmpnam 2006-07-10 16:24:09.000000000 +0200
+++ vice-1.20/src/arch/unix/archdep.c 2006-09-23 09:18:46.000000000 +0200
@@ -373,36 +373,28 @@
}
char *archdep_tmpnam(void)
-{
-#ifdef GP2X
- static unsigned int tmp_string_counter=0;
- char tmp_string[32];
-
- sprintf(tmp_string,"vice%d.tmp",tmp_string_counter++);
- return lib_stralloc(tmp_string);
-#elif HAVE_MKSTEMP
- char *tmpName;
- const char mkstempTemplate[] = "/vice.XXXXXX";
- int fd;
- char* tmp;
-
- tmpName = (char *)lib_malloc(ioutil_maxpathlen());
- if ((tmp = getenv("TMPDIR")) != NULL ) {
- strncpy(tmpName, tmp, ioutil_maxpathlen());
- tmpName[ioutil_maxpathlen() - sizeof(mkstempTemplate)] = '\0';
+{
+ char *tmp, *name;
+
+ name = util_concat(archdep_home_path(), "/.vice", NULL);
+ if (access(name, F_OK)) {
+ mkdir(name, 0700);
+ }
+ lib_free(name);
+
+ name = util_concat(archdep_home_path(), "/.vice/tmp", NULL);
+ if (access(name, F_OK)) {
+ mkdir(name, 0700);
}
- else
- strcpy(tmpName, "/tmp" );
- strcat(tmpName, mkstempTemplate );
- if ((fd = mkstemp(tmpName)) < 0 )
- tmpName[0] = '\0';
- else
- close(fd);
- lib_free(tmpName);
- return lib_stralloc(tmpName);
+ tmp = tempnam(name, "vice");
+ lib_free(name);
+#ifndef LIB_DEBUG
+ return tmp;
#else
- return lib_stralloc(tmpnam(NULL));
+ name = lib_stralloc(tmp);
+ free(tmp);
+ return name;
#endif
}
--- NEW FILE vice.spec ---
Name: vice
Version: 1.22
Release: 2%{?dist}
Summary: Emulator for a variety of Commodore 8bit machines
Group: Applications/Emulators
License: GPL
URL:
http://www.viceteam.org/
Source0:
http://www.viceteam.org/online/vice-%{version}.tar.gz
Source1: x128.desktop
Source2: x64.desktop
Source3: xcbm-ii.desktop
Source4: xpet.desktop
Source5: xplus4.desktop
Source6: xvic.desktop
Source7: vice-miniicons.tar.bz2
Source8: vice-normalicons.tar.bz2
Source9: vice-largeicons.tar.bz2
Patch1: vice-1.19-datadir.patch
Patch2: vice-htmlview.patch
Patch3: vice-tmpnam.patch
Patch4: vice-1.20-monitor-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libXt-devel libXext-devel libXxf86vm-devel libXxf86dga-devel
BuildRequires: giflib-devel libjpeg-devel libgnomeui-devel ffmpeg-devel
BuildRequires: ncurses-devel readline-devel SDL-devel alsa-lib-devel
BuildRequires: bison flex gettext info desktop-file-utils xorg-x11-font-utils
Requires: hicolor-icon-theme htmlview
%description
An emulator for a variety of Commodore 8bit machines, including the C16, C64,
C128, VIC-20, PET (all models, except SuperPET 9000), Plus-4, CBM-II
(aka C610)
%prep
%setup -q
%patch1 -p1 -z .datadir
%patch2 -p1 -z .htmlview
%patch3 -p1 -z .tmpnam
%patch4 -p1 -z .mon
for i in man/*.1 doc/*.info*; do
iconv -f ISO-8859-1 -t UTF8 $i > $i.tmp
mv $i.tmp $i
done
# not really needed, make sure these don't get used:
rm -f src/lib/*/*.c src/lib/*/*.h
%build
%configure --enable-gnomeui --enable-fullscreen --with-sdl
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT VICEDIR=%{_datadir}/%{name}
%find_lang %{name}
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
# vice installs its docs under /usr/share/vice/doc, we install them ourselves
# with %doc, so nuke vice's install and create a symlink for the help function
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
ln -s ../doc/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
for i in x128.desktop x64.desktop xcbm-ii.desktop xpet.desktop xplus4.desktop \
xvic.desktop; do
desktop-file-install --vendor dribble \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_SOURCE_DIR/$i
done
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
cd $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
tar xvfj %{SOURCE7}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
cd $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
tar xvfj %{SOURCE8}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
cd $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
tar xvfj %{SOURCE9}
# remove "icon" from the icons name they are already in the icons dir.
cd $RPM_BUILD_ROOT%{_datadir}/icons/hicolor
for i in */apps/*icon.png; do mv $i `echo $i|sed s/icon//`; done
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%preun
if [ "$1" = 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
%postun
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog FEEDBACK README doc/mon.txt doc/iec-bus.txt
%doc doc/html/*.html doc/html/images/* doc/html/plain/*
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/applications/dribble-*.desktop
%{_datadir}/icons/hicolor/*/apps/*.png
%{_infodir}/%{name}.info*
%{_mandir}/man1/*.1.gz
%changelog
* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.22-2
- Release bump for rpmfusion
* Mon Aug 13 2007 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.22-1
- New upstream release 1.22
* Wed Apr 25 2007 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.21-3%{?dist}
- Further fixes to the xrand code to fix more crashes on exit (drb bz 87)
* Sun Apr 15 2007 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.21-2%{?dist}
- Fix vice crashing with the latest libX11 update (dribble bz 91)
- Fix vice crashing on exit due to corrupted mem
* Sat Mar 10 2007 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.21-1%{?dist}
- New upstream release 1.21
- Fixup .desktop file categories for games-menus usage
* Thu Mar 1 2007 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.20-3%{?dist}
- Fix dribble bug 76
* Sun Oct 1 2006 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.20-2%{?dist}
- Add a patch from upstream which fixes the black buttons / menu problem on FC5
* Sat Sep 23 2006 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.20-1%{?dist}
- New upstream release 1.20
* Fri Jun 23 2006 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.19-4%{?dist}
- add Patch3, which replaces tmpnam with tempnam and creates the tmpfiles
in a user owned dir fixing a tempfile security vulnerability.
* Fri Jun 23 2006 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.19-3%{?dist}
- change --vendor fedora to --vendor dribble when installing .desktop files
- add %%{?dist} to release field in changelog
- add Patch2, which calls htmlview instead of netscape when accessing help.
- make BuildRequires conditonally Require modular or monolithic X using
%%{?fedora} to fix building on FC-4.
* Wed Jun 21 2006 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.19-2
- convert manual and info pages to UTF8
* Tue Jun 20 2006 Hans de Goede <j.w.r.degoede(a)hhs.nl> 1.19-1
- Initial Release, loosely based on the vice package by Ian Chapman
<ian.chapman(a)amiga-hardware.com>, the icons are from Mandrakes package.
--- NEW FILE x128.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=X128 (Vice)
Comment=A Commodore 128 Emulator
Exec=x128
Icon=c128.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Game;Emulator;
--- NEW FILE x64.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=X64 (Vice)
Comment=A Commodore 64 Emulator
Exec=x64
Icon=c64.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Game;Emulator;
--- NEW FILE xcbm-ii.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=XCBM-II (Vice)
Comment=A CBM-II (C610) Emulator
Exec=xcbm2
Icon=c610.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Game;Emulator;
--- NEW FILE xpet.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=XPET (Vice)
Comment=A Commodore PET Emulator
Exec=xpet
Icon=pet.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Game;Emulator;
--- NEW FILE xplus4.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=XPlus-4 (Vice)
Comment=A Commodore Plus-4 Emulator
Exec=xplus4
Icon=plus4.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Game;Emulator;
--- NEW FILE xvic.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=XVic (Vice)
Comment=A Commodore VIC-20 Emulator
Exec=xvic
Icon=vic20.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Game;Emulator;
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/vice/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Jun 2008 16:12:38 -0000 1.1
+++ .cvsignore 25 Jul 2008 19:52:59 -0000 1.2
@@ -0,0 +1,4 @@
+vice-1.22.tar.gz
+vice-largeicons.tar.bz2
+vice-miniicons.tar.bz2
+vice-normalicons.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/vice/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Jun 2008 16:12:38 -0000 1.1
+++ sources 25 Jul 2008 19:52:59 -0000 1.2
@@ -0,0 +1,4 @@
+33204acbb74bafb12594d39b55888626 vice-1.22.tar.gz
+a4936bbfe1cc7b37d4fd93f0901de974 vice-largeicons.tar.bz2
+c944e3eeaac9c3962983423f8e7609e7 vice-miniicons.tar.bz2
+1e024cef652bc4bf929905b182ef689b vice-normalicons.tar.bz2