aboutsummaryrefslogtreecommitdiff
path: root/japanese/zangband/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'japanese/zangband/Makefile')
-rw-r--r--japanese/zangband/Makefile78
1 files changed, 66 insertions, 12 deletions
diff --git a/japanese/zangband/Makefile b/japanese/zangband/Makefile
index 5b89a3312038..2cad2818b0d9 100644
--- a/japanese/zangband/Makefile
+++ b/japanese/zangband/Makefile
@@ -5,21 +5,75 @@
# $FreeBSD$
#
-CATEGORIES= japanese
+PORTNAME= zangband
+PORTVERSION= 2.4.0${JA_VERSION}
+CATEGORIES= japanese games
+MASTER_SITES= ftp://clockwork.dementia.org/angband/Variant/ZAngband/ \
+ ftp://ftp.sunet.se/pub/games/Angband/Variant/ZAngband/ \
+ http://www.geocities.co.jp/SiliconValley-SanJose/9606/zg/
+DISTFILES= ${PORTNAME}-${E_VERSION:S/.//g}-src.zip \
+ ${JA_DISTFILE}
+DIST_SUBDIR= ${PORTNAME}
+EXTRACT_ONLY= ${PORTNAME}-${E_VERSION:S/.//g}-src.zip
MAINTAINER= makoto@pinpott.spnet.ne.jp
-MASTERDIR= ${.CURDIR}/../../games/zangband
+USE_ZIP= yes
+EXTRACT_BEFORE_ARGS= -qa
+USE_XLIB= yes
-PKGDIR= ${MASTERDIR}
-COMMENT= ${.CURDIR}/pkg-comment
-DESCR= ${.CURDIR}/pkg-descr
+NO_CDROM= Possible copyright infringement
-JAPANESE= yes
-JA_MASTER_SITE= http://www.geocities.co.jp/SiliconValley-SanJose/9606/zg/
-ANGBANDLIB?= lib/jzangband
-ANGBANDBIN?= bin/jzangband
-JA_PLIST= pkg-plist.ja
-MAKE_ARGS+= JAPANESE_CFLAGS="-DJP -DEUC"
+WRKSRC= ${WRKDIR}/ZAngband
+PKGMESSAGE= ${WRKDIR}/MESSAGE
+PLIST_SUB+= ANGBANDBIN=${ANGBANDBIN} ANGBANDLIB=${ANGBANDLIB}
-.include "${MASTERDIR}/Makefile"
+SHAREOWN= games
+SHAREGRP= games
+BINOWN= ${SHAREOWN}
+BINGRP= ${SHAREOWN}
+BINMODE= 2755
+
+MAKE_ARGS+= ANGBANDLIB=${PREFIX}/${ANGBANDLIB} \
+ JAPANESE_CFLAGS="-DJP -DEUC"
+ANGBANDLIB?= lib/j${PORTNAME}
+ANGBANDBIN?= bin/j${PORTNAME}
+
+E_VERSION= ${PORTVERSION:S/${JA_VERSION}//}
+
+PATCH_VERSION?= 010621
+JA_VERSION= .j${PATCH_VERSION}
+JA_DISTFILE= zj${E_VERSION:S/.//g}ux-${PATCH_VERSION}.tgz
+
+pre-patch:
+ (cd ${WRKSRC} ; ${TAR} zxf ${DISTDIR}/${DIST_SUBDIR}/zj${E_VERSION:S/.//g}ux-${PATCH_VERSION}.tgz)
+ (cd ${WRKSRC}/src ; ${PATCH} -p1 -l -s < ../zj${E_VERSION:S/.//g}.patch ; ${PATCH} -p1 -l -s < ${FILESDIR}/makefile-adjust.patch)
+
+pre-build:
+ ${CP} ${FILESDIR}/Makefile.in ${WRKSRC}/Makefile
+ ${CP} ${WRKSRC}/src/makefile.std ${WRKSRC}/src/Makefile
+ @${SED} -e "s|%%PREFIX%%|${PREFIX}|g;s|%%ANGBANDBIN%%|${ANGBANDBIN}|g;s|%%ANGBANDLIB%%|${ANGBANDLIB}|g" ${FILESDIR}/MESSAGE.in > ${PKGMESSAGE}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/testing ${PREFIX}/${ANGBANDBIN}
+ ${MKDIR} ${PREFIX}/${ANGBANDLIB}
+ ${CP} -rp ${WRKSRC}/lib/* ${PREFIX}/${ANGBANDLIB}
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${WRKSRC}/lib
+.if defined(USE_Z_SCORES)
+ test -f ${PREFIX}/${ANGBANDLIB}/apex/scores.raw || \
+ ${CP} ${PREFIX}/${ANGBANDLIB}/apex/z_scores.raw \
+ ${ANGBANDLIB}/apex/scores.raw
+.else
+ test -f ${PREFIX}/${ANGBANDLIB}/apex/scores.raw || \
+ ${TOUCH} ${PREFIX}/${ANGBANDLIB}/apex/scores.raw
+.endif
+ (cd ${PREFIX}/${ANGBANDLIB} && \
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} apex data ; \
+ ${CHMOD} 755 . ; \
+ ${CHMOD} -R ug+rw,o-rw * ; \
+ ${CHMOD} -R o+r help xtra ; \
+ ${CHMOD} 1777 save user \
+ )
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>