- Update to 1.99.8.

- Regenerate patches with make makepatch.
This commit is contained in:
MANTANI Nobutaka 2018-07-15 16:45:41 +00:00
parent 76fa912565
commit 32c8a26e27
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=474702
20 changed files with 144 additions and 89 deletions

View file

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= dd_rescue
PORTVERSION= 1.46
PORTVERSION= 1.99.8
CATEGORIES= sysutils
MASTER_SITES= http://www.garloff.de/kurt/linux/ddrescue/ \
http://fossies.org/unix/privat/
@ -13,22 +13,30 @@ COMMENT= dd tool suitable for rescuing data from a medium with errors
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
GNU_CONFIGURE= yes
USES= autoreconf gmake
USE_CSTD= gnu89
BROKEN_aarch64= Fails to link: undefined reference to find_nonzero_arm8
WRKSRC= ${WRKDIR}/${PORTNAME}
LIB_DEPENDS= liblzo2.so:archivers/lzo2
USES= autoreconf gmake ssl tar:bzip2
USE_CSTD= gnu89
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
ALL_TARGET= default
MAKE_ARGS= EXTRA_LDFLAGS=-L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
OPTIONS_DEFINE= DOCS
BROKEN_aarch64= Fails to link: undefined reference to find_nonzero_arm8
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/dd_rescue ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/libddr_crypt.so ${STAGEDIR}${PREFIX}/lib
${INSTALL_PROGRAM} ${WRKSRC}/libddr_hash.so ${STAGEDIR}${PREFIX}/lib
${INSTALL_PROGRAM} ${WRKSRC}/libddr_null.so ${STAGEDIR}${PREFIX}/lib
${INSTALL_PROGRAM} ${WRKSRC}/libddr_lzo.so ${STAGEDIR}${PREFIX}/lib
${INSTALL_MAN} ${WRKSRC}/dd_rescue.1 ${STAGEDIR}${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/ddr_crypt.1 ${STAGEDIR}${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/ddr_lzo.1 ${STAGEDIR}${PREFIX}/man/man1
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}

View file

@ -1,2 +1,3 @@
SHA256 (dd_rescue-1.46.tar.gz) = 9e09b5583f778fe43b6c473998fe0455486d5ffeacbb72b022d6cf5ba8241aba
SIZE (dd_rescue-1.46.tar.gz) = 126790
TIMESTAMP = 1529856127
SHA256 (dd_rescue-1.99.8.tar.bz2) = 90db76716af6a6a2370d9726804ff26cc63e61109af9967078a5eb941faa7dbd
SIZE (dd_rescue-1.99.8.tar.bz2) = 174594

View file

@ -1,28 +1,28 @@
--- Makefile.orig 2014-05-27 20:31:21.000000000 +0900
+++ Makefile 2014-08-06 21:41:59.000000000 +0900
@@ -6,10 +6,7 @@
--- Makefile.orig 2017-12-03 21:01:05 UTC
+++ Makefile
@@ -7,10 +7,7 @@ VERSION = 1.99.8
DESTDIR =
SRCDIR = .
-CC = gcc
-RPM_OPT_FLAGS = -Os -Wall -g -D_FORTIFY_SOURCE=2
-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H
-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H -I .
-CFLAGS_OPT = $(CFLAGS) -O3
+CFLAGS_OPT = $(CFLAGS) -DHAVE_CONFIG_H
INSTALL = install
INSTALLFLAGS = -s
prefix = $(DESTDIR)/usr
@@ -32,7 +29,7 @@
LIB = lib
@@ -34,7 +31,7 @@ LIB = lib
LIBDIR = /usr/$(LIB)
COMPILER = $(shell $(CC) --version | head -n1)
-DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" # -DPLUGSEARCH="\"$(LIBDIR)\""
+DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DHAVE_CONFIG_H # -DPLUGSEARCH="\"$(LIBDIR)\""
ID = $(shell git describe --tags || cat REL-ID)
-DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DID=\"$(ID)\" # -DPLUGSEARCH="\"$(LIBDIR)\""
+DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DID=\"$(ID)\" -DHAVE_CONFIG_H # -DPLUGSEARCH="\"$(LIBDIR)\""
OUT = -o dd_rescue
LZOP = $(shell type -p lzop || type -P true)
@@ -46,12 +43,6 @@
HAVE_LZO=0
PIC = -fPIC
PIE = -fPIE
@@ -63,19 +60,13 @@ else
HAVE_OPENSSL=0
endif
-ifeq ($(CC),wcl386)
@ -31,24 +31,32 @@
- OUT = ""
-endif
-
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)
MACH := $(shell uname -m | tr A-Z a-z | sed 's/i[3456]86/i386/')
@@ -74,7 +65,7 @@
ISX86 := 0
ifeq ($(MACH),i386)
ISX86 := 1
endif
endif
-ifeq ($(MACH),x86_64)
+ifeq ($(MACH),amd64)
LIB = lib64
OBJECTS2 = find_nonzero_sse2.o
ifeq ($(HAVE_SSE42),1)
@@ -180,7 +171,7 @@
$(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(LIBDIR)/libfallocate.a
ISX86 := 1
LIB = lib64
endif
@@ -243,7 +234,7 @@ libddr_MD5.so: libddr_hash.so
ln -sf $< $@
dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS) $(OBJECTS2)
- $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) -ldl
+ $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2)
libddr_lzo.so: libddr_lzo.po
- $(CC) -shared -o $@ $^ -llzo2
+ $(CC) -shared -o $@ $^ $(EXTRA_LDFLAGS) -llzo2
md5: md5.c md5.h hash.h config.h
$(CC) $(CFLAGS_OPT) -DMD5_MAIN -o $@ $<
libddr_null.so: libddr_null.po
$(CC) -shared -o $@ $^
@@ -306,7 +297,7 @@ libfalloc-static: $(SRCDIR)/dd_rescue.c
# This is the default built
dd_rescue: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJECTS) $(OBJECTS2)
- $(CC) $(CFLAGS) $(PIE) $(LDPIE) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) -ldl $(EXTRA_LDFLAGS) $(RDYNAMIC)
+ $(CC) $(CFLAGS) $(PIE) $(LDPIE) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(EXTRA_LDFLAGS) $(RDYNAMIC)
# Test programs
md5: $(SRCDIR)/md5.c $(SRCDIR)/md5.h $(SRCDIR)/hash.h config.h

