Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-apps/watchdog/, sys-apps/watchdog/files/
Date: Tue, 03 Jan 2017 03:44:59
Message-Id: 1483279421.ae4d775680d7f6ad140646d8a34a2c459b8e92ad.lluixhi@gentoo
1 commit: ae4d775680d7f6ad140646d8a34a2c459b8e92ad
2 Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
3 AuthorDate: Thu Dec 29 18:23:26 2016 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Sun Jan 1 14:03:41 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=ae4d7756
7
8 sys-apps/watchdog: pick musl patches from upstream
9
10 Gentoo-Bug: #604260
11
12 sys-apps/watchdog/Manifest | 12 +++
13 ...sl-Compile-with-musl-when-nfs-is-disabled.patch | 32 ++++++++
14 ...d-issues-found-with-non-glibc-C-libraries.patch | 96 ++++++++++++++++++++++
15 ...inux-param.h-for-EXEC_PAGESIZE-definition.patch | 28 +++++++
16 sys-apps/watchdog/files/watchdog-conf.d | 6 ++
17 sys-apps/watchdog/files/watchdog-init.d | 48 +++++++++++
18 sys-apps/watchdog/files/watchdog-init.d-r1 | 44 ++++++++++
19 sys-apps/watchdog/files/watchdog.service | 10 +++
20 sys-apps/watchdog/metadata.xml | 14 ++++
21 sys-apps/watchdog/watchdog-5.14.ebuild | 43 ++++++++++
22 sys-apps/watchdog/watchdog-5.15.ebuild | 43 ++++++++++
23 11 files changed, 376 insertions(+)
24
25 diff --git a/sys-apps/watchdog/Manifest b/sys-apps/watchdog/Manifest
26 new file mode 100644
27 index 0000000..20f68a0
28 --- /dev/null
29 +++ b/sys-apps/watchdog/Manifest
30 @@ -0,0 +1,12 @@
31 +AUX musl-Compile-with-musl-when-nfs-is-disabled.patch 827 SHA256 10e3c657b2decdee5cd5bbd4ef42da91514315006cfd18ebe349b00fbaa73134 SHA512 a95b1c4ea9c1c9cf8d4b7b00a19640912371b39478378a79153329a14eb7d63f06c0242f6fc6023613b6508c306f140484b9c744a273c2869735da224b43e097 WHIRLPOOL 83de3fdc2f44e8dc4735d351982c507bbf9ec20d968d71d45236b377bdb5fb5155eccb635c038883874f20349fba6b84ab933bd2e5bb97d286ca16adb0cb3a1f
32 +AUX musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch 2443 SHA256 f56d2a8886388b9b4497056acdd92e4abb57f07368fd3f932682f95ad9f01780 SHA512 aa2facfe3e0d0ef1ddff45574260136fcdfdcc3a5f00b121fd078c28ee62e297379dd2d5c358a746d24b4213c8aac175274a1664fe9b8ecc0882278844d0c4e9 WHIRLPOOL ea8568ff4a06a1a6a1b82fbf56bd292a0bd37582d441cf24cd7a52c28e22abacfbc9879bcaa17d8636c904c853f04a30542374f4279db9e74ab9100bed37ff18
33 +AUX musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch 765 SHA256 7f3a2b9618ecb2cd7d9c32fdb27e6d80bda2dd6f04ead8a52223fef5f0d8cb07 SHA512 6930aaa31c52cbe4b728d875870f788754ac5fe9a1ae45b1deeb31b1745adfc2224da54740da8eead9095972dbf84fed361168a785126cd67514e6748d85881a WHIRLPOOL e2411d983d2d9673d3dd08b13f90ee1a05975661f61ee6ad1ecc53b5d9b1ec019100720d5116a7d2f5d775a60be9580d86919e05d38a291b1d603921104206d3
34 +AUX watchdog-conf.d 165 SHA256 ab86be631bae5f81ee60f1602d5f663bdc15381423197a9aaceea3c8c9861c9c SHA512 bb5da9f7161ff6b7d3b8079a3e81bd9f7ecf6055cd5a32cc599e8bbeccf73672361995f6271129059cd31d4c4f8062686020cc527ae374a17209b8b107098a21 WHIRLPOOL 7c03971bf42276db6121f9f051c9c52d420da23b7e88b60ecd0f4932233ab0507a0be8a4eb4eec232bd21c3e6793127b132e40786d95a98bf277ec60d1cca0c4
35 +AUX watchdog-init.d 868 SHA256 937f7d7fad1600033d27ac2abd448cf1c36b97db3ae89bcebf8ebbd8c972264f SHA512 81ae3054f037e4d281ce0e835ded8ed096faf779a58b63c9ac85875fee4fc24716d1016d46bd14297e8e7dbffe740aba61afb5758e17af6ae7b522bf424c804b WHIRLPOOL 0eb75065d7bbaa07f41e246aead783236012aaecc671551ca7751fe5398b493dcfe6eb75769195efaa645a11d52669cd2dca8785f452d0ff0fbe4d56fc377ed8
36 +AUX watchdog-init.d-r1 780 SHA256 d5be25e8cad3d8c1296e7fcab52627b2c073dd09ec363e9a100fc161840d7ec9 SHA512 359913f95fd99718380a0afc11c6a6637c5cc4f1586554b71db8c05a23d8ca75830d059cc4dfd6d93f9041f8494ab1c63da4e36d6aa3ad92661c61779a083626 WHIRLPOOL a338760d3b2c1588162cb4b51a19ad187d619bc80cf0176ee517b3352ff6c53b86c76484fb9416f0be52213ea56bdbc2dbe1fbdaeb7b31f3f3c698e3434696dc
37 +AUX watchdog.service 146 SHA256 91b021d969dcdf9d87f24c01f88da4dccae5a6697306231e04fe474b8fbe4500 SHA512 5eb489e72351db8a881d84fc15730a91ca2a108641031196ad5374aec5e01fa5b859872fa27c3382b4637482a5c8dab7efa61057f4663ae6c49c4ed01e9d8abd WHIRLPOOL ffd1c299b12059407f376f646998708a78aa480cac83f384bd81017d6eada423e7cf4a0689ef2c626eec7bd950e2f4dbd4bcbea4c24e9357a3cf5d050808e000
38 +DIST watchdog-5.14.tar.gz 216384 SHA256 620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1 SHA512 ccfaca7a68a47cff42dbeae047dfa691e1cfc23851f9ca0634ea6315ff55a13cdbb0020bde7df38b702c82c0535ad41f520617dd639037e171701a6b0f8991aa WHIRLPOOL 5520e0a4970a20c25780d507260380acf2056828bad8702de98039876526c39a40f884eb1b684cf39386479e6d40c08f3134b138cc6caf51b4150289a364239c
39 +DIST watchdog-5.15.tar.gz 228132 SHA256 ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c SHA512 a675cfadf3296d583b9163193297038fb19459daf7c6681289392d613e775e75b7afd42a3e01b136a955f25b2f45818033b56e10de9050075d7dc015535a6e75 WHIRLPOOL ebd7ee604ddbad856760949b16615693b1665289d57312f7dee10cea1d358dbd20f2beb2656e549a80c81ad08e5e6de8621cda3ad4eb696e9af7b63b8b4045b9
40 +EBUILD watchdog-5.14.ebuild 1028 SHA256 84dc108b2aaf4f8faf2f5c88ef0dce2fa3acdae838d7deb564c2f1367a665331 SHA512 7ac94499b49b4785f70fde24c28fb33f324faf90e7445890a7f79dc0554244f59d227fc19cc11c4328c7ddba02bf94ee01d01abe86b65e9d12ddaf5b934e514a WHIRLPOOL 8e0931befdced8b6cb82b7d66501b875de5db31b93d85ccb27bf50eed311b061c80292b86ed8f61229c35e78e43177d1ca0ee6d232011a294f18fcc4a8bb8b6f
41 +EBUILD watchdog-5.15.ebuild 1072 SHA256 dc1f7b926d90590ba495a98f5f64b0c6eae78a793044adce1ab9f74d0ae5d910 SHA512 c35132c564879ea31177c11d7ee96b4e76b638deeab467ab54f3ca4c7944d7f245eb8784ce562c35685bbda81e7065f119682e05e6142ea7d3e2dfa6a0a532fb WHIRLPOOL 885a7fa97eec61490110a6f7eec58741dd7d7ceed2cebc3f622889607a9553c3810f23832e87231273e644811aba7012654db89d3a6d3295c8c7c659fd8362dc
42 +MISC metadata.xml 405 SHA256 df8b3f543f03f2448f223bdc8555d159448a5f111f21ee74db2ae213e3ad275e SHA512 36da0e0199b41608190b0e39de2b82bea5516890208c57744b93e527904501de01b1bfd4e20fc74450bd7b9ac4d152e0d57e31a35deca0b1edddc9ce60846d0b WHIRLPOOL 88b9d34283d0ebe4d570cc6062e375998f5687b1f33ac1e93476b7c9e27763670a671a1a7488b2a9b04f2ba23722ddae446064436bcdeb9d1c2f5501d992e0b6
43
44 diff --git a/sys-apps/watchdog/files/musl-Compile-with-musl-when-nfs-is-disabled.patch b/sys-apps/watchdog/files/musl-Compile-with-musl-when-nfs-is-disabled.patch
45 new file mode 100644
46 index 0000000..4898d21
47 --- /dev/null
48 +++ b/sys-apps/watchdog/files/musl-Compile-with-musl-when-nfs-is-disabled.patch
49 @@ -0,0 +1,32 @@
50 +From f52c40680f0aad44b9ae16648803453ec00cbb2c Mon Sep 17 00:00:00 2001
51 +From: Paul Crawford <psc@×××××××××××××.uk>
52 +Date: Fri, 30 Dec 2016 15:55:45 +0000
53 +Subject: [PATCH 1/3] Compile with musl when nfs is disabled
54 +
55 +musl does by default not ship with rpc headers. The watchdog should
56 +not require rpc headers when nfs support is disabled.
57 +
58 +Patch by Felix Janda <fjanda@××××××××.net>
59 +---
60 + include/sundries.h | 2 ++
61 + 1 file changed, 2 insertions(+)
62 +
63 +diff --git a/include/sundries.h b/include/sundries.h
64 +index 4379982..98c489a 100644
65 +--- a/include/sundries.h
66 ++++ b/include/sundries.h
67 +@@ -9,9 +9,11 @@
68 + #include <signal.h>
69 + #include <stdarg.h>
70 + #include <stdlib.h>
71 ++#if HAVE_NFS
72 + #if !defined(bool_t) && !defined(__GLIBC__)
73 + #include <rpc/types.h>
74 + #endif
75 ++#endif
76 +
77 + extern int mount_mount_quiet;
78 + extern int mount_verbose;
79 +--
80 +2.7.3
81 +
82
83 diff --git a/sys-apps/watchdog/files/musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch b/sys-apps/watchdog/files/musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch
84 new file mode 100644
85 index 0000000..ca2b9c7
86 --- /dev/null
87 +++ b/sys-apps/watchdog/files/musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch
88 @@ -0,0 +1,96 @@
89 +From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
90 +From: Khem Raj <raj.khem@×××××.com>
91 +Date: Wed, 30 Dec 2015 01:01:15 +0000
92 +Subject: [PATCH] Fix build issues found with non glibc C libraries
93 +
94 +Add time.h for getting time_t definition
95 +limits.h for PATH_MAX
96 +linux/param.h for EXEC_PAGESIZE
97 +Replace deprecated MNTTAB with _PATH_MNTTAB
98 +include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
99 +MNTTYPE_EXT2
100 +Include sys/types.h for u_char definition
101 +
102 +Signed-off-by: Khem Raj <raj.khem@×××××.com>
103 +---
104 + include/extern.h | 1 +
105 + src/configfile.c | 1 +
106 + src/memory.c | 3 +++
107 + src/net.c | 1 +
108 + src/shutdown.c | 3 ++-
109 + 5 files changed, 8 insertions(+), 1 deletion(-)
110 +
111 +diff --git a/include/extern.h b/include/extern.h
112 +index 21db11b..04b16bc 100644
113 +--- a/include/extern.h
114 ++++ b/include/extern.h
115 +@@ -3,6 +3,7 @@
116 +
117 + #include <netinet/in.h>
118 + #include <stdio.h>
119 ++#include <time.h>
120 +
121 + #include "logmessage.h"
122 + #include "xmalloc.h"
123 +diff --git a/src/configfile.c b/src/configfile.c
124 +index be5d7b3..7c1d1dd 100644
125 +--- a/src/configfile.c
126 ++++ b/src/configfile.c
127 +@@ -16,6 +16,7 @@
128 + #include <errno.h>
129 + #include <string.h>
130 + #include <dirent.h>
131 ++#include <limits.h>
132 + #include <sys/stat.h>
133 +
134 + #include "extern.h"
135 +diff --git a/src/memory.c b/src/memory.c
136 +index e9607e4..b5e08aa 100644
137 +--- a/src/memory.c
138 ++++ b/src/memory.c
139 +@@ -21,6 +21,9 @@
140 + #include <sys/stat.h>
141 + #include <sys/param.h>
142 + #include <sys/mman.h>
143 ++#ifdef __linux__
144 ++#include <linux/param.h>
145 ++#endif
146 +
147 + #include "extern.h"
148 + #include "watch_err.h"
149 +diff --git a/src/net.c b/src/net.c
150 +index 21823ae..8930caf 100644
151 +--- a/src/net.c
152 ++++ b/src/net.c
153 +@@ -17,6 +17,7 @@
154 + #include <string.h>
155 + #include <unistd.h> /* for gethostname() etc */
156 + #include <netdb.h> /* for gethostbyname() */
157 ++#include <sys/types.h>
158 + #include <sys/param.h> /* for MAXHOSTNAMELEN */
159 + #include <sys/socket.h>
160 + #include <netinet/in.h>
161 +diff --git a/src/shutdown.c b/src/shutdown.c
162 +index 74aafa5..46b99cf 100644
163 +--- a/src/shutdown.c
164 ++++ b/src/shutdown.c
165 +@@ -25,6 +25,7 @@
166 +
167 + #include "watch_err.h"
168 + #include "extern.h"
169 ++#include "ext2_mnt.h"
170 +
171 + #if defined __GLIBC__
172 + #include "ext2_mnt.h"
173 +@@ -123,7 +124,7 @@ static void mnt_off()
174 + FILE *fp;
175 + struct mntent *mnt;
176 +
177 +- fp = setmntent(MNTTAB, "r");
178 ++ fp = setmntent(_PATH_MNTTAB, "r");
179 + /* in some rare cases fp might be NULL so be careful */
180 + while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
181 + /* First check if swap */
182 +--
183 +2.6.4
184 +
185
186 diff --git a/sys-apps/watchdog/files/musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch b/sys-apps/watchdog/files/musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch
187 new file mode 100644
188 index 0000000..73f58e2
189 --- /dev/null
190 +++ b/sys-apps/watchdog/files/musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch
191 @@ -0,0 +1,28 @@
192 +From c5cb4e1a0339844ae3f55ff1dc4a716c28012f05 Mon Sep 17 00:00:00 2001
193 +From: Paul Crawford <psc@×××××××××××××.uk>
194 +Date: Tue, 28 Jun 2016 18:08:48 +0100
195 +Subject: [PATCH 1/3] Include linux/param.h for EXEC_PAGESIZE definition
196 +
197 +Musl does not include linux/param.h whereas glibc does, so it fails
198 +to build on musl. Patch supplied by Khem Raj <raj.khem@×××××.com>
199 +---
200 + src/watchdog.c | 3 +++
201 + 1 file changed, 3 insertions(+)
202 +
203 +diff --git a/src/watchdog.c b/src/watchdog.c
204 +index acf6450..486384a 100644
205 +--- a/src/watchdog.c
206 ++++ b/src/watchdog.c
207 +@@ -26,6 +26,9 @@
208 + #include <sys/param.h> /* For EXEC_PAGESIZE */
209 + #include <linux/oom.h>
210 + #include <linux/watchdog.h>
211 ++#ifdef __linux__
212 ++#include <linux/param.h>
213 ++#endif
214 + #include <string.h>
215 +
216 + #include <libgen.h>
217 +--
218 +2.7.3
219 +
220
221 diff --git a/sys-apps/watchdog/files/watchdog-conf.d b/sys-apps/watchdog/files/watchdog-conf.d
222 new file mode 100644
223 index 0000000..60c7843
224 --- /dev/null
225 +++ b/sys-apps/watchdog/files/watchdog-conf.d
226 @@ -0,0 +1,6 @@
227 +# Copyright 1999-2005 Gentoo Foundation
228 +# Distributed under the terms of the GNU General Public License v2
229 +# $Id$
230 +
231 +# for more info, see watchdog(8)
232 +WATCHDOG_OPTS=""
233
234 diff --git a/sys-apps/watchdog/files/watchdog-init.d b/sys-apps/watchdog/files/watchdog-init.d
235 new file mode 100644
236 index 0000000..a646838
237 --- /dev/null
238 +++ b/sys-apps/watchdog/files/watchdog-init.d
239 @@ -0,0 +1,48 @@
240 +#!/sbin/openrc-run
241 +# Copyright 1999-2009 Gentoo Foundation
242 +# Distributed under the terms of the GNU General Public License v2
243 +# $Id$
244 +
245 +depend() {
246 + need localmount
247 + use logger
248 +}
249 +
250 +get_config() {
251 + set -- ${WATCHDOG_OPTS}
252 + while [ -n "$1" ] ; do
253 + if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
254 + echo $2
255 + return
256 + fi
257 + shift
258 + done
259 + echo /etc/watchdog.conf
260 +}
261 +
262 +get_delay() {
263 + # man this is fugly
264 + sed -n \
265 + -e '1{x;s:.*:10:;x}' \
266 + -e 's:#.*::' \
267 + -e 's:^[[:space:]]*::' \
268 + -e '/^interval/{s:.*=::;h}' \
269 + -e '${g;p}' \
270 + $(get_config)
271 +}
272 +
273 +start() {
274 + ebegin "Starting watchdog"
275 + start-stop-daemon --start \
276 + --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
277 + -- ${WATCHDOG_OPTS}
278 + eend $?
279 +}
280 +
281 +stop() {
282 + ebegin "Stopping watchdog"
283 + start-stop-daemon --stop \
284 + --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
285 + --retry $(get_delay)
286 + eend $?
287 +}
288
289 diff --git a/sys-apps/watchdog/files/watchdog-init.d-r1 b/sys-apps/watchdog/files/watchdog-init.d-r1
290 new file mode 100644
291 index 0000000..7960201
292 --- /dev/null
293 +++ b/sys-apps/watchdog/files/watchdog-init.d-r1
294 @@ -0,0 +1,44 @@
295 +#!/sbin/openrc-run
296 +# Copyright 1999-2016 Gentoo Foundation
297 +# Distributed under the terms of the GNU General Public License v2
298 +# $Id$
299 +
300 +pidfile="/var/run/watchdog.pid"
301 +command="/usr/sbin/watchdog"
302 +command_args="${WATCHDOG_OPTS}"
303 +
304 +depend() {
305 + need localmount
306 + use logger
307 +}
308 +
309 +get_config() {
310 + set -- ${WATCHDOG_OPTS}
311 + while [ -n "$1" ] ; do
312 + if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
313 + echo $2
314 + return
315 + fi
316 + shift
317 + done
318 + echo /etc/watchdog.conf
319 +}
320 +
321 +get_delay() {
322 + # man this is fugly
323 + sed -n \
324 + -e '1{x;s:.*:10:;x}' \
325 + -e 's:#.*::' \
326 + -e 's:^[[:space:]]*::' \
327 + -e '/^interval/{s:.*=::;h}' \
328 + -e '${g;p}' \
329 + $(get_config)
330 +}
331 +
332 +stop() {
333 + ebegin "Stopping watchdog"
334 + start-stop-daemon --stop \
335 + --exec ${command} --pidfile ${pidfile} \
336 + --retry $(get_delay)
337 + eend $?
338 +}
339
340 diff --git a/sys-apps/watchdog/files/watchdog.service b/sys-apps/watchdog/files/watchdog.service
341 new file mode 100644
342 index 0000000..9ec1076
343 --- /dev/null
344 +++ b/sys-apps/watchdog/files/watchdog.service
345 @@ -0,0 +1,10 @@
346 +[Unit]
347 +Description=watchdog daemon
348 +After=syslog.target
349 +
350 +[Service]
351 +Type=forking
352 +ExecStart=/usr/sbin/watchdog
353 +
354 +[Install]
355 +WantedBy=multi-user.target
356
357 diff --git a/sys-apps/watchdog/metadata.xml b/sys-apps/watchdog/metadata.xml
358 new file mode 100644
359 index 0000000..36ad6a6
360 --- /dev/null
361 +++ b/sys-apps/watchdog/metadata.xml
362 @@ -0,0 +1,14 @@
363 +<?xml version="1.0" encoding="UTF-8"?>
364 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
365 +<pkgmetadata>
366 +<maintainer type="project">
367 + <email>base-system@g.o</email>
368 + <name>Gentoo Base System</name>
369 +</maintainer>
370 +<use>
371 + <flag name="nfs">enable support for checking nfs mounts</flag>
372 +</use>
373 +<upstream>
374 + <remote-id type="sourceforge">watchdog</remote-id>
375 +</upstream>
376 +</pkgmetadata>
377
378 diff --git a/sys-apps/watchdog/watchdog-5.14.ebuild b/sys-apps/watchdog/watchdog-5.14.ebuild
379 new file mode 100644
380 index 0000000..86763ab
381 --- /dev/null
382 +++ b/sys-apps/watchdog/watchdog-5.14.ebuild
383 @@ -0,0 +1,43 @@
384 +# Copyright 1999-2016 Gentoo Foundation
385 +# Distributed under the terms of the GNU General Public License v2
386 +# $Id$
387 +
388 +EAPI=6
389 +
390 +inherit toolchain-funcs flag-o-matic systemd
391 +
392 +DESCRIPTION="A software watchdog and /dev/watchdog daemon"
393 +HOMEPAGE="https://sourceforge.net/projects/watchdog/"
394 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
395 +
396 +LICENSE="GPL-2"
397 +SLOT="0"
398 +KEYWORDS="amd64 arm m68k ~mips ppc s390 sh ~sparc x86"
399 +IUSE="nfs"
400 +
401 +DEPEND="nfs? ( net-libs/libtirpc )"
402 +RDEPEND="${DEPEND}"
403 +
404 +PATCHES=(
405 + "${FILESDIR}/musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch"
406 + "${FILESDIR}/musl-Compile-with-musl-when-nfs-is-disabled.patch"
407 +)
408 +
409 +src_configure() {
410 + if use nfs ; then
411 + tc-export PKG_CONFIG
412 + append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
413 + export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
414 + fi
415 + econf $(use_enable nfs)
416 +}
417 +
418 +src_install() {
419 + default
420 + docinto examples
421 + dodoc examples/*
422 +
423 + newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
424 + newinitd "${FILESDIR}"/${PN}-init.d ${PN}
425 + systemd_dounit "${FILESDIR}"/watchdog.service
426 +}
427
428 diff --git a/sys-apps/watchdog/watchdog-5.15.ebuild b/sys-apps/watchdog/watchdog-5.15.ebuild
429 new file mode 100644
430 index 0000000..67dc3b8
431 --- /dev/null
432 +++ b/sys-apps/watchdog/watchdog-5.15.ebuild
433 @@ -0,0 +1,43 @@
434 +# Copyright 1999-2016 Gentoo Foundation
435 +# Distributed under the terms of the GNU General Public License v2
436 +# $Id$
437 +
438 +EAPI=6
439 +
440 +inherit toolchain-funcs flag-o-matic systemd
441 +
442 +DESCRIPTION="A software watchdog and /dev/watchdog daemon"
443 +HOMEPAGE="https://sourceforge.net/projects/watchdog/"
444 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
445 +
446 +LICENSE="GPL-2"
447 +SLOT="0"
448 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
449 +IUSE="nfs"
450 +
451 +DEPEND="nfs? ( net-libs/libtirpc )"
452 +RDEPEND="${DEPEND}"
453 +
454 +PATCHES=(
455 + "${FILESDIR}/musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch"
456 + "${FILESDIR}/musl-Compile-with-musl-when-nfs-is-disabled.patch"
457 +)
458 +
459 +src_configure() {
460 + if use nfs ; then
461 + tc-export PKG_CONFIG
462 + append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
463 + export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
464 + fi
465 + econf $(use_enable nfs)
466 +}
467 +
468 +src_install() {
469 + default
470 + docinto examples
471 + dodoc examples/*
472 +
473 + newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
474 + newinitd "${FILESDIR}"/${PN}-init.d-r1 ${PN}
475 + systemd_dounit "${FILESDIR}"/watchdog.service
476 +}