From: Jeremie Courreges-Anglas Subject: Re: rsync add zstd flavor? To: Bryan Vyhmeister Cc: ports@openbsd.org Date: Wed, 26 Jun 2024 17:43:16 +0200 On Tue, Jun 25, 2024 at 05:38:02PM -0700, Bryan Vyhmeister wrote: > I have a project that requires rsync with zstd compression and I would > like to have the option in ports without having to manually modify my > rsync port Makefile if possible. The zstd option is disabled in the > rsync port right now. This diff would add a flavor for zstd. I'm not > sure everyone would want zstd enabled globally but a flavor might work > instead? Thoughts? I haven't tested zstd with rsync to tell how useful it is. However, the diff should be tightened. The empty FLAVOR fails to build because zstd is required by default and you dropped the explicit --disable-zstd. Also we should forcefully disable support for iconv or zstd if not present in FLAVOR, to avoid hidden dep issues in the resulting package and in bulk builds. Also, pkg/DESCR should mention the zstd FLAVOR (not included). Index: Makefile =================================================================== RCS file: /cvs/ports/net/rsync/Makefile,v diff -u -p -r1.103 Makefile --- Makefile 6 May 2024 12:23:48 -0000 1.103 +++ Makefile 26 Jun 2024 12:45:59 -0000 @@ -5,7 +5,7 @@ CATEGORIES = net HOMEPAGE = https://rsync.samba.org/ REVISION = 0 -FLAVORS = iconv +FLAVORS = iconv zstd FLAVOR ?= # GPLv3 @@ -26,7 +26,6 @@ BUILD_DEPENDS = textproc/py-commonmark${ SEPARATE_BUILD =Yes CONFIGURE_STYLE =gnu CONFIGURE_ARGS =--disable-lz4 \ - --disable-zstd \ --with-included-popt \ --with-included-zlib \ --with-rrsync \ @@ -47,6 +46,18 @@ CONFIGURE_ARGS +=--enable-md5-asm CONFIGURE_ENV +=LDFLAGS='-L${LOCALBASE}/lib' LIB_DEPENDS += converters/libiconv WANTLIB += iconv +.else +CONFIGURE_ARGS+=--disable-iconv-open +# XXX --disable-iconv-open is not respected +CONFIGURE_ENV+= ac_cv_search_libiconv_open=no +.endif + +.if ${FLAVOR:Mzstd} +CONFIGURE_ENV +=LDFLAGS='-L${LOCALBASE}/lib' +LIB_DEPENDS += archivers/zstd +WANTLIB += zstd +.else +CONFIGURE_ARGS+=--disable-zstd .endif DOCDIR = ${PREFIX}/share/doc/rsync -- jca