summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-misc/datefudge
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-misc/datefudge')
-rw-r--r--app-misc/datefudge/Manifest1
-rw-r--r--app-misc/datefudge/datefudge-1.17.ebuild36
-rw-r--r--app-misc/datefudge/files/datefudge-1.17-bsd.patch58
-rw-r--r--app-misc/datefudge/metadata.xml8
4 files changed, 103 insertions, 0 deletions
diff --git a/app-misc/datefudge/Manifest b/app-misc/datefudge/Manifest
new file mode 100644
index 000000000000..d0c008de3054
--- /dev/null
+++ b/app-misc/datefudge/Manifest
@@ -0,0 +1 @@
+DIST datefudge_1.17.tar.gz 12606 SHA256 ff6c566ef6d587dce27396c15b178fafc3c3d8a0275dd6bbd5523b88badabec4 SHA512 6d335f2c1f42792756d3a81264be0bdf4cde5efab86bec5b62de9ccb2488deaff67e4a4f6c7984fa7a5336156df2d76e366bf486436052d2c5ee5ff88067335e WHIRLPOOL 1c107cea05910b900e249338969cf89448cd81e6de61ae1731df37160ffb399912c45d25d1f3f1bf95d0bb7f8d42139916bf13f5a37e4b68362d16f10bc9d718
diff --git a/app-misc/datefudge/datefudge-1.17.ebuild b/app-misc/datefudge/datefudge-1.17.ebuild
new file mode 100644
index 000000000000..67db96de6427
--- /dev/null
+++ b/app-misc/datefudge/datefudge-1.17.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit multilib toolchain-funcs eutils
+
+DESCRIPTION="A program (and preload library) to fake system date"
+HOMEPAGE="http://packages.qa.debian.org/d/datefudge.html"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ use userland_BSD && epatch "${FILESDIR}"/${P}-bsd.patch
+ sed -i \
+ -e '/dpkg-parsechangelog/d' \
+ -e "s:usr/lib:usr/$(get_libdir):" \
+ Makefile || die
+
+ if use prefix; then
+ sed -i -e '/-o root -g root/d' Makefile || die
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" VERSION="${PV}"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" VERSION="${PV}" install
+ dodoc debian/changelog README
+}
diff --git a/app-misc/datefudge/files/datefudge-1.17-bsd.patch b/app-misc/datefudge/files/datefudge-1.17-bsd.patch
new file mode 100644
index 000000000000..2f2a7dac9be3
--- /dev/null
+++ b/app-misc/datefudge/files/datefudge-1.17-bsd.patch
@@ -0,0 +1,58 @@
+diff --git a/Makefile b/Makefile
+index b2f81bb..35da75e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,17 +12,17 @@ compile all: datefudge datefudge.so
+
+ install: datefudge datefudge.so datefudge.1
+ install -d $(DESTDIR)/usr/lib/datefudge/
+- $(INSTALL_PROGRAM) -o root -g root -m 644 datefudge.so $(DESTDIR)/usr/lib/datefudge/datefudge.so
++ $(INSTALL_PROGRAM) -o root -g wheel -m 644 datefudge.so $(DESTDIR)/usr/lib/datefudge/datefudge.so
+ install -d $(DESTDIR)/usr/bin/
+- $(INSTALL_PROGRAM) -o root -g root -m 755 datefudge $(DESTDIR)/usr/bin
++ $(INSTALL_PROGRAM) -o root -g wheel -m 755 datefudge $(DESTDIR)/usr/bin
+ install -d $(DESTDIR)/usr/share/man/man1
+- install -o root -g root -m 644 datefudge.1 $(DESTDIR)/usr/share/man/man1
++ install -o root -g wheel -m 644 datefudge.1 $(DESTDIR)/usr/share/man/man1
+
+ datefudge: datefudge.sh
+ sed -e 's,@VERSION@,$(VERSION),g' < $< > $@
+
+ datefudge.so: datefudge.o
+- $(CC) $(LDFLAGS) -o $@ -shared $< -ldl -lc
++ $(CC) $(LDFLAGS) -o $@ -shared $< -lc
+
+ datefudge.o: datefudge.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+@@ -39,8 +39,8 @@ test: compile
+ export TZ=UTC ;\
+ ret1=1; ret2=1 ;\
+ for i in 1 2; do \
+- export DATEFUDGE=`LC_ALL=C date --date='yesterday 0:00' +%s` ;\
+- dt=`LC_ALL=C LD_PRELOAD=$(CURDIR)/datefudge.so date --date=12:15 +%F.%T` ;\
++ export DATEFUDGE=`LC_ALL=C date -v-1d -v0H -v0M +%s` ;\
++ dt=`LC_ALL=C LD_PRELOAD=$(CURDIR)/datefudge.so date -v12H -v15M +%F.%T` ;\
+ exp="1970-01-02.12:15:00" ;\
+ [ "$$dt" != "$$exp" ] || { echo "OK"; ret1=0; break; } ;\
+ echo "failed: expected: $$exp, actual: $$dt" ;\
+@@ -49,7 +49,7 @@ test: compile
+ echo -n "Running a simple perl localtime() test... " ;\
+ pscr='@t=localtime(time);$$t[5]+=1900;$$t[4]++;printf "%04d-%02d-%02d\n",$$t[5],$$t[4],$$t[3];';\
+ for i in 1 2; do \
+- export DATEFUDGE=`LC_ALL=C date --date='yesterday 0:00' +%s` ;\
++ export DATEFUDGE=`LC_ALL=C date -v-1d -v0H -v0M +%s` ;\
+ dt=`LD_PRELOAD=$(CURDIR)/datefudge.so perl -e "$$pscr"` ;\
+ exp="1970-01-02" ;\
+ [ "$$dt" != "$$exp" ] || { echo "OK"; ret2=0; break; } ;\
+diff --git a/datefudge.c b/datefudge.c
+index 8c86652..fc7e3d6 100644
+--- a/datefudge.c
++++ b/datefudge.c
+@@ -14,7 +14,6 @@
+ #include <stdlib.h>
+ #include <dlfcn.h>
+ #include <assert.h>
+-#include <features.h>
+ #include <unistd.h>
+ #include <time.h>
+ #include <sys/time.h>
diff --git a/app-misc/datefudge/metadata.xml b/app-misc/datefudge/metadata.xml
new file mode 100644
index 000000000000..c2d865517c00
--- /dev/null
+++ b/app-misc/datefudge/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+</pkgmetadata>