Skip to content

Commit

Permalink
games-misc/fortune-mod: add 3.22.0
Browse files Browse the repository at this point in the history
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Jul 7, 2024
1 parent 1d9be08 commit cdd80c5
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions games-misc/fortune-mod/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST fortune-mod-3.18.0.tar.xz 1470208 BLAKE2B b975d75aea745f06f26753038416b1cc50b462a11a5cbe71a9aadc44b31f9120ac3e37ed160c9d7f90e379e5ea4c51dc39921362d24811547364e37d64c3faf9 SHA512 b8d16bf5032c1a0fcb161c912109abd24f3b762f3455eaf86d41ed3f16a33db4913d9a21bb6a42f974a3b11cfaedac57cabc4456d178a3d631d8d4a723789798
DIST fortune-mod-3.22.0.tar.xz 1473952 BLAKE2B 9edddea4c059314a22351bf088035284cf74983c714165bf52e50f1de00a300f3d04dc4e510ca8b4f3d78c89a4523e7b413a40ca4d6924c0fe94d3f11319c1d4 SHA512 54726bad10a986b71a98de6eaed2ec56bbd28aeb245eea04254f2aa84fa4658d3bac148a0d1f3b8f44ed539b3a4d40379fc9d6438a1dba419a5c05a3180e3537
70 changes: 70 additions & 0 deletions games-misc/fortune-mod/fortune-mod-3.22.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="The notorious fortune program"
HOMEPAGE="https://www.shlomifish.org/open-source/projects/fortune-mod/"
SRC_URI="
https://www.shlomifish.org/open-source/projects/${PN}/arcs/${P}.tar.xz
https://github.com/shlomif/fortune-mod/releases/download/${P}/${P}.tar.xz
"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc64 ~riscv ~sparc ~x86"
IUSE="offensive pcre test"
RESTRICT="!test? ( test )"

RDEPEND="
!games-misc/fortune-mod-tao
app-text/recode:=
>=dev-libs/rinutils-0.10.2
pcre? ( dev-libs/libpcre2 )
"
DEPEND="${RDEPEND}"
BDEPEND="
app-text/App-XML-DocBook-Builder
dev-lang/perl
test? (
dev-perl/File-Find-Object
dev-perl/IO-All
dev-perl/Test-Differences
dev-perl/Test-Trap
)
"

PATCHES=(
"${FILESDIR}"/${PN}-3.14.0-valgrind-tests.patch
)

src_configure() {
local mycmakeargs=(
-DUSE_PCRE=$(usex pcre)
-DNO_OFFENSIVE=$(usex !offensive)
# bug #857246
-DLOCALDIR="/usr/local/share/fortune"
-DCOOKIEDIR="/usr/share/fortune"
)

cmake_src_configure
}

src_test() {
cmake_src_compile check
}

src_install() {
cmake_src_install

# We don't want to create the dir if it doesn't exist
rm -rf "${ED}"//usr/local || die

mkdir -p "${ED}"/usr/bin || die
mv "${ED}"/usr/games/fortune "${ED}"/usr/bin/fortune || die
rm -rf "${ED}"/usr/games || die

dodoc ChangeLog INDEX Notes Offensive README TODO cookie-files
}

0 comments on commit cdd80c5

Please sign in to comment.