reminded by the dwz mail, rsync would also like to use xxhash if
available:

    'The xxHash library (https://cyan4973.github.io/xxHash/) provides
    extremely fast checksum functions that can make the "rsync algorithm"
    run much more quickly, especially when matching blocks in large files.
    Installing this development library adds xxhash checksums as the default
    checksum algorithm. You'll need at least v0.8.0 if you want rsync to
    include the full range of its checksum algorithms.'

while xxHash does provide standard shared+static libraries, it is more
commonly used as a "header-only library" (done here and also in dwz)
so there's no additional run dependency in rsync for this.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/rsync/Makefile,v
retrieving revision 1.97
diff -u -p -r1.97 Makefile
--- Makefile    5 Jan 2023 21:59:21 -0000       1.97
+++ Makefile    5 Jun 2023 11:36:48 -0000
@@ -1,6 +1,7 @@
 COMMENT =      mirroring/synchronization over low bandwidth links
 
 DISTNAME =     rsync-3.2.7
+REVISION =     0
 CATEGORIES =   net
 HOMEPAGE =     https://rsync.samba.org/
 
@@ -19,12 +20,12 @@ MODULES =   lang/python
 
 MODPY_RUNDEP = No
 
-BUILD_DEPENDS =        textproc/py-commonmark${MODPY_FLAVOR}
+BUILD_DEPENDS =        textproc/py-commonmark${MODPY_FLAVOR} \
+               sysutils/xxhash
 
 SEPARATE_BUILD =Yes
 CONFIGURE_STYLE =gnu
 CONFIGURE_ARGS =--disable-lz4 \
-               --disable-xxhash \
                --disable-zstd \
                --with-included-popt \
                --with-included-zlib \
@@ -33,6 +34,8 @@ CONFIGURE_ARGS =--disable-lz4 \
                --with-rsh=/usr/bin/ssh \
                --with-nobody-user=_rsync \
                --with-nobody-group=_rsync
+CONFIGURE_ENV +=CPPFLAGS="-I${LOCALBASE}/include -DXXH_INLINE_ALL=1" \
+               ac_cv_search_XXH64_createState=""
 
 .include <bsd.port.arch.mk>
 
@@ -41,8 +44,7 @@ CONFIGURE_ARGS +=--enable-md5-asm
 .endif
 
 .if ${FLAVOR:Miconv}
-CONFIGURE_ENV +=CPPFLAGS='-I${LOCALBASE}/include' \
-               LDFLAGS='-L${LOCALBASE}/lib'
+CONFIGURE_ENV +=LDFLAGS='-L${LOCALBASE}/lib'
 LIB_DEPENDS += converters/libiconv
 WANTLIB +=     iconv
 .endif

Reply via email to