public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Louis Sautier" <sbraz@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/
Date: Wed, 17 Jul 2024 01:09:29 +0000 (UTC)	[thread overview]
Message-ID: <1721178487.54e661770fa7c07f2e661accd98b71c4e73ad4fd.sbraz@gentoo> (raw)

commit:     54e661770fa7c07f2e661accd98b71c4e73ad4fd
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 14 14:33:45 2024 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Wed Jul 17 01:08:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54e66177

net-nntp/nzbget: add 24.1 from new nzbget.com fork, #911617

https://github.com/nzbget/nzbget has been archived since 2022.
We initially thought of switching to https://github.com/nzbget-ng/nzbget
but https://github.com/nzbgetcom/nzbget seems more active.

Closes: https://bugs.gentoo.org/911617
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 net-nntp/nzbget/Manifest                           |   1 +
 .../nzbget/files/nzbget-24.1-fix-allocah.patch     |  39 ++++++++
 net-nntp/nzbget/metadata.xml                       |   5 +-
 net-nntp/nzbget/nzbget-24.1.ebuild                 | 110 +++++++++++++++++++++
 4 files changed, 152 insertions(+), 3 deletions(-)

diff --git a/net-nntp/nzbget/Manifest b/net-nntp/nzbget/Manifest
index c4912cd5ee43..059d1d38d04c 100644
--- a/net-nntp/nzbget/Manifest
+++ b/net-nntp/nzbget/Manifest
@@ -1 +1,2 @@
 DIST nzbget-21.1.tar.gz 1988916 BLAKE2B 74298c5c7f3986831f36832a8ffe596543196b5b46500925de478bf11cab8e66fb36dee9458533a4194d82123765b29e37914463d72fd206e218b4875861001a SHA512 d8dc1ad324f675c5505e623049a14c022475267aa03dcd5d8fd6cf9ed3b776cc2776077b61d035e252937ea4b6bf8f90bd33e715cfd842d2e012615df3ffeafb
+DIST nzbget-24.1.tar.gz 5365282 BLAKE2B 4fe260c361888d99eaf457a520b39560320b86d181cd12891b35962c9d4c6d773aeb389bf2254029fc58643bb5b04eb24917db9319f1a1068014feed08521dde SHA512 eb4a60cb3a529e2fb8242615e57758ceed615a573fabbe7170490e7af8c228edc90a096860ab7cf49ee85fc834cb8db30aa866c4f149679396139e54c166cf5c

