git: 3375d85b5e7f - main - sysutils/jdupes: Update to 1.21.0

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sun, 30 Oct 2022 20:06:34 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3375d85b5e7f7e4dec59696ed7f37debb0883fef

commit 3375d85b5e7f7e4dec59696ed7f37debb0883fef
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-10-30 19:47:50 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-10-30 20:04:23 +0000

    sysutils/jdupes: Update to 1.21.0
    
    Use xxHash from ports instead of bundled version
    Strip hardcoded optimization and -g
    Remove hardcoded GCC version check
    
    Changelog: https://github.com/jbruchon/jdupes/releases/tag/v1.21.0
    
    PR:             267073
    Reviewed by:    Thomas Hurst <tom@hur.st> (maintainer)
---
 sysutils/jdupes/Makefile             |  8 ++++++--
 sysutils/jdupes/distinfo             |  6 +++---
 sysutils/jdupes/files/patch-Makefile | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/sysutils/jdupes/Makefile b/sysutils/jdupes/Makefile
index a3a963d29e35..bf25227b3e9d 100644
--- a/sysutils/jdupes/Makefile
+++ b/sysutils/jdupes/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	jdupes
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.19.2
+DISTVERSION=	1.21.0
 CATEGORIES=	sysutils
 
 MAINTAINER=	tom@hur.st
@@ -10,11 +10,15 @@ WWW=		https://github.com/jbruchon/jdupes
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		gmake
+LIB_DEPENDS=	libxxhash.so:devel/xxhash
+
+USES=		gmake localbase:ldflags
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	jbruchon
 
+LDFLAGS+=	-lxxhash
+
 PLIST_FILES=	bin/jdupes \
 		man/man1/jdupes.1.gz
 
diff --git a/sysutils/jdupes/distinfo b/sysutils/jdupes/distinfo
index 2b04c011cbf2..2468ad0cf7ac 100644
--- a/sysutils/jdupes/distinfo
+++ b/sysutils/jdupes/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1616799484
-SHA256 (jbruchon-jdupes-v1.19.2_GH0.tar.gz) = c14da2751a519f2dff82bbbf9eaaccf13272c979082611a67a348044476424d4
-SIZE (jbruchon-jdupes-v1.19.2_GH0.tar.gz) = 93197
+TIMESTAMP = 1665829385
+SHA256 (jbruchon-jdupes-v1.21.0_GH0.tar.gz) = 13e56c608354f10f9314c99cf37b034dde14e6bf4a9303c77391323e2ef4f549
+SIZE (jbruchon-jdupes-v1.21.0_GH0.tar.gz) = 96407
diff --git a/sysutils/jdupes/files/patch-Makefile b/sysutils/jdupes/files/patch-Makefile
new file mode 100644
index 000000000000..f84bea644e15
--- /dev/null
+++ b/sysutils/jdupes/files/patch-Makefile
@@ -0,0 +1,34 @@
+--- Makefile.orig	2022-09-03 18:09:32 UTC
++++ Makefile
+@@ -54,7 +54,7 @@ MKDIR   = mkdir -p
+ CC ?= gcc
+ COMPILER_OPTIONS = -Wall -Wwrite-strings -Wcast-align -Wstrict-aliasing -Wstrict-prototypes -Wpointer-arith -Wundef
+ COMPILER_OPTIONS += -Wshadow -Wfloat-equal -Waggregate-return -Wcast-qual -Wswitch-default -Wswitch-enum -Wconversion -Wunreachable-code -Wformat=2
+-COMPILER_OPTIONS += -std=gnu99 -O2 -g -D_FILE_OFFSET_BITS=64 -fstrict-aliasing -pipe
++COMPILER_OPTIONS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -fstrict-aliasing -pipe
+ COMPILER_OPTIONS += -DSMA_MAX_FREE=11 -DNO_ATIME
+ 
+ #####################################################################
+@@ -62,10 +62,10 @@ COMPILER_OPTIONS += -DSMA_MAX_FREE=11 -DNO_ATIME
+ #####################################################################
+ 
+ # Don't use unsupported compiler options on gcc 3/4 (OS X 10.5.8 Xcode)
+-GCCVERSION = $(shell expr `LC_ALL=C gcc -v 2>&1 | grep 'gcc version ' | cut -d\  -f3 | cut -d. -f1` \>= 5)
+-ifeq "$(GCCVERSION)" "1"
++#GCCVERSION = $(shell expr `LC_ALL=C gcc -v 2>&1 | grep 'gcc version ' | cut -d\  -f3 | cut -d. -f1` \>= 5)
++#ifeq "$(GCCVERSION)" "1"
+ 	COMPILER_OPTIONS += -Wextra -Wstrict-overflow=5 -Winit-self
+-endif
++#endif
+ 
+ # Are we running on a Windows OS?
+ ifeq ($(OS), Windows_NT)
+@@ -167,7 +167,7 @@ INSTALL_DATA    = $(INSTALL) -m 0644
+ OBJS += jdupes.o jody_paths.o jody_sort.o jody_win_unicode.o jody_strtoepoch.o string_malloc.o oom.o
+ OBJS += jody_cacheinfo.o
+ OBJS += act_deletefiles.o act_linkfiles.o act_printmatches.o act_summarize.o act_printjson.o
+-OBJS += xxhash.o
++# OBJS += xxhash.o
+ OBJS += $(ADDITIONAL_OBJECTS)
+ 
+ all: $(PROGRAM_NAME)