Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Nov 2013 11:30:33 +0000 (UTC)
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r333379 - in head/emulators/fuse: . files
Message-ID:  <201311101130.rAABUX2b041623@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rene
Date: Sun Nov 10 11:30:32 2013
New Revision: 333379
URL: http://svnweb.freebsd.org/changeset/ports/333379

Log:
  - Use option helpers
  - Drop SAMPLERATE option, the configure script no longer defines it
  - Add GTK3, SDL, and SVGALIB interfaces
  - Add support for installing icons
  - Fix broken libao sound and issue with SDL sound
  - Bump PORTREVISION
  
  PR:		ports/183694
  Submitted by:	Vladimir Kondratiev <wulf@mail.mipt.ru>

Added:
  head/emulators/fuse/files/patch-sound__sdlsound.c   (contents, props changed)
Modified:
  head/emulators/fuse/Makefile
  head/emulators/fuse/files/patch-sound__aosound.c
  head/emulators/fuse/pkg-plist

Modified: head/emulators/fuse/Makefile
==============================================================================
--- head/emulators/fuse/Makefile	Sun Nov 10 11:27:07 2013	(r333378)
+++ head/emulators/fuse/Makefile	Sun Nov 10 11:30:32 2013	(r333379)
@@ -3,6 +3,7 @@
 
 PORTNAME=	fuse
 PORTVERSION=	1.1.1
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	SF/${PORTNAME}-emulator/${PORTNAME}/${PORTVERSION}
 
@@ -16,31 +17,40 @@ LIB_DEPENDS=	libspectrum.so:${PORTSDIR}/
 		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 ICONS
+OPTIONS_DEFAULT=	ICONS GTK2
+OPTIONS_SINGLE=		UI
+UI_DESC=		User Interface
+OPTIONS_SINGLE_UI=	GTK2 GTK3 SDL SVGALIB
+
+OPTIONS_SUB=		yes
+AO_CONFIGURE_WITH=	libao
+AO_LIB_DEPENDS=		libao.so:${PORTSDIR}/audio/libao
+ICONS_USES=		desktop-file-utils 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
-.endif
-
-.if ${PORT_OPTIONS:MSAMPLERATE}
-LIB_DEPENDS+=	libsamplerate.so:${PORTSDIR}/audio/libsamplerate
-.else
-CONFIGURE_ARGS+=--without-libsamplerate
+.if ${PORT_OPTIONS:MICONS}
+INSTALLS_ICONS=	yes
 .endif
 
 post-install:

Modified: head/emulators/fuse/files/patch-sound__aosound.c
==============================================================================
--- head/emulators/fuse/files/patch-sound__aosound.c	Sun Nov 10 11:27:07 2013	(r333378)
+++ head/emulators/fuse/files/patch-sound__aosound.c	Sun Nov 10 11:30:32 2013	(r333379)
@@ -1,5 +1,5 @@
---- ./sound/aosound.c.orig	2013-05-16 22:26:12.000000000 +0200
-+++ ./sound/aosound.c	2013-05-20 14:06:11.000000000 +0200
+--- sound/aosound.c.orig	2013-05-16 22:26:12.000000000 +0200
++++ sound/aosound.c	2013-11-09 22:31:16.000000000 +0100
 @@ -78,14 +78,14 @@
    }
  }
@@ -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 );
  

Added: head/emulators/fuse/files/patch-sound__sdlsound.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/fuse/files/patch-sound__sdlsound.c	Sun Nov 10 11:30:32 2013	(r333379)
@@ -0,0 +1,24 @@
+--- sound/sdlsound.c.orig	2013-05-16 22:26:12.000000000 +0200
++++ sound/sdlsound.c	2013-11-09 22:33:21.000000000 +0100
+@@ -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;

Modified: head/emulators/fuse/pkg-plist
==============================================================================
--- head/emulators/fuse/pkg-plist	Sun Nov 10 11:27:07 2013	(r333378)
+++ head/emulators/fuse/pkg-plist	Sun Nov 10 11:30:32 2013	(r333379)
@@ -1,14 +1,18 @@
 @comment $FreeBSD$
 bin/fuse
 man/man1/fuse.1.gz
+%%ICONS%%share/applications/fuse.desktop
 %%DATADIR%%/128-0.rom
 %%DATADIR%%/128-1.rom
 %%DATADIR%%/48.rom
 %%DATADIR%%/cassette.bmp
 %%DATADIR%%/disciple.rom
 %%DATADIR%%/disk_plus3.szx
+%%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
 %%DATADIR%%/plus2-0.rom
 %%DATADIR%%/plus2-1.rom
@@ -42,6 +46,41 @@ man/man1/fuse.1.gz
 %%DATADIR%%/tc2048.rom
 %%DATADIR%%/tc2068-0.rom
 %%DATADIR%%/tc2068-1.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



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