aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Olivier Mercier <nemunaire@nemunai.re>2016-12-29 19:23:26 +0100
committerPierre-Olivier Mercier <nemunaire@nemunai.re>2017-01-01 15:03:41 +0100
commitae4d775680d7f6ad140646d8a34a2c459b8e92ad (patch)
tree2257de665e43adc6cf1ab5500038536033b88eeb /sys-apps/watchdog
parentapp-office/libreoffice: version bump to 5.2.4.2 (diff)
downloadmusl-ae4d775680d7f6ad140646d8a34a2c459b8e92ad.tar.gz
musl-ae4d775680d7f6ad140646d8a34a2c459b8e92ad.tar.bz2
musl-ae4d775680d7f6ad140646d8a34a2c459b8e92ad.zip
sys-apps/watchdog: pick musl patches from upstream
Gentoo-Bug: #604260
Diffstat (limited to 'sys-apps/watchdog')
-rw-r--r--sys-apps/watchdog/Manifest12
-rw-r--r--sys-apps/watchdog/files/musl-Compile-with-musl-when-nfs-is-disabled.patch32
-rw-r--r--sys-apps/watchdog/files/musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch96
-rw-r--r--sys-apps/watchdog/files/musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch28
-rw-r--r--sys-apps/watchdog/files/watchdog-conf.d6
-rw-r--r--sys-apps/watchdog/files/watchdog-init.d48
-rw-r--r--sys-apps/watchdog/files/watchdog-init.d-r144
-rw-r--r--sys-apps/watchdog/files/watchdog.service10
-rw-r--r--sys-apps/watchdog/metadata.xml14
-rw-r--r--sys-apps/watchdog/watchdog-5.14.ebuild43
-rw-r--r--sys-apps/watchdog/watchdog-5.15.ebuild43
11 files changed, 376 insertions, 0 deletions
diff --git a/sys-apps/watchdog/Manifest b/sys-apps/watchdog/Manifest
new file mode 100644
index 0000000..20f68a0
--- /dev/null
+++ b/sys-apps/watchdog/Manifest
@@ -0,0 +1,12 @@
+AUX musl-Compile-with-musl-when-nfs-is-disabled.patch 827 SHA256 10e3c657b2decdee5cd5bbd4ef42da91514315006cfd18ebe349b00fbaa73134 SHA512 a95b1c4ea9c1c9cf8d4b7b00a19640912371b39478378a79153329a14eb7d63f06c0242f6fc6023613b6508c306f140484b9c744a273c2869735da224b43e097 WHIRLPOOL 83de3fdc2f44e8dc4735d351982c507bbf9ec20d968d71d45236b377bdb5fb5155eccb635c038883874f20349fba6b84ab933bd2e5bb97d286ca16adb0cb3a1f
+AUX musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch 2443 SHA256 f56d2a8886388b9b4497056acdd92e4abb57f07368fd3f932682f95ad9f01780 SHA512 aa2facfe3e0d0ef1ddff45574260136fcdfdcc3a5f00b121fd078c28ee62e297379dd2d5c358a746d24b4213c8aac175274a1664fe9b8ecc0882278844d0c4e9 WHIRLPOOL ea8568ff4a06a1a6a1b82fbf56bd292a0bd37582d441cf24cd7a52c28e22abacfbc9879bcaa17d8636c904c853f04a30542374f4279db9e74ab9100bed37ff18
+AUX musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch 765 SHA256 7f3a2b9618ecb2cd7d9c32fdb27e6d80bda2dd6f04ead8a52223fef5f0d8cb07 SHA512 6930aaa31c52cbe4b728d875870f788754ac5fe9a1ae45b1deeb31b1745adfc2224da54740da8eead9095972dbf84fed361168a785126cd67514e6748d85881a WHIRLPOOL e2411d983d2d9673d3dd08b13f90ee1a05975661f61ee6ad1ecc53b5d9b1ec019100720d5116a7d2f5d775a60be9580d86919e05d38a291b1d603921104206d3
+AUX watchdog-conf.d 165 SHA256 ab86be631bae5f81ee60f1602d5f663bdc15381423197a9aaceea3c8c9861c9c SHA512 bb5da9f7161ff6b7d3b8079a3e81bd9f7ecf6055cd5a32cc599e8bbeccf73672361995f6271129059cd31d4c4f8062686020cc527ae374a17209b8b107098a21 WHIRLPOOL 7c03971bf42276db6121f9f051c9c52d420da23b7e88b60ecd0f4932233ab0507a0be8a4eb4eec232bd21c3e6793127b132e40786d95a98bf277ec60d1cca0c4
+AUX watchdog-init.d 868 SHA256 937f7d7fad1600033d27ac2abd448cf1c36b97db3ae89bcebf8ebbd8c972264f SHA512 81ae3054f037e4d281ce0e835ded8ed096faf779a58b63c9ac85875fee4fc24716d1016d46bd14297e8e7dbffe740aba61afb5758e17af6ae7b522bf424c804b WHIRLPOOL 0eb75065d7bbaa07f41e246aead783236012aaecc671551ca7751fe5398b493dcfe6eb75769195efaa645a11d52669cd2dca8785f452d0ff0fbe4d56fc377ed8
+AUX watchdog-init.d-r1 780 SHA256 d5be25e8cad3d8c1296e7fcab52627b2c073dd09ec363e9a100fc161840d7ec9 SHA512 359913f95fd99718380a0afc11c6a6637c5cc4f1586554b71db8c05a23d8ca75830d059cc4dfd6d93f9041f8494ab1c63da4e36d6aa3ad92661c61779a083626 WHIRLPOOL a338760d3b2c1588162cb4b51a19ad187d619bc80cf0176ee517b3352ff6c53b86c76484fb9416f0be52213ea56bdbc2dbe1fbdaeb7b31f3f3c698e3434696dc
+AUX watchdog.service 146 SHA256 91b021d969dcdf9d87f24c01f88da4dccae5a6697306231e04fe474b8fbe4500 SHA512 5eb489e72351db8a881d84fc15730a91ca2a108641031196ad5374aec5e01fa5b859872fa27c3382b4637482a5c8dab7efa61057f4663ae6c49c4ed01e9d8abd WHIRLPOOL ffd1c299b12059407f376f646998708a78aa480cac83f384bd81017d6eada423e7cf4a0689ef2c626eec7bd950e2f4dbd4bcbea4c24e9357a3cf5d050808e000
+DIST watchdog-5.14.tar.gz 216384 SHA256 620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1 SHA512 ccfaca7a68a47cff42dbeae047dfa691e1cfc23851f9ca0634ea6315ff55a13cdbb0020bde7df38b702c82c0535ad41f520617dd639037e171701a6b0f8991aa WHIRLPOOL 5520e0a4970a20c25780d507260380acf2056828bad8702de98039876526c39a40f884eb1b684cf39386479e6d40c08f3134b138cc6caf51b4150289a364239c
+DIST watchdog-5.15.tar.gz 228132 SHA256 ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c SHA512 a675cfadf3296d583b9163193297038fb19459daf7c6681289392d613e775e75b7afd42a3e01b136a955f25b2f45818033b56e10de9050075d7dc015535a6e75 WHIRLPOOL ebd7ee604ddbad856760949b16615693b1665289d57312f7dee10cea1d358dbd20f2beb2656e549a80c81ad08e5e6de8621cda3ad4eb696e9af7b63b8b4045b9
+EBUILD watchdog-5.14.ebuild 1028 SHA256 84dc108b2aaf4f8faf2f5c88ef0dce2fa3acdae838d7deb564c2f1367a665331 SHA512 7ac94499b49b4785f70fde24c28fb33f324faf90e7445890a7f79dc0554244f59d227fc19cc11c4328c7ddba02bf94ee01d01abe86b65e9d12ddaf5b934e514a WHIRLPOOL 8e0931befdced8b6cb82b7d66501b875de5db31b93d85ccb27bf50eed311b061c80292b86ed8f61229c35e78e43177d1ca0ee6d232011a294f18fcc4a8bb8b6f
+EBUILD watchdog-5.15.ebuild 1072 SHA256 dc1f7b926d90590ba495a98f5f64b0c6eae78a793044adce1ab9f74d0ae5d910 SHA512 c35132c564879ea31177c11d7ee96b4e76b638deeab467ab54f3ca4c7944d7f245eb8784ce562c35685bbda81e7065f119682e05e6142ea7d3e2dfa6a0a532fb WHIRLPOOL 885a7fa97eec61490110a6f7eec58741dd7d7ceed2cebc3f622889607a9553c3810f23832e87231273e644811aba7012654db89d3a6d3295c8c7c659fd8362dc
+MISC metadata.xml 405 SHA256 df8b3f543f03f2448f223bdc8555d159448a5f111f21ee74db2ae213e3ad275e SHA512 36da0e0199b41608190b0e39de2b82bea5516890208c57744b93e527904501de01b1bfd4e20fc74450bd7b9ac4d152e0d57e31a35deca0b1edddc9ce60846d0b WHIRLPOOL 88b9d34283d0ebe4d570cc6062e375998f5687b1f33ac1e93476b7c9e27763670a671a1a7488b2a9b04f2ba23722ddae446064436bcdeb9d1c2f5501d992e0b6
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
new file mode 100644
index 0000000..4898d21
--- /dev/null
+++ b/sys-apps/watchdog/files/musl-Compile-with-musl-when-nfs-is-disabled.patch
@@ -0,0 +1,32 @@
+From f52c40680f0aad44b9ae16648803453ec00cbb2c Mon Sep 17 00:00:00 2001
+From: Paul Crawford <psc@sat.dundee.ac.uk>
+Date: Fri, 30 Dec 2016 15:55:45 +0000
+Subject: [PATCH 1/3] Compile with musl when nfs is disabled
+
+musl does by default not ship with rpc headers. The watchdog should
+not require rpc headers when nfs support is disabled.
+
+Patch by Felix Janda <fjanda@users.sf.net>
+---
+ include/sundries.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sundries.h b/include/sundries.h
+index 4379982..98c489a 100644
+--- a/include/sundries.h
++++ b/include/sundries.h
+@@ -9,9 +9,11 @@
+ #include <signal.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
++#if HAVE_NFS
+ #if !defined(bool_t) && !defined(__GLIBC__)
+ #include <rpc/types.h>
+ #endif
++#endif
+
+ extern int mount_mount_quiet;
+ extern int mount_verbose;
+--
+2.7.3
+
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
new file mode 100644
index 0000000..ca2b9c7
--- /dev/null
+++ b/sys-apps/watchdog/files/musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch
@@ -0,0 +1,96 @@
+From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 01:01:15 +0000
+Subject: [PATCH] Fix build issues found with non glibc C libraries
+
+Add time.h for getting time_t definition
+limits.h for PATH_MAX
+linux/param.h for EXEC_PAGESIZE
+Replace deprecated MNTTAB with _PATH_MNTTAB
+include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
+MNTTYPE_EXT2
+Include sys/types.h for u_char definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/extern.h | 1 +
+ src/configfile.c | 1 +
+ src/memory.c | 3 +++
+ src/net.c | 1 +
+ src/shutdown.c | 3 ++-
+ 5 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/include/extern.h b/include/extern.h
+index 21db11b..04b16bc 100644
+--- a/include/extern.h
++++ b/include/extern.h
+@@ -3,6 +3,7 @@
+
+ #include <netinet/in.h>
+ #include <stdio.h>
++#include <time.h>
+
+ #include "logmessage.h"
+ #include "xmalloc.h"
+diff --git a/src/configfile.c b/src/configfile.c
+index be5d7b3..7c1d1dd 100644
+--- a/src/configfile.c
++++ b/src/configfile.c
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <dirent.h>
++#include <limits.h>
+ #include <sys/stat.h>
+
+ #include "extern.h"
+diff --git a/src/memory.c b/src/memory.c
+index e9607e4..b5e08aa 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -21,6 +21,9 @@
+ #include <sys/stat.h>
+ #include <sys/param.h>
+ #include <sys/mman.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+
+ #include "extern.h"
+ #include "watch_err.h"
+diff --git a/src/net.c b/src/net.c
+index 21823ae..8930caf 100644
+--- a/src/net.c
++++ b/src/net.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <unistd.h> /* for gethostname() etc */
+ #include <netdb.h> /* for gethostbyname() */
++#include <sys/types.h>
+ #include <sys/param.h> /* for MAXHOSTNAMELEN */
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+diff --git a/src/shutdown.c b/src/shutdown.c
+index 74aafa5..46b99cf 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -25,6 +25,7 @@
+
+ #include "watch_err.h"
+ #include "extern.h"
++#include "ext2_mnt.h"
+
+ #if defined __GLIBC__
+ #include "ext2_mnt.h"
+@@ -123,7 +124,7 @@ static void mnt_off()
+ FILE *fp;
+ struct mntent *mnt;
+
+- fp = setmntent(MNTTAB, "r");
++ fp = setmntent(_PATH_MNTTAB, "r");
+ /* in some rare cases fp might be NULL so be careful */
+ while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
+ /* First check if swap */
+--
+2.6.4
+
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
new file mode 100644
index 0000000..73f58e2
--- /dev/null
+++ b/sys-apps/watchdog/files/musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch
@@ -0,0 +1,28 @@
+From c5cb4e1a0339844ae3f55ff1dc4a716c28012f05 Mon Sep 17 00:00:00 2001
+From: Paul Crawford <psc@sat.dundee.ac.uk>
+Date: Tue, 28 Jun 2016 18:08:48 +0100
+Subject: [PATCH 1/3] Include linux/param.h for EXEC_PAGESIZE definition
+
+Musl does not include linux/param.h whereas glibc does, so it fails
+to build on musl. Patch supplied by Khem Raj <raj.khem@gmail.com>
+---
+ src/watchdog.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/watchdog.c b/src/watchdog.c
+index acf6450..486384a 100644
+--- a/src/watchdog.c
++++ b/src/watchdog.c
+@@ -26,6 +26,9 @@
+ #include <sys/param.h> /* For EXEC_PAGESIZE */
+ #include <linux/oom.h>
+ #include <linux/watchdog.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+ #include <string.h>
+
+ #include <libgen.h>
+--
+2.7.3
+
diff --git a/sys-apps/watchdog/files/watchdog-conf.d b/sys-apps/watchdog/files/watchdog-conf.d
new file mode 100644
index 0000000..60c7843
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-conf.d
@@ -0,0 +1,6 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# for more info, see watchdog(8)
+WATCHDOG_OPTS=""
diff --git a/sys-apps/watchdog/files/watchdog-init.d b/sys-apps/watchdog/files/watchdog-init.d
new file mode 100644
index 0000000..a646838
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-init.d
@@ -0,0 +1,48 @@
+#!/sbin/openrc-run
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ use logger
+}
+
+get_config() {
+ set -- ${WATCHDOG_OPTS}
+ while [ -n "$1" ] ; do
+ if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
+ echo $2
+ return
+ fi
+ shift
+ done
+ echo /etc/watchdog.conf
+}
+
+get_delay() {
+ # man this is fugly
+ sed -n \
+ -e '1{x;s:.*:10:;x}' \
+ -e 's:#.*::' \
+ -e 's:^[[:space:]]*::' \
+ -e '/^interval/{s:.*=::;h}' \
+ -e '${g;p}' \
+ $(get_config)
+}
+
+start() {
+ ebegin "Starting watchdog"
+ start-stop-daemon --start \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ -- ${WATCHDOG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping watchdog"
+ start-stop-daemon --stop \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ --retry $(get_delay)
+ eend $?
+}
diff --git a/sys-apps/watchdog/files/watchdog-init.d-r1 b/sys-apps/watchdog/files/watchdog-init.d-r1
new file mode 100644
index 0000000..7960201
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-init.d-r1
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/watchdog.pid"
+command="/usr/sbin/watchdog"
+command_args="${WATCHDOG_OPTS}"
+
+depend() {
+ need localmount
+ use logger
+}
+
+get_config() {
+ set -- ${WATCHDOG_OPTS}
+ while [ -n "$1" ] ; do
+ if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
+ echo $2
+ return
+ fi
+ shift
+ done
+ echo /etc/watchdog.conf
+}
+
+get_delay() {
+ # man this is fugly
+ sed -n \
+ -e '1{x;s:.*:10:;x}' \
+ -e 's:#.*::' \
+ -e 's:^[[:space:]]*::' \
+ -e '/^interval/{s:.*=::;h}' \
+ -e '${g;p}' \
+ $(get_config)
+}
+
+stop() {
+ ebegin "Stopping watchdog"
+ start-stop-daemon --stop \
+ --exec ${command} --pidfile ${pidfile} \
+ --retry $(get_delay)
+ eend $?
+}
diff --git a/sys-apps/watchdog/files/watchdog.service b/sys-apps/watchdog/files/watchdog.service
new file mode 100644
index 0000000..9ec1076
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=watchdog daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/watchdog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/watchdog/metadata.xml b/sys-apps/watchdog/metadata.xml
new file mode 100644
index 0000000..36ad6a6
--- /dev/null
+++ b/sys-apps/watchdog/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="nfs">enable support for checking nfs mounts</flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">watchdog</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/watchdog/watchdog-5.14.ebuild b/sys-apps/watchdog/watchdog-5.14.ebuild
new file mode 100644
index 0000000..86763ab
--- /dev/null
+++ b/sys-apps/watchdog/watchdog-5.14.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="A software watchdog and /dev/watchdog daemon"
+HOMEPAGE="https://sourceforge.net/projects/watchdog/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm m68k ~mips ppc s390 sh ~sparc x86"
+IUSE="nfs"
+
+DEPEND="nfs? ( net-libs/libtirpc )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/musl-Fix-build-issues-found-with-non-glibc-C-libraries.patch"
+ "${FILESDIR}/musl-Compile-with-musl-when-nfs-is-disabled.patch"
+)
+
+src_configure() {
+ if use nfs ; then
+ tc-export PKG_CONFIG
+ append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
+ export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
+ fi
+ econf $(use_enable nfs)
+}
+
+src_install() {
+ default
+ docinto examples
+ dodoc examples/*
+
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ systemd_dounit "${FILESDIR}"/watchdog.service
+}
diff --git a/sys-apps/watchdog/watchdog-5.15.ebuild b/sys-apps/watchdog/watchdog-5.15.ebuild
new file mode 100644
index 0000000..67dc3b8
--- /dev/null
+++ b/sys-apps/watchdog/watchdog-5.15.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="A software watchdog and /dev/watchdog daemon"
+HOMEPAGE="https://sourceforge.net/projects/watchdog/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nfs"
+
+DEPEND="nfs? ( net-libs/libtirpc )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/musl-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch"
+ "${FILESDIR}/musl-Compile-with-musl-when-nfs-is-disabled.patch"
+)
+
+src_configure() {
+ if use nfs ; then
+ tc-export PKG_CONFIG
+ append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
+ export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
+ fi
+ econf $(use_enable nfs)
+}
+
+src_install() {
+ default
+ docinto examples
+ dodoc examples/*
+
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}-init.d-r1 ${PN}
+ systemd_dounit "${FILESDIR}"/watchdog.service
+}