From owner-svn-ports-all@freebsd.org Tue Dec 22 04:49:26 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78E02A4D57D; Tue, 22 Dec 2015 04:49:26 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56308123B; Tue, 22 Dec 2015 04:49:26 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBM4nPxF041918; Tue, 22 Dec 2015 04:49:25 GMT (envelope-from miwi@FreeBSD.org) Received: (from miwi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBM4nPK6041914; Tue, 22 Dec 2015 04:49:25 GMT (envelope-from miwi@FreeBSD.org) Message-Id: <201512220449.tBM4nPK6041914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: miwi set sender to miwi@FreeBSD.org using -f From: Martin Wilke Date: Tue, 22 Dec 2015 04:49:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r404212 - in head/games/xscavenger: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 04:49:26 -0000 Author: miwi Date: Tue Dec 22 04:49:24 2015 New Revision: 404212 URL: https://svnweb.freebsd.org/changeset/ports/404212 Log: - Update to 1.4.5 - Update WWW PR: 205208 Submitted by: Ports Fury Approved by: mat (mentor) Differential Revision: D4632 Modified: head/games/xscavenger/Makefile head/games/xscavenger/distinfo head/games/xscavenger/files/patch-sound.c head/games/xscavenger/pkg-descr Modified: head/games/xscavenger/Makefile ============================================================================== --- head/games/xscavenger/Makefile Tue Dec 22 04:39:55 2015 (r404211) +++ head/games/xscavenger/Makefile Tue Dec 22 04:49:24 2015 (r404212) @@ -2,16 +2,13 @@ # $FreeBSD$ PORTNAME= xscavenger -PORTVERSION= 1.4.4 -PORTREVISION= 2 +PORTVERSION= 1.4.5 CATEGORIES= games -MASTER_SITES= http://www.xdr.com/dash/ +MASTER_SITES= http://www.linuxmotors.com/scavenger/downloads/ MAINTAINER= ports@FreeBSD.org COMMENT= Lode Runner clone for X11 -BROKEN= unfetchable - LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/../copyright @@ -22,6 +19,18 @@ USE_XORG= x11 xext CFLAGS+= -Wno-return-type -Wno-pointer-sign +DESKTOP_ENTRIES="XScavenger" "" "" "scavenger" "" "" + +OPTIONS_DEFINE= ALSA +OPTIONS_DEFAULT= ALSA + +ALSA_LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib +ALSA_CFLAGS_OFF= -DNO_ALSA + +post-patch-ALSA-off: + @${REINPLACE_CMD} -e \ + 's|-lasound||' ${WRKSRC}/Imakefile + pre-configure: @${LN} -sf scavenger.6 ${WRKSRC}/scavenger.man @${ECHO_CMD} "MANSUFFIX=6" >> ${WRKSRC}/Imakefile Modified: head/games/xscavenger/distinfo ============================================================================== --- head/games/xscavenger/distinfo Tue Dec 22 04:39:55 2015 (r404211) +++ head/games/xscavenger/distinfo Tue Dec 22 04:49:24 2015 (r404212) @@ -1,2 +1,2 @@ -SHA256 (xscavenger-1.4.4.tgz) = 65c8d2224068151fcac704f34b91fb46056f77b708b1a60170a955d93751553e -SIZE (xscavenger-1.4.4.tgz) = 193346 +SHA256 (xscavenger-1.4.5.tgz) = f719ffd4ed2abaed9f34b5d22bc392f3067b5c4b19bea2e9a02be07243a4d406 +SIZE (xscavenger-1.4.5.tgz) = 192990 Modified: head/games/xscavenger/files/patch-sound.c ============================================================================== --- head/games/xscavenger/files/patch-sound.c Tue Dec 22 04:39:55 2015 (r404211) +++ head/games/xscavenger/files/patch-sound.c Tue Dec 22 04:49:24 2015 (r404212) @@ -1,11 +1,227 @@ ---- sound.c.orig Tue May 22 17:45:42 2001 -+++ sound.c Tue May 22 17:45:53 2001 -@@ -5,7 +5,7 @@ - #include - #include - #include --#include -+#include - #include - #include +--- sound.c.orig 2014-11-18 23:26:13 UTC ++++ sound.c +@@ -10,7 +10,13 @@ #include + #include + ++#ifdef NO_ALSA ++#include ++#include ++#define SOUNDDEV "/dev/dsp" ++#else + #include ++#endif + + + #include "scav.h" +@@ -42,10 +48,14 @@ sample samples[NUMSOUNDS]; + + int soundworking=0; + int fragment; ++#ifdef NO_ALSA ++int dsp; ++#endif + int soundwrite,soundread; + int *soundbuffer; + int soundbufferlen; + ++#ifndef NO_ALSA + snd_pcm_t *playback_handle; + + void opendsp(int samplerate) +@@ -122,6 +132,7 @@ void opendsp(int samplerate) + } + + } ++#endif + + + void soundinit(void) +@@ -129,26 +140,50 @@ void soundinit(void) + int fd[2]; + char devname[256]; + int value; ++#ifndef NO_ALSA + int res; ++#endif + + sprintf(dirlist,"%s/%s,%s",localname,localdirname,libname); + soundworking=0; ++#ifdef NO_ALSA ++ pipe(fd); ++#else + res=pipe(fd);res=res;//STFU ++#endif + soundread=fd[0]; + soundwrite=fd[1]; ++#ifdef NO_ALSA ++ if(fork()) ++#else + res = fork(); + if(res>0) ++#endif + { + close(soundread); + return; + } + close(soundwrite); + memset(samples,0,sizeof(samples)); ++#ifdef NO_ALSA ++ strcpy(devname,SOUNDDEV); ++ dsp=open(devname,O_WRONLY); ++ if(dsp<0) goto failed; ++ fragment=0x20009; ++ ioctl(dsp,SNDCTL_DSP_SETFRAGMENT,&fragment); ++ value=10000; ++ ioctl(dsp,SNDCTL_DSP_SPEED,&value); ++ value=0; ++ ioctl(dsp,SNDCTL_DSP_STEREO,&value); ++ ioctl(dsp,SNDCTL_DSP_GETBLKSIZE,&fragment); ++ if(!fragment) {close(dsp);goto failed;} ++#else + + // 10,000 hz mono 8bit samples + fragment = 256; + opendsp(10000); + ++#endif + soundbufferlen=fragment*sizeof(int); + soundbuffer=malloc(soundbufferlen); + if(!soundbuffer) goto failed; +@@ -180,12 +215,21 @@ int i,file,size,len; + } + size=lseek(file,0,SEEK_END); + lseek(file,0,SEEK_SET); ++#ifdef NO_ALSA ++ len=samples[num].len=(size+fragment-1)/fragment; ++#else + int expand = 1; + len=samples[num].len=(size*expand+fragment-1)/fragment; ++#endif + len*=fragment; + p1=samples[num].data=malloc(len); + if(p1) + { ++#ifdef NO_ALSA ++ i=read(file,p1,size); ++ if(len-size) memset(p1+size,0,len-size); ++ while(size--) *p1++ ^= 0x80; ++#else + memset(p1, 0, len); + int got=read(file,p1,size); + for(i=got-1;i>=0;--i) +@@ -194,6 +238,7 @@ int i,file,size,len; + for(j=expand-1;j>=0;--j) + p1[i*expand+j] = p1[i] - 0x80; + } ++#endif + } else + samples[num].data=0; + close(file); +@@ -207,8 +252,12 @@ signed char *p; + int *ip; + int playing[MIXMAX],position[MIXMAX]; + int which; ++#ifdef NO_ALSA ++unsigned char clip[8192]; ++#else + int *mixbuffer; + short *outbuffer; ++#endif + + while(!soundworking) + { +@@ -223,12 +272,21 @@ short *outbuffer; + com=*commands; + if(com==SOUND_EXIT) exit(0); + } ++#ifdef NO_ALSA ++ for(i=0;i<8192;i++) ++ { ++ j=i-4096; ++ clip[i]=j > 127 ? 255 : (j<-128 ? 0 : j+128); ++ } ++#endif + for(i=0;i