From 265dbe5dbc14c199299496c6db8fce3f76647015 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 21 Sep 2018 18:00:10 +0100 Subject: gentoo resync : 21.09.2018 --- net-misc/ptpd/Manifest | 3 + .../ptpd-2.3.1-fix-libressl-compatibility.patch | 24 ++++++++ net-misc/ptpd/files/ptpd-2.3.1-fix-snmp.patch | 12 ++++ net-misc/ptpd/ptpd-2.3.1-r2.ebuild | 66 ++++++++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 net-misc/ptpd/files/ptpd-2.3.1-fix-libressl-compatibility.patch create mode 100644 net-misc/ptpd/files/ptpd-2.3.1-fix-snmp.patch create mode 100644 net-misc/ptpd/ptpd-2.3.1-r2.ebuild (limited to 'net-misc/ptpd') diff --git a/net-misc/ptpd/Manifest b/net-misc/ptpd/Manifest index 21a680f5a554..23fc802709fd 100644 --- a/net-misc/ptpd/Manifest +++ b/net-misc/ptpd/Manifest @@ -1,6 +1,9 @@ +AUX ptpd-2.3.1-fix-libressl-compatibility.patch 1154 BLAKE2B 3b229bda14d65c610606225e7a9bac0f381a7173cee358f760dbbdb7266a7c87b7bf535a2d7d593b5c9f556b811f560ac98850f0b9d469b70bf778363bf3facb SHA512 19b6c3b3e248514d3374ac17f37070f60b43b5ba8d38b7564abd00896e2aecc29813f9a36bba2da7be33d6ff47aa029644d735f4325e948fe73ba81b466abc1d +AUX ptpd-2.3.1-fix-snmp.patch 420 BLAKE2B c3b9da6337671c9a502bc36a8b2ad85bc7ff041cdc496a05c0e4e32d22dd5a933150d6e65252afb1c79c7fc45e148d4f2ba63adca8b18e6227581ee2515069fd SHA512 40e6f89dc922da9b3a68f7513a4d08f8708a1f4ebb87147c6ab3e6a75d8aaa5a627045e967c5256445897175205c7b95e77f0ca7322062fa6265b7e909097978 AUX ptpd2.confd 61 BLAKE2B 0724014663c4e18dd2205982e4ebb20b6cc5af2eda0d1070515b2823924882f34b1f1879ba3ee3540d4918203c4b6f23d04da276aaf5f938963794e1eef7f87b SHA512 40ea56a92222eb10dc429343a23bdcc0e75f626e34fea139a09ca545a50aee0550253965de036218889554a2c0c7928c0051e3e71d9b9cd0a9d44d334e0bac47 AUX ptpd2.rc 1372 BLAKE2B 071dce26d1343050b212312381a07af6b24d4923d715e4b7c4e065ab67283a3bcf4b350d1c28a9270cb9c03b8e04cffff6b3e422a80460d6210b546b684bd37d SHA512 37af776a265fbabdabed381d98cf50d78a512634fd84ce07466a47a0e96a6b2cccfb762732a043139b6c136eefdc6443ab9a5cba1c30234b6c66acc23e98a5b2 AUX ptpd2.service 228 BLAKE2B 89bb7a7b4352f9905032ca7efc778cc220282df8389f1da4f60af653cc71b2bc15d08c73730f326c9311f97ebeff2602b73cdbd55683a2d69cb57d0a63a28a47 SHA512 72d609c9b803921b55cc0528aafa5cbbff0b7ed2f1267fa5f06e410ec640295642717928bbf38c849f632d157132f01f60a8bad826428b846d8248bac27e932a DIST ptpd-2.3.1.tar.gz 884161 BLAKE2B 029eeff4ff427aec7a24365bd7f62a4f5d6bfe4bc0a003b0fa8ca1f7581b2395cb96c27bfa59c6333b0354ac0fb12fb11fd24319506c2168e0ff4ddfb3df9117 SHA512 25c128ce1920ae2c1469e986bfa5d5b8ebca04ec14b838fb8232b36e0a1ef94646507e1b25034846d11cf0f71d7e2da983b9f6408f8fcfc608904ecfec2a15c4 EBUILD ptpd-2.3.1-r1.ebuild 1358 BLAKE2B bbd67fb82dabd88f2f0885df34dea7e4a26406a86c5329aa72fa66f93327a842eeb7b0c20aa6f5874157e4acc461ffe1fd1befa37825ed96f7ee331c6985854e SHA512 157ebd631b8066ce73f1d1bc8133e23dea20fcf34585e219c59a792ff90d0b80be4fd74bed2d30e0f256c99e5f24ac2a861fba14f69904ad899330b32dcafc97 +EBUILD ptpd-2.3.1-r2.ebuild 1418 BLAKE2B 03563a0e1e386d9d2a25f54497262adbf12b7abcd9554c23893d0b38a4865ce7a92e209d43d49dfb948fdf4aec284f5afaaa09eb6a5f54d476e8db94c65eb946 SHA512 24f1927b4fd1b526ad503fd92d5c0d87f8dfdbc1838b47f02a341a6b549afbedd025fa936b31e45aa3cc7815a1ef8a07a18afd9feed65380c684da6beb600d4e MISC metadata.xml 988 BLAKE2B 25f10292189622b3e50d058fc2faadd46959bab489a65a77f4bf4b4d5b8c98ec86e4b54e987b87dab497d4fd39c2c786b743987166ada6d9c4a61e15a5960a1b SHA512 a96ee23e21b8230c4756022e5678df1f72c61576b0aae1de04c10328417f64535129ed4a10beb7545c7316e36b9fe658e8c5ced5f28177ff84b106caf525ec06 diff --git a/net-misc/ptpd/files/ptpd-2.3.1-fix-libressl-compatibility.patch b/net-misc/ptpd/files/ptpd-2.3.1-fix-libressl-compatibility.patch new file mode 100644 index 000000000000..4fa25797ff06 --- /dev/null +++ b/net-misc/ptpd/files/ptpd-2.3.1-fix-libressl-compatibility.patch @@ -0,0 +1,24 @@ +diff -urN old/src/dep/ntpengine/ntp_isc_md5.c new/src/dep/ntpengine/ntp_isc_md5.c +--- old/src/dep/ntpengine/ntp_isc_md5.c 2015-06-29 17:13:29.000000000 +0200 ++++ new/src/dep/ntpengine/ntp_isc_md5.c 2018-09-15 22:56:18.469044902 +0200 +@@ -262,7 +262,7 @@ + { + u_char digest[64]; + u_int len; +- EVP_MD_CTX ctx; ++ PTPD_EVP_MD_CTX ctx; + pkt[length / 4] = htonl(keyid); + EVP_DigestInit(&ctx); + EVP_DigestUpdate(&ctx, (u_char *)key, (u_int)strlen(key)); +diff -urN old/src/dep/ntpengine/ntp_isc_md5.h new/src/dep/ntpengine/ntp_isc_md5.h +--- old/src/dep/ntpengine/ntp_isc_md5.h 2015-06-29 17:13:29.000000000 +0200 ++++ new/src/dep/ntpengine/ntp_isc_md5.h 2018-09-15 22:56:11.852020732 +0200 +@@ -80,7 +80,7 @@ + # define MD5Init(c) isc_md5_init(c) + # define MD5Update(c, p, s) isc_md5_update(c, p, s) + # define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */ +- typedef MD5_CTX EVP_MD_CTX; ++ typedef MD5_CTX PTPD_EVP_MD_CTX; + # define EVP_DigestInit(c) MD5Init(c) + # define EVP_DigestUpdate(c, p, s) MD5Update(c, p, s) + # define EVP_DigestFinal(c, d, pdl) \ diff --git a/net-misc/ptpd/files/ptpd-2.3.1-fix-snmp.patch b/net-misc/ptpd/files/ptpd-2.3.1-fix-snmp.patch new file mode 100644 index 000000000000..31b466d1468c --- /dev/null +++ b/net-misc/ptpd/files/ptpd-2.3.1-fix-snmp.patch @@ -0,0 +1,12 @@ +diff -urN old/src/dep/snmp.c new/src/dep/snmp.c +--- old/src/dep/snmp.c 2015-06-29 17:13:29.000000000 +0200 ++++ new/src/dep/snmp.c 2018-09-15 22:54:11.818589001 +0200 +@@ -221,7 +221,7 @@ + + #define SNMP_LOCAL_VARIABLES \ + static unsigned long long_ret; \ +- static U64 counter64_ret; \ ++ static struct counter64 counter64_ret; \ + static uint32_t ipaddr; \ + Integer64 bigint; \ + struct snmpHeaderIndex idx; \ diff --git a/net-misc/ptpd/ptpd-2.3.1-r2.ebuild b/net-misc/ptpd/ptpd-2.3.1-r2.ebuild new file mode 100644 index 000000000000..cfca56347ad2 --- /dev/null +++ b/net-misc/ptpd/ptpd-2.3.1-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools flag-o-matic systemd + +DESCRIPTION="Precision Time Protocol daemon" +HOMEPAGE="https://github.com/ptpd/ptpd" +SRC_URI="https://github.com/ptpd/ptpd/archive/${P}.tar.gz" + +KEYWORDS="~amd64 ~arm ~x86" +LICENSE="BSD" +SLOT="0" +IUSE="debug experimental ntp +pcap snmp slave-only +statistics" + +RDEPEND=" + pcap? ( net-libs/libpcap ) + snmp? ( net-analyzer/net-snmp )" +DEPEND="${RDEPEND}" +RDEPEND="${RDEPEND} + ntp? ( net-misc/ntp )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3.1-fix-snmp.patch + "${FILESDIR}"/${PN}-2.3.1-fix-libressl-compatibility.patch +) + +S=${WORKDIR}/ptpd-${P} + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + append-flags -fno-strict-aliasing + local myconf=( + --enable-daemon + $(use_enable snmp) + $(use_enable experimental experimental-options) + $(use_enable statistics) + $(use_enable debug runtime-debug) + $(use_enable pcap) + $(use_enable slave-only) + ) + econf "${myconf[@]}" +} + +src_install() { + emake install DESTDIR="${D}" + + insinto /etc + newins "src/ptpd2.conf.minimal" ptpd2.conf + + newinitd "${FILESDIR}/ptpd2.rc" ptpd2 + newconfd "${FILESDIR}/ptpd2.confd" ptpd2 + + systemd_dounit "${FILESDIR}/ptpd2.service" +} + +pkg_postinst() { + elog "Do not forget to setup correct network interface." + elog "Change the config file ${EROOT}etc/ptpd2.conf to suit your needs." +} -- cgit v1.2.3