From owner-svn-ports-head@FreeBSD.ORG Fri Dec 20 17:03:45 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BA8528C; Fri, 20 Dec 2013 17:03:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2728215F9; Fri, 20 Dec 2013 17:03:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBKH3jxZ046915; Fri, 20 Dec 2013 17:03:45 GMT (envelope-from pawel@svn.freebsd.org) Received: (from pawel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBKH3iv7046911; Fri, 20 Dec 2013 17:03:44 GMT (envelope-from pawel@svn.freebsd.org) Message-Id: <201312201703.rBKH3iv7046911@svn.freebsd.org> From: Pawel Pekala Date: Fri, 20 Dec 2013 17:03:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r337040 - in head/games/xdigger: . 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-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2013 17:03:45 -0000 Author: pawel Date: Fri Dec 20 17:03:44 2013 New Revision: 337040 URL: http://svnweb.freebsd.org/changeset/ports/337040 Log: - Fix build with clang - Add desktop entry file - Support staging PR: ports/184867 Submitted by: KATO Tsuguru Added: head/games/xdigger/files/patch-runleves.c (contents, props changed) Modified: head/games/xdigger/Makefile (contents, props changed) head/games/xdigger/files/patch-ad (contents, props changed) head/games/xdigger/pkg-plist (contents, props changed) Modified: head/games/xdigger/Makefile ============================================================================== --- head/games/xdigger/Makefile Fri Dec 20 16:43:48 2013 (r337039) +++ head/games/xdigger/Makefile Fri Dec 20 17:03:44 2013 (r337040) @@ -3,10 +3,9 @@ PORTNAME= xdigger PORTVERSION= 1.0.10 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games -MASTER_SITES= ${MASTER_SITE_SUNSITE} -MASTER_SITE_SUBDIR= games/arcade +MASTER_SITES= SUNSITE/games/arcade EXTRACT_SUFX= .tgz MAINTAINER= ports@FreeBSD.org @@ -14,23 +13,16 @@ COMMENT= Boulderdash-like KC85 Digger fo USES= imake USE_XORG= x11 xext -MAN6= xdigger.6 -NO_STAGE= yes -.include +DESKTOP_ENTRIES="XDigger" "" "" "${PORTNAME}" "" "" post-patch: @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/configure.h post-install: - @${CHMOD} 2755 ${PREFIX}/bin/xdigger - @${CHOWN} root:games ${PREFIX}/bin/xdigger - @${CHMOD} 664 ${PREFIX}/share/xdigger/xdigger.hiscore - @${CHOWN} root:games ${PREFIX}/share/xdigger/xdigger.hiscore -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} -.endif + @${MKDIR} ${STAGEDIR}${DOCSDIR} +.for i in ChangeLog README + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) +.endfor .include Modified: head/games/xdigger/files/patch-ad ============================================================================== --- head/games/xdigger/files/patch-ad Fri Dec 20 16:43:48 2013 (r337039) +++ head/games/xdigger/files/patch-ad Fri Dec 20 17:03:44 2013 (r337040) @@ -16,7 +16,7 @@ #ifdef SOUND_RPLAY RPLAYLIB = -lrplay -@@ -23,12 +23,10 @@ +@@ -23,15 +23,13 @@ ComplexProgramTarget(xdigger) InstallNonExecFile(xdigger.level,XDIGGER_LIB_DIR) @@ -30,3 +30,9 @@ /* InstallNonExecFileNoClobber(xdigger.hiscore,XDIGGER_HISCORE_DIR) */ install:: +- $(MKDIRHIER) XDIGGER_HISCORE_DIR +- touch XDIGGER_HISCORE_DIR/xdigger.hiscore +- chmod a+w XDIGGER_HISCORE_DIR/xdigger.hiscore ++ $(MKDIRHIER) $(DESTDIR)XDIGGER_HISCORE_DIR ++ touch $(DESTDIR)XDIGGER_HISCORE_DIR/xdigger.hiscore ++ chmod a+w $(DESTDIR)XDIGGER_HISCORE_DIR/xdigger.hiscore Added: head/games/xdigger/files/patch-runleves.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xdigger/files/patch-runleves.c Fri Dec 20 17:03:44 2013 (r337040) @@ -0,0 +1,201 @@ +--- runlevels.c.orig ++++ runlevels.c +@@ -672,6 +672,20 @@ + } + } /* DiggerHalfStep() */ + ++typedef struct ++{ ++ unsigned char x, y, id, type; ++} TMerk; ++ ++void Merke(unsigned char type, int x, int y, int *merkidx, TMerk *merk) ++{ ++ merk[*merkidx].x = x; ++ merk[*merkidx].y = y; ++ merk[*merkidx].id = field[x][y].id & 7; ++ merk[*merkidx].type = type; ++ *merkidx++; ++} ++ + void StoneDiamondStep() + { + +@@ -680,24 +694,10 @@ + #define SF_LEFTDOWN 2 + #define SF_CHANGER 3 + +- typedef struct +- { +- unsigned char x, y, id, type; +- } TMerk; +- + TMerk merk[140], ghosts_todie[17]; + int i, x, y, dx, dy, merkidx, ghosts_todie_idx; + Bool digger_todie = False; +- +- void Merke(unsigned char type) +- { +- merk[merkidx].x = x; +- merk[merkidx].y = y; +- merk[merkidx].id = field[x][y].id & 7; +- merk[merkidx].type = type; +- merkidx++; +- } +- ++ + /* Schritt 1 (nur markieren) : */ + merkidx = 0; ghosts_todie_idx = 0; + +@@ -708,19 +708,19 @@ + (field[x][y].id == ID_IVDIAMOND)) + { + if (field[x][y+1].id == ID_NOTHING) +- Merke(SF_DOWN); ++ Merke(SF_DOWN, x, y, &merkidx, merk); + else + if ((field[x][y+1].id == ID_STONE) || + (field[x][y+1].id == ID_DIAMOND)) + { + if ((field[x-1][y].id == ID_NOTHING) && + (field[x-1][y+1].id == ID_NOTHING)) +- Merke(SF_LEFTDOWN); ++ Merke(SF_LEFTDOWN, x, y, &merkidx, merk); + else + if ((field[x+1][y].id == ID_NOTHING) && + (field[x+1][y+1].id == ID_NOTHING)) + { +- Merke(SF_RIGHTDOWN); ++ Merke(SF_RIGHTDOWN, x, y, &merkidx, &merk); + field[x+1][y+1].id = ID_FSTODMD; + } + } +@@ -729,7 +729,7 @@ + (field[x][y].id == ID_IVSTONE)) && + (field[x][y+1].id == ID_CHANGER) && + (field[x][y+2].id == ID_NOTHING)) +- Merke(SF_CHANGER); ++ Merke(SF_CHANGER, x, y, &merkidx, &merk); + } + merk[merkidx].x = 0; + merk[merkidx].y = 0; +@@ -1573,6 +1573,50 @@ + + /*---------------------------------------------------------------------------*/ + ++void Save_Ghost(int flags, int *id, int *d, unsigned char *file_daten) ++{ ++ switch (flags & F_GHOST_TYPEMASK) ++ { ++ case F_GHOST_TYPE180: ++ *id = 3; ++ break; ++ case F_GHOST_TYPEL: ++ *id = 7; ++ break; ++ case F_GHOST_TYPER: ++ *id = 15; ++ break; ++ case F_GHOST_TYPELR: ++ *id = 11; ++ break; ++ } ++ switch (flags & F_GHOST_MOVEMASK) ++ { ++ case F_GHOST_DOWN: ++ *d = 0; ++ break; ++ case F_GHOST_UP: ++ *d = 1; ++ break; ++ case F_GHOST_RIGHT: ++ *d = 2; ++ break; ++ case F_GHOST_LEFT: ++ *d = 3; ++ break; ++ } ++ if (number_ghosts < MAX_GHOSTS) ++ { ++ if (number_ghosts & 1) ++ file_daten[0x94 + number_ghosts/2] = ++ (file_daten[0x94 + number_ghosts/2] & 0xf0) | (*d); ++ else ++ file_daten[0x94 + number_ghosts/2] = ++ (file_daten[0x94 + number_ghosts/2] & 0x0f) | (*d << 4); ++ number_ghosts++; ++ } ++} ++ + void Edit_SaveLevel(int level_number) + { + /* char filename[256]; */ +@@ -1580,50 +1624,6 @@ + int x, y, id, flags, i, d; + FILE *filehandle; + +- void Save_Ghost() +- { +- switch (flags & F_GHOST_TYPEMASK) +- { +- case F_GHOST_TYPE180: +- id = 3; +- break; +- case F_GHOST_TYPEL: +- id = 7; +- break; +- case F_GHOST_TYPER: +- id = 15; +- break; +- case F_GHOST_TYPELR: +- id = 11; +- break; +- } +- switch (flags & F_GHOST_MOVEMASK) +- { +- case F_GHOST_DOWN: +- d = 0; +- break; +- case F_GHOST_UP: +- d = 1; +- break; +- case F_GHOST_RIGHT: +- d = 2; +- break; +- case F_GHOST_LEFT: +- d = 3; +- break; +- } +- if (number_ghosts < MAX_GHOSTS) +- { +- if (number_ghosts & 1) +- file_daten[0x94 + number_ghosts/2] = +- (file_daten[0x94 + number_ghosts/2] & 0xf0) | (d); +- else +- file_daten[0x94 + number_ghosts/2] = +- (file_daten[0x94 + number_ghosts/2] & 0x0f) | (d << 4); +- number_ghosts++; +- } +- } +- + bzero(file_daten, sizeof(file_daten)); + number_ghosts = 0; + c = file_daten; +@@ -1637,7 +1637,7 @@ + diggerposy = y; + } + if (id == ID_GHOST) +- Save_Ghost(); ++ Save_Ghost(flags, &id, &d, file_daten); + *c = (*c & 0x0f) | (id << 4); + + /* ------------------------------------------------------------------ */ +@@ -1650,7 +1650,7 @@ + diggerposy = y; + } + if (id == ID_GHOST) +- Save_Ghost(); ++ Save_Ghost(flags, &id, &d, file_daten); + *c = (*c & 0xf0) | id; + } + c += 3; Modified: head/games/xdigger/pkg-plist ============================================================================== --- head/games/xdigger/pkg-plist Fri Dec 20 16:43:48 2013 (r337039) +++ head/games/xdigger/pkg-plist Fri Dec 20 17:03:44 2013 (r337040) @@ -1,10 +1,19 @@ +@mode 2755 +@group games bin/xdigger -%%PORTDOCS%%share/doc/xdigger/ChangeLog -%%PORTDOCS%%share/doc/xdigger/README -share/xdigger/diamond.au -share/xdigger/step.au -share/xdigger/stone.au -share/xdigger/xdigger.hiscore -share/xdigger/xdigger.level -%%PORTDOCS%%@dirrm share/doc/xdigger -@dirrm share/xdigger +@group +@mode +man/man6/xdigger.6.gz +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/README +%%DATADIR%%/diamond.au +%%DATADIR%%/step.au +%%DATADIR%%/stone.au +@mode 644 +@group games +%%DATADIR%%/xdigger.hiscore +@group +@mode +%%DATADIR%%/xdigger.level +@dirrm %%DATADIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%%