Created attachment 264978 [details] Patch for brotli Compile and runtime tested on FreeBSD 14.3-RELEASE (amd64) (make, make check-plist, make test) Poudriere testport OK 13.5-RELEASE (amd64) Poudriere testport OK 13.5-RELEASE (i386) Poudriere testport OK 14.3-RELEASE (amd64) "Mini" exp-run looks fine on 14.3-RELEASE (amd64) except for archivers/py-brotli which needs updating.
You say you did a mini exp-run, does this need an exp-run?
(In reply to Antoine Brodin from comment #1) Maybe? I have limited resources but listed ports from freshports (build and direct dependencies) looks fine.
There are 47 ports require testing: % find /usr/ports -name Makefile\* | xargs grep "LIB_DEPENDS=.*brotli" | awk -F: '{print $1}' | wc -l 47
(In reply to Sergey A. Osokin from comment #3) I did a regex search for "archivers\/brotli" on Makefiles and found these. Not sure how many of them are optional. I believe just setting OPTIONS+=BROLTI in make.conf should probably catch most. There probably are some missing from list, all nginx ports and apache at least, because their optional brotli dependency is defined in another file. ftp/curl net-mgmt/netdata www/angie-module-brotli www/envoy www/node20 www/elinks www/links www/cpp-httplib www/wget2 www/node24 www/apache24 www/chawan www/c-icap www/privoxy www/trafficserver www/node22 lang/dotnet net-p2p/jackett archivers/p5-IO-Compress-Brotli archivers/py-brotlicffi archivers/php-brotli archivers/py-brotli net/wireshark sysutils/nix textproc/ugrep databases/arrow databases/mongosh graphics/mupdf graphics/lepton graphics/libjxl graphics/brunsli graphics/py-imagecodecs graphics/exiv2 mail/cyrus-imapd36 mail/cyrus-imapd312 mail/cyrus-imapd32 mail/cyrus-imapd38 mail/cyrus-imapd30 mail/cyrus-imapd310 mail/cyrus-imapd34 shells/powershell security/openssl35 security/bitwarden-cli security/openssl36 security/gnutls security/openssl33 security/openssl34 devel/woff2 devel/android-tools devel/apitrace devel/libsoup3 devel/pecl-swoole devel/qt6-base devel/cpprestsdk x11-fonts/ots print/freetype2 print/fontforge x11/xpra x11/xpra-html5
(In reply to Paavo-Einari Kaipila from comment #4) Oh, it did catch apache. These + all nginxes. Does anyone else know any others?
(In reply to Antoine Brodin from comment #1) Hi Antoine, not sure where we are, could you guide me. Thank you.
(In reply to Sergey A. Osokin from comment #6) Just push it? Multiple repos have already imported it.
It seems the STATIC option is broken with attachment 264978 [details]. % make ... ===> Patching for brotli-1.2.0,1 ===> Applying extra patch /usr/ports/archivers/brotli/files/extra-patch-static-libs 2 out of 3 hunks failed--saving rejects to CMakeLists.txt.rej ===> FAILED Applying extra patch /usr/ports/archivers/brotli/files/extra-patch-static-libs *** Error code 1
Created attachment 265287 [details] Patch for brotli v2
Comment on attachment 265287 [details] Patch for brotli v2 Fix STATIC option
Created attachment 265288 [details] Patch for brotli v3 Adjust plist order
Please install the static libraries with the same name as shared libraries.
(In reply to Po-Chuan Hsieh from comment #12) Please use this instead. It fixes the filename of static libraries. https://people.freebsd.org/~sunpoet/patch/archivers-brotli.txt
(In reply to Po-Chuan Hsieh from comment #13) Hi Po-Chuan, I like the changes you've suggested, thank you very much. Daniel, is there any objections on proposed changes? Thank you.
Created attachment 265343 [details] Patch for brotli v4 Force file names to follow shared libs
Another take on it, no external patch files and only patches when requested. Probably easier to maintain too than a non upstreamed patch.
(In reply to Daniel Engberg from comment #15) (In reply to Daniel Engberg from comment #16) I already provided a simple 2-line static patch. I don't see the benefit for modifying two intermediate file (build.ninja and cmake_install.cmake). And https://docs.freebsd.org/en/books/porters-handbook/slow-porting/#slow-patch-automatic-replacements would tell you: ! Important Only use sed(1) to replace variable content. You must use patch files instead of sed(1) to replace static content.
(In reply to Po-Chuan Hsieh from comment #17) I'm not sure what part of the build directory you think is not variable content and it's obviously not bundled with sources.
(In reply to Daniel Engberg from comment #18) CMakeLists.txt is a static file. build.ninja and cmake_install.cmake are intermediate files generate by cmake during the build. You must use REINPLACE_CMD instead of 2 patch files because it is not there during the patch phase. The main problem here is, it is totally unnecessary to patch these intermediate files when we could complete the fix with a simple, unconditional patch file during patch phase. You just make it more complicated.
(In reply to Po-Chuan Hsieh from comment #19) You don't really need to explain to me how it works, you have yet to explain what part isn't variable which you initially claimed. Anyhow, time is better spent working with upstream than adding more local patches to the tree that people need to maintain.
@ Sergey Can we please get this going? I don't care which variant you commit, one where you maintain a separate patch file or the other where you don't and just maintain a Makefile.
(In reply to Daniel Engberg from comment #21) Sure, Daniel, on my way!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bbf491027c2b48691b28f7568e334f807c639bd0 commit bbf491027c2b48691b28f7568e334f807c639bd0 Author: Sergey A. Osokin <osa@FreeBSD.org> AuthorDate: 2025-11-16 01:31:00 +0000 Commit: Sergey A. Osokin <osa@FreeBSD.org> CommitDate: 2025-11-16 01:31:00 +0000 archivers/brotli: update 1.1.0 -> 1.2.0 ChangeLog: https://github.com/google/brotli/compare/v1.1.0...v1.2.0 Reported by: diizzy Reviewed by: sunpoet, diizzy PR: 290637 Sponsored by: tipi.work archivers/brotli/Makefile | 18 ++++++---- archivers/brotli/distinfo | 10 +++--- .../brotli/files/extra-patch-static-libs (gone) | 40 ---------------------- archivers/brotli/files/patch-CMakeLists.txt (new) | 11 ++++++ 4 files changed, 27 insertions(+), 52 deletions(-)
Fixed, thank you very much!
Hey, this update breaks the py-brotli port --- it is still at version 1.1.0 and requires the same version of brotli. A lot of dependent ports are broken as well. BUILD_DEPENDS= brotli>=${PORTVERSION},1<${PORTVERSION}_99,1:archivers/brotli
(In reply to Wes Morgan from comment #25) Already listed and see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290725#c5