FreeBSD Bugzilla – Attachment 164064 Details for
Bug 205208
[PATCH] games/xscavenger: Update to version 1.4.5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
games_xscavenger.diff
games_xscavenger.diff (text/plain), 8.67 KB, created by
tkato432
on 2015-12-10 18:35:36 UTC
(
hide
)
Description:
games_xscavenger.diff
Filename:
MIME Type:
Creator:
tkato432
Created:
2015-12-10 18:35:36 UTC
Size:
8.67 KB
patch
obsolete
>diff -urN /usr/ports/games/xscavenger/Makefile games/xscavenger/Makefile >--- /usr/ports/games/xscavenger/Makefile 2015-11-09 22:25:27.764488000 +0900 >+++ games/xscavenger/Makefile 2015-12-11 00:00:00.000000000 +0900 >@@ -2,16 +2,13 @@ > # $FreeBSD: head/games/xscavenger/Makefile 401096 2015-11-09 12:59:03Z antoine $ > > 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 @@ > > 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 >diff -urN /usr/ports/games/xscavenger/distinfo games/xscavenger/distinfo >--- /usr/ports/games/xscavenger/distinfo 2015-08-24 04:04:59.149716000 +0900 >+++ games/xscavenger/distinfo 2015-12-11 00:00:00.000000000 +0900 >@@ -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 >diff -urN /usr/ports/games/xscavenger/files/patch-edit.c games/xscavenger/files/patch-edit.c >--- /usr/ports/games/xscavenger/files/patch-edit.c 2015-08-24 04:04:59.192923000 +0900 >+++ games/xscavenger/files/patch-edit.c 1970-01-01 09:00:00.000000000 +0900 >@@ -1,10 +0,0 @@ >---- edit.c.orig 2013-06-11 18:21:01.902812410 +0400 >-+++ edit.c 2013-06-11 18:21:15.931811652 +0400 >-@@ -2,6 +2,7 @@ >- >- #include <stdio.h> >- #include <unistd.h> >-+#include <string.h> >- #include "scav.h" >- #include "edit.h" >- #include "x.h" >diff -urN /usr/ports/games/xscavenger/files/patch-sound.c games/xscavenger/files/patch-sound.c >--- /usr/ports/games/xscavenger/files/patch-sound.c 2015-08-24 04:04:59.205716000 +0900 >+++ games/xscavenger/files/patch-sound.c 2015-12-11 00:00:00.000000000 +0900 >@@ -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 <unistd.h> >- #include <fcntl.h> >- #include <sys/ioctl.h> >--#include <linux/soundcard.h> >-+#include <sys/soundcard.h> >- #include <sys/time.h> >- #include <signal.h> >+--- sound.c.orig 2014-11-18 23:26:13 UTC >++++ sound.c >+@@ -10,7 +10,13 @@ > #include <string.h> >+ #include <errno.h> >+ >++#ifdef NO_ALSA >++#include <sys/ioctl.h> >++#include <sys/soundcard.h> >++#define SOUNDDEV "/dev/dsp" >++#else >+ #include <alsa/asoundlib.h> >++#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<NUMSOUNDS;++i) >+ readsound(i); >+ memset(playing,0,sizeof(playing)); >+ memset(position,0,sizeof(position)); >++#ifndef NO_ALSA >+ mixbuffer = malloc(fragment * sizeof(*mixbuffer)); >+ outbuffer = malloc(fragment * sizeof(*outbuffer)); >++#endif >+ for(;;) >+ { >+ commandlen=read(soundread,commands,64); >+@@ -238,10 +296,18 @@ short *outbuffer; >+ commandlen=0; >+ if(errno==EPIPE) exit(0); >+ } else if(commandlen==0) exit(0); >++#ifdef NO_ALSA >++ p=commands; >++#else >+ signed char *comp=commands; >++#endif >+ while(commandlen--) >+ { >++#ifdef NO_ALSA >++ com=*p++; >++#else >+ com=*comp++; >++#endif >+ if(com==SOUND_QUIET) {memset(position,0,sizeof(position));continue;} >+ if(com==SOUND_EXIT) exit(0); >+ if(com<NUMSOUNDS) >+@@ -261,7 +327,11 @@ short *outbuffer; >+ position[i]=0; >+ } >+ } >++#ifdef NO_ALSA >++ memset(soundbuffer,0,soundbufferlen); >++#else >+ memset(mixbuffer, 0, fragment * sizeof(*mixbuffer)); >++#endif >+ for(i=0;i<MIXMAX;++i) >+ { >+ if(!position[i]) continue; >+@@ -274,6 +344,17 @@ short *outbuffer; >+ p=samples[which].data; >+ if(!p) continue; >+ p+=fragment*(position[i]++ -1); >++#ifdef NO_ALSA >++ ip=soundbuffer; >++ j=fragment; >++ while(j--) *ip++ += *p++; >++ } >++ j=fragment; >++ ip=soundbuffer; >++ p=(char *) soundbuffer; >++ while(j--) *p++ = clip[4096+*ip++]; >++ write(dsp,(char *)soundbuffer,fragment); >++#else >+ >+ for(j=0;j<fragment;++j) >+ mixbuffer[j] += 255*p[j]; >+@@ -289,15 +370,22 @@ short *outbuffer; >+ res = snd_pcm_writei(playback_handle, outbuffer, fragment); >+ //printf("res=%d\n", res); >+ >++#endif >+ } >+ } >+ >+ void playsound(int n) >+ { >+ char c; >++#ifndef NO_ALSA >+ int res; >++#endif >+ c=n; >++#ifdef NO_ALSA >++ write(soundwrite,&c,1); >++#else >+ res=write(soundwrite,&c,1);res=res;//STFU >++#endif >+ } >+ >+ void endsound(void) >diff -urN /usr/ports/games/xscavenger/pkg-descr games/xscavenger/pkg-descr >--- /usr/ports/games/xscavenger/pkg-descr 2015-08-24 04:04:59.161674000 +0900 >+++ games/xscavenger/pkg-descr 2015-12-11 00:00:00.000000000 +0900 >@@ -1,12 +1,12 @@ >-Scavenger is like Lode Runner. You've got to run around gathering objects >-while avoiding enemies. You can dig down through some of the blocks to get >-at buried objects. After you've collected everything, ladders may appear. >-To finish the level you've got to exit through the top of the screen. If >-an enemy falls into a dug brick, he is stunned for a while. If the brick >-fills in with him in it, he is killed, and he will reappear at the top of >-the screen. >+Scavenger is like Lode Runner. You've got to run around gathering >+objects while avoiding enemies. You can dig down through some of the >+blocks to get at buried objects. After you've collected everything, >+ladders may appear. To finish the level you've got to exit through the >+top of the screen. If an enemy falls into a dug brick, he is stunned for >+a while. If the brick fills in with him in it, he is killed, and he will >+reappear at the top of the screen. > > This version has a level editor for designing your own levels, and a > graphics editor for drawing your own artwork. > >-WWW: http://www.xdr.com/dash/scavenger.html >+WWW: http://www.linuxmotors.com/scavenger/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205208
: 164064