freebsd-ports/games/angband/Makefile
Adriaan de Groot e6a0f339de games/angband: update to 4.2.2, latest upstream
The release notes are at
	https://github.com/angband/angband/releases/tag/4.2.2

Angband looks like it's in the process or a project-reorganization.
Sources have moved to github; the official site is being changes
as well. Docs have gone to sphinx, and build looks like it's moving
to CMake -- but incomplete.

This update pulls in the changes to distribution and build so far:
- MASTER_SITES is set explicitly; upstream rolls a release tarball,
  and I don't want to grab the GH auto-rolled one.
- ncurses needs some linker-flag-magic because it's linked into an
  intermediate static library.
- The manual is now built with sphinx. Upstream wants the "better"
  sphinx theme, but that isn't packaged; I picked a different one
  at random. Since the generated HTML is installed without its
  supporting stylesheets or javascript, the difference is unimportant.

Play-tested in text (ncurses) and X11 modes, at least to the point
that I enter the dungeon and get eaten by a grue.
2021-07-05 01:01:17 +02:00

62 lines
1.8 KiB
Makefile

# Created by: Matthew Hunt <mph@pobox.com>
PORTNAME= angband
DISTVERSION= 4.2.2
DISTNAME= Angband-${DISTVERSION}
CATEGORIES= games
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${DISTVERSION}/
MAINTAINER= adridg@FreeBSD.org
COMMENT= Rogue-like game with color, X11 support
LICENSE= GPLv2
USES= autoreconf gmake ncurses
GNU_CONFIGURE= yes
CONFIGURE_ENV= ac_cv_path_NCURSES_CONFIG=${TRUE}
CONFIGURE_ARGS= --localstatedir=/var
CPPFLAGS+= -I${NCURSESINC}
LDFLAGS+= -Wl,--Bstatic -L${NCURSESLIB} -lncursesw -Wl,--Bdynamic
OPTIONS_DEFINE= SDL X11 DOCS
OPTIONS_DEFAULT=X11
# The docs as shipped want to use theme "better", but that's
# not packaged in ports (yet); use rtd instead because it is.
DOCS_USES= python:build
DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx \
${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR}
SDL_USES= sdl
SDL_USE= SDL=image,mixer,ttf,sdl
SDL_CONFIGURE_ENABLE= sdl
X11_USES= xorg
X11_USE= XORG=ice,sm,x11
X11_RUN_DEPENDS= xorg-fonts-miscbitmaps>=0:x11-fonts/xorg-fonts-miscbitmaps
X11_CONFIGURE_ENABLE= x11
post-patch:
@${REINPLACE_CMD} -e \
'/-Wno-missing-field-initializers/,/fi$$/d ; \
s|/games$$|/bin|' ${WRKSRC}/configure.ac
@${REINPLACE_CMD} -e \
's|.SILENT:||' ${WRKSRC}/mk/buildsys.mk.in
@${REINPLACE_CMD} -e \
's|-O0||' ${WRKSRC}/src/Makefile
post-build-DOCS-on:
# Needs gmake, although we could run sphinx directly
cd ${WRKSRC}/docs && ${MAKE_CMD} singlehtml
post-stage-DOCS-on:
mkdir -p ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/docs/_build/singlehtml/index.html ${STAGEDIR}${DOCSDIR}/index.html
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/angband
.for i in user/save user/scores
@${MKDIR} ${STAGEDIR}${DATADIR}/${i}
.endfor
.include <bsd.port.mk>