View file

@ -1,6 +1,6 @@
--- 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 @@
--- dd_rescue.c.orig 2017-11-02 11:28:14 UTC
+++ dd_rescue.c
@@ -117,6 +117,7 @@
#include "list.h"
#include "fmt_no.h"
#include "find_nonzero.h"
@ -8,7 +8,7 @@
#include "fstrim.h"
@@ -2304,7 +2305,9 @@
@@ -2712,7 +2713,9 @@ int is_filename(char* arg)
const char* retstrdupcat3(const char* dir, char dirsep, const char* inm)
{
@ -19,7 +19,7 @@
const int dlen = strlen(dir) + (dirsep>0? 1: dirsep);
char* ret = (char*)malloc(dlen + strlen(inm) + 1);
strcpy(ret, dir);
@@ -2323,7 +2326,9 @@
@@ -2731,7 +2734,9 @@ const char* dirappfile(const char* onm,
{
size_t oln = strlen(onm);
if (!strcmp(onm, ".")) {

View file

@ -1,5 +1,5 @@
--- ddr_ctrl.h.orig 2014-06-29 00:49:05.000000000 +0900
+++ ddr_ctrl.h 2014-06-29 00:49:52.000000000 +0900
--- ddr_ctrl.h.orig 2016-12-28 22:37:15 UTC
+++ ddr_ctrl.h
@@ -10,6 +10,8 @@
#ifndef _DDR_CTRL_H
#define _DDR_CTRL_H

View file

@ -1,5 +1,5 @@
--- ffs.h.orig 2014-02-22 05:39:33.000000000 +0900
+++ ffs.h 2014-08-13 22:46:51.000000000 +0900
--- ffs.h.orig 2015-08-27 15:45:57 UTC
+++ ffs.h
@@ -27,7 +27,15 @@
#ifdef HAVE_ENDIAN_H
#include <endian.h>
@ -16,7 +16,7 @@
#ifdef HAVE_FFS
# define myffs(x) ffs(x)
@@ -50,12 +58,9 @@
@@ -54,12 +62,9 @@
# define myffsl(x) myffsl_c(x)
#endif
@ -28,9 +28,9 @@
-# error Need to define __WORDSIZE
-#endif
#ifndef HAVE_FFS
/** Find first (lowest) bit set in word val, returns a val b/w 1 and __WORDSIZE, 0 if no bit is set */
@@ -88,7 +93,7 @@
//#ifndef HAVE_FFS
#ifdef NEED_FFSL_C
@@ -93,7 +98,7 @@ static int myffsl_c(unsigned long val)
}
#endif
@ -39,9 +39,9 @@
/** 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 +122,8 @@
}
@@ -132,6 +137,8 @@ static int myflsl(unsigned long val)
return res;
#endif
}
+#else
+# define myflsl(x) flsl(x)

View file

@ -0,0 +1,10 @@
--- fiemap.c.orig 2015-04-15 08:56:38 UTC
+++ fiemap.c
@@ -286,7 +286,6 @@ char* strippart(const char* partname)
return _fulldevnm;
}
-#include <linux/hdreg.h>
/* Get partition offset in sectors for block device devnm */
int64_t partoffset(const char* devnm)
{

View file

@ -1,5 +1,5 @@
--- 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
--- find_nonzero_sse2.c.orig 2016-12-28 21:17:50 UTC
+++ find_nonzero_sse2.c
@@ -5,6 +5,7 @@
*/

View file

@ -1,5 +1,5 @@
--- fmt_no.h.orig 2014-08-06 22:50:41.000000000 +0900
+++ fmt_no.h 2014-08-06 22:51:11.000000000 +0900
--- fmt_no.h.orig 2017-11-09 13:09:58 UTC
+++ fmt_no.h
@@ -4,6 +4,8 @@
#define _FMT_NO_H
@ -7,5 +7,5 @@
+#include "ddr_ctrl.h"
+
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,
loff_t no, const char* bold, const int blen,
const char* norm, const int nlen,

View file

@ -1,5 +1,5 @@
--- frandom.c.orig 2013-01-27 02:43:19.000000000 +0900
+++ frandom.c 2013-01-27 02:43:29.000000000 +0900
--- frandom.c.orig 2016-12-28 21:17:50 UTC
+++ frandom.c
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include <stdio.h>
@ -7,5 +7,5 @@
-#include <asm/errno.h>
+#include <sys/errno.h>
#include <unistd.h>
#include <time.h>
#ifdef HAVE_CONFIG_H

View file

@ -1,19 +0,0 @@
--- libddr_MD5.c.orig 2014-08-10 03:38:53.000000000 +0900
+++ libddr_MD5.c 2014-08-13 23:02:10.000000000 +0900
@@ -21,6 +21,7 @@
#include "sha256.h"
#include "sha512.h"
#include "sha1.h"
+#include "ffs.h"
#include <stdlib.h>
#include <string.h>
@@ -36,7 +37,7 @@
#endif
#include <netinet/in.h> /* For ntohl/htonl */
-#include <endian.h>
+#include <machine/endian.h>
// TODO: pass at runtime rather than compile time
#define HASH_DEBUG(x) if (state->debug) x

View file

@ -0,0 +1,11 @@
--- libddr_crypt.c.orig 2017-12-03 21:58:24 UTC
+++ libddr_crypt.c
@@ -44,7 +44,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
-#include <endian.h>
+#include <machine/endian.h>
#include <signal.h>
#ifdef HAVE_ATTR_XATTR_H

View file

@ -0,0 +1,11 @@
--- libddr_hash.c.orig 2017-08-25 15:14:33 UTC
+++ libddr_hash.c
@@ -34,7 +34,7 @@
#include <fcntl.h>
#include <netinet/in.h> /* For ntohl/htonl */
-#include <endian.h>
+#include <machine/endian.h>
#ifdef HAVE_ATTR_XATTR_H
#include <attr/xattr.h>

View file

@ -0,0 +1,10 @@
--- libddr_lzo.c.orig 2017-11-04 09:14:24 UTC
+++ libddr_lzo.c
@@ -46,6 +46,7 @@
#error __WORDSIZE unknown
#endif
+#define HAVE_BASENAME 1
#ifdef HAVE_BASENAME
//char* basename(char*);
#else

View file

@ -1,5 +1,5 @@
--- libddr_null.c.orig 2014-05-26 17:30:19.000000000 +0900
+++ libddr_null.c 2014-08-13 22:57:16.000000000 +0900
--- libddr_null.c.orig 2015-04-15 08:56:38 UTC
+++ libddr_null.c
@@ -8,8 +8,10 @@
#include "ddr_plugin.h"

View file

@ -1,5 +1,5 @@
--- md5.c.orig 2014-06-29 00:53:13.000000000 +0900
+++ md5.c 2014-06-29 00:53:22.000000000 +0900
--- md5.c.orig 2017-11-04 09:03:51 UTC
+++ md5.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>

View file

@ -0,0 +1,11 @@
--- pbkdf_ossl.c.orig 2017-11-04 09:03:51 UTC
+++ pbkdf_ossl.c
@@ -11,7 +11,7 @@
#include "md5.h"
#include <stdlib.h>
#include <assert.h>
-#include <endian.h>
+#include <machine/endian.h>
#include <stdint.h>
#define MIN(a,b) ((a)<(b)? (a): (b))

View file

@ -1,6 +1,6 @@
--- 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 @@
--- pread64.h.orig 2015-04-15 08:56:38 UTC
+++ pread64.h
@@ -94,7 +94,7 @@ static inline ssize_t pread64(int fd, vo
{
return pread(fd, buf, sz, off);
}

View file

@ -1,5 +1,5 @@
--- sha512.c.orig 2014-08-07 02:38:59.000000000 +0900
+++ sha512.c 2014-08-13 23:04:15.000000000 +0900
--- sha512.c.orig 2016-12-28 21:17:50 UTC
+++ sha512.c
@@ -13,13 +13,14 @@
#endif

View file

@ -1,5 +1,9 @@
bin/dd_rescue
lib/libddr_crypt.so
lib/libddr_hash.so
lib/libddr_null.so
lib/libddr_lzo.so
man/man1/dd_rescue.1.gz
man/man1/ddr_crypt.1.gz
man/man1/ddr_lzo.1.gz
%%PORTDOCS%%%%DOCSDIR%%/README.dd_rescue