summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Redaelli <drizzt@gentoo.org>2009-02-05 11:54:05 +0000
committerTimothy Redaelli <drizzt@gentoo.org>2009-02-05 11:54:05 +0000
commite542e8b001c6bab23e196d4d038c32efca6d6f40 (patch)
treeb78f76c382b4ac1718a42d762a0378017af5dec8 /app-backup/cpdup
parentx11-base/xorg-server: add 4 more patches, see ChangeLog for details (diff)
downloadgentoo-2-e542e8b001c6bab23e196d4d038c32efca6d6f40.tar.gz
gentoo-2-e542e8b001c6bab23e196d4d038c32efca6d6f40.tar.bz2
gentoo-2-e542e8b001c6bab23e196d4d038c32efca6d6f40.zip
Version bump, add a patch to fix 64bit platforms (from Fedora bug #435508)
Add compatibility with Linux and add ~amd64 keyword (Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'app-backup/cpdup')
-rw-r--r--app-backup/cpdup/ChangeLog12
-rw-r--r--app-backup/cpdup/cpdup-1.11.ebuild47
-rw-r--r--app-backup/cpdup/files/Makefile.linux13
-rw-r--r--app-backup/cpdup/files/cpdup-1.11-explicit_sizes.patch85
-rw-r--r--app-backup/cpdup/files/cpdup-1.11-unused.patch14
5 files changed, 169 insertions, 2 deletions
diff --git a/app-backup/cpdup/ChangeLog b/app-backup/cpdup/ChangeLog
index 599de3d653cd..484d2ea6229d 100644
--- a/app-backup/cpdup/ChangeLog
+++ b/app-backup/cpdup/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-backup/cpdup
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-backup/cpdup/ChangeLog,v 1.1 2006/11/14 09:33:48 drizzt Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/cpdup/ChangeLog,v 1.2 2009/02/05 11:54:05 drizzt Exp $
+
+*cpdup-1.11 (05 Feb 2009)
+
+ 05 Feb 2009; Timothy Redaelli <drizzt@gentoo.org>
+ +files/cpdup-1.11-explicit_sizes.patch, +files/cpdup-1.11-unused.patch,
+ +files/Makefile.linux, +cpdup-1.11.ebuild:
+ Version bump, add a patch to fix 64bit platforms (from Fedora bug #435508)
+ Add compatibility with Linux and add ~amd64 keyword
*cpdup-1.07 (14 Nov 2006)
diff --git a/app-backup/cpdup/cpdup-1.11.ebuild b/app-backup/cpdup/cpdup-1.11.ebuild
new file mode 100644
index 000000000000..ef880f42d2cd
--- /dev/null
+++ b/app-backup/cpdup/cpdup-1.11.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/cpdup/cpdup-1.11.ebuild,v 1.1 2009/02/05 11:54:05 drizzt Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A comprehensive filesystem mirroring program"
+HOMEPAGE="http://apollo.backplane.com/FreeSrc/"
+SRC_URI="http://apollo.backplane.com/FreeSrc/${P}.tgz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86-fbsd ~amd64"
+IUSE="userland_GNU threads"
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-explicit_sizes.patch # Patch from Fedora bug #435508
+ epatch "${FILESDIR}"/${P}-unused.patch
+
+ if use userland_GNU; then
+ cp "${FILESDIR}"/Makefile.linux Makefile
+ # bits/stat.h has __unused too
+ sed -i 's/__unused/__cpdup_unused/' *.c
+ fi
+ rm -r scripts/CVS
+}
+
+src_compile() {
+ tc-export CC
+ use threads || MAKEOPTS="$MAKEOPTS NOPTHREADS=1"
+ MAKE=make emake || die "emake failed"
+}
+
+src_install() {
+ dobin cpdup || die "cannot install cpdup"
+ doman cpdup.1
+ docinto scripts
+ dodoc scripts/*
+}
diff --git a/app-backup/cpdup/files/Makefile.linux b/app-backup/cpdup/files/Makefile.linux
new file mode 100644
index 000000000000..3e18e4e0b218
--- /dev/null
+++ b/app-backup/cpdup/files/Makefile.linux
@@ -0,0 +1,13 @@
+OBJS = cpdup.o fsmid.o hclink.o hcproto.o misc.o
+
+CFLAGS += -D__cpdup_unused="__attribute__ ((unused))" -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOMD5
+
+ifndef NOPTHREADS
+CFLAGS += -DUSE_PTHREADS=1 -pthread
+endif
+
+all: $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o cpdup
+
+.c.o:
+ $(CC) $(CFLAGS) -c -o $@ $<
diff --git a/app-backup/cpdup/files/cpdup-1.11-explicit_sizes.patch b/app-backup/cpdup/files/cpdup-1.11-explicit_sizes.patch
new file mode 100644
index 000000000000..42819ae7c661
--- /dev/null
+++ b/app-backup/cpdup/files/cpdup-1.11-explicit_sizes.patch
@@ -0,0 +1,85 @@
+--- cpdup-1.11/hcproto.c.explicit_sizes 2008-05-22 19:34:41.000000000 -0400
++++ cpdup-1.11/hcproto.c 2008-06-11 14:40:46.000000000 -0400
+@@ -336,7 +336,7 @@
+ struct HCHead *head;
+ struct HCLeaf *item;
+ struct dirent *den;
+- int desc = 0;
++ size_t desc = 0;
+
+ if (hc == NULL || hc->host == NULL)
+ return(opendir(path));
+@@ -355,7 +355,7 @@
+ }
+ }
+ if (hcc_get_descriptor(hc, desc, HC_DESC_DIR)) {
+- fprintf(stderr, "hc_opendir: remote reused active descriptor %d\n",
++ fprintf(stderr, "hc_opendir: remote reused active descriptor %zd\n",
+ desc);
+ return(NULL);
+ }
+@@ -406,12 +406,12 @@
+ return(readdir(dir));
+
+ trans = hcc_start_command(hc, HC_READDIR);
+- hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
++ hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
+ if ((head = hcc_finish_command(trans)) == NULL)
+ return(NULL);
+ if (head->error)
+ return(NULL); /* XXX errno */
+- den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
++ den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
+ if (den == NULL)
+ return(NULL); /* XXX errno */
+ if (den->d_name)
+@@ -476,13 +476,13 @@
+
+ if (hc == NULL || hc->host == NULL)
+ return(closedir(dir));
+- den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
++ den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
+ if (den) {
+ free(den);
+- hcc_set_descriptor(hc, (int)dir, NULL, HC_DESC_DIR);
++ hcc_set_descriptor(hc, (size_t)dir, NULL, HC_DESC_DIR);
+
+ trans = hcc_start_command(hc, HC_CLOSEDIR);
+- hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
++ hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
+ if ((head = hcc_finish_command(trans)) == NULL)
+ return(-1);
+ if (head->error)
+--- cpdup-1.11/cpdup.c.explicit_sizes 2008-05-24 13:21:36.000000000 -0400
++++ cpdup-1.11/cpdup.c 2008-06-11 14:49:59.000000000 -0400
+@@ -304,7 +304,7 @@
+ * make any required connections.
+ */
+ if (src && (ptr = strchr(src, ':')) != NULL) {
+- asprintf(&SrcHost.host, "%*.*s", ptr - src, ptr - src, src);
++ asprintf(&SrcHost.host, "%*.*s", (int)(ptr - src), (int)(ptr - src), src);
+ src = ptr + 1;
+ if (UseCpFile) {
+ fprintf(stderr, "The cpignore options are not currently supported for remote sources\n");
+@@ -318,7 +318,7 @@
+ exit(1);
+ }
+ if (dst && (ptr = strchr(dst, ':')) != NULL) {
+- asprintf(&DstHost.host, "%*.*s", ptr - dst, ptr - dst, dst);
++ asprintf(&DstHost.host, "%*.*s", (int)(ptr - dst), (int)(ptr - dst), dst);
+ dst = ptr + 1;
+ if (UseFSMIDOpt) {
+ fprintf(stderr, "The FSMID options are not currently supported for remote targets\n");
+--- cpdup-1.11/fsmid.c.explicit_sizes 2008-05-22 19:05:08.000000000 -0400
++++ cpdup-1.11/fsmid.c 2008-06-11 15:07:50.000000000 -0400
+@@ -35,8 +35,8 @@
+
+ for (node = FSMIDBase; node; node = node->fid_Next) {
+ if (node->fid_Accessed && node->fid_Code) {
+- fprintf(fo, "%016llx %d %s\n",
+- node->fid_Code,
++ fprintf(fo, "%016llx %zd %s\n",
++ (long long unsigned)node->fid_Code,
+ strlen(node->fid_Name),
+ node->fid_Name
+ );
diff --git a/app-backup/cpdup/files/cpdup-1.11-unused.patch b/app-backup/cpdup/files/cpdup-1.11-unused.patch
new file mode 100644
index 000000000000..1757cb441adc
--- /dev/null
+++ b/app-backup/cpdup/files/cpdup-1.11-unused.patch
@@ -0,0 +1,14 @@
+--- cpdup.c.orig 2009-02-05 12:22:10.000000000 +0100
++++ cpdup.c 2009-02-05 12:23:23.000000000 +0100
+@@ -1543,7 +1543,11 @@
+ */
+
+ static int
++#ifdef _ST_FLAGS_PRESENT_
+ xrename(const char *src, const char *dst, u_long flags)
++#else
++xrename(const char *src, const char *dst, u_long flags __unused)
++#endif
+ {
+ int r;
+