commit:     7dc08b1056b678d5f52df09015f8d52d90b2bccc
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 10:41:47 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 10:41:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dc08b10

net-misc/linuxptp: add 4.0

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 net-misc/linuxptp/Manifest            |  1 +
 net-misc/linuxptp/linuxptp-4.0.ebuild | 50 +++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/net-misc/linuxptp/Manifest b/net-misc/linuxptp/Manifest
index bd6d2da1cdd6..82fbb36fd64c 100644
--- a/net-misc/linuxptp/Manifest
+++ b/net-misc/linuxptp/Manifest
@@ -1 +1,2 @@
 DIST linuxptp-3.1.1.tgz 218784 BLAKE2B 
5b46580a0e1b6e003f5f03e512c4f9b348c086f356fd47d3480da5e8223ba291fdb213798c696c37759896a99bccf21cd7e7daddce5aa5ed5701afb0e622a755
 SHA512 
c3c40987fe68480a8473097ebc3c506fb4f8f3b6456bbe637b2b3cb0b3e0182f1513b511fdc04b3607d5f7d8bd1bd22502bb86eb13f9fa4fa63a3331846b33ec
+DIST linuxptp-4.0.tgz 250862 BLAKE2B 
2c790e35677ee443b39130459b51e9b7237ec780f6e9774028e3c956de6e962ae8272157bf5e6bea847a098654b8cf9621a907b57c38778d55383182ec2d63aa
 SHA512 
763de5654f0426f2f489223e02fb3dd39a3a830751b366406657efe33bb923b5b38edada7b62de3efed6d257d5d386ece0d42a5eb92da5e5d443eac9b32e105d

diff --git a/net-misc/linuxptp/linuxptp-4.0.ebuild 
b/net-misc/linuxptp/linuxptp-4.0.ebuild
new file mode 100644
index 000000000000..482409416297
--- /dev/null
+++ b/net-misc/linuxptp/linuxptp-4.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info systemd toolchain-funcs
+
+DESCRIPTION="The Linux Precision Time Protocol (PTP) implementation"
+HOMEPAGE="https://linuxptp.nwtime.org/";
+SRC_URI="mirror://sourceforge/project/${PN}/v$(ver_cut 1-2)/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+
+DEPEND="elibc_musl? ( sys-libs/queue-standalone )"
+
+CONFIG_CHECK="~NETWORK_PHY_TIMESTAMPING ~PPS ~PTP_1588_CLOCK"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.1.1-user_cpp.patch
+       "${FILESDIR}"/${PN}-3.1.1-string-include.patch
+)
+
+pkg_setup() {
+       linux-info_pkg_setup
+}
+
+src_compile() {
+       # parse needed additional CFLAGS
+       export MY_FLAGS=$(CPP="$(tc-getCPP)" ./incdefs.sh)
+       export EXTRA_CFLAGS="${CFLAGS} ${MY_FLAGS}"
+       emake CC="$(tc-getCC)" prefix=/usr mandir=/usr/share/man
+}
+
+src_install() {
+       emake \
+               prefix="${D}"/usr \
+               mandir="${D}"/usr/share/man \
+               infodir="${D}"/usr/share/info \
+               libdir="${D}"/usr/$(get_libdir) \
+               install
+
+       systemd_newunit "${FILESDIR}"/phc2sysAT.service phc2sys@.service
+       systemd_newunit "${FILESDIR}"/ptp4lAT.service ptp4l@.service
+       systemd_dounit "${FILESDIR}"/timemaster.service
+
+       dodoc README.org
+       dodoc -r configs
+}

Reply via email to