summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-16 01:23:07 +0100
committerSam James <sam@gentoo.org>2022-06-16 01:23:07 +0100
commit36aca27bf69bef70ce417ed8490d72d90855c3fc (patch)
tree89204cc4d33738d79192791ab577b2d0539ba131 /net-news/snownews
parentapp-misc/rover: Added package (diff)
downloadgentoo-36aca27bf69bef70ce417ed8490d72d90855c3fc.tar.gz
gentoo-36aca27bf69bef70ce417ed8490d72d90855c3fc.tar.bz2
gentoo-36aca27bf69bef70ce417ed8490d72d90855c3fc.zip
net-news/snownews: respect CC; drop which
Closes: https://bugs.gentoo.org/844901 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-news/snownews')
-rw-r--r--net-news/snownews/files/snownews-1.9-no-which.patch30
-rw-r--r--net-news/snownews/snownews-1.9-r1.ebuild50
2 files changed, 80 insertions, 0 deletions
diff --git a/net-news/snownews/files/snownews-1.9-no-which.patch b/net-news/snownews/files/snownews-1.9-no-which.patch
new file mode 100644
index 000000000000..84335e93711b
--- /dev/null
+++ b/net-news/snownews/files/snownews-1.9-no-which.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/844901
+--- a/configure
++++ b/configure
+@@ -164,7 +164,7 @@ s/@builddir@/\$\{TMPDIR\}\/make/g"
+
+ #### Find programs and libs ##########################################
+
+-# Programs found using which
++# Programs found using command -v
+ for i in $progs; do
+ pname=$(expr $i : '\([^=]*\)')
+ pcall=$(expr $i : '[^=]*=\([^=]*\)')
+@@ -172,7 +172,7 @@ for i in $progs; do
+ # First check if an environment variable is set
+ [ -n "$ppath" ] && sub "s/@$pname@/$ppath/g"
+ # Check if the program exists
+- ppath=$(which $pcall 2>/dev/null)
++ ppath=$(command -v $pcall 2>/dev/null)
+ [ -n "$ppath" ] && [ -x "$ppath" ] && sub "s/@$pname@/$pcall/g"
+ done
+ # If nothing found in first loop, set the first pair anyway
+@@ -183,7 +183,7 @@ for i in $progs; do
+ done
+
+ # Packages found using pkg-config
+-pkgconfig=$(which pkg-config 2>/dev/null)
++pkgconfig=$(command -v pkg-config 2>/dev/null)
+ if [ -n "$pkgconfig" ] && [ -x "$pkgconfig" ]; then
+ faildeps=""
+ for i in $pkgs; do
diff --git a/net-news/snownews/snownews-1.9-r1.ebuild b/net-news/snownews/snownews-1.9-r1.ebuild
new file mode 100644
index 000000000000..da5e7bfd6e0a
--- /dev/null
+++ b/net-news/snownews/snownews-1.9-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Command-line RSS feed reader"
+HOMEPAGE="https://github.com/msharov/snownews"
+SRC_URI="https://github.com/msharov/snownews/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+RDEPEND="
+ dev-libs/libxml2
+ dev-libs/openssl:=
+ net-misc/curl
+ sys-libs/ncurses:=[unicode(+)]
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9-no-which.patch
+)
+
+src_prepare() {
+ default
+
+ tc-export CC
+
+ # Disable stripping in the build system - leave it to the package manager
+ sed -i -e '/ldflags/s/-s/-g -rdynamic/' -e '/cflags/s/-g0/-g/' Config.mk.in || die
+}
+
+src_configure() {
+ econf "$(use_with debug)"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}