Index: head/sysutils/dd_rescue/Makefile =================================================================== --- head/sysutils/dd_rescue/Makefile (revision 568428) +++ head/sysutils/dd_rescue/Makefile (revision 568429) @@ -1,46 +1,45 @@ # Created by: MANTANI Nobutaka # $FreeBSD$ PORTNAME= dd_rescue -PORTVERSION= 1.99.8 -PORTREVISION= 1 +PORTVERSION= 1.99.10 CATEGORIES= sysutils MASTER_SITES= http://www.garloff.de/kurt/linux/ddrescue/ \ http://fossies.org/unix/privat/ MAINTAINER= nobutaka@FreeBSD.org COMMENT= dd tool suitable for rescuing data from a medium with errors LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_aarch64= Fails to link: undefined reference to find_nonzero_arm8 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 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} ${INSTALL_DATA} ${WRKSRC}/README.dd_rescue ${STAGEDIR}${DOCSDIR} .include Index: head/sysutils/dd_rescue/distinfo =================================================================== --- head/sysutils/dd_rescue/distinfo (revision 568428) +++ head/sysutils/dd_rescue/distinfo (revision 568429) @@ -1,3 +1,3 @@ -TIMESTAMP = 1529856127 -SHA256 (dd_rescue-1.99.8.tar.bz2) = 90db76716af6a6a2370d9726804ff26cc63e61109af9967078a5eb941faa7dbd -SIZE (dd_rescue-1.99.8.tar.bz2) = 174594 +TIMESTAMP = 1615785193 +SHA256 (dd_rescue-1.99.10.tar.bz2) = 100fceb65b073a2c6e4f1a6b6e2e58e5d51235a4e85162f098b03d9ff0e65c16 +SIZE (dd_rescue-1.99.10.tar.bz2) = 176603 Index: head/sysutils/dd_rescue/files/patch-Makefile =================================================================== --- head/sysutils/dd_rescue/files/patch-Makefile (revision 568428) +++ head/sysutils/dd_rescue/files/patch-Makefile (revision 568429) @@ -1,62 +1,62 @@ ---- Makefile.orig 2017-12-03 21:01:05 UTC +--- Makefile.orig 2021-03-08 07:47:42 UTC +++ Makefile -@@ -7,10 +7,7 @@ VERSION = 1.99.8 +@@ -7,10 +7,7 @@ VERSION = 1.99.10 DESTDIR = SRCDIR = . --CC = gcc --RPM_OPT_FLAGS = -Os -Wall -g -D_FORTIFY_SOURCE=2 +-CC ?= gcc +-RPM_OPT_FLAGS ?= -Os -Wall -g -D_FORTIFY_SOURCE=2 -CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H -I . -CFLAGS_OPT = $(CFLAGS) -O3 +CFLAGS_OPT = $(CFLAGS) -DHAVE_CONFIG_H - INSTALL = install + INSTALL ?= install INSTALLFLAGS = -s prefix = $(DESTDIR)/usr -@@ -34,7 +31,7 @@ LIB = lib +@@ -35,7 +32,7 @@ LIB = lib LIBDIR = /usr/$(LIB) COMPILER = $(shell $(CC) --version | head -n1) 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 PIC = -fPIC PIE = -fPIE -@@ -63,19 +60,13 @@ else - HAVE_OPENSSL=0 +@@ -70,19 +67,13 @@ else + HAVE_XATTR=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/') ISX86 := 0 ifeq ($(MACH),i386) ISX86 := 1 endif -ifeq ($(MACH),x86_64) +ifeq ($(MACH),amd64) ISX86 := 1 LIB = lib64 endif -@@ -243,7 +234,7 @@ libddr_MD5.so: libddr_hash.so +@@ -261,7 +252,7 @@ libddr_MD5.so: libddr_hash.so ln -sf $< $@ libddr_lzo.so: libddr_lzo.po - $(CC) -shared -o $@ $^ -llzo2 + $(CC) -shared -o $@ $^ $(EXTRA_LDFLAGS) -llzo2 libddr_null.so: libddr_null.po $(CC) -shared -o $@ $^ -@@ -306,7 +297,7 @@ libfalloc-static: $(SRCDIR)/dd_rescue.c +@@ -324,7 +315,7 @@ libfalloc-static: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) # 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 Index: head/sysutils/dd_rescue/files/patch-dd_rescue.c =================================================================== --- head/sysutils/dd_rescue/files/patch-dd_rescue.c (revision 568428) +++ head/sysutils/dd_rescue/files/patch-dd_rescue.c (revision 568429) @@ -1,32 +1,32 @@ ---- dd_rescue.c.orig 2017-11-02 11:28:14 UTC +--- dd_rescue.c.orig 2021-03-07 06:46:37 UTC +++ dd_rescue.c -@@ -117,6 +117,7 @@ +@@ -116,6 +116,7 @@ #include "list.h" #include "fmt_no.h" #include "find_nonzero.h" +#include "ffs.h" #include "fstrim.h" -@@ -2712,7 +2713,9 @@ int is_filename(char* arg) +@@ -2725,7 +2726,9 @@ int is_filename(char* arg) const char* retstrdupcat3(const char* dir, char dirsep, const char* inm) { - char* ibase = basename(strdupa(inm)); + char* str = alloca(strlen(inm) + 1); + strcpy(str, inm); + char* ibase = basename(str); const int dlen = strlen(dir) + (dirsep>0? 1: dirsep); char* ret = (char*)malloc(dlen + strlen(inm) + 1); strcpy(ret, dir); -@@ -2731,7 +2734,9 @@ const char* dirappfile(const char* onm, +@@ -2744,7 +2747,9 @@ const char* dirappfile(const char* onm, opt_t *op) { size_t oln = strlen(onm); if (!strcmp(onm, ".")) { - 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; } Index: head/sysutils/dd_rescue/files/patch-ffs.h =================================================================== --- head/sysutils/dd_rescue/files/patch-ffs.h (revision 568428) +++ head/sysutils/dd_rescue/files/patch-ffs.h (revision 568429) @@ -1,50 +1,50 @@ ---- ffs.h.orig 2015-08-27 15:45:57 UTC +--- ffs.h.orig 2021-03-07 06:41:24 UTC +++ ffs.h @@ -27,7 +27,15 @@ #ifdef HAVE_ENDIAN_H #include #endif +#include +#ifndef __WORDSIZE +#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) +#define __WORDSIZE 64 +#else +#define __WORDSIZE 32 +#endif +#endif #ifdef HAVE_FFS # define myffs(x) ffs(x) @@ -54,12 +62,9 @@ # define myffsl(x) myffsl_c(x) #endif -#ifndef __BYTE_ORDER +#ifndef BYTE_ORDER # error Need to define __BYTE_ORDER #endif -#ifndef __WORDSIZE -# error Need to define __WORDSIZE -#endif //#ifndef HAVE_FFS #ifdef NEED_FFSL_C @@ -93,7 +98,7 @@ static int myffsl_c(unsigned long val) } #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) { -@@ -132,6 +137,8 @@ static int myflsl(unsigned long val) - return res; - #endif +@@ -134,6 +139,8 @@ static int myflsl(unsigned long val) } + int myffs_sse42(unsigned long); + int myffsl_sse42(unsigned long); +#else +# define myflsl(x) flsl(x) #endif void probe_sse42();