commit: b1623555fbb620459bb4f894bc2710d28ca828b3 Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr> AuthorDate: Mon Feb 24 23:20:32 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Feb 27 06:03:34 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1623555
app-text/sword: EAPI 8, add test utils, force compliance w/ useflags update EAPI 7 -> 8 useflags: add test add utils (previsously enabled by default, rdep breakout checked) rm doc (no bdep, small size) rm debug (no action) cmakeargs: force compliance with useflags (SWORD_NO_*) rm rpath add patch to respect user's CFLAGS Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr> Closes: https://github.com/gentoo/gentoo/pull/40748 Signed-off-by: Sam James <sam <AT> gentoo.org> app-text/sword/files/sword-1.9.0-cflags.patch | 15 +++++++ app-text/sword/metadata.xml | 1 + app-text/sword/sword-1.9.0-r2.ebuild | 60 +++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) diff --git a/app-text/sword/files/sword-1.9.0-cflags.patch b/app-text/sword/files/sword-1.9.0-cflags.patch new file mode 100644 index 000000000000..5966fe69de4d --- /dev/null +++ b/app-text/sword/files/sword-1.9.0-cflags.patch @@ -0,0 +1,15 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -174,10 +174,10 @@ + ELSE(MSVC) + SET(CMAKE_C_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_C_FLAGS}") + SET(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS}") +- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_C_FLAGS}") ++ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS}") + SET(CMAKE_CXX_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS}") + ENDIF(MSVC) + ############################################################################################## + # Setting libraries and includes diff --git a/app-text/sword/metadata.xml b/app-text/sword/metadata.xml index cc4b6313e0c0..1e5f7dd2bb68 100644 --- a/app-text/sword/metadata.xml +++ b/app-text/sword/metadata.xml @@ -9,5 +9,6 @@ societies to write new Bible software more quickly and easily. </longdescription> <use> <flag name="clucene">Use <pkg>dev-cpp/clucene</pkg> for lucene search support</flag> + <flag name="utils">CLI (diatheke) and conversion utilities for bible documents in SWORD supported formats</flag> </use> </pkgmetadata> diff --git a/app-text/sword/sword-1.9.0-r2.ebuild b/app-text/sword/sword-1.9.0-r2.ebuild new file mode 100644 index 000000000000..e64123de6e9e --- /dev/null +++ b/app-text/sword/sword-1.9.0-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Library for Bible reading software" +HOMEPAGE="https://www.crosswire.org/sword/" +SRC_URI="https://www.crosswire.org/ftpmirror/pub/${PN}/source/v${PV%.*}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos" +IUSE="clucene curl icu test utils" +REQUIRED_USE="test? ( curl icu utils )" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-arch/bzip2 + app-arch/xz-utils + sys-libs/zlib + curl? ( net-misc/curl ) + icu? ( dev-libs/icu:= ) + clucene? ( dev-cpp/clucene:1 ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-1.9.0-cflags.patch +) + +DOCS=( AUTHORS CODINGSTYLE ChangeLog README examples/ samples/ ) + +src_configure() { + local mycmakeargs=( + -DCMAKE_SKIP_RPATH="ON" + # default is shared and static + -DLIBSWORD_LIBRARY_TYPE="Shared" + -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" + -DSYSCONF_INSTALL_DIR="${EPREFIX}/etc" + -DSWORD_BUILD_TESTS=$(usex test) + -DSWORD_BUILD_UTILS=$(usev !utils No) + -DSWORD_NO_CLUCENE=$(usev !clucene Yes) + -DWITH_CLUCENE=$(usex clucene) + -DSWORD_NO_CURL=$(usev !curl Yes) + -DWITH_CURL=$(usex curl) + -DSWORD_NO_ICU=$(usev !icu Yes) + -DWITH_ICU=$(usex icu) + -DWITH_ZLIB=1 + ) + + cmake_src_configure +} + +src_test() { + local -x LD_LIBRARY_PATH="${BUILD_DIR}" + cmake_src_test +}
