From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- games-arcade/xscavenger/Manifest | 6 + games-arcade/xscavenger/files/1.4.4-gentoo.patch | 200 +++++++++++++++++++++++ games-arcade/xscavenger/metadata.xml | 8 + games-arcade/xscavenger/xscavenger-1.4.4.ebuild | 46 ++++++ 4 files changed, 260 insertions(+) create mode 100644 games-arcade/xscavenger/Manifest create mode 100644 games-arcade/xscavenger/files/1.4.4-gentoo.patch create mode 100644 games-arcade/xscavenger/metadata.xml create mode 100644 games-arcade/xscavenger/xscavenger-1.4.4.ebuild (limited to 'games-arcade/xscavenger') diff --git a/games-arcade/xscavenger/Manifest b/games-arcade/xscavenger/Manifest new file mode 100644 index 000000000000..8d9e0114df61 --- /dev/null +++ b/games-arcade/xscavenger/Manifest @@ -0,0 +1,6 @@ +AUX 1.4.4-gentoo.patch 5762 SHA256 6950fa5c300938af5c27dca5a0c9a0f640a0d2b7980a800f2b6eceee928628a3 SHA512 95e5c803b4d60b110be44254d1ceb78ea4ba3c7c72d6d95d856616902160141975ee57ee40c4a8c785220d71821531a02d2b823cfa5dca2cbbdd6b8b9bb842a5 WHIRLPOOL 33d56ece00c03e2b2f589478ea8ba81ae13a6b7440a88d084d2638841a4ad69159ccded27c9e779f16e7a9d0f953af8c7d057dd0a2e389d6034ae527a1a70d5b +DIST xscavenger-1.4.4.tgz 193346 SHA256 65c8d2224068151fcac704f34b91fb46056f77b708b1a60170a955d93751553e SHA512 5f200912b9114ea0c09f0bfcc3f06be2e7c2e1700a744319081f5f3a22c8b93663477076af27837326acf9830af6f597cf8f8fb44562db7d00128321487841ec WHIRLPOOL 1fe351967e379f1e4c4121595b216f4c7d27e127f0282ebcb3904b83437d5059f798db8a34ed0a5aab07633774b56baa27b9b3711ec0bfb8209546960952a853 +EBUILD xscavenger-1.4.4.ebuild 863 SHA256 3259fc2d57f876038961b0a3ac33529051b1df005d545186d3e69e32a8b6f7c2 SHA512 47cf20c9bb942e8a6f54a3b1c12ecc3a6e190e3d71d029e1d303d40365cbca218815695925c9d564efbaad0561c4186e999f8e26857c98e00c7aa7d6b9a128d2 WHIRLPOOL 1b1c1c9b2e4f81c886f02df4fcb76a73ea511cfe0376151ec8fa897aadab1ff00667858cbb3b7ec19a33a26db3c8528c1ea7521ba5ac9aefb8f23743e9f2b860 +MISC ChangeLog 2467 SHA256 4ef9f3522922bddd3aaf9273dec90e39d84923d8411181efacca049912143c9e SHA512 03ebe604f8b9ab626418deaa625e0ffcbc99fb2a9f87bc09e6e55ae94946b28dabf45243d955b32e818ef5904d03756e7110db444538d9c179a576e4b6705759 WHIRLPOOL 4f9a16a610fb92620b26c8e57c77e88e3030f39ed826024a94a376045353eb68598da7e0f6bbdaccfb83c40fb83f2142c00e68fd1d8dd0604b5b8d8d8539c564 +MISC ChangeLog-2015 1462 SHA256 528d3944b3949b0254f7851a05ce47af48eab396c1b40a1d937c3b19b19770b8 SHA512 9fc1df55d23bc96bb4a38615054fae3f0b0b543027adc7a850463294463d491e355defeb8f0158b14d3585eafbaea4debbc1d18916d9390d6edb0b08446e3898 WHIRLPOOL de0ea5c11a7c5c4b8220616711ef96cf98c0ba6eee6787d3492d6ea322dfdf1ab0b471c779a39fa74eb549ea764a5c6a2092c4af61296e42f12e4f050a91f2c3 +MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088 diff --git a/games-arcade/xscavenger/files/1.4.4-gentoo.patch b/games-arcade/xscavenger/files/1.4.4-gentoo.patch new file mode 100644 index 000000000000..df5936ed3de8 --- /dev/null +++ b/games-arcade/xscavenger/files/1.4.4-gentoo.patch @@ -0,0 +1,200 @@ +diff -urN xscavenger-1.4.4.orig/src/Imakefile xscavenger-1.4.4/src/Imakefile +--- xscavenger-1.4.4.orig/src/Imakefile ++++ xscavenger-1.4.4/src/Imakefile +@@ -1,20 +1,36 @@ + # set this to the path where data files should be stored. LIBDIR + # is automatically defined by imake, usually to /usr/X11R6/lib/X11, so + # this should be a good default. +-LIBNAME = $(LIBDIR)/scavenger ++LIBNAME = GENTOO_DATADIR/scavenger + + SRCS = anim.c edit.c scav.c x.c sound.c + OBJS = $(SRCS:.c=.o) + ++# the "subst" hack below is because imake uses the C preprocessor, which ++# will interpret an unquoted "/*" as a comment beginning. ++#LIB_DATA = $(subst S,/,..SdataS*) + LIB_DATA = \ +- ../data/badguy.lbm ../data/brownblue.lbm ../data/death.raw \ +- ../data/dig.raw ../data/fall.raw ../data/levels.scl \ +- ../data/microman.lbm ../data/pop.raw ../data/redbrick.lbm \ +- ../data/reddevil.lbm ../data/regularguy.lbm ../data/spiralthing.lbm \ ++ ../data/badguy.lbm \ ++ ../data/brownblue.lbm \ ++ ../data/death.raw \ ++ ../data/dig.raw \ ++ ../data/fall.raw \ ++ ../data/flashspiral.lbm \ ++ ../data/gems.lbm \ ++ ../data/jungle.lbm \ ++ ../data/levels.scl \ ++ ../data/microman.lbm \ ++ ../data/pop.raw \ ++ ../data/redbrick.lbm \ ++ ../data/reddevil.lbm \ ++ ../data/regularguy.lbm \ ++ ../data/spiralthing.lbm \ + ../data/victory.raw + + LOCAL_LIBRARIES = $(XLIB) + EXTRA_DEFINES = -DLIBNAME=\"$(LIBNAME)\" + +-ComplexProgramTarget(scavenger) ++AllTarget(scavenger) ++NormalProgramTarget(scavenger,$(OBJS),,,$(XLIB)) ++InstallProgram(scavenger,GENTOO_BINDIR) + InstallMultipleFlags($(LIB_DATA),$(LIBNAME),-m 644) +diff -urN xscavenger-1.4.4.orig/src/scav.c xscavenger-1.4.4/src/scav.c +--- xscavenger-1.4.4.orig/src/scav.c ++++ xscavenger-1.4.4/src/scav.c +@@ -240,15 +240,19 @@ + + + ++/* 14 Dec 2002: re-wrote to be more portable - don't assume two's-complement ++ * representation for integers, and fix bug when sizeof(long) > 4. ++ */ + long readlong() + { +-long val1=0; +- +- val1=myci()<<24L; +- val1|=myci()<<16L; +- val1|=myci()<<8; +- val1|=myci(); ++ long val1=0; ++ int i,j; + ++ for (i=0; i<4; i++) { ++ j = myci(); ++ if (j==-1) return -1L; ++ val1 = (val1<<8) + j; ++ } + return val1; + } + int rbs() +@@ -309,7 +313,7 @@ + bmw=bmh=byteswide=0; + while( (type=readlong()) ) + { +- if(type==0xffffffffL) break; ++ if(type==-1L) break; + size=readlong(); + if(size&1) size++; + if(type==BMHD) +@@ -402,16 +406,16 @@ + input=open(resourcename,O_RDONLY); + if(input<0) return -1; + got=read(input,buff,8); +- if(got!=8) return -2; +- if (strncmp(buff,"SCAV",4)) return -3; ++ if(got!=8) {close(input);return -2;} ++ if (strncmp(buff,"SCAV",4)) {close(input);return -3;} + max=(buff[4]<<24) | (buff[5]<<16) | (buff[6]<<8) | buff[7]; +- if(num>=max) return 0; ++ if(num>=max) {close(input);return 0;} + lseek(input,(num+1)<<3,SEEK_SET); + got=read(input,buff,8); + offset=(buff[0]<<24) | (buff[1]<<16) | (buff[2]<<8) | buff[3]; + length=(buff[4]<<24) | (buff[5]<<16) | (buff[6]<<8) | buff[7]; + if(len>length) len=length; +- if(!offset || !len) return 0; ++ if(!offset || !len) {close(input);return 0;} + lseek(input,offset,SEEK_SET); + got=read(input,put,len); + close(input); +@@ -448,8 +452,8 @@ + input=open(resourcename,O_RDONLY); + if(input==-1) return -4; + got=read(input,buff,8); +- if(got!=8) return -2; +- if(strncmp(buff,"SCAV",4)) return -3; ++ if(got!=8) {close(input);return -2;} ++ if(strncmp(buff,"SCAV",4)) {close(input);return -3;} + output=creat(bakname,00600); + if(output==-1) {close(input);return -6;} + +@@ -473,12 +477,12 @@ + for(i=0;i1024 ? 1024 : count; +- if (read(input,copybuff,got) != got) return -200; +- if (write(output,copybuff,got) != got) return -200; ++ if (read(input,copybuff,got) != got) {close(input);close(output);return -200;} ++ if (write(output,copybuff,got) != got) {close(input);close(output);return -200;} + count-=got; + } + lseek(input,length,SEEK_CUR); +@@ -498,17 +502,17 @@ + { + got=read(input, copybuff, 1024); + if (!got) break; +- if (write (output, copybuff, got) != got) return -200; ++ if (write (output, copybuff, got) != got) {close(input);close(output);return -200;} + offset += got; + } + if(len) + { +- if (write (output, take, len) != len) return -200; ++ if (write (output, take, len) != len) {close(input);close(output);return -200;} + lseek (output, (num+1) << 3, SEEK_SET); +- if (!rlout (output, offset)) return -200; ++ if (!rlout (output, offset)) {close(input);close(output);return -200;} + } + close (input); +- if (fsync(output)) return -200; ++ if (fsync(output)) {close(output);return -200;} + if (close(output)) return -200; + err=rename(bakname,resourcename); + if(err) return -1; +@@ -1382,6 +1386,7 @@ + break; + } + } ++ close(file); + } + + void remslash(char *str) +@@ -1416,6 +1421,8 @@ + return -3; + } + } while(len); ++ close(input); ++ close(output); + return 0; + } + +@@ -1448,7 +1455,7 @@ + printf("Failed to create directory %s, exiting\n",temp); + exit(1); + } +- } ++ } else close(file); + + sprintf(resourcename,"%s/%s/%s",localname,localdirname,LEVELSNAME); + file=open(resourcename,O_RDONLY); +@@ -1485,7 +1492,7 @@ + printf("Couldn't create %s\n",temp); + exit(1); + } +- } ++ } else close(file); + } + + void makercname(char *str) diff --git a/games-arcade/xscavenger/metadata.xml b/games-arcade/xscavenger/metadata.xml new file mode 100644 index 000000000000..78274e0fa550 --- /dev/null +++ b/games-arcade/xscavenger/metadata.xml @@ -0,0 +1,8 @@ + + + + + games@gentoo.org + Gentoo Games Project + + diff --git a/games-arcade/xscavenger/xscavenger-1.4.4.ebuild b/games-arcade/xscavenger/xscavenger-1.4.4.ebuild new file mode 100644 index 000000000000..b74e97733192 --- /dev/null +++ b/games-arcade/xscavenger/xscavenger-1.4.4.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs games + +DESCRIPTION="Lode-Runner-like arcade game" +HOMEPAGE="http://www.xdr.com/dash/scavenger.html" +SRC_URI="http://www.xdr.com/dash/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="x11-libs/libXext" +DEPEND="${RDEPEND} + x11-misc/imake" + +S=${WORKDIR}/${P}/src + +src_prepare() { + epatch "${FILESDIR}/${PV}-gentoo.patch" + sed -i \ + -e "s:GENTOO_DATADIR:${GAMES_DATADIR}:" \ + -e "s:GENTOO_BINDIR:${GAMES_BINDIR}:" \ + Imakefile \ + || die +} + +src_configure() { + xmkmf || die +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CDEBUGFLAGS="${CFLAGS}" \ + EXTRA_LDOPTIONS="${LDFLAGS}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc ../{CREDITS,DOC,README,TODO,changelog} + prepgamesdirs +} -- cgit v1.2.3