Zurab Kvachadze 5f9a4cf888 nginx-module.eclass: Add new eclass for building NGINX external modules
Currently, it is impossible for NGINX external modules to be packaged
on their own, separately from the NGINX ebuild. The nginx-module.eclass
enables packaging third party NGINX modules as any other software in the
Gentoo tree.

The eclass builds on the foundation provided by nginx.eclass.

NGINX modules are somewhat special in the way they are built. In
addition to (obviously) requiring NGINX headers, their build system is
the one of NGINX. Actually, they are intended to be built and installed
alongside the NGINX server, but, luckily, it is possible to succesfuly
build a module, given (1) the headers, (2) the build system and the
exact same (3) ./configure flags that have been used to configure NGINX
itself are present. The points (1) and (2) are taken for granted here,
as nginx.eclass takes care of them:

    * headers are installed into /usr/include/nginx

    * build system is installed into /usr/src/nginx

As for the (3) point, the configuration flags are recorder into
ngx_auto_config.h file as preprocessor #define's. The file is also saved
into /usr/include/nginx.

The build process undergoes in the ${WORKDIR}/nginx directory, which
has 3 symlinks:
    * src/        -> /usr/include/nginx
    * configure   -> /usr/src/nginx/configure
    * auto/       -> /usr/src/nginx/auto
The build is the exact same as building a module "in-tree": the
./configure script is called with the '--add-dynamic-module' flag. The
rest of the eclass is really simple; src_compile() executes 'make
modules' and src_install() installs the compiled shared objects into
/usr/$(get_libdir)/nginx/modules.

Closes: https://bugs.gentoo.org/573710
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/37590
Signed-off-by: Sam James <sam@gentoo.org>
2025-07-05 08:26:43 +01:00
2025-07-04 23:32:13 +03:00
2025-07-05 00:02:33 +03:00
2025-06-26 12:59:01 +02:00
2025-07-05 05:46:55 +01:00
2025-06-21 09:07:27 +02:00
2025-07-05 09:08:26 +02:00
2025-07-04 10:46:44 -07:00
2025-07-03 10:04:02 +02:00
2025-06-08 05:54:10 +01:00
2025-07-05 08:14:16 +01:00
2025-07-04 09:48:18 +02:00
2025-07-05 06:18:07 +01:00
2025-06-14 09:21:36 +02:00
2025-06-29 23:52:07 +01:00
2025-06-21 19:00:26 +02:00
…
S
Description
No description provided
9.8 GiB
Languages
Shell 98%
Roff 1.4%
Emacs Lisp 0.2%
C 0.1%