From 41f15fb2b5870cc0ec420e817fcbdc49fb4f35dd Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 30 May 2025 12:17:40 +0100 Subject: [PATCH] net-misc/htpdate: add 2.0.0 * Drop uclibc sed. If that would still be needed, it should be a proper patch. * GPL-2+ for LICENSE as --help/--version output shows it now. * wrt tests: did try to make tests available w/ ALLOW_TEST=network but they seem to fail for me even with that. Signed-off-by: Sam James --- net-misc/htpdate/Manifest | 1 + net-misc/htpdate/htpdate-2.0.0.ebuild | 55 +++++++++++++++++++++++++++ net-misc/htpdate/htpdate-9999.ebuild | 8 ++-- 3 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 net-misc/htpdate/htpdate-2.0.0.ebuild diff --git a/net-misc/htpdate/Manifest b/net-misc/htpdate/Manifest index 4a5ee50fe01d0..4f6d067de40be 100644 --- a/net-misc/htpdate/Manifest +++ b/net-misc/htpdate/Manifest @@ -1 +1,2 @@ DIST htpdate-1.3.6.tar.gz 16683 BLAKE2B ad6e689f64a2cff3e5a832d8ed6bfc85acc7ea99d16e6da5c1ff9052009b46b5ee5dfd113232908df17eb837470c47063be6b5cc91270d6301b78efab8f71ce5 SHA512 41b9ed50e962bb5c207122c4929d919ae4491a2d527f29aafb4a3ef175c3c12e608c77632037d48b5440e48ff051c89caf3e923987ad53329056b83838943439 +DIST htpdate-2.0.0.tar.gz 17443 BLAKE2B dc2f9377ca188b3308bde2ecf42b16e06a871d78ec3e8cf4f5aafb9d26a0cd4c66808694c7e74972328b32c324d77127bcac84128def4cc106e6af6f995d690e SHA512 1500aade1d693748a5fbd01c3b3b85a56766741c510aab74ddc4a85daf3bc27d41df2d4bd957c0d8bd63a53703837bb81dd14681e66d4a38fda6360e9fe26b0d diff --git a/net-misc/htpdate/htpdate-2.0.0.ebuild b/net-misc/htpdate/htpdate-2.0.0.ebuild new file mode 100644 index 0000000000000..76a9b1d3a8344 --- /dev/null +++ b/net-misc/htpdate/htpdate-2.0.0.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 toolchain-funcs + +DESCRIPTION="Synchronize local workstation with time offered by remote webservers" +HOMEPAGE="https://www.vervest.org/htp/" +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/twekkel/htpdate" +else + SRC_URI="https://github.com/twekkel/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="GPL-2+" +SLOT="0" +IUSE="+ssl" + +DEPEND="ssl? ( dev-libs/openssl:= )" +RDEPEND="${DEPEND}" + +# Test suite tries to connect to the Internet +#PROPERTIES="test_network" +# ... but seems to fail even if allowing that? +RESTRICT="test" + +DOC_CONTENTS="If you would like to run htpdate as a daemon, set +appropriate http servers in /etc/conf.d/htpdate!" + +src_prepare() { + default + + # Don't compress man pages by default + sed '/gzip/d' -i Makefile || die +} + +src_compile() { + emake \ + CFLAGS="-Wall ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" \ + CC="$(tc-getCC)" \ + $(usev ssl 'https') +} + +src_install() { + emake DESTDIR="${D}" STRIP="/bin/true" bindir='$(prefix)/sbin' install + dodoc README.md Changelog + + newconfd "${FILESDIR}"/htpdate.conf htpdate + newinitd "${FILESDIR}"/htpdate.init-r1 htpdate + + readme.gentoo_create_doc +} diff --git a/net-misc/htpdate/htpdate-9999.ebuild b/net-misc/htpdate/htpdate-9999.ebuild index 409f146ff81c0..76a9b1d3a8344 100644 --- a/net-misc/htpdate/htpdate-9999.ebuild +++ b/net-misc/htpdate/htpdate-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -15,7 +15,7 @@ else KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux" fi -LICENSE="GPL-2" +LICENSE="GPL-2+" SLOT="0" IUSE="+ssl" @@ -23,6 +23,8 @@ DEPEND="ssl? ( dev-libs/openssl:= )" RDEPEND="${DEPEND}" # Test suite tries to connect to the Internet +#PROPERTIES="test_network" +# ... but seems to fail even if allowing that? RESTRICT="test" DOC_CONTENTS="If you would like to run htpdate as a daemon, set @@ -31,8 +33,6 @@ appropriate http servers in /etc/conf.d/htpdate!" src_prepare() { default - # Use more standard adjtimex() to fix uClibc builds. - sed -i 's:ntp_adjtime:adjtimex:g' htpdate.[8c] || die # Don't compress man pages by default sed '/gzip/d' -i Makefile || die }