Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2013 20:04:43 GMT
From:      Vladimir Kondratiev <wulf@mail.mipt.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/183694: [patch] emulators/fuse miscelaneous fixes & improvements
Message-ID:  <201311052004.rA5K4h5k070187@oldred.freebsd.org>
Resent-Message-ID: <201311052010.rA5KA0d2012929@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183694
>Category:       ports
>Synopsis:       [patch] emulators/fuse miscelaneous fixes & improvements
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 05 20:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir Kondratiev
>Release:        
>Organization:
>Environment:
>Description:
1. Remove libsamplerate dependence. There is no such option now
2. Fix libao support broken in rev. 318604
3. Install menu icon & mime-types
4. Add GTK3 UI.
5. Add SDL UI for fullscreen support.
6. Add SVGALIB UI for console support.
7. Fix "Couldn't open audio: Fragment size must be a power of two" issue with SDL sound.
8. Option to install extra ROM images which have been removed after 1.0.0.1 version of fuse.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: fuse/Makefile
===================================================================
--- fuse/Makefile	(revision 332857)
+++ fuse/Makefile	(working copy)
@@ -3,8 +3,10 @@
 
 PORTNAME=	fuse
 PORTVERSION=	1.1.1
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	SF/${PORTNAME}-emulator/${PORTNAME}/${PORTVERSION}
+DISTFILES=	${PORTNAME}-${PORTVERSION}.tar.gz
 
 MAINTAINER=	rene@FreeBSD.org
 COMMENT=	Free Unix (Sinclair ZX-)Spectrum Emulator
@@ -16,31 +18,57 @@
 		libgcrypt.so:${PORTSDIR}/security/libgcrypt
 
 GNU_CONFIGURE=	yes
-USES=		pkgconfig
-USE_GNOME=	libxml2 glib20 gtk20
+USES=		pkgconfig gmake
+USE_GNOME=	libxml2 glib20
 
 CONFIGURE_ARGS+=--without-alsa --without-joystick
 CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
 CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
 
-OPTIONS_DEFINE=	AO SAMPLERATE
-OPTIONS_DEFAULT=	SAMPLERATE
-AO_DESC=	Use libao for audio output
-SAMPLERATE_DESC=	Better beeper sound quality
+OPTIONS_DEFINE=	AO ROMS ICONS
+OPTIONS_DEFAULT=	ICONS GTK2
+OPTIONS_SINGLE=	UI
+OPTIONS_SINGLE_UI=	GTK2 GTK3 SDL SVGALIB
 
+UI_DESC=	User Interface
+ROMS_DESC=	Extra ROM images (128p, 256s, Gluck, IF1, Opus, TrDOS)
+
+OPTIONS_SUB=	yes
+AO_CONFIGURE_WITH=	libao
+AO_LIB_DEPENDS=		libao.so:${PORTSDIR}/audio/libao
+ICONS_USE=		GNOME=desktopfileutils
+ICONS_BUILD_DEPENDS=	${LOCALBASE}/bin/update-mime-database:${PORTSDIR}/misc/shared-mime-info
+ICONS_RUN_DEPENDS=	${LOCALBASE}/bin/update-mime-database:${PORTSDIR}/misc/shared-mime-info
+ICONS_CONFIGURE_ENABLE=	desktop-integration
+GTK2_USE=		GNOME=gtk20
+GTK2_CONFIGURE_ON=	--with-gtk
+GTK3_USE=		GNOME=gtk30
+GTK3_CONFIGURE_ON=	--with-gtk
+GTK3_CONFIGURE_ENABLE=	gtk3
+SDL_USE=		SDL=sdl
+SDL_CONFIGURE_WITH=	sdl
+SDL_CONFIGURE_ON=	--without-gtk
+SVGALIB_LIB_DEPENDS=	libvga.so:${PORTSDIR}/graphics/svgalib
+SVGALIB_CONFIGURE_WITH=	svgalib
+SVGALIB_CONFIGURE_ON=	--without-gtk
+
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MAO}
-CONFIGURE_ARGS+=--with-libao
-LIB_DEPENDS+=	libao.so:${PORTSDIR}/audio/libao
-.else
-CONFIGURE_ARGS+=--without-libao
+.if ${PORT_OPTIONS:MICONS}
+INSTALLS_ICONS=	yes
 .endif
 
-.if ${PORT_OPTIONS:MSAMPLERATE}
-LIB_DEPENDS+=	libsamplerate.so:${PORTSDIR}/audio/libsamplerate
-.else
-CONFIGURE_ARGS+=--without-libsamplerate
+.if ${PORT_OPTIONS:MROMS}
+ROMSVERSION=	1.0.0
+ROMS_DISTFILE=	${PORTNAME}-${ROMSVERSION}.tar.gz
+MASTER_SITES+=	SF/${PORTNAME}-emulator/${PORTNAME}/${ROMSVERSION}:roms
+DISTFILES+=	${ROMS_DISTFILE}:roms
+
+EXTRA_ROMS=	128p-0.rom 128p-1.rom 256s-0.rom 256s-1.rom 256s-2.rom \
+		256s-3.rom gluck.rom if1-1.rom if1-2.rom opus.rom trdos.rom
+
+RESTRICTED=	ROM images do not have explicit permission to distribute
+RESTRICTED_FILES=	${ROMS_DISTFILE}
 .endif
 
 post-install:
@@ -49,5 +77,9 @@
 	cd ${WRKSRC} && ${INSTALL_DATA} AUTHORS ChangeLog README THANKS \
 		${STAGEDIR}${DOCSDIR}
 .endif
+.if ${PORT_OPTIONS:MROMS}
+	cd ${WRKDIR}/${PORTNAME}-${ROMSVERSION}/roms && \
+		${INSTALL_DATA} ${EXTRA_ROMS} ${STAGEDIR}${DATADIR}
+.endif
 
 .include <bsd.port.mk>
Index: fuse/distinfo
===================================================================
--- fuse/distinfo	(revision 332857)
+++ fuse/distinfo	(working copy)
@@ -1,2 +1,4 @@
 SHA256 (fuse-1.1.1.tar.gz) = a857d4bd62e01d18429897467508af15624cbaf343caed8b9ba1ab3a8879444e
 SIZE (fuse-1.1.1.tar.gz) = 1881332
+SHA256 (fuse-1.0.0.tar.gz) = a00add3abc0148247f7990e6feebcc32d82ebe857897d9426e5230222425aeb9
+SIZE (fuse-1.0.0.tar.gz) = 1628751
Index: fuse/files/patch-sound__aosound.c
===================================================================
--- fuse/files/patch-sound__aosound.c	(revision 332857)
+++ fuse/files/patch-sound__aosound.c	(working copy)
@@ -13,7 +13,7 @@
    /* Get a copy of the device string we can modify */
    if( !device || *device == '\0' )
 -    return;
-+    return 1;
++    return 0;
  
    mutable = utils_safe_strdup( device );
  
Index: fuse/files/patch-sound__sdlsound.c
===================================================================
--- fuse/files/patch-sound__sdlsound.c	(revision 0)
+++ fuse/files/patch-sound__sdlsound.c	(working copy)
@@ -0,0 +1,24 @@
+--- sound/sdlsound.c.orig	2013-05-17 00:26:12.000000000 +0400
++++ sound/sdlsound.c	2013-11-03 21:20:59.273741357 +0400
+@@ -94,7 +94,9 @@
+      speed to about 2000% on my Mac, 100Hz allows up to 5000% for me) */
+   if( hz > 100.0 ) hz = 100.0;
+   sound_framesiz = *freqptr / hz;
+-  requested.samples = sound_framesiz;
++  requested.samples = 1;
++  while( requested.samples < sound_framesiz )
++    requested.samples *= 2;
+ 
+   if ( SDL_OpenAudio( &requested, &received ) < 0 ) {
+     settings_current.sound = 0;
+@@ -112,7 +114,9 @@
+ 
+     requested.freq = *freqptr;
+     sound_framesiz = *freqptr / hz;
+-    requested.samples = sound_framesiz;
++    requested.samples = 1;
++    while( requested.samples < sound_framesiz )
++      requested.samples *= 2;
+ 
+     if( SDL_OpenAudio( &requested, NULL ) < 0 ) {
+       settings_current.sound = 0;

Property changes on: fuse/files/patch-sound__sdlsound.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: fuse/pkg-plist
===================================================================
--- fuse/pkg-plist	(revision 332857)
+++ fuse/pkg-plist	(working copy)
@@ -1,15 +1,29 @@
 @comment $FreeBSD$
 bin/fuse
 man/man1/fuse.1.gz
+%%ICONS%%share/applications/fuse.desktop
 %%DATADIR%%/128-0.rom
 %%DATADIR%%/128-1.rom
+%%ROMS%%%%DATADIR%%/128p-0.rom
+%%ROMS%%%%DATADIR%%/128p-1.rom
+%%ROMS%%%%DATADIR%%/256s-0.rom
+%%ROMS%%%%DATADIR%%/256s-1.rom
+%%ROMS%%%%DATADIR%%/256s-2.rom
+%%ROMS%%%%DATADIR%%/256s-3.rom
 %%DATADIR%%/48.rom
 %%DATADIR%%/cassette.bmp
 %%DATADIR%%/disciple.rom
 %%DATADIR%%/disk_plus3.szx
+%%ROMS%%%%DATADIR%%/gluck.rom
+%%ROMS%%%%DATADIR%%/if1-1.rom
+%%ROMS%%%%DATADIR%%/if1-2.rom
+%%SDL%%%%DATADIR%%/fuse.font
+%%SVGALIB%%%%DATADIR%%/fuse.font
 %%DATADIR%%/keyboard.scr
-%%DATADIR%%/menu_data.ui
+%%GTK2%%%%DATADIR%%/menu_data.ui
+%%GTK3%%%%DATADIR%%/menu_data.ui
 %%DATADIR%%/microdrive.bmp
+%%ROMS%%%%DATADIR%%/opus.rom
 %%DATADIR%%/plus2-0.rom
 %%DATADIR%%/plus2-1.rom
 %%DATADIR%%/plus3-0.rom
@@ -42,6 +56,42 @@
 %%DATADIR%%/tc2048.rom
 %%DATADIR%%/tc2068-0.rom
 %%DATADIR%%/tc2068-1.rom
+%%ROMS%%%%DATADIR%%/trdos.rom
+%%ICONS%%share/icons/hicolor/128x128/apps/fuse.png
+%%ICONS%%share/icons/hicolor/128x128/mimetypes/application-x-spectrum.png
+%%ICONS%%share/icons/hicolor/16x16/apps/fuse.png
+%%ICONS%%share/icons/hicolor/16x16/mimetypes/application-x-spectrum.png
+%%ICONS%%share/icons/hicolor/256x256/apps/fuse.png
+%%ICONS%%share/icons/hicolor/256x256/mimetypes/application-x-spectrum.png
+%%ICONS%%share/icons/hicolor/32x32/apps/fuse.png
+%%ICONS%%share/icons/hicolor/32x32/mimetypes/application-x-spectrum.png
+%%ICONS%%share/icons/hicolor/48x48/apps/fuse.png
+%%ICONS%%share/icons/hicolor/48x48/mimetypes/application-x-spectrum.png
+%%ICONS%%share/icons/hicolor/64x64/apps/fuse.png
+%%ICONS%%share/icons/hicolor/64x64/mimetypes/application-x-spectrum.png
+%%ICONS%%share/mime/packages/fuse.xml
+%%ICONS%%@dirrmtry share/mime/packages
+%%ICONS%%@dirrmtry share/mime
+%%ICONS%%@dirrmtry share/icons/hicolor/64x64/mimetypes
+%%ICONS%%@dirrmtry share/icons/hicolor/64x64/apps
+%%ICONS%%@dirrmtry share/icons/hicolor/64x64
+%%ICONS%%@dirrmtry share/icons/hicolor/48x48/mimetypes
+%%ICONS%%@dirrmtry share/icons/hicolor/48x48/apps
+%%ICONS%%@dirrmtry share/icons/hicolor/48x48
+%%ICONS%%@dirrmtry share/icons/hicolor/32x32/mimetypes
+%%ICONS%%@dirrmtry share/icons/hicolor/32x32/apps
+%%ICONS%%@dirrmtry share/icons/hicolor/32x32
+%%ICONS%%@dirrmtry share/icons/hicolor/256x256/mimetypes
+%%ICONS%%@dirrmtry share/icons/hicolor/256x256/apps
+%%ICONS%%@dirrmtry share/icons/hicolor/256x256
+%%ICONS%%@dirrmtry share/icons/hicolor/16x16/mimetypes
+%%ICONS%%@dirrmtry share/icons/hicolor/16x16/apps
+%%ICONS%%@dirrmtry share/icons/hicolor/16x16
+%%ICONS%%@dirrmtry share/icons/hicolor/128x128/mimetypes
+%%ICONS%%@dirrmtry share/icons/hicolor/128x128/apps
+%%ICONS%%@dirrmtry share/icons/hicolor/128x128
+%%ICONS%%@dirrmtry share/icons/hicolor
+%%ICONS%%@dirrmtry share/icons
 @dirrm %%DATADIR%%
 %%PORTDOCS%%%%DOCSDIR%%/AUTHORS
 %%PORTDOCS%%%%DOCSDIR%%/ChangeLog
@@ -48,3 +98,7 @@
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%%%DOCSDIR%%/THANKS
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%ICONS%%@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
+%%ICONS%%@unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
+%%ICONS%%@exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
+%%ICONS%%@unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311052004.rA5K4h5k070187>