Skip to content

Conversation

@mikelolasagasti
Copy link

63ca02a made the bundled sub‑module mandatory by hard‑coding deps/brotli and linking the objects produced in ../out. This broke distribution builds that are required to link against the shared libbrotli already shipped by the system.

This change brings back the original behaviour while integrating pkg-config:

  • Detect a system installation with pkg-config libbrotlienc; if found, use the reported cflags/libs and compile only the NGINX wrapper source.
  • If no suitable system copy exists, fall back to the bundled git sub‑module exactly as before.
  • Abort early with a clear error message when neither flavour is available, including instructions to initialise the sub‑module.

No command‑line flags are needed for the common case; packagers simply omit the sub‑module and let pkg-config do the work, while end users who prefer the bundled copy keep the sub‑module checked out.

Fixes: 63ca02a (“filter: require bundled Brotli out/ artifacts”)

63ca02a made the bundled sub‑module mandatory by hard‑coding
deps/brotli and linking the objects produced in ../out. This broke
distribution builds that are required to link against the shared
libbrotli already shipped by the system.

This change brings back the original behaviour while integrating
`pkg-config`:

* Detect a system installation with `pkg-config libbrotlienc`;
  if found, use the reported cflags/libs and compile only the NGINX
  wrapper source.
* If no suitable system copy exists, fall back to the bundled
  git sub‑module exactly as before.
* Abort early with a clear error message when neither flavour is
  available, including instructions to initialise the sub‑module.

No command‑line flags are needed for the common case; packagers simply
omit the sub‑module and let `pkg-config` do the work, while end users
who prefer the bundled copy keep the sub‑module checked out.

Fixes: 63ca02a (“filter: require bundled Brotli out/ artifacts”)

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
BalkanMadman added a commit to BalkanMadman/gentoo that referenced this pull request Jul 10, 2025
This imports a patch[1] from upstream GitHub PR. The patch links to the
system Brotli lib using pkgconfig.

Since the system Brotli lib is used in favour of the bundled Brotli lib,
the commit drops bundled Brotli from the package.

Many thanks to Mikel Olasagasti Uranga for writing the patch[1].

[1]: google/ngx_brotli#172

Closes: https://bugs.gentoo.org/959780
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
BalkanMadman added a commit to BalkanMadman/gentoo that referenced this pull request Jul 22, 2025
…bbrotlienc

This imports a patch[1] from upstream GitHub PR. The patch links to the
system Brotli lib using pkgconfig.

Since the system Brotli lib is used in favour of the bundled Brotli lib,
the commit drops bundled Brotli from the package.

Many thanks to Mikel Olasagasti Uranga for writing the patch[1].

[1]: google/ngx_brotli#172

Closes: https://bugs.gentoo.org/959780
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
BalkanMadman added a commit to BalkanMadman/gentoo that referenced this pull request Jul 22, 2025
…bbrotlienc

This imports a patch[1] from upstream GitHub PR. The patch links to the
system Brotli lib using pkgconfig.

Since the system Brotli lib is used in favour of the bundled Brotli lib,
the commit drops bundled Brotli from the package.

Many thanks to Mikel Olasagasti Uranga for writing the patch[1].

[1]: google/ngx_brotli#172

Closes: https://bugs.gentoo.org/959780
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
BalkanMadman added a commit to BalkanMadman/gentoo that referenced this pull request Jul 22, 2025
…otlienc

This imports a patch[1] from upstream GitHub PR. The patch links to the
system Brotli lib using pkgconfig.

Since the system Brotli lib is used in favour of the bundled Brotli lib,
the commit drops bundled Brotli from the package.

Many thanks to Mikel Olasagasti Uranga for writing the patch[1].

[1]: google/ngx_brotli#172

Closes: https://bugs.gentoo.org/959780
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
BalkanMadman added a commit to BalkanMadman/gentoo that referenced this pull request Jul 22, 2025
…rotlienc

This imports a patch[1] from upstream GitHub PR. The patch links to the
system Brotli lib using pkgconfig.

Since the system Brotli lib is used in favour of the bundled Brotli lib,
the commit drops bundled Brotli from the package.

Many thanks to Mikel Olasagasti Uranga for writing the patch[1].

[1]: google/ngx_brotli#172

Closes: https://bugs.gentoo.org/959780
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Jul 23, 2025
…rotlienc

This imports a patch[1] from upstream GitHub PR. The patch links to the
system Brotli lib using pkgconfig.

Since the system Brotli lib is used in favour of the bundled Brotli lib,
the commit drops bundled Brotli from the package.

Many thanks to Mikel Olasagasti Uranga for writing the patch[1].

[1]: google/ngx_brotli#172

Closes: https://bugs.gentoo.org/959780
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Part-of: #42955
Closes: #42955
Signed-off-by: Sam James <sam@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant