Skip to content

Commit

Permalink
games-roguelike/cataclysm-dda: Add doc USE flag and install man pages
Browse files Browse the repository at this point in the history
Signed-off-by: strategictraveler <[email protected]>
  • Loading branch information
strategictraveler committed Jan 14, 2025
1 parent 5c98216 commit d6e86fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions games-roguelike/cataclysm-dda/cataclysm-dda-0h.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Gentoo Authors
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
Expand Down Expand Up @@ -31,7 +31,7 @@ fi

# CC-BY-SA-4.0 for soundpack
LICENSE="Apache-2.0 CC-BY-SA-3.0 CC-BY-SA-4.0 MIT OFL-1.1 Unicode-3.0"
IUSE="debug ncurses nls +sound +soundpack test +tiles"
IUSE="debug doc ncurses nls +sound +soundpack test +tiles"
REQUIRED_USE="soundpack? ( sound ) sound? ( tiles ) \
|| ( tiles ncurses )"
RESTRICT="!test? ( test )"
Expand All @@ -50,6 +50,7 @@ RDEPEND="
)"
DEPEND="${RDEPEND}"
BDEPEND="
doc? ( app-text/doxygen[dot] )
soundpack? ( app-arch/unzip )
nls? ( sys-devel/gettext )
"
Expand Down Expand Up @@ -121,6 +122,8 @@ src_compile() {

use nls && export LANGUAGES="all"

use doc && doxygen doxygen_doc/doxygen_conf.txt || die "Failed to generate docs"

This comment has been minimized.

Copy link
@pastalian

pastalian Jan 14, 2025

Contributor

This doesn't work. I think using if use doc; then would be simpler and better.

bash -c 'false && true || echo die'
die

if use ncurses; then
# don't build tests twice
if ! use tiles; then
Expand Down Expand Up @@ -151,6 +154,11 @@ src_install() {

[[ -e "${WORKDIR}/cataclysm-${SLOT}" ]] && dobin "${WORKDIR}/cataclysm-${SLOT}"

use doc && dodoc -r doxygen_doc/html

use tiles && newman "doc/cataclysm-tiles.6" "cataclysm-tiles-${SLOT}.6"
use ncurses && newman "doc/cataclysm.6" "cataclysm-${SLOT}.6"

if use soundpack; then
insinto "/usr/share/${PN}-${SLOT}/sound"
doins -r "${WORKDIR}/CC-Sounds"
Expand Down
12 changes: 10 additions & 2 deletions games-roguelike/cataclysm-dda/cataclysm-dda-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Gentoo Authors
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
Expand Down Expand Up @@ -31,7 +31,7 @@ fi

# CC-BY-SA-4.0 for soundpack
LICENSE="Apache-2.0 CC-BY-SA-3.0 CC-BY-SA-4.0 MIT OFL-1.1 Unicode-3.0"
IUSE="debug ncurses nls +sound +soundpack test +tiles"
IUSE="debug doc ncurses nls +sound +soundpack test +tiles"
REQUIRED_USE="soundpack? ( sound ) sound? ( tiles ) \
|| ( tiles ncurses )"
RESTRICT="!test? ( test )"
Expand All @@ -50,6 +50,7 @@ RDEPEND="
)"
DEPEND="${RDEPEND}"
BDEPEND="
doc? ( app-text/doxygen[dot] )
nls? ( sys-devel/gettext )
"

Expand Down Expand Up @@ -115,6 +116,8 @@ src_compile() {

use nls && export LANGUAGES="all"

use doc && doxygen doxygen_doc/doxygen_conf.txt || die "Failed to generate docs"

if use ncurses; then
# don't build tests twice
if ! use tiles; then
Expand Down Expand Up @@ -145,6 +148,11 @@ src_install() {

[[ -e "${WORKDIR}/cataclysm-${SLOT}" ]] && dobin "${WORKDIR}/cataclysm-${SLOT}"

use doc && dodoc -r doxygen_doc/html

use tiles && newman "doc/cataclysm-tiles.6" "cataclysm-tiles-${SLOT}.6"
use ncurses && newman "doc/cataclysm.6" "cataclysm-${SLOT}.6"

if use soundpack; then
insinto "/usr/share/${PN}-${SLOT}/sound"
doins -r "${WORKDIR}/CC-Sounds"
Expand Down

0 comments on commit d6e86fd

Please sign in to comment.