Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2005 15:22:53 -0300
From:      "Alejandro Pulver" <alejandro@varnet.biz>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/84921: [UPDATE] games/fargoal: update port and allegro dependency
Message-ID:  <1124043773.0@phobos.mars.bsd>
Resent-Message-ID: <200508141830.j7EIUIsK080837@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84921
>Category:       ports
>Synopsis:       [UPDATE] games/fargoal: update port and allegro dependency
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 14 18:30:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Alejandro Pulver
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:





>Description:


* Update to version 20040629.
* Take maintainership.
* Update allegro dependency.
* Remove USE_X_PREFIX.
* Remove patch "files/patch-game.c"
* Install binary in libexec and wrapper script in bin, both with the name "fargoal"
* Use %%DATADIR%% in pkg-plist.


>How-To-Repeat:





>Fix:


--- fargoal.diff begins here ---
Binary files /usr/ports/games/fargoal/.Makefile.swp and fargoal/.Makefile.swp differ
diff -urN /usr/ports/games/fargoal/Makefile fargoal/Makefile
--- /usr/ports/games/fargoal/Makefile	Sun Jan  9 01:34:15 2005
+++ fargoal/Makefile	Thu Aug 11 16:10:56 2005
@@ -6,43 +6,43 @@
 #
 
 PORTNAME=	fargoal
-PORTVERSION=	20030731b
-PORTREVISION=	1
+PORTVERSION=	20040629
 CATEGORIES=	games
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	squidfighter
 DISTNAME=	${PORTNAME}${PORTVERSION}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	alejandro@varnet.biz
 COMMENT=	Remake of classic roguelike game "Sword of Fargoal"
 
-LIB_DEPENDS=	alleg.41:${PORTSDIR}/devel/allegro
+LIB_DEPENDS=	alleg.42:${PORTSDIR}/devel/allegro
+
+WRKSRC=		${WRKDIR}/${PORTNAME}/src
 
-WRKSRC=		${WRKDIR}/fargoal/src
-USE_X_PREFIX=	yes
 USE_ZIP=	yes
 USE_GMAKE=	yes
 
+SUB_FILES=	${PORTNAME}-sh
+
 do-install:
-	${MKDIR} ${PREFIX}/share/fargoal
-	${MKDIR} ${PREFIX}/share/fargoal/data
-	@${INSTALL_DATA} ${WRKSRC}/../data/sof.cfg ${PREFIX}/share/fargoal/data/sof.cfg
-	${MKDIR} ${PREFIX}/share/fargoal/gfx
-.for i in black.bmp chars.bmp chars_ep.bmp dmz_chars.bmp dmz_layout.bmp \
-		dmz_tiles.bmp layout.bmp layout_ep.bmp originalchars.bmp \
-		originalset.bmp sword.dat tiles.bmp tiles_ep.bmp
-	@${INSTALL_DATA} ${WRKSRC}/../gfx/${i} ${PREFIX}/share/fargoal/gfx/${i}
-.endfor
-	${MKDIR} ${PREFIX}/share/fargoal/sfx
-.for i in attack beacon boom chop clang claw climb clink crash crunch \
-		ding down fight gnarl gold intro item levelup move pit potion \
-		sacrifice shred shriek slain slash spell step teleport thump \
-		ugh up victory
-	@${INSTALL_DATA} ${WRKSRC}/../sfx/${i}.wav ${PREFIX}/share/fargoal/sfx/${i}.wav
+# Script
+	@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-sh ${PREFIX}/bin/${PORTNAME}
+
+# Program
+	@${INSTALL_PROGRAM} ${WRKSRC}/../sword ${PREFIX}/libexec/${PORTNAME}
+
+# Data
+.for f in agreement.txt data gfx sfx
+	@${MKDIR} ${DATADIR}
+	@${CP} -R ${WRKSRC}/../${f} ${DATADIR}
 .endfor