diff --git a/net-nntp/nzbget/files/nzbget-24.1-fix-allocah.patch b/net-nntp/nzbget/files/nzbget-24.1-fix-allocah.patch
new file mode 100644
index 000000000000..335800118e31
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget-24.1-fix-allocah.patch
@@ -0,0 +1,39 @@
+https://github.com/nzbgetcom/nzbget/commit/412d9e5b732c1cf39aac266dcf97bf097f85bc58
+
+From 412d9e5b732c1cf39aac266dcf97bf097f85bc58 Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis@gmail.com>
+Date: Tue, 16 Jul 2024 05:41:47 +0200
+Subject: [PATCH] Fix: add missing HAVE_ALLOCA_H definition for regex (#308)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Without this, the build fails with:
+```
+/var/tmp/portage/net-nntp/nzbget-24.1/work/nzbget-24.1/lib/regex/regex.c: In function ‘set_regs’:
+/var/tmp/portage/net-nntp/nzbget-24.1/work/nzbget-24.1/lib/regex/regex.c:7701:39: error: implicit declaration of function ‘alloca’; did you mean ‘calloc’? [-Wimplicit-function-declaration]                        7701 |         prev_idx_match = (regmatch_t*)alloca(nmatch * sizeof(regmatch_t));
+      |                                       ^~~~~~
+      |                                       calloc
+```
+--- a/cmake/config.h.in
++++ b/cmake/config.h.in
+@@ -134,6 +134,9 @@
+ /* Define to 1 if you have the <unistd.h> header file. */
+ #cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@
+ 
++/* Define to 1 if you have the <alloca.h> header file. */
++#cmakedefine HAVE_ALLOCA_H @HAVE_ALLOCA_H@
++
+ /* Define to 1 if variadic macros are supported */
+ #cmakedefine HAVE_VARIADIC_MACROS @HAVE_VARIADIC_MACROS@
+ 
+--- a/cmake/posix.cmake
++++ b/cmake/posix.cmake
+@@ -120,6 +120,7 @@ check_include_file(strings.h HAVE_STRINGS_H)
+ check_include_file(string.h HAVE_STRING_H)
+ check_include_file(sys/stat.h HAVE_SYS_STAT_H)
+ check_include_file(unistd.h HAVE_UNISTD_H)
++check_include_file(alloca.h HAVE_ALLOCA_H)
+ 
+ check_library_exists(pthread pthread_create "" HAVE_PTHREAD_CREATE) 
+ check_library_exists(socket socket "" HAVE_SOCKET) 

diff --git a/net-nntp/nzbget/metadata.xml b/net-nntp/nzbget/metadata.xml
index 0a4610de225c..800bfff4a254 100644
--- a/net-nntp/nzbget/metadata.xml
+++ b/net-nntp/nzbget/metadata.xml
@@ -13,8 +13,7 @@
 		<flag name="parcheck">Enable support for checking PAR archives</flag>
 	</use>
 	<upstream>
-		<remote-id type="github">nzbget/nzbget</remote-id>
-		<bugs-to>https://github.com/nzbget/nzbget/issues</bugs-to>
-		<remote-id type="sourceforge">nzbget</remote-id>
+		<remote-id type="github">nzbgetcom/nzbget</remote-id>
+		<bugs-to>https://github.com/nzbgetcom/nzbget/issues</bugs-to>
 	</upstream>
 </pkgmetadata>

diff --git a/net-nntp/nzbget/nzbget-24.1.ebuild b/net-nntp/nzbget/nzbget-24.1.ebuild
new file mode 100644
index 000000000000..a2fbf9d1ad90
--- /dev/null
+++ b/net-nntp/nzbget/nzbget-24.1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake systemd
+
+DESCRIPTION="A command-line based binary newsgrabber supporting .nzb files"
+HOMEPAGE="https://nzbget.com/"
+SRC_URI="https://github.com/nzbgetcom/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="gnutls ncurses +parcheck ssl test zlib"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-libs/boost:=
+	dev-libs/libxml2:=
+	ncurses? ( sys-libs/ncurses:0= )
+	ssl? (
+		gnutls? (
+			net-libs/gnutls:=
+			dev-libs/nettle:=
+		)
+		!gnutls? ( dev-libs/openssl:0=[-bindist(-)] )
+	)
+	zlib? ( sys-libs/zlib:= )"
+RDEPEND="
+	${DEPEND}
+	acct-user/nzbget
+	acct-group/nzbget
+"
+BDEPEND="
+	test? (
+		|| (
+			app-arch/rar
+			app-arch/unrar
+		)
+	)
+	virtual/pkgconfig
+"
+
+DOCS=( ChangeLog.md README.md nzbget.conf )
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-allocah.patch"
+)
+
+src_prepare() {
+	# Do not install a configuration file in /usr/etc
+	sed -i '\:install(FILES ${CMAKE_BINARY_DIR}/nzbget.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/etc):d' cmake/install.cmake || die
+	cmake_src_prepare
+
+	sed -i 's:^ScriptDir=.*:ScriptDir=/usr/share/nzbget/ppscripts:' nzbget.conf || die
+
+	sed \
+		-e 's:^MainDir=.*:MainDir=/var/lib/nzbget:' \
+		-e 's:^LogFile=.*:LogFile=/var/log/nzbget/nzbget.log:' \
+		-e 's:^WebDir=.*:WebDir=/usr/share/nzbget/webui:' \
+		-e 's:^ConfigTemplate=.*:ConfigTemplate=/usr/share/nzbget/nzbget.conf:' \
+		-e 's:^DaemonUsername=.*:DaemonUsername=nzbget:' \
+		nzbget.conf > nzbgetd.conf || die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DDISABLE_CURSES=$(usex !ncurses)
+		-DDISABLE_PARCHECK=$(usex !parcheck)
+		-DDISABLE_TLS=$(usex !ssl)
+		-DDISABLE_GZIP=$(usex !zlib)
+		-DUSE_OPENSSL=$(usex !gnutls)
+		-DUSE_GNUTLS=$(usex gnutls)
+		-DENABLE_TESTS=$(usex test)
+	)
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	insinto /etc
+	doins nzbget.conf
+	doins nzbgetd.conf
+
+	keepdir /var/log/nzbget
+
+	newinitd "${FILESDIR}"/nzbget.initd-r1 nzbget
+	newconfd "${FILESDIR}"/nzbget.confd nzbget
+	systemd_dounit "${FILESDIR}"/nzbget.service
+}
+
+pkg_preinst() {
+	fowners nzbget:nzbget /var/log/nzbget
+	fperms 750 /var/log/nzbget
+
+	fowners nzbget:nzbget /etc/nzbgetd.conf
+	fperms 640 /etc/nzbgetd.conf
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog
+		elog "Please add users that you want to be able to use the system-wide"
+		elog "nzbget daemon to the nzbget group. To access the daemon, run nzbget"
+		elog "with the --configfile /etc/nzbgetd.conf option."
+		elog
+	fi
+}


             reply	other threads:[~2024-07-17  1:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17  1:09 Louis Sautier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-24 22:17 [gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/ Louis Sautier
2022-08-24 10:42 Louis Sautier
2017-10-05 21:37 Sven Wegener
2017-06-23 22:29 Sven Wegener
2016-03-24 16:36 Sven Wegener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1721178487.54e661770fa7c07f2e661accd98b71c4e73ad4fd.sbraz@gentoo \
    --to=sbraz@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox