<feed xmlns='http://www.w3.org/2005/Atom'>
<title>algaos/algaos-ebuild-tree/eclass/nginx-module.eclass, branch next</title>
<subtitle>[no description]</subtitle>
<id>https://git.algaos.com/algaos/algaos-ebuild-tree/atom?h=next</id>
<link rel='self' href='https://git.algaos.com/algaos/algaos-ebuild-tree/atom?h=next'/>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/'/>
<updated>2026-09-16T00:09:45Z</updated>
<entry>
<title>nginx{-module}.eclass: fix typos, indentation</title>
<updated>2026-09-16T00:09:45Z</updated>
<author>
<name>Peter Volkov</name>
<email>peter.volkov@gmail.com</email>
</author>
<published>2026-08-04T12:16:52Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=c73f70723a4d73a46f34abf878827c82a7ed48ec'/>
<id>urn:sha1:c73f70723a4d73a46f34abf878827c82a7ed48ec</id>
<content type='text'>
Signed-off-by: Peter Volkov &lt;peter.volkov@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1621
Merges: https://codeberg.org/gentoo/gentoo/pulls/1621
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx{,-module}.eclass: Pass --as-needed before libraries</title>
<updated>2026-09-16T00:09:45Z</updated>
<author>
<name>Peter Volkov</name>
<email>peter.volkov@gmail.com</email>
</author>
<published>2026-08-04T12:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=36ce0003e136594122f01bb4d7e79e04475e8e20'/>
<id>urn:sha1:36ce0003e136594122f01bb4d7e79e04475e8e20</id>
<content type='text'>
Signed-off-by: Peter Volkov &lt;peter.volkov@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1621
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx-module.eclass: Read NGINX config flags from ESYSROOT</title>
<updated>2026-09-16T00:09:44Z</updated>
<author>
<name>Peter Volkov</name>
<email>peter.volkov@gmail.com</email>
</author>
<published>2026-08-04T10:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=d25f7cdc312b6ac31c5ec61b9620b37884fd566e'/>
<id>urn:sha1:d25f7cdc312b6ac31c5ec61b9620b37884fd566e</id>
<content type='text'>
The configure flags are installed by the target www-servers/nginx
dependency from DEPEND.  Therefore, they must be read from ESYSROOT
rather than BROOT, which contains build-time dependencies from BDEPEND.

Keep _NGX_MOD_CONFIG_FLAGS_FILE root-relative and prepend ESYSROOT when
accessing it from the src_*.

Signed-off-by: Peter Volkov &lt;peter.volkov@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1621
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx-module.eclass: fix typos in documentation</title>
<updated>2026-09-16T00:09:43Z</updated>
<author>
<name>Peter Volkov</name>
<email>peter.volkov@gmail.com</email>
</author>
<published>2026-08-04T10:36:24Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=3095f529c9ad7537d318894f34b53991f2dba218'/>
<id>urn:sha1:3095f529c9ad7537d318894f34b53991f2dba218</id>
<content type='text'>
Signed-off-by: Peter Volkov &lt;peter.volkov@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1621
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx-module.eclass: add ngx_usex_module(): use-gated ngx_force_module</title>
<updated>2026-07-31T20:27:46Z</updated>
<author>
<name>Zurab Kvachadze</name>
<email>zurabid2016@gmail.com</email>
</author>
<published>2026-07-06T18:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=6914133127af47f6eab91a634c7d29e5c83bf376'/>
<id>urn:sha1:6914133127af47f6eab91a634c7d29e5c83bf376</id>
<content type='text'>
Helps to reduce boilerplate when you want to ngx_force_module() based on
USE flags.

Signed-off-by: Zurab Kvachadze &lt;zurabid2016@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1329
Merges: https://codeberg.org/gentoo/gentoo/pulls/1329
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx-module.eclass: add ngx_force_module()</title>
<updated>2026-07-31T20:27:45Z</updated>
<author>
<name>Zurab Kvachadze</name>
<email>zurabid2016@gmail.com</email>
</author>
<published>2026-07-06T18:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=185a0d5423ab9151351e6e9504b93fc0c4216e8a'/>
<id>urn:sha1:185a0d5423ab9151351e6e9504b93fc0c4216e8a</id>
<content type='text'>
This is similar to gtk's GENTOO_GTK_HIDE_{X11,WAYLAND}. Many third-party
modules do automagic dependencies on first-party NGINX modules. This
adds a function that allows to selectively enable or disable specified
modules.

The actual enabling/disabling occurs in nginx-module_src_configure,
where an internal function _ngx_mod_enforce_module_flags (for the lack
of better name) does some heuristics to find the correct ./configure
flag(s) to enable/disable the specified module(s).

Signed-off-by: Zurab Kvachadze &lt;zurabid2016@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1329
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx{,-module}.eclass: save NGINX build config by storing ./configure flags</title>
<updated>2026-07-31T20:27:43Z</updated>
<author>
<name>Zurab Kvachadze</name>
<email>zurabid2016@gmail.com</email>
</author>
<published>2026-07-06T17:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=2ce0f85d0ce360488d2451ff8586e4b57f6465eb'/>
<id>urn:sha1:2ce0f85d0ce360488d2451ff8586e4b57f6465eb</id>
<content type='text'>
Background
==========

