diff options
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/dd_rescue/Makefile | 14 | ||||
-rw-r--r-- | sysutils/dd_rescue/distinfo | 4 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-Makefile | 42 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-dd_rescue.c | 22 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-ddr_ctrl.h | 11 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-ffs.h | 38 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-find_nonzero.h | 10 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-find_nonzero_sse2.c | 10 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-fmt_no.h | 11 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-libddr_null.c | 10 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-md5.c | 11 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-pread64.h | 11 | ||||
-rw-r--r-- | sysutils/dd_rescue/files/patch-sha512.c | 11 | ||||
-rw-r--r-- | sysutils/dd_rescue/pkg-plist | 3 |
14 files changed, 168 insertions, 40 deletions
diff --git a/sysutils/dd_rescue/Makefile b/sysutils/dd_rescue/Makefile index fcbc48e2adef..3ec89f7eaa69 100644 --- a/sysutils/dd_rescue/Makefile +++ b/sysutils/dd_rescue/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= dd_rescue -PORTVERSION= 1.40 +PORTVERSION= 1.45 CATEGORIES= sysutils MASTER_SITES= http://www.garloff.de/kurt/linux/ddrescue/ \ http://fossies.org/unix/privat/ @@ -22,9 +22,17 @@ ALL_TARGET= default OPTIONS_DEFINE= DOCS +.include <bsd.port.options.mk> +.include <bsd.port.pre.mk> + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/dd_rescue ${STAGEDIR}${PREFIX}/bin - @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_PROGRAM} ${WRKSRC}/libddr_hash.so ${STAGEDIR}${PREFIX}/lib + ${INSTALL_PROGRAM} ${WRKSRC}/libddr_null.so ${STAGEDIR}${PREFIX}/lib + ${INSTALL_MAN} ${WRKSRC}/dd_rescue.1 ${STAGEDIR}${PREFIX}/man/man1 +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.dd_rescue ${STAGEDIR}${DOCSDIR} +.endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/sysutils/dd_rescue/distinfo b/sysutils/dd_rescue/distinfo index 8742bf1bcd3d..4dfad290dd55 100644 --- a/sysutils/dd_rescue/distinfo +++ b/sysutils/dd_rescue/distinfo @@ -1,2 +1,2 @@ -SHA256 (dd_rescue-1.40.tar.gz) = 54545ebbe2be00597d8c9ba3d51abcfdd7ba89f17d51974629e612c2619730ff -SIZE (dd_rescue-1.40.tar.gz) = 47107 +SHA256 (dd_rescue-1.45.tar.gz) = 2626fa2842916f6861b4e1ce72284c81e1b6e7323a842911aad4082bdaa4f663 +SIZE (dd_rescue-1.45.tar.gz) = 121426 diff --git a/sysutils/dd_rescue/files/patch-Makefile b/sysutils/dd_rescue/files/patch-Makefile index 9279a559bad7..0545c06346ac 100644 --- a/sysutils/dd_rescue/files/patch-Makefile +++ b/sysutils/dd_rescue/files/patch-Makefile @@ -1,39 +1,45 @@ ---- Makefile.orig 2013-08-13 06:29:50.000000000 +0900 -+++ Makefile 2014-01-18 17:48:01.000000000 +0900 -@@ -6,10 +6,6 @@ +--- Makefile.orig 2014-05-27 20:31:21.000000000 +0900 ++++ Makefile 2014-06-29 01:15:59.000000000 +0900 +@@ -6,10 +6,7 @@ DESTDIR = -CC = gcc --RPM_OPT_FLAGS = -Os -Wall -g +-RPM_OPT_FLAGS = -Os -Wall -g -D_FORTIFY_SOURCE=2 -CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H -CFLAGS_OPT = $(CFLAGS) -O3 ++CFLAGS_OPT = $(CFLAGS) -DHAVE_CONFIG_H INSTALL = install INSTALLFLAGS = -s prefix = $(DESTDIR)/usr -@@ -26,15 +22,9 @@ - INSTASROOT = -o root -g root - LIBDIR = /usr/lib +@@ -32,7 +29,7 @@ + LIB = lib + LIBDIR = /usr/$(LIB) COMPILER = $(shell $(CC) --version | head -n1) --DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -+DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DHAVE_CONFIG_H +-DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" # -DPLUGSEARCH="\"$(LIBDIR)\"" ++DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DHAVE_CONFIG_H # -DPLUGSEARCH="\"$(LIBDIR)\"" OUT = -o dd_rescue + LZOP = $(shell type -p lzop || type -P true) +@@ -46,12 +43,6 @@ + HAVE_LZO=0 + endif + -ifeq ($(CC),wcl386) - CFLAGS = "-ox -wx $(EXTRA_CFLAGS)" - DEFINES = -dMISS_STRSIGNAL -dMISS_PREAD -dVERSION=\"$(VERSION)\" -d__COMPILER__="\"$(COMPILER)\"" - OUT = "" -endif - - MACH := $(shell uname -m | tr A-Z a-z | sed 's/i[3456]86/i386/') - - ifeq ($(MACH),i386) -@@ -75,7 +65,7 @@ - $(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) $(LIBDIR)/libfallocate.a + HAVE_AVX2 := $(shell echo "" | $(CC) -mavx2 -xc - 2>&1 | grep unrecognized || echo 1) + HAVE_SSE42 := $(shell echo "" | $(CC) -msse4.2 -xc - 2>&1 | grep unrecognized || echo 1) - dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS) -- $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) -ldl -+ $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) +@@ -180,7 +171,7 @@ + $(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(LIBDIR)/libfallocate.a - libfalloc-dl: dd_rescue + dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS) $(OBJECTS2) +- $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) -ldl ++ $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) + md5: md5.c md5.h hash.h config.h + $(CC) $(CFLAGS_OPT) -DMD5_MAIN -o $@ $< diff --git a/sysutils/dd_rescue/files/patch-dd_rescue.c b/sysutils/dd_rescue/files/patch-dd_rescue.c index 714b05cc1d54..33263289790e 100644 --- a/sysutils/dd_rescue/files/patch-dd_rescue.c +++ b/sysutils/dd_rescue/files/patch-dd_rescue.c @@ -1,6 +1,14 @@ ---- dd_rescue.c.orig 2014-01-18 19:02:26.000000000 +0900 -+++ dd_rescue.c 2014-01-18 19:02:39.000000000 +0900 -@@ -1848,7 +1848,9 @@ +--- dd_rescue.c.orig 2014-05-27 17:27:21.000000000 +0900 ++++ dd_rescue.c 2014-06-29 01:17:08.000000000 +0900 +@@ -118,6 +118,7 @@ + #include "list.h" + #include "fmt_no.h" + #include "find_nonzero.h" ++#include "ffs.h" + + #include "fstrim.h" + +@@ -2304,7 +2305,9 @@ const char* retstrdupcat3(const char* dir, char dirsep, const char* inm) { @@ -11,13 +19,13 @@ const int dlen = strlen(dir) + (dirsep>0? 1: dirsep); char* ret = (char*)malloc(dlen + strlen(inm) + 1); strcpy(ret, dir); -@@ -1867,7 +1869,9 @@ +@@ -2323,7 +2326,9 @@ { size_t oln = strlen(onm); if (!strcmp(onm, ".")) { -- char* ret = strdup(basename(strdupa(iname))); -+ char* str = alloca(strlen(iname) + 1); -+ strcpy(str, iname); +- char* ret = strdup(basename(strdupa(op->iname))); ++ char* str = alloca(strlen(op->iname) + 1); ++ strcpy(str, op->iname); + char* ret = strdup(basename(str)); LISTAPPEND(freenames, ret, charp); return ret; diff --git a/sysutils/dd_rescue/files/patch-ddr_ctrl.h b/sysutils/dd_rescue/files/patch-ddr_ctrl.h new file mode 100644 index 000000000000..f093adf889d1 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-ddr_ctrl.h @@ -0,0 +1,11 @@ +--- ddr_ctrl.h.orig 2014-06-29 00:49:05.000000000 +0900 ++++ ddr_ctrl.h 2014-06-29 00:49:52.000000000 +0900 +@@ -10,6 +10,8 @@ + #ifndef _DDR_CTRL_H + #define _DDR_CTRL_H + ++typedef long long loff_t; ++ + /* Options */ + typedef struct _opt_t { + const char *iname, *oname, *lname, *bbname; diff --git a/sysutils/dd_rescue/files/patch-ffs.h b/sysutils/dd_rescue/files/patch-ffs.h new file mode 100644 index 000000000000..57a209773a3d --- /dev/null +++ b/sysutils/dd_rescue/files/patch-ffs.h @@ -0,0 +1,38 @@ +--- ffs.h.orig 2014-02-22 05:39:33.000000000 +0900 ++++ ffs.h 2014-06-29 01:21:32.000000000 +0900 +@@ -27,7 +27,7 @@ + #ifdef HAVE_ENDIAN_H + #include <endian.h> + #endif +- ++#include <stdint.h> + + #ifdef HAVE_FFS + # define myffs(x) ffs(x) +@@ -50,7 +50,7 @@ + # define myffsl(x) myffsl_c(x) + #endif + +-#ifndef __BYTE_ORDER ++#ifndef BYTE_ORDER + # error Need to define __BYTE_ORDER + #endif + #ifndef __WORDSIZE +@@ -88,7 +88,7 @@ + } + #endif + +-#if __BYTE_ORDER == __BIG_ENDIAN || defined(TEST) ++#if BYTE_ORDER == BIG_ENDIAN || defined(TEST) + /** Find last (highest) bit set in word val, returns a val b/w __WORDSIZE and 1, 0 if no bit is set */ + static int myflsl(unsigned long val) + { +@@ -117,6 +117,8 @@ + } + return res; + } ++#else ++# define myflsl(x) flsl(x) + #endif + + void probe_sse42(); diff --git a/sysutils/dd_rescue/files/patch-find_nonzero.h b/sysutils/dd_rescue/files/patch-find_nonzero.h deleted file mode 100644 index 71198d554037..000000000000 --- a/sysutils/dd_rescue/files/patch-find_nonzero.h +++ /dev/null @@ -1,10 +0,0 @@ ---- find_nonzero.h.orig 2014-01-18 17:32:44.000000000 +0900 -+++ find_nonzero.h 2014-01-18 17:33:03.000000000 +0900 -@@ -12,6 +12,7 @@ - - #include <string.h> - #include <sys/types.h> -+#include <stdint.h> - - #ifdef HAVE_FFS - # define myffs(x) ffs(x) diff --git a/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c b/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c new file mode 100644 index 000000000000..e575ce379ae6 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-find_nonzero_sse2.c @@ -0,0 +1,10 @@ +--- find_nonzero_sse2.c.orig 2014-06-29 01:06:51.000000000 +0900 ++++ find_nonzero_sse2.c 2014-06-29 01:07:11.000000000 +0900 +@@ -5,6 +5,7 @@ + */ + + #include "find_nonzero.h" ++#include "ffs.h" + + #if defined(__SSE2__) + #include <emmintrin.h> diff --git a/sysutils/dd_rescue/files/patch-fmt_no.h b/sysutils/dd_rescue/files/patch-fmt_no.h new file mode 100644 index 000000000000..88f1326c9604 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-fmt_no.h @@ -0,0 +1,11 @@ +--- fmt_no.h.orig 2014-06-29 00:25:12.000000000 +0900 ++++ fmt_no.h 2014-06-29 00:28:32.000000000 +0900 +@@ -4,6 +4,8 @@ + #define _FMT_NO_H + + #include <sys/types.h> ++typedef long long loff_t; ++ + char* fmt_int_b(unsigned char pre, unsigned char post, unsigned int scale, + loff_t no, const char* bold, const char* norm, + const char boldinvis, const unsigned char base, diff --git a/sysutils/dd_rescue/files/patch-libddr_null.c b/sysutils/dd_rescue/files/patch-libddr_null.c new file mode 100644 index 000000000000..846b79907052 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-libddr_null.c @@ -0,0 +1,10 @@ +--- libddr_null.c.orig 2014-06-29 00:55:34.000000000 +0900 ++++ libddr_null.c 2014-06-29 00:56:42.000000000 +0900 +@@ -10,6 +10,7 @@ + #include "ddr_ctrl.h" + #include <string.h> + #include <stdlib.h> ++#include <stdint.h> + + /* fwd decl */ + extern ddr_plugin_t ddr_plug; diff --git a/sysutils/dd_rescue/files/patch-md5.c b/sysutils/dd_rescue/files/patch-md5.c new file mode 100644 index 000000000000..6c6455f9b520 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-md5.c @@ -0,0 +1,11 @@ +--- md5.c.orig 2014-06-29 00:53:13.000000000 +0900 ++++ md5.c 2014-06-29 00:53:22.000000000 +0900 +@@ -12,7 +12,7 @@ + #include <stdlib.h> + #include <string.h> + #include <stdint.h> +-#include <endian.h> ++#include <machine/endian.h> + #include <assert.h> + #include <netinet/in.h> + diff --git a/sysutils/dd_rescue/files/patch-pread64.h b/sysutils/dd_rescue/files/patch-pread64.h new file mode 100644 index 000000000000..ffbd329ed640 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-pread64.h @@ -0,0 +1,11 @@ +--- pread64.h.orig 2014-06-29 00:37:49.000000000 +0900 ++++ pread64.h 2014-06-29 00:39:50.000000000 +0900 +@@ -94,7 +94,7 @@ + { + return pread(fd, buf, sz, off); + } +-static inline ssize_t pwrite(int fd, const void *buf, size_t sz, loff_t off) ++static inline ssize_t pwrite64(int fd, const void *buf, size_t sz, loff_t off) + { + return pwrite(fd, buf, sz, off); + } diff --git a/sysutils/dd_rescue/files/patch-sha512.c b/sysutils/dd_rescue/files/patch-sha512.c new file mode 100644 index 000000000000..e2219fa54e86 --- /dev/null +++ b/sysutils/dd_rescue/files/patch-sha512.c @@ -0,0 +1,11 @@ +--- sha512.c.orig 2014-06-29 00:54:18.000000000 +0900 ++++ sha512.c 2014-06-29 00:54:36.000000000 +0900 +@@ -19,7 +19,7 @@ + #include <netinet/in.h> + #include <assert.h> + #include <unistd.h> +-#include <endian.h> ++#include <machine/endian.h> + + /* + Note 1: All variables are 64 bit unsigned integers and addition is calculated modulo 2^64 diff --git a/sysutils/dd_rescue/pkg-plist b/sysutils/dd_rescue/pkg-plist index 16ef6f00b767..7c25932f4759 100644 --- a/sysutils/dd_rescue/pkg-plist +++ b/sysutils/dd_rescue/pkg-plist @@ -1,3 +1,6 @@ bin/dd_rescue +lib/libddr_hash.so +lib/libddr_null.so +man/man1/dd_rescue.1.gz %%PORTDOCS%%%%DOCSDIR%%/README.dd_rescue %%PORTDOCS%%@dirrm %%DOCSDIR%% |