| # |
| # Copyright 2023 Google LLC |
| # |
| # This program is free software; you can redistribute it and/or |
| # modify it under the terms of the GNU General Public License |
| # version 2 as published by the Free Software Foundation. |
| # |
| # This program is distributed in the hope that it will be useful, |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| |
| EAPI=7 |
| |
| inherit linux-info systemd toolchain-funcs |
| |
| DESCRIPTION="The Linux Precision Time Protocol (PTP) implementation" |
| HOMEPAGE="http://linuxptp.sourceforge.net/" |
| 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" |
| |
| 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 |
| } |