update wip/cpdup to version 1.17
On systems where it is available, use wip/libbsd; on systems that neither have the required BSD MD5 functions natively nor support libbsd (i.e. Darwin), leave out MD5 support. Change maintainer to me, as suggested by Adam Hoka.
This commit is contained in:
parent
edf2f64040
commit
6e373796c9
8 changed files with 82 additions and 64 deletions
|
@ -1,3 +1,3 @@
|
|||
It works like the standard 'cp' program but is designed to make exact mirrors of
|
||||
directory trees by default, whereas the 'cp' program requires a ton of options
|
||||
to even come close (and even then doesn't do it properly).
|
||||
Make an exact (local or remote) mirror copy of a file or directory,
|
||||
creating and deleting files and directories as necessary. UTimes,
|
||||
hardlinks, softlinks, devices, permissions, and flags are mirrored.
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# $NetBSD: Makefile,v 1.5 2012/09/24 18:26:55 asau Exp $
|
||||
# $NetBSD: Makefile,v 1.6 2013/01/03 21:21:36 mrampke Exp $
|
||||
#
|
||||
|
||||
DISTNAME= cpdup-1.07
|
||||
DISTNAME= cpdup-1.17
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://apollo.backplane.com/FreeSrc/ \
|
||||
http://utenti.gufi.org/~gmarco/files/distfiles/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= adam.hoka@gmail.com
|
||||
MAINTAINER= matthias@rampke.de
|
||||
HOMEPAGE= http://apollo.backplane.com/FreeSrc/
|
||||
COMMENT= Designed to make exact mirrors of directory trees
|
||||
|
||||
NOT_FOR_PLATFORM= ${LP64PLATFORMS}
|
||||
LICENSE= 2-clause-bsd
|
||||
|
||||
WRKSRC= ${WRKDIR}/cpdup
|
||||
|
||||
|
@ -21,4 +21,13 @@ do-install:
|
|||
${INSTALL_PROGRAM} ${WRKSRC}/cpdup ${DESTDIR}${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKSRC}/cpdup.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
|
||||
|
||||
.include "../../wip/libbsd/buildlink3.mk"
|
||||
|
||||
# on platforms where libbsd is available, it is needed for MD5
|
||||
.if defined(USE_LIBBSD)
|
||||
MAKE_FLAGS+= -DLIBBSD
|
||||
.elif ${OS} == Darwin
|
||||
MAKE_FLAGS+= -DNOMD5
|
||||
.endif
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
24
cpdup/TODO
24
cpdup/TODO
|
@ -1,24 +0,0 @@
|
|||
$Id: TODO,v 1.2 2008/05/26 14:19:49 hoka_adam Exp $
|
||||
|
||||
Does not build on Darwin with the following error:
|
||||
|
||||
===> build-message [cpdup-1.07] ===> Building for cpdup-1.07
|
||||
gcc -pipe -O2 -no-cpp-precomp -c cpdup.c
|
||||
In file included from cpdup.c:58:
|
||||
cpdup.h:26:17: error: md5.h: No such file or directory
|
||||
*** Error code 1
|
||||
|
||||
-------------------
|
||||
Bulk build reveals:
|
||||
-------------------
|
||||
hcproto.c: In function 'hc_opendir':
|
||||
hcproto.c:352: warning: cast to pointer from integer of different size
|
||||
hcproto.c: In function 'hc_readdir':
|
||||
hcproto.c:395: warning: cast from pointer to integer of different size
|
||||
hcproto.c:400: warning: cast from pointer to integer of different size
|
||||
hcproto.c: In function 'hc_closedir':
|
||||
hcproto.c:464: warning: cast from pointer to integer of different size
|
||||
hcproto.c:467: warning: cast from pointer to integer of different size
|
||||
hcproto.c:470: warning: cast from pointer to integer of different size
|
||||
*** Error code 1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: distinfo,v 1.1.1.1 2007/06/08 01:10:17 hoka_adam Exp $
|
||||
$NetBSD: distinfo,v 1.2 2013/01/03 21:21:36 mrampke Exp $
|
||||
|
||||
SHA1 (cpdup-1.07.tgz) = c5bf465a5331c7c507a90ad0dfe34858dfce82f8
|
||||
RMD160 (cpdup-1.07.tgz) = 14cb34a206eb8c65fa2b594ffdcbd7e6b62fadfd
|
||||
Size (cpdup-1.07.tgz) = 23242 bytes
|
||||
SHA1 (patch-aa) = abedd03e5b451e54453c2b358b84cc37abf645b3
|
||||
SHA1 (patch-ab) = 2845c3d73cd4c35bb2441069273182048472098f
|
||||
SHA1 (cpdup-1.17.tgz) = 812a3a41d16b8102d7a18792b7b6851eff158ba5
|
||||
RMD160 (cpdup-1.17.tgz) = 8c6cc5c4caccb1c790e7d02fb59d9dfb1adf024a
|
||||
Size (cpdup-1.17.tgz) = 42236 bytes
|
||||
SHA1 (patch-Makefile) = b4fe63210a9d3f1f118c2ea9040350bdc3ae10ac
|
||||
SHA1 (patch-cpdup.h) = 998731dc9bbb12bf254d73af371b69a92f66218e
|
||||
|
|
26
cpdup/patches/patch-Makefile
Normal file
26
cpdup/patches/patch-Makefile
Normal file
|
@ -0,0 +1,26 @@
|
|||
$NetBSD: patch-Makefile,v 1.1 2013/01/03 21:21:36 mrampke Exp $
|
||||
|
||||
Link against libbsd on Linux
|
||||
|
||||
--- Makefile.orig 2010-07-05 18:02:07.000000000 +0000
|
||||
+++ Makefile
|
||||
@@ -11,10 +11,16 @@ WARNS?= 6
|
||||
|
||||
.if !defined(NOMD5)
|
||||
SRCS+= md5.c
|
||||
-.endif
|
||||
-
|
||||
+.if defined(LIBBSD)
|
||||
+LDADD+= -lbsd
|
||||
+CFLAGS+= -DLIBBSD=1
|
||||
+.else # BSD, link libmd
|
||||
LDADD+= -lmd
|
||||
-DPADD+= ${LIBMD}
|
||||
+DPADD+= ${LIBMD} # XXX not sure what this line does, but it is in the original Makefile
|
||||
+.endif # LIBBSD
|
||||
+.else # NOMD5
|
||||
+CFLAGS+= -DNOMD5=1
|
||||
+.endif # !NOMD5
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-aa,v 1.1.1.1 2007/06/08 01:10:17 hoka_adam Exp $
|
||||
|
||||
--- Makefile.orig 2007-06-08 02:02:17.000000000 +0200
|
||||
+++ Makefile
|
||||
@@ -8,8 +8,8 @@ SRCS= cpdup.c hcproto.c hclink.c misc.c
|
||||
SRCS+= md5.c
|
||||
.endif
|
||||
|
||||
-LDADD+= -lmd
|
||||
-DPADD+= ${LIBMD}
|
||||
+#LDADD+= -lmd
|
||||
+#DPADD+= ${LIBMD}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
$NetBSD: patch-ab,v 1.1.1.1 2007/06/08 01:10:17 hoka_adam Exp $
|
||||
|
||||
--- md5.c.orig 2006-08-13 22:24:35.000000000 +0200
|
||||
+++ md5.c
|
||||
@@ -266,6 +266,6 @@ doMD5File(const char *filename, char *bu
|
||||
CountReadBytes += size;
|
||||
}
|
||||
}
|
||||
- return MD5File(filename, buf);
|
||||
+ return doMD5File(filename, buf);
|
||||
}
|
||||
|
34
cpdup/patches/patch-cpdup.h
Normal file
34
cpdup/patches/patch-cpdup.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
$NetBSD: patch-cpdup.h,v 1.1 2013/01/03 21:21:36 mrampke Exp $
|
||||
|
||||
Linux compatibility defines and libbsd includes
|
||||
|
||||
--- cpdup.h.orig 2010-07-19 19:01:56.000000000 +0000
|
||||
+++ cpdup.h
|
||||
@@ -25,8 +25,13 @@
|
||||
#include <fnmatch.h>
|
||||
#include <assert.h>
|
||||
#ifndef NOMD5
|
||||
+#ifdef LIBBSD
|
||||
+#include <bsd/sys/cdefs.h>
|
||||
+#include <bsd/md5.h>
|
||||
+#else
|
||||
#include <md5.h>
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Solaris needs <strings.h> for bzero(), bcopy() and bcmp(). */
|
||||
#include <strings.h>
|
||||
@@ -35,6 +40,13 @@
|
||||
#include "compat_sun.h"
|
||||
#endif
|
||||
|
||||
+/* as per PORTING in cpdup-1.17 */
|
||||
+#ifdef __linux__
|
||||
+#define __unused
|
||||
+#define _GNU_SOURCE
|
||||
+#define __USE_FILE_OFFSET64
|
||||
+#endif
|
||||
+
|
||||
void logstd(const char *ctl, ...);
|
||||
void logerr(const char *ctl, ...);
|
||||
char *mprintf(const char *ctl, ...);
|
Loading…
Reference in a new issue