commit:     0acb2f095c98d14ab5f3d6ae9804b4aae373708a
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 16 18:43:29 2019 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Jun 16 18:43:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0acb2f09

net-misc/adjtimex: bump EAPI & debian patch series

Package-Manager: Portage-2.3.67, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 net-misc/adjtimex/Manifest                         |  1 +
 net-misc/adjtimex/adjtimex-1.29-r2.ebuild          | 68 ++++++++++++++++++++++
 .../files/adjtimex-1.29-r2-gentoo-utc.patch        | 30 ++++++++++
 3 files changed, 99 insertions(+)

diff --git a/net-misc/adjtimex/Manifest b/net-misc/adjtimex/Manifest
index 6a6999f0d18..a92dcb53e26 100644
--- a/net-misc/adjtimex/Manifest
+++ b/net-misc/adjtimex/Manifest
@@ -1,2 +1,3 @@
+DIST adjtimex_1.29-10.debian.tar.xz 33008 BLAKE2B 
b1da53008ef2373d9b450228bdb7f3378516880bf5b0d9b6d2c8aaa25880eea05954923e18497c42bf4e0f541dfa6c119c558b2712c5ed096a9c3e32dd3407c0
 SHA512 
4be30bdc63446259fe246e4d7fc0cb78fa40f40e9eb1a0b3a9d523d19ba0664be5e04f1803235a268eaae41cf4d88adfdbc6ecec86f8bd03703aca6c25ba9b8b
 DIST adjtimex_1.29-2.diff.gz 51735 BLAKE2B 
a59efafa03527ca8cb54994bfe49bec3638b2d76dcb505fcbe3be9e112326223c7f6009f7e527b0ff1a265e7af3c190894b8e3c41c6cf4e31dc2832a093bc38a
 SHA512 
cc78cf9fd93cb243019952f877cb9730a5755d87336fc1a956162e957fd579de3770cb6bbba58ac9b6d350ee631ed294303360d0aa4153b12a31eb1bb4e35924
 DIST adjtimex_1.29.orig.tar.gz 85551 BLAKE2B 
4e7784c3d3efa1f6ea226a7822de675a27c5be5d048664f8ff215eebe65b493e6dc0d004cc955c2e3b4e314e6283eafd628e92b611504b6ea92f4e5fe7d1a8c7
 SHA512 
5a48cdc538866c06562f62e369c08d60978c791ed91565262c0179c6fa25dd343963992d00e10f32475fdc00b458f81cf9c61adbfa9e1b7a8d4981ebeeff5649

diff --git a/net-misc/adjtimex/adjtimex-1.29-r2.ebuild 
b/net-misc/adjtimex/adjtimex-1.29-r2.ebuild
new file mode 100644
index 00000000000..c93afec77da
--- /dev/null
+++ b/net-misc/adjtimex/adjtimex-1.29-r2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit eutils fixheadtails toolchain-funcs
+
+DEBIAN_PV="10"
+MY_P="${P/-/_}"
+DEBIAN_URI="mirror://debian/pool/main/${PN:0:1}/${PN}"
+DEBIAN_PATCH="${MY_P}-${DEBIAN_PV}.debian.tar.xz"
+DEBIAN_SRC="${MY_P}.orig.tar.gz"
+DESCRIPTION="display or set the kernel time variables"
+HOMEPAGE="https://www.ibiblio.org/pub/Linux/system/admin/time/adjtimex.lsm 
https://github.com/rogers0/adjtimex";
+SRC_URI="${DEBIAN_URI}/${DEBIAN_PATCH}
+       ${DEBIAN_URI}/${DEBIAN_SRC}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="sys-apps/sed"
+RDEPEND=""
+
+src_unpack() {
+       unpack "${DEBIAN_SRC}"
+       cd "${S}" || die "Failed to cd $S"
+       unpack "${DEBIAN_PATCH}"
+}
+
+src_prepare() {
+       # Debian series first
+       DEBPATCHDIR="${S}"/debian/patches/
+       for f in $(cat "$DEBPATCHDIR/series") ; do
+               eapply "$DEBPATCHDIR"/$f
+       done
+       # Then gentoo changes
+       for i in debian/adjtimexconfig debian/adjtimexconfig.8 ; do
+               sed -e 's|/etc/default/adjtimex|/etc/conf.d/adjtimex|' \
+                       -i.orig ${i}
+               sed -e 's|^/sbin/adjtimex |/usr/sbin/adjtimex |' \
+                       -i.orig ${i}
+       done
+       eapply "${FILESDIR}"/${PN}-1.29-r2-gentoo-utc.patch
+       ht_fix_file debian/adjtimexconfig
+       sed -i \
+               -e '/CFLAGS = -Wall -t/,/endif/d' \
+               -e '/$(CC).* -o/s|$(CFLAGS)|& $(LDFLAGS)|g' \
+               Makefile.in || die "sed Makefile.in"
+       eapply_user
+}
+
+src_configure() {
+       tc-export CC
+       default
+}
+
+src_install() {
+       dodoc README* ChangeLog
+       doman adjtimex.8 debian/adjtimexconfig.8
+       dosbin adjtimex debian/adjtimexconfig
+       newinitd "${FILESDIR}"/adjtimex.init adjtimex
+}
+
+pkg_postinst() {
+       einfo "Please run adjtimexconfig to create the configuration file"
+}

diff --git a/net-misc/adjtimex/files/adjtimex-1.29-r2-gentoo-utc.patch 
b/net-misc/adjtimex/files/adjtimex-1.29-r2-gentoo-utc.patch
new file mode 100644
index 00000000000..0038258b9d4
--- /dev/null
+++ b/net-misc/adjtimex/files/adjtimex-1.29-r2-gentoo-utc.patch
@@ -0,0 +1,30 @@
+--- adjtimex-1.29-debian/debian/adjtimexconfig 2011-12-23 21:29:32.962449759 
+0100
++++ adjtimex-1.29/debian/adjtimexconfig        2011-12-23 21:30:00.610638657 
+0100
+@@ -3,6 +3,18 @@
+ conffile=/etc/default/adjtimex
+ startfile=/etc/init.d/adjtimex
+ 
++# Get UTC setting
++params=''
++if [ -f /etc/conf.d/clock ]; then
++    #baselayout-1
++    source /etc/conf.d/clock
++    [ "$CLOCK" == "UTC" ] && params='--utc'
++elif [ -f /etc/conf.d/hwclock ]; then
++    #baselayout-2
++    source /etc/conf.d/hwclock
++    [ "$clock" == "UTC" ] && params='--utc'
++fi
++
+ echo -n "Comparing clocks (this will take 70 sec)..."
+ 
+ # Get the parameters
+@@ -11,7 +23,7 @@
+ baseline=`awk '/<= tick/{print ($1+$NF)/2}' $tmpfile`
+ hz=`awk '/USER_HZ/{print $3}' $tmpfile`
+ /usr/sbin/adjtimex  --tick $baseline  --frequency 0
+-/usr/sbin/adjtimex  --adjust --force-adjust >$tmpfile
++/usr/sbin/adjtimex  ${params} --adjust --force-adjust >$tmpfile
+ echo "done."
+ ticks=`tail -n 1 $tmpfile|awk '{print $6}'`
+ freq=`tail -n 1 $tmpfile|awk '{print $7}'`

Reply via email to