-	@${INSTALL_PROGRAM} ${WRKSRC}/../sword ${PREFIX}/bin/sword
-	@${SED} s^%%FARGOAL_ROOT%%^${PREFIX}/share/fargoal^g \
-		< ${FILESDIR}/fargoal > ${WRKDIR}/fargoal/fargoal
-	@${INSTALL_SCRIPT} ${WRKDIR}/fargoal/fargoal ${PREFIX}/bin/fargoal
+
+post-install:
+# Fix permissions
+	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
+	@${FIND} ${DATADIR} -type f -print0 | \
+		${XARGS} -0 ${CHMOD} ${SHAREMODE}
+	@${FIND} ${DATADIR} -type d -print0 | \
+		${XARGS} -0 ${CHMOD} ${BINMODE}
 
 .include <bsd.port.mk>
diff -urN /usr/ports/games/fargoal/distinfo fargoal/distinfo
--- /usr/ports/games/fargoal/distinfo	Wed Mar 31 00:07:52 2004
+++ fargoal/distinfo	Wed Aug 10 19:42:53 2005
@@ -1,2 +1,2 @@
-MD5 (fargoal20030731b.zip) = 9b24008b30b2c4b075998bd082de9459
-SIZE (fargoal20030731b.zip) = 764328
+MD5 (fargoal20040629.zip) = a72efd5f9b83d7932497721d08306ce6
+SIZE (fargoal20040629.zip) = 792975
diff -urN /usr/ports/games/fargoal/files/fargoal fargoal/files/fargoal
--- /usr/ports/games/fargoal/files/fargoal	Mon Dec 15 06:01:23 2003
+++ fargoal/files/fargoal	Wed Dec 31 21:00:00 1969
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-if [ -d ~/.fargoal ]; then
-  cd ~/.fargoal
-  sword
-else
-  mkdir ~/.fargoal
-  cd ~/.fargoal
-  mkdir data
-  cp -r %%FARGOAL_ROOT%%/data/* data/
-  ln -s %%FARGOAL_ROOT%%/gfx gfx
-  ln -s %%FARGOAL_ROOT%%/sfx sfx
-  sword
-fi
diff -urN /usr/ports/games/fargoal/files/fargoal-sh.in fargoal/files/fargoal-sh.in
--- /usr/ports/games/fargoal/files/fargoal-sh.in	Wed Dec 31 21:00:00 1969
+++ fargoal/files/fargoal-sh.in	Thu Aug 11 15:28:57 2005
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# The executable needs to be run from its data directory, and needs to store
+# configuration in it. We therefore mirror the data directory hierarchy in
+# ~/.fargoal, and create symlinks to the data files.
+
+cd %%DATADIR%% || exit 1
+
+find * -type d -exec mkdir -p ~/.fargoal/{} \; || exit 1
+
+test -f ~/.fargoal/data/sof.cfg || cp data/sof.cfg ~/.fargoal/data && \
+chmod u+w ~/.fargoal/data/sof.cfg
+
+find * -type f -exec ln -s %%DATADIR%%/{} ~/.fargoal/{} \; 2>/dev/null || \
+exit 1
+
+cd ~/.fargoal || exit 1
+
+exec %%PREFIX%%/libexec/fargoal
diff -urN /usr/ports/games/fargoal/files/patch-Makefile fargoal/files/patch-Makefile
--- /usr/ports/games/fargoal/files/patch-Makefile	Mon Dec 15 06:01:23 2003
+++ fargoal/files/patch-Makefile	Thu Aug 11 15:12:29 2005
@@ -1,16 +1,15 @@
---- Makefile.orig	Thu Jul 31 10:06:51 2003
-+++ Makefile	Sat Dec 13 15:44:52 2003
-@@ -1,8 +1,10 @@
+--- Makefile.orig	Tue Jun 29 16:45:02 2004
++++ Makefile	Thu Aug 11 15:12:26 2005
+@@ -1,4 +1,4 @@
 -CC=gcc
-+CC ?= gcc
 +all: ../sword
-+
- ../sword: char.o config.o credits.o game.o gfx.o main.o map.o menu.o message.o monster.o player.o save.o scroller.o spell.o  
+ ../sword: char.o config.o credits.o game.o gfx.o main.o map.o menu.o message.o monster.o player.o save.o scroller.o spell.o 
  	$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
  include makefile.dep
--CFLAGS = -W -Wall -O3
--CXXFLAGS = -W -Wall -O3
-+CFLAGS += -W -Wall `allegro-config --cflags` -DALLEGRO_LINUX
-+CXXFLAGS += -W -Wall `allegro-config --cflags` -DALLEGRO_LINUX
- LDFLAGS = -s
- LDLIBS =  `allegro-config --libs`
+@@ -10,5 +10,5 @@
+ CFLAGS += -DMINGW 
+ else
+ LDLIBS :=  `allegro-config --libs`
+-CFLAGS += `allegro-config --cflags` -DLINUX 
++CFLAGS += `allegro-config --cflags` -DLINUX -DALLEGRO_LINUX
+ endif
diff -urN /usr/ports/games/fargoal/files/patch-game.c fargoal/files/patch-game.c
--- /usr/ports/games/fargoal/files/patch-game.c	Mon Dec 15 06:01:23 2003
+++ fargoal/files/patch-game.c	Wed Dec 31 21:00:00 1969
@@ -1,11 +0,0 @@
---- game.c	Thu Jul 31 10:06:51 2003
-+++ game.c	Mon Nov 17 09:50:58 2003
-@@ -363,7 +363,7 @@
- 	try_load_sample (boom, "sfx/boom.wav");
- 	try_load_sample (crash, "sfx/crash.wav");
- 	try_load_sample (gold, "sfx/gold.wav");
--	try_load_sample (pit, "sfx/pit.wav");
-+	try_load_sample (pit, "sfx/crash.wav");  /* pit.wav is corrupt? */
- 	try_load_sample (spell, "sfx/spell.wav");
- 	try_load_sample (step, "sfx/step.wav");
- 	try_load_sample (attack, "sfx/attack.wav");
diff -urN /usr/ports/games/fargoal/pkg-descr fargoal/pkg-descr
--- /usr/ports/games/fargoal/pkg-descr	Mon Dec 15 06:01:23 2003
+++ fargoal/pkg-descr	Thu Aug 11 15:19:20 2005
@@ -2,10 +2,6 @@
 Fargoal", created by Jeff McCord for the Commodore 64 in 1983.
 This remake was written for the 2003 remakes.org competition.
 
-Note: this port installs both the Sword of Fargoal executable,
-'sword', and a wrapper script, 'fargoal', which allows each
-user to keep their own savefiles in their ~/.fargoal directory.
-
 WWW: http://squidfighter.sourceforge.net/fargoal/
 
 -Chris
diff -urN /usr/ports/games/fargoal/pkg-plist fargoal/pkg-plist
--- /usr/ports/games/fargoal/pkg-plist	Mon Dec 15 06:01:23 2003
+++ fargoal/pkg-plist	Thu Aug 11 16:11:55 2005
@@ -1,53 +1,54 @@
 bin/fargoal
-bin/sword
-share/fargoal/data/sof.cfg
-share/fargoal/gfx/black.bmp
-share/fargoal/gfx/chars.bmp
-share/fargoal/gfx/chars_ep.bmp
-share/fargoal/gfx/dmz_chars.bmp
-share/fargoal/gfx/dmz_layout.bmp
-share/fargoal/gfx/dmz_tiles.bmp
-share/fargoal/gfx/layout.bmp
-share/fargoal/gfx/layout_ep.bmp
-share/fargoal/gfx/originalchars.bmp
-share/fargoal/gfx/originalset.bmp
-share/fargoal/gfx/sword.dat
-share/fargoal/gfx/tiles.bmp
-share/fargoal/gfx/tiles_ep.bmp
-share/fargoal/sfx/attack.wav
-share/fargoal/sfx/beacon.wav
-share/fargoal/sfx/boom.wav
-share/fargoal/sfx/chop.wav
-share/fargoal/sfx/clang.wav
-share/fargoal/sfx/claw.wav
-share/fargoal/sfx/climb.wav
-share/fargoal/sfx/clink.wav
-share/fargoal/sfx/crash.wav
-share/fargoal/sfx/crunch.wav
-share/fargoal/sfx/ding.wav
-share/fargoal/sfx/down.wav
-share/fargoal/sfx/fight.wav
-share/fargoal/sfx/gnarl.wav
-share/fargoal/sfx/gold.wav
-share/fargoal/sfx/intro.wav
-share/fargoal/sfx/item.wav
-share/fargoal/sfx/levelup.wav
-share/fargoal/sfx/move.wav
-share/fargoal/sfx/pit.wav
-share/fargoal/sfx/potion.wav
-share/fargoal/sfx/sacrifice.wav
-share/fargoal/sfx/shred.wav
-share/fargoal/sfx/shriek.wav
-share/fargoal/sfx/slain.wav
-share/fargoal/sfx/slash.wav
-share/fargoal/sfx/spell.wav
-share/fargoal/sfx/step.wav
-share/fargoal/sfx/teleport.wav
-share/fargoal/sfx/thump.wav
-share/fargoal/sfx/ugh.wav
-share/fargoal/sfx/up.wav
-share/fargoal/sfx/victory.wav
-@dirrm share/fargoal/data
-@dirrm share/fargoal/gfx
-@dirrm share/fargoal/sfx
-@dirrm share/fargoal
+libexec/fargoal
+%%DATADIR%%/agreement.txt
+%%DATADIR%%/data/sof.cfg
+%%DATADIR%%/gfx/black.bmp
+%%DATADIR%%/gfx/chars.bmp
+%%DATADIR%%/gfx/chars_ep.bmp
+%%DATADIR%%/gfx/dmz_chars.bmp
+%%DATADIR%%/gfx/dmz_layout.bmp
+%%DATADIR%%/gfx/dmz_tiles.bmp
+%%DATADIR%%/gfx/layout.bmp
+%%DATADIR%%/gfx/layout_ep.bmp
+%%DATADIR%%/gfx/originalchars.bmp
+%%DATADIR%%/gfx/originalset.bmp
+%%DATADIR%%/gfx/sword.dat
+%%DATADIR%%/gfx/tiles.bmp
+%%DATADIR%%/gfx/tiles_ep.bmp
+%%DATADIR%%/sfx/attack.wav
+%%DATADIR%%/sfx/beacon.wav
+%%DATADIR%%/sfx/boom.wav
+%%DATADIR%%/sfx/chop.wav
+%%DATADIR%%/sfx/clang.wav
+%%DATADIR%%/sfx/claw.wav
+%%DATADIR%%/sfx/climb.wav
+%%DATADIR%%/sfx/clink.wav
+%%DATADIR%%/sfx/crash.wav
+%%DATADIR%%/sfx/crunch.wav
+%%DATADIR%%/sfx/ding.wav
+%%DATADIR%%/sfx/down.wav
+%%DATADIR%%/sfx/fight.wav
+%%DATADIR%%/sfx/gnarl.wav
+%%DATADIR%%/sfx/gold.wav
+%%DATADIR%%/sfx/intro.wav
+%%DATADIR%%/sfx/item.wav
+%%DATADIR%%/sfx/levelup.wav
+%%DATADIR%%/sfx/move.wav
+%%DATADIR%%/sfx/pit.wav
+%%DATADIR%%/sfx/potion.wav
+%%DATADIR%%/sfx/sacrifice.wav
+%%DATADIR%%/sfx/shred.wav
+%%DATADIR%%/sfx/shriek.wav
+%%DATADIR%%/sfx/slain.wav
+%%DATADIR%%/sfx/slash.wav
+%%DATADIR%%/sfx/spell.wav
+%%DATADIR%%/sfx/step.wav
+%%DATADIR%%/sfx/teleport.wav
+%%DATADIR%%/sfx/thump.wav
+%%DATADIR%%/sfx/ugh.wav
+%%DATADIR%%/sfx/up.wav
+%%DATADIR%%/sfx/victory.wav
+@dirrm %%DATADIR%%/sfx
+@dirrm %%DATADIR%%/gfx
+@dirrm %%DATADIR%%/data
+@dirrm %%DATADIR%%
--- fargoal.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



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