summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaohiro Aota <naota@gentoo.org>2012-03-08 13:37:06 +0000
committerNaohiro Aota <naota@gentoo.org>2012-03-08 13:37:06 +0000
commitcdd3e7e9334cdd6cf29e2d253a88bebd8baa04ce (patch)
treefa64f5fa82e332aaffd8da0c9b256ee3bb7f892c /app-misc
parentx86 stable wrt bug #405623 (diff)
downloadgentoo-2-cdd3e7e9334cdd6cf29e2d253a88bebd8baa04ce.tar.gz
gentoo-2-cdd3e7e9334cdd6cf29e2d253a88bebd8baa04ce.tar.bz2
gentoo-2-cdd3e7e9334cdd6cf29e2d253a88bebd8baa04ce.zip
Add ~x86-fbsd. Add patch to deal with FreeBSD. #326999
(Portage version: 2.2.0_alpha89/cvs/FreeBSD i386)
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/datefudge/ChangeLog6
-rw-r--r--app-misc/datefudge/datefudge-1.17.ebuild7
-rw-r--r--app-misc/datefudge/files/datefudge-1.17-bsd.patch58
3 files changed, 67 insertions, 4 deletions
diff --git a/app-misc/datefudge/ChangeLog b/app-misc/datefudge/ChangeLog
index 49eabd9b8a62..aa4cf118dcec 100644
--- a/app-misc/datefudge/ChangeLog
+++ b/app-misc/datefudge/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-misc/datefudge
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/datefudge/ChangeLog,v 1.19 2012/03/06 14:27:12 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/datefudge/ChangeLog,v 1.20 2012/03/08 13:37:06 naota Exp $
+
+ 08 Mar 2012; Naohiro Aota <naota@gentoo.org> +files/datefudge-1.17-bsd.patch,
+ datefudge-1.17.ebuild:
+ Add ~x86-fbsd. Add patch to deal with FreeBSD. #326999
06 Mar 2012; Brent Baude <ranger@gentoo.org> datefudge-1.17.ebuild:
Marking datefudge-1.17 ppc for bug 405123
diff --git a/app-misc/datefudge/datefudge-1.17.ebuild b/app-misc/datefudge/datefudge-1.17.ebuild
index f1c759faec7e..029ef6a60815 100644
--- a/app-misc/datefudge/datefudge-1.17.ebuild
+++ b/app-misc/datefudge/datefudge-1.17.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/datefudge/datefudge-1.17.ebuild,v 1.6 2012/03/06 14:27:12 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/datefudge/datefudge-1.17.ebuild,v 1.7 2012/03/08 13:37:06 naota Exp $
EAPI=4
-inherit multilib toolchain-funcs
+inherit multilib toolchain-funcs eutils
DESCRIPTION="A program (and preload library) to fake system date"
HOMEPAGE="http://packages.qa.debian.org/d/datefudge.html"
@@ -11,7 +11,7 @@ SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE=""
src_prepare() {
@@ -23,6 +23,7 @@ src_prepare() {
if use prefix; then
sed -i -e '/-o root -g root/d' Makefile || die
fi
+ use userland_BSD && epatch "${FILESDIR}"/${P}-bsd.patch
}
src_compile() {
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>