Here is a diff that changes rsync to include iconv, lz4, and zstd by
default and then creates a minimal flavor that disables all three. I
updated the DESCR as jca@ directed as well. This built and worked fine
for me in both regular and minimal flavor builds and I confirmed that
zstd and lz4 show up in the compress list for the regular build and do
not for the minimal flavor. Thoughts?

Bryan


Index: net/rsync/Makefile
===================================================================
RCS file: /cvs/ports/net/rsync/Makefile,v
retrieving revision 1.103
diff -u -p -u -r1.103 Makefile
--- net/rsync/Makefile  6 May 2024 12:23:48 -0000       1.103
+++ net/rsync/Makefile  26 Jun 2024 21:50:12 -0000
@@ -3,15 +3,15 @@ COMMENT =     mirroring/synchronization over
 DISTNAME =     rsync-3.3.0
 CATEGORIES =   net
 HOMEPAGE =     https://rsync.samba.org/
-REVISION =     0
+REVISION =     1
 
-FLAVORS =      iconv
+FLAVORS =      minimal
 FLAVOR ?=
 
 # GPLv3
 PERMIT_PACKAGE =       Yes
 
-WANTLIB =      c crypto
+WANTLIB =      c crypto iconv lz4 zstd
 
 SITES =                https://rsync.samba.org/ftp/rsync/src/ \
                https://ftp.funet.fi/pub/mirrors/samba.org/pub/rsync/src/
@@ -25,9 +25,7 @@ BUILD_DEPENDS =       textproc/py-commonmark${
 
 SEPARATE_BUILD =Yes
 CONFIGURE_STYLE =gnu
-CONFIGURE_ARGS =--disable-lz4 \
-               --disable-zstd \
-               --with-included-popt \
+CONFIGURE_ARGS =--with-included-popt \
                --with-included-zlib \
                --with-rrsync \
                --with-rsyncd-conf="${SYSCONFDIR}/rsyncd.conf" \
@@ -35,7 +33,10 @@ CONFIGURE_ARGS =--disable-lz4 \
                --with-nobody-user=_rsync \
                --with-nobody-group=_rsync
 CONFIGURE_ENV +=CPPFLAGS="-I${LOCALBASE}/include -DXXH_INLINE_ALL=1" \
-               ac_cv_search_XXH64_createState=""
+               LDFLAGS='-L${LOCALBASE}/lib' ac_cv_search_XXH64_createState=""
+LIB_DEPENDS += archivers/lz4 \
+               archivers/zstd \
+               converters/libiconv
 
 .include <bsd.port.arch.mk>
 
@@ -43,10 +44,11 @@ CONFIGURE_ENV +=CPPFLAGS="-I${LOCALBASE}
 CONFIGURE_ARGS +=--enable-md5-asm
 .endif
 
-.if ${FLAVOR:Miconv}
-CONFIGURE_ENV +=LDFLAGS='-L${LOCALBASE}/lib'
-LIB_DEPENDS += converters/libiconv
-WANTLIB +=     iconv
+.if ${FLAVOR:Mminimal}
+CONFIGURE_ARGS +=--disable-lz4 \
+               --disable-zstd
+WANTLIB =      c crypto
+LIB_DEPENDS =
 .endif
 
 DOCDIR =       ${PREFIX}/share/doc/rsync
Index: net/rsync/pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/rsync/pkg/DESCR,v
retrieving revision 1.6
diff -u -p -u -r1.6 DESCR
--- net/rsync/pkg/DESCR 26 Apr 2024 13:26:27 -0000      1.6
+++ net/rsync/pkg/DESCR 26 Jun 2024 21:50:12 -0000
@@ -7,11 +7,12 @@ its delta-transfer algorithm, which redu
 over the network by sending only the differences between the source
 files and the existing files in the destination. Rsync is widely
 used for backups and mirroring and as an improved copy command for
-everyday use.
+everyday use. This also includes options for lz4 and zstd compression
+as well as iconv for people wanting to bring files from other OSes 
+with more versatile filenames.
 
-Flavor: iconv
-    extra dependency, for people wanting to bring files from other OSes with
-    more versatile filenames.
+Flavor: minimal
+    without any extra dependencies of iconv, lz4, and zstd.
 
 To use the rrsync wrapper, python3 should be installed.
 

Reply via email to