NGINX's ABI and API can change depending on supplied ./configure flags
(most notoriously, enabling/disabling many first-party modules can
change ABI and API of NGINX as a whole). Perhaps unrelated, but
third-party modules are expected to be built in-tree, at the same time
NGINX is built. It is because of these two factors that we have to
freeze/preserve NGINX configuration.

Configuration-saving methods
============================

In general, I have identified two approaches as to how to preserve NGINX
configuration for building third-party modules out-of-tree.

The current implementation saves the generated headers:
ngx_auto_config.h and ngx_auto_headers.h. When third-party modules are
built, the ./configure flags are mostly ignored. It is straightforward
and easy and allowed us to cut some parts of configuration out.
Unfortunately, due to headers not being first-class configuration in the
build system, it has proven to be quite difficult to change some parts
of the build using headers alone.

For instance, my initial header-mangling-based implementation of
ngx_force_module (see the following commit) proved to be quite limited
and not really robust. The reason why I used this approach initially is
because when nginx-module.eclass was written, none of the
ngx_force_module fancy crossed my mind.

Second method is saving the ./configure flags themselves. Although
increasing the src_configure time (since we no longer skip phases), this
allows to build modules and edit the build configuration more easily and
correctly. This also gives users/ebuild authors more control since, as
stated above, most ./configure flags are ignored in the header
implementation.

Compatibility
=============

While nginx.eclass completely removes support for emitting
ngx_auto_{config,headers}.h, generating only ./configure flags,
nginx-module.eclass will support both configuration-saving methods for
the time being, allowing users to update www-servers/nginx.

Notes
=====

Passing ./configure flags around makes modules transitively depend on
NGINX's dependencies.

-Wl,--as-needed is added to LDFLAGS since NGINX links external
libraries needed by first-party modules also to third-party modules.

Signed-off-by: Zurab Kvachadze &lt;zurabid2016@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1329
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx-module.eclass: documentation improvements</title>
<updated>2026-07-31T20:27:41Z</updated>
<author>
<name>Zurab Kvachadze</name>
<email>zurabid2016@gmail.com</email>
</author>
<published>2026-06-30T20:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=538151e468f279dd8b224cbaeecbe37741077eaf'/>
<id>urn:sha1:538151e468f279dd8b224cbaeecbe37741077eaf</id>
<content type='text'>
Delete the mention of NGINX_MOD_S, clarify when and what variables do.

Signed-off-by: Zurab Kvachadze &lt;zurabid2016@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1329
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx-module.eclass: Add ngx_gen_dep() helper</title>
<updated>2026-07-31T20:27:38Z</updated>
<author>
<name>Zurab Kvachadze</name>
<email>zurabid2016@gmail.com</email>
</author>
<published>2026-02-27T22:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=a132af3b8144c560c7792235e6a57ac9ac4f48aa'/>
<id>urn:sha1:a132af3b8144c560c7792235e6a57ac9ac4f48aa</id>
<content type='text'>
The function generates the proper dependency string for depending on
specific first-party NGINX modules. This is useful for modules that
really depend (call respective APIs, access inner structs, etc) on some
first-party modules.

Signed-off-by: Zurab Kvachadze &lt;zurabid2016@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1329
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
<entry>
<title>nginx-module.eclass: src_test(): Prepend pkg_sonames with NGINX_S</title>
<updated>2026-07-31T20:27:37Z</updated>
<author>
<name>Zurab Kvachadze</name>
<email>zurabid2016@gmail.com</email>
</author>
<published>2026-07-06T17:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.algaos.com/algaos/algaos-ebuild-tree/commit/?id=5bfc77b489a37511fa51c053208fae9b5142b129'/>
<id>urn:sha1:5bfc77b489a37511fa51c053208fae9b5142b129</id>
<content type='text'>
Before e0b1493dce7b (nginx-module.eclass: Use S as NGINX_MOD_S, use
NGINX_S for build system, 2026-02-08), S pointed to NGINX_S, fake NGINX
build env. In that commit, S was changed to point to what was
NGINX_MOD_S at the time, i.e., the root of the module sources.

Unfortunately, while correctly removing usages of NGINX_MOD_S, I missed
the usage of S as NGINX_S in nginx-module_src_test() in pkg_sonames.

pkg_sonames is an array holding the absolute paths to the shared objects
of the current module. pkg_sonames is used to load those shared objects
to test them in nginx-module_src_test().

We prepend ${S} to each shared object, while actually needing NGINX_S
since e0b1493dce7b.

This commit fixes the definition of pkg_sonames to correctly prepend
NGINX_S instead of S.

Closes: https://bugs.gentoo.org/978429
Signed-off-by: Zurab Kvachadze &lt;zurabid2016@gmail.com&gt;
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1329
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
</content>
</entry>
</feed>
