Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

15
sysutils/dd_rescue/DESCR Normal file
View File

@@ -0,0 +1,15 @@
Like dd, dd_rescue does copy data from one file or block device to another.
You can specify file positions (called seek and Skip in dd).
There are several differences:
* dd_rescue does not provide character conversions.
* The command syntax is different. Call dd_rescue -h.
* dd_rescue does not abort on errors on the input file, unless you specify a
maximum error number. Then dd_rescue will abort when this number is
reached.
* dd_rescue does not truncate the output file, unless asked to.
* You can tell dd_rescue to start from the end of a file and move backwards.
* It uses two block sizes, a large (soft) block size and a small (hard) block
size. In case of errors, the size falls back to the small one and is
promoted again after a while without errors.
* It does not (yet) support non-seekable in- or output.

View File

@@ -0,0 +1,6 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2013/06/04 14:55:03 mef Exp $
README file is available at ${PREFIX}/share/doc/dd_rescue/README
or `dd_rescue -h' for help, thank you.
===========================================================================

View File

@@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.9 2013/06/04 00:47:46 mef Exp $
DISTNAME= dd_rescue-1.33
CATEGORIES= sysutils
MASTER_SITES= ${HOMEPAGE:Q}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.garloff.de/kurt/linux/ddrescue/
COMMENT= Tool like dd(1) for rescuing data from media with errors
LICENSE= gnu-gpl-v2
WRKSRC= ${WRKDIR}/dd_rescue
BUILD_TARGET= dd_rescue
USE_TOOLS+= gmake
INSTALLATION_DIRS= bin share/doc/${PKGBASE}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/dd_rescue ${DESTDIR}${PREFIX}/bin/
${INSTALL_DATA} ${WRKSRC}/README.dd_rescue \
${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/README
.include "../../mk/bsd.pkg.mk"

3
sysutils/dd_rescue/PLIST Normal file
View File

@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:16:03 joerg Exp $
bin/dd_rescue
share/doc/dd_rescue/README

View File

@@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.8 2013/06/14 01:07:58 mef Exp $
SHA1 (dd_rescue-1.33.tar.gz) = cb21524fec919d32b7263b7999e2c8b26e7273cd
RMD160 (dd_rescue-1.33.tar.gz) = ed39efddcf3fa6708926cb31c9b32020e0d59208
Size (dd_rescue-1.33.tar.gz) = 36923 bytes
SHA1 (patch-aa) = ae11e96371b3b815b066a2dcedd869c90d4b89ff
SHA1 (patch-ab) = b590da5113cf4367b52d2042f036acbe6e330fbe
SHA1 (patch-frandom_c) = dd3c300df7a2f6cee6c981507c1dd17b39c47fb2

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-aa,v 1.3 2013/06/04 00:47:46 mef Exp $
Make it portable.
--- Makefile.orig 2013-03-31 04:33:15.000000000 +0900
+++ Makefile 2013-04-08 16:56:38.000000000 +0900
@@ -6,9 +6,6 @@ VERSION = 1.33
DESTDIR =
-CC = gcc
-RPM_OPT_FLAGS = -Os -Wall -g
-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS)
CFLAGS_OPT = $(CFLAGS) -O3
INSTALL = install
INSTALLFLAGS = -s

View File

@@ -0,0 +1,64 @@
$NetBSD: patch-ab,v 1.7 2013/06/14 01:07:58 mef Exp $
(1) clang flags:
dd_rescue.c:1494:22: warning: implicit declaration of function 'basename' is invalid in C99 [-Wimplicit-function-declaration]
const char* ibase = basename(inm);
(2)
See http://gnats.netbsd.org/38620
dd_rescue: (fatal): allocation of aligned buffer failed!
(3) clang flags:
dd_recue.c:(.text+0x12b4): undefined reference to `mypread'
dd_rescue.c:(.text+0x1374): undefined reference to `mypwrite'
--- dd_rescue.c.orig 2013-03-31 04:24:34.000000000 +0900
+++ dd_rescue.c 2013-06-13 16:44:35.000000000 +0900
@@ -83,6 +83,7 @@
#include <limits.h>
#include <sys/time.h>
#include <sys/stat.h>
+#include <libgen.h>
#include "frandom.h"
#include "list.h"
@@ -121,6 +122,10 @@
# endif
#endif
+#ifdef __DragonFly__
+#undef O_DIRECT
+#endif
+
/* fwd decls */
int cleanup();
@@ -740,7 +745,7 @@
return ln;
}
-inline ssize_t mypread(int fd, void* bf, size_t sz, off_t off)
+static inline ssize_t mypread(int fd, void* bf, size_t sz, off_t off)
{
if (i_repeat) {
if (i_rep_init)
@@ -762,7 +767,7 @@
return pread(fd, bf, sz, off);
}
-inline ssize_t mypwrite(int fd, void* bf, size_t sz, off_t off)
+static inline ssize_t mypwrite(int fd, void* bf, size_t sz, off_t off)
{
if (o_chr)
return write(fd, bf, sz);
@@ -1452,6 +1457,11 @@
unsigned char *ptr;
#ifdef O_DIRECT
void *mp;
+#ifdef linux
+#define my_valloc(a, b, c) posix_memalign((a), (b), (c))
+#else
+#define my_valloc(a, b, c) !(*(a) = valloc((c)))
+#endif
if (posix_memalign(&mp, pagesize, bs)) {
fplog(stderr, "dd_rescue: (fatal): allocation of aligned buffer failed!\n");
cleanup(); exit(18);

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-frandom_c,v 1.1 2013/06/04 00:47:46 mef Exp $
frandom.c:19:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
--- frandom.c.orig 2013-02-10 17:06:41.000000000 +0900
+++ frandom.c 2013-04-08 17:18:43.000000000 +0900
@@ -16,7 +16,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <asm/errno.h>
+/* #include <asm/errno.h> */
+#define ENOMEM 12 /* Out of memory */
#include <unistd.h>
#include <time.h>
#include <sys/time.h>