1 |
commit: 9739194b9f3017af85679495544482e5d95cdf62 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 31 14:02:55 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 31 14:07:33 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9739194b |
7 |
|
8 |
net-misc/htpdate: Added live ebuild for new upstream |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
net-misc/htpdate/files/htpdate-1.2.6-ldlibs.patch | 35 ++++++++++++++ |
13 |
net-misc/htpdate/htpdate-9999.ebuild | 57 +++++++++++++++++++++++ |
14 |
2 files changed, 92 insertions(+) |
15 |
|
16 |
diff --git a/net-misc/htpdate/files/htpdate-1.2.6-ldlibs.patch b/net-misc/htpdate/files/htpdate-1.2.6-ldlibs.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..fea1d85b10b |
19 |
--- /dev/null |
20 |
+++ b/net-misc/htpdate/files/htpdate-1.2.6-ldlibs.patch |
21 |
@@ -0,0 +1,35 @@ |
22 |
+From ea14fbcd91e5575bf16bc64b7660a6d02a855d7a Mon Sep 17 00:00:00 2001 |
23 |
+From: Lars Wendler <polynomial-c@g.o> |
24 |
+Date: Wed, 31 Mar 2021 15:46:38 +0200 |
25 |
+Subject: [PATCH] Makefile: Libraries belong into LDLIBS variable |
26 |
+ |
27 |
+Signed-off-by: Lars Wendler <polynomial-c@g.o> |
28 |
+--- |
29 |
+ Makefile | 4 ++-- |
30 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
31 |
+ |
32 |
+diff --git a/Makefile b/Makefile |
33 |
+index 21668a6..a531f90 100644 |
34 |
+--- a/Makefile |
35 |
++++ b/Makefile |
36 |
+@@ -8,7 +8,7 @@ PKG_CONFIG ?= pkg-config |
37 |
+ |
38 |
+ ifdef ENABLE_HTTPS |
39 |
+ CFLAGS += -DENABLE_HTTPS |
40 |
+-LDFLAGS += $(shell $(PKG_CONFIG) --libs openssl) |
41 |
++LDLIBS = $(shell $(PKG_CONFIG) --libs openssl) |
42 |
+ endif |
43 |
+ |
44 |
+ INSTALL = install -c |
45 |
+@@ -16,7 +16,7 @@ INSTALL = install -c |
46 |
+ all: htpdate |
47 |
+ |
48 |
+ htpdate: htpdate.c |
49 |
+- $(CC) $(CFLAGS) $(CPPFLAGS) -o htpdate htpdate.c $(LDFLAGS) |
50 |
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o htpdate htpdate.c $(LDLIBS) |
51 |
+ |
52 |
+ install: all |
53 |
+ mkdir -p $(bindir) |
54 |
+-- |
55 |
+2.31.1 |
56 |
+ |
57 |
|
58 |
diff --git a/net-misc/htpdate/htpdate-9999.ebuild b/net-misc/htpdate/htpdate-9999.ebuild |
59 |
new file mode 100644 |
60 |
index 00000000000..03379020927 |
61 |
--- /dev/null |
62 |
+++ b/net-misc/htpdate/htpdate-9999.ebuild |
63 |
@@ -0,0 +1,57 @@ |
64 |
+# Copyright 1999-2021 Gentoo Authors |
65 |
+# Distributed under the terms of the GNU General Public License v2 |
66 |
+ |
67 |
+EAPI=7 |
68 |
+ |
69 |
+inherit flag-o-matic readme.gentoo-r1 toolchain-funcs |
70 |
+ |
71 |
+DESCRIPTION="Synchronize local workstation with time offered by remote webservers" |
72 |
+HOMEPAGE="https://github.com/angeloc/htpdate" |
73 |
+if [[ "${PV}" == *9999 ]] ; then |
74 |
+ inherit git-r3 |
75 |
+ EGIT_REPO_URI="https://github.com/angeloc/htpdate.git" |
76 |
+else |
77 |
+ SRC_URI="https://github.com/angeloc/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
78 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux" |
79 |
+fi |
80 |
+IUSE="+ssl" |
81 |
+LICENSE="GPL-2" |
82 |
+SLOT="0" |
83 |
+ |
84 |
+DEPEND="ssl? ( dev-libs/openssl:0= )" |
85 |
+RDEPEND="${DEPEND}" |
86 |
+BDEPEND="ssl? ( virtual/pkgconfig )" |
87 |
+ |
88 |
+DOC_CONTENTS="If you would like to run htpdate as a daemon, set |
89 |
+appropriate http servers in /etc/conf.d/htpdate!" |
90 |
+ |
91 |
+PATCHES=( "${FILESDIR}/${PN}-1.2.6-ldlibs.patch" ) |
92 |
+ |
93 |
+src_prepare() { |
94 |
+ default |
95 |
+ |
96 |
+ # Use more standard adjtimex() to fix uClibc builds. |
97 |
+ sed -i 's:ntp_adjtime:adjtimex:g' htpdate.[8c] || die |
98 |
+ # Don't compress man pages by default |
99 |
+ sed '/gzip/d' -i Makefile || die |
100 |
+} |
101 |
+ |
102 |
+src_compile() { |
103 |
+ if use ssl ; then |
104 |
+ append-cflags -DENABLE_HTTPS |
105 |
+ export PKG_CONFIG="$(tc-getPKG_CONFIG)" |
106 |
+ fi |
107 |
+ |
108 |
+ emake CFLAGS="-Wall ${CFLAGS}" CC="$(tc-getCC)" \ |
109 |
+ $(usex ssl 'ENABLE_HTTPS=1' '') |
110 |
+} |
111 |
+ |
112 |
+src_install() { |
113 |
+ emake DESTDIR="${D}" bindir='$(prefix)/sbin' install |
114 |
+ dodoc README.md Changelog |
115 |
+ |
116 |
+ newconfd "${FILESDIR}"/htpdate.conf htpdate |
117 |
+ newinitd "${FILESDIR}"/htpdate.init-r1 htpdate |
118 |
+ |
119 |
+ readme.gentoo_create_doc |
120 |
+} |