Download raw body.
UPDATE: games/angband to 4.2.5
Hi,
This updates angband to the latest.
I started this at p2k24, but it was more effort than expected. Please check
carefully for mistakes.
Notes:
- Use sdl2 instead of sdl1.
- Sound not working out of the box. Didn't try to fix it really. Not sure if
sound really adds much to a game like angband.
- Found a bug which upstream quickly patched. Local patch included.
- Sound not enabled by default any more, only if you enable SDL is it turned
on. I forced it off for the sdl FLAVOR.
- Only run tags for FLAVORs that would install icons and desktop files.
- Was surprised `PKG_ARGS += -Dno_x11=1` wasn't required to deselect
`PFRAG.no-no_x11` when necessary. Curious... I did check the contents of the
packages, that they include/exclude the right files for the right FLAVORs.
- Is the `BASELOCALSTATEDIR` stuff right?
- All FLAVORs build tested with dpb to look for missing deps. None
forthcoming.
Cheers
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/angband/Makefile,v
diff -u -p -r1.39 Makefile
--- Makefile 19 Apr 2024 13:07:46 -0000 1.39
+++ Makefile 28 Apr 2024 21:27:59 -0000
@@ -3,10 +3,9 @@
COMMENT= rogue-like game with X11 support
COMMENT-no_x11= rogue-like game
-V = 4.1.3
-REVISION = 1
-V_DLDIR = ${V:C/\.[0-9]$//}
-DISTNAME= angband-${V}
+V = 4.2.5
+DISTNAME = Angband-${V}
+PKGNAME = ${DISTNAME:L}
CATEGORIES= games
HOMEPAGE= http://rephial.org
@@ -18,9 +17,9 @@ MAINTAINER = Edd Barrett <edd@openbsd.o
# See ${WRKSRC}/copying.txt for a list.
PERMIT_PACKAGE= Yes
-WANTLIB= c m curses
+WANTLIB = c curses
-SITES = ${HOMEPAGE}/downloads/${V_DLDIR}/
+SITES = https://github.com/angband/angband/releases/download/${V}/
CONFIGURE_STYLE= autoreconf
AUTOCONF_VERSION = 2.69
@@ -28,7 +27,7 @@ AUTOMAKE_VERSION = 1.15
CONFIGURE_ENV += "LDFLAGS=-L${LOCALBASE}/lib"
CONFIGURE_ARGS += --with-setgid=games \
- --with-varpath=/var/games/angband \
+ --localstatedir=${BASELOCALSTATEDIR} \
--bindir=${PREFIX}/bin
USE_GMAKE = Yes
@@ -36,48 +35,50 @@ USE_GMAKE = Yes
FLAVORS= no_x11 sdl
FLAVOR?=
-RUN_DEPENDS = devel/desktop-file-utils
BUILD_DEPENDS = textproc/py-docutils,python3
.if ${FLAVOR:Mno_x11}
CONFIGURE_ARGS+= --without-x
.else
CONFIGURE_ARGS+= --with-x
+# We only install desktop files and icons for non-no_x11 FLAVORs.
+RUN_DEPENDS = devel/desktop-file-utils \
+ x11/gtk+4,-guic
WANTLIB+= ICE SM X11
.endif
.if ${FLAVOR:Msdl} # funky graphical mode and sounds
# Sound is currently broken:
-# http://trac.rephial.org/ticket/1977
-CONFIGURE_ARGS += --enable-sdl \
- --disable-sdl-mixer \
- --with-sdl-prefix=/usr/local
+# https://github.com/angband/angband/issues/5952
+#
+# It may not be hard to fix. I haven't tried.
+CONFIGURE_ARGS += --enable-sdl2 \
+ --disable-sdl2-mixer \
+ --with-sdl2-prefix=/usr/local
PKG_ARGS += -Dsdl=1
-LIB_DEPENDS += devel/sdl-image \
- devel/sdl-ttf
-WANTLIB += SDL SDL_image SDL_ttf pthread
+LIB_DEPENDS += devel/sdl2-image \
+ devel/sdl2-ttf
+WANTLIB += SDL2 SDL2_image SDL2_ttf
.else
-CONFIGURE_ARGS += --disable-sdl-mixer # defaults to ON
PKG_ARGS += -Dsdl=0
.endif
NO_TEST = Yes
-pre-configure:
- @perl -pi -e "s,/usr/share,${TRUEPREFIX}/share," \
- ${WRKSRC}/lib/icons/angband-*.desktop
-
-# Looks like upstream forgot to include a version file.
-# `cat: ../version: No such file or directory`
+# Kill `make -s`.
pre-build:
- echo ${V} > ${WRKSRC}/version
+ sed -i 's/$${MAKE} -s/$${MAKE}/g' ${WRKBUILD}/mk/buildsys.mk
post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
- mv ${PREFIX}/share/angband/icons/*.desktop \
- ${PREFIX}/share/applications
+ # By default installs at most one desktop file (depending on configured
+ # GUI libs) and installs it as `angband.desktop`. Installs neither a
+ # desktop file, nor even the `applications` dir for no_x11 FLAVOR.
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/
+ rm -f ${PREFIX}/share/applications/angband.desktop
+ ${INSTALL_DATA} ${WRKSRC}/lib/icons/angband-{sdl2,x11}.desktop \
+ ${PREFIX}/share/applications/
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/
mv ${WRKINST}/etc/angband ${PREFIX}/share/examples/
- chmod -R u+rwX ${WRKINST}/var
+ chmod -R u+rwX ${WRKINST}/${BASELOCALSTATEDIR}/games/angband/
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/angband/distinfo,v
diff -u -p -r1.10 distinfo
--- distinfo 27 Apr 2019 13:24:42 -0000 1.10
+++ distinfo 28 Apr 2024 21:25:42 -0000
@@ -1,2 +1,2 @@
-SHA256 (angband-4.1.3.tar.gz) = lALE+NppHtvUVnqUjFZj4QZr7j/LSmL7z4a1RUkYQG8=
-SIZE (angband-4.1.3.tar.gz) = 19924395
+SHA256 (Angband-4.2.5.tar.gz) = xMrL3yj3JvyxoLMLh2MQD7BviNu1cOlVIy5B2D4HGKY=
+SIZE (Angband-4.2.5.tar.gz) = 25734496
Index: patches/patch-lib_help_version_txt
===================================================================
RCS file: patches/patch-lib_help_version_txt
diff -N patches/patch-lib_help_version_txt
--- patches/patch-lib_help_version_txt 19 Apr 2024 13:07:46 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-newer sphinx doesn't like this
-
-Index: lib/help/version.txt
---- lib/help/version.txt.orig
-+++ lib/help/version.txt
-@@ -455,7 +455,7 @@ Peter Berger, "Prfnoff", Arcum Dagsson, Ed Cogburn, Ma
- Ben Harrison, Steven Fuerst, Julian Lighton, Andrew Hill, Werner Baer,
- Tom Morton, "Cyric the Mad", Chris Kern, Tim Baker, Jurriaan Kalkman,
- Alexander Wilkins, Mauro Scarpa, John I'anson-Holton, "facade",
--Dennis van Es, Kenneth A. Strom, Wei-Hwa Huang, Nikodemus, Timo Pietilä,
-+Dennis van Es, Kenneth A. Strom, Wei-Hwa Huang, Nikodemus, Timo Pietila,
- Greg Wooledge, Keldon Jones, Shayne Steele, Dr. Andrew White, Musus Umbra,
- Jonathan Ellis
-
Index: patches/patch-mk_buildsys_mk_in
===================================================================
RCS file: /cvs/ports/games/angband/patches/patch-mk_buildsys_mk_in,v
diff -u -p -r1.2 patch-mk_buildsys_mk_in
--- patches/patch-mk_buildsys_mk_in 11 Mar 2022 19:04:06 -0000 1.2
+++ patches/patch-mk_buildsys_mk_in 29 Apr 2024 19:43:05 -0000
@@ -3,29 +3,11 @@ Print compiler invocations.
Index: mk/buildsys.mk.in
--- mk/buildsys.mk.in.orig
+++ mk/buildsys.mk.in
-@@ -150,10 +150,8 @@ depend: pre-depend ${SRCS}
- pre-depend:
+@@ -124,7 +124,6 @@ DEPS = ${OBJS:.o=.dep} \
- ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}
-- ${LINK_STATUS}
-- if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \
-- ${LINK_OK}; \
-- else \
-+ echo ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}
-+ if ! ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \
- ${LINK_FAILED}; \
- fi
+ MO_FILES = ${LOCALES:.po=.mo}
-@@ -239,10 +237,8 @@ ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS
- locales: ${MO_FILES}
-
- .c.o:
-- ${COMPILE_STATUS}
-- if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
-- ${COMPILE_OK}; \
-- else \
-+ echo ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
-+ if ! ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
- ${COMPILE_FAILED}; \
- fi
- .c.lib.o:
+-.SILENT:
+ .SUFFIXES:
+ .SUFFIXES: .amigalib.o .beam .c .cc .class .cxx .d .erl .lib.o .java .mo .m .mm .o .plugin.o .po .py .pyc .rc .S .xpm
+ .PHONY: all subdirs subdirs-after pre-depend depend install install-extra post-install uninstall uninstall-extra clean pre-clean distclean pre-distclean locales copy-headers-into-framework ${SUBDIRS} ${SUBDIRS_AFTER}
Index: patches/patch-src_main_c
===================================================================
RCS file: patches/patch-src_main_c
diff -N patches/patch-src_main_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_main_c 28 Apr 2024 21:25:42 -0000
@@ -0,0 +1,23 @@
+Avoid crash with -l option when there are no savefiles to list.
+
+https://github.com/angband/angband/pull/5954/commits/affb9988687d1a6c5fc8a66c60e37f0cf2c632f5
+
+Index: src/main.c
+--- src/main.c.orig
++++ src/main.c
+@@ -280,9 +280,13 @@ static void list_saves(void)
+ {
+ savefile_getter g = NULL;
+
+- if (!got_savefile(&g) && !got_savefile_dir(g)) {
++ if (!got_savefile(&g)) {
+ cleanup_savefile_getter(g);
+- quit_fmt("Cannot open savefile directory");
++ if (!got_savefile_dir(g)) {
++ quit_fmt("Cannot open savefile directory");
++ }
++ printf("There are no savefiles you can use.\n");
++ return;
+ }
+
+ printf("Savefiles you can use are:\n");
Index: patches/patch-src_mon-blows_h
===================================================================
RCS file: patches/patch-src_mon-blows_h
diff -N patches/patch-src_mon-blows_h
--- patches/patch-src_mon-blows_h 11 Mar 2022 19:04:06 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-Fixes for -fno-common.
-
-Index: src/mon-blows.h
---- src/mon-blows.h.orig
-+++ src/mon-blows.h
-@@ -35,7 +35,7 @@ struct blow_method {
- struct blow_method *next;
- };
-
--struct blow_method *blow_methods;
-+extern struct blow_method *blow_methods;
-
- /**
- * Storage for context information for effect handlers called in
-@@ -76,7 +76,7 @@ struct blow_effect {
- struct blow_effect *next;
- };
-
--struct blow_effect *blow_effects;
-+extern struct blow_effect *blow_effects;
-
- /* Functions */
- int blow_index(const char *name);
Index: pkg/PFRAG.no-no_x11
===================================================================
RCS file: pkg/PFRAG.no-no_x11
diff -N pkg/PFRAG.no-no_x11
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.no-no_x11 28 Apr 2024 21:25:42 -0000
@@ -0,0 +1,28 @@
+share/angband/icons/
+share/angband/icons/att-128.png
+share/angband/icons/att-16.png
+share/angband/icons/att-256.png
+share/angband/icons/att-32.png
+share/angband/icons/att-512.png
+share/applications/angband-x11.desktop
+share/icons/
+share/icons/hicolor/
+share/icons/hicolor/128x128/
+share/icons/hicolor/128x128/apps/
+share/icons/hicolor/128x128/apps/angband.png
+share/icons/hicolor/16x16/
+share/icons/hicolor/16x16/apps/
+share/icons/hicolor/16x16/apps/angband.png
+share/icons/hicolor/256x256/
+share/icons/hicolor/256x256/apps/
+share/icons/hicolor/256x256/apps/angband.png
+share/icons/hicolor/32x32/
+share/icons/hicolor/32x32/apps/
+share/icons/hicolor/32x32/apps/angband.png
+share/icons/hicolor/512x512/
+share/icons/hicolor/512x512/apps/
+share/icons/hicolor/512x512/apps/angband.png
+share/metainfo/
+share/metainfo/angband.metainfo.xml
+@tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor
Index: pkg/PFRAG.sdl
===================================================================
RCS file: /cvs/ports/games/angband/pkg/PFRAG.sdl,v
diff -u -p -r1.4 PFRAG.sdl
--- pkg/PFRAG.sdl 11 Mar 2022 19:04:06 -0000 1.4
+++ pkg/PFRAG.sdl 28 Apr 2024 21:25:42 -0000
@@ -211,7 +211,6 @@ share/angband/fonts/9x15xb.fon
@comment share/angband/sounds/pls_tone_headstock.mp3
@comment share/angband/sounds/pls_tone_scrape.mp3
@comment share/angband/sounds/pls_tone_stick.mp3
-@comment share/angband/sounds/sound.cfg
@comment share/angband/sounds/sto_bell_desk.mp3
@comment share/angband/sounds/sto_bell_ding.mp3
@comment share/angband/sounds/sto_bell_dingaling.mp3
@@ -261,5 +260,7 @@ share/angband/tiles/old/xtra-xxx.prf
share/angband/tiles/shockbolt/
share/angband/tiles/shockbolt/64x64.png
share/angband/tiles/shockbolt/flvr-shb.prf
-share/angband/tiles/shockbolt/graf-shb.prf
+share/angband/tiles/shockbolt/graf-shb-dark.prf
+share/angband/tiles/shockbolt/graf-shb-light.prf
share/angband/tiles/shockbolt/xtra-shb.prf
+share/applications/angband-sdl2.desktop
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/angband/pkg/PLIST,v
diff -u -p -r1.18 PLIST
--- pkg/PLIST 11 Mar 2022 19:04:06 -0000 1.18
+++ pkg/PLIST 28 Apr 2024 21:25:42 -0000
@@ -6,38 +6,16 @@
%%sdl%%
share/angband/
share/angband/help/
-share/angband/help/attack.txt
-share/angband/help/birth.txt
-share/angband/help/command.txt
-share/angband/help/copying.txt
-share/angband/help/customize.txt
-share/angband/help/debug.txt
-share/angband/help/dungeon.txt
-share/angband/help/general.txt
-share/angband/help/help.hlp
+share/angband/help/commands.txt
share/angband/help/index.txt
-share/angband/help/modifying.txt
-share/angband/help/option.txt
-share/angband/help/playing.txt
-share/angband/help/version.txt
-share/angband/icons/
-share/angband/icons/att-128.png
-share/angband/icons/att-16.png
-share/angband/icons/att-256.png
-share/angband/icons/att-32.png
-share/angband/icons/att-512.png
+share/angband/help/r_comm.txt
+share/angband/help/r_index.txt
+share/angband/help/symbols.txt
share/angband/screens/
share/angband/screens/crown.txt
share/angband/screens/dead.txt
share/angband/screens/news.txt
-share/angband/user/
-share/angband/user/info/
-share/angband/user/info/dummy.txt
-share/angband/user/info/user.hlp
-share/applications/angband-sdl.desktop
-share/applications/angband-x11.desktop
-share/doc/angband/
-share/doc/angband/manual.html
+!%%no_x11%%
share/examples/angband/
@sample ${SYSCONFDIR}/angband/
share/examples/angband/customize/
@@ -46,6 +24,8 @@ share/examples/angband/customize/font-gc
@sample ${SYSCONFDIR}/angband/customize/font-gcu.prf
share/examples/angband/customize/font-sdl.prf
@sample ${SYSCONFDIR}/angband/customize/font-sdl.prf
+share/examples/angband/customize/font-sdl2.prf
+@sample ${SYSCONFDIR}/angband/customize/font-sdl2.prf
share/examples/angband/customize/font-win.prf
@sample ${SYSCONFDIR}/angband/customize/font-win.prf
share/examples/angband/customize/font-x11.prf
@@ -76,6 +56,8 @@ share/examples/angband/gamedata/body.txt
@sample ${SYSCONFDIR}/angband/gamedata/body.txt
share/examples/angband/gamedata/brand.txt
@sample ${SYSCONFDIR}/angband/gamedata/brand.txt
+share/examples/angband/gamedata/chest_trap.txt
+@sample ${SYSCONFDIR}/angband/gamedata/chest_trap.txt
share/examples/angband/gamedata/class.txt
@sample ${SYSCONFDIR}/angband/gamedata/class.txt
share/examples/angband/gamedata/constants.txt
@@ -104,8 +86,6 @@ share/examples/angband/gamedata/object.t
@sample ${SYSCONFDIR}/angband/gamedata/object.txt
share/examples/angband/gamedata/object_base.txt
@sample ${SYSCONFDIR}/angband/gamedata/object_base.txt
-share/examples/angband/gamedata/object_power.txt
-@sample ${SYSCONFDIR}/angband/gamedata/object_power.txt
share/examples/angband/gamedata/object_property.txt
@sample ${SYSCONFDIR}/angband/gamedata/object_property.txt
share/examples/angband/gamedata/p_race.txt
@@ -114,6 +94,8 @@ share/examples/angband/gamedata/pain.txt
@sample ${SYSCONFDIR}/angband/gamedata/pain.txt
share/examples/angband/gamedata/pit.txt
@sample ${SYSCONFDIR}/angband/gamedata/pit.txt
+share/examples/angband/gamedata/player_property.txt
+@sample ${SYSCONFDIR}/angband/gamedata/player_property.txt
share/examples/angband/gamedata/player_timed.txt
@sample ${SYSCONFDIR}/angband/gamedata/player_timed.txt
share/examples/angband/gamedata/projection.txt
@@ -124,6 +106,8 @@ share/examples/angband/gamedata/realm.tx
@sample ${SYSCONFDIR}/angband/gamedata/realm.txt
share/examples/angband/gamedata/room_template.txt
@sample ${SYSCONFDIR}/angband/gamedata/room_template.txt
+share/examples/angband/gamedata/shape.txt
+@sample ${SYSCONFDIR}/angband/gamedata/shape.txt
share/examples/angband/gamedata/slay.txt
@sample ${SYSCONFDIR}/angband/gamedata/slay.txt
share/examples/angband/gamedata/store.txt
@@ -134,13 +118,23 @@ share/examples/angband/gamedata/terrain.
@sample ${SYSCONFDIR}/angband/gamedata/terrain.txt
share/examples/angband/gamedata/trap.txt
@sample ${SYSCONFDIR}/angband/gamedata/trap.txt
+share/examples/angband/gamedata/ui_entry.txt
+@sample ${SYSCONFDIR}/angband/gamedata/ui_entry.txt
+share/examples/angband/gamedata/ui_entry_base.txt
+@sample ${SYSCONFDIR}/angband/gamedata/ui_entry_base.txt
+share/examples/angband/gamedata/ui_entry_renderer.txt
+@sample ${SYSCONFDIR}/angband/gamedata/ui_entry_renderer.txt
+share/examples/angband/gamedata/ui_knowledge.txt
+@sample ${SYSCONFDIR}/angband/gamedata/ui_knowledge.txt
share/examples/angband/gamedata/vault.txt
@sample ${SYSCONFDIR}/angband/gamedata/vault.txt
+share/examples/angband/gamedata/visuals.txt
+@sample ${SYSCONFDIR}/angband/gamedata/visuals.txt
share/examples/angband/gamedata/world.txt
@sample ${SYSCONFDIR}/angband/gamedata/world.txt
@mode 775
@sample /var/games/angband/
@sample /var/games/angband/archive/
+@sample /var/games/angband/panic/
@sample /var/games/angband/save/
@sample /var/games/angband/scores/
-@tag update-desktop-database
--
Best Regards
Edd Barrett
https://www.theunixzoo.co.uk
UPDATE: games/angband to 4.2.5