> > ... simply use the `PKG_CHECK_MODULES' macro in `configure.raw', which > provides both the necessary environment variables and a check whether > a proper .pc file is available (the former overrides the latter). >
Thanks. I have done the basic work needed to have a default library. The `configure.raw' file just contains some code which is almost exactly the same as that for `harfbuzz' or `libpng'. The port files are placed in the `svg' folder and I set the hooks in `module_init'. See <https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?h=GSoC-2019-moazin> . I would want to allow the user to plug in a different library as the default one while building the library. What should be the user interface to do that? To plug in a default, the following things are needed: * Library package name with version. e.g. `librsvg-2.0 >= 2.40.0", this is needed to that `PKG_CHECK_EXISTS' and `PKG_CHECK_MODULES' could be used. * The '*.h' and '*.c' file for the port. '*.h' so it can be included and the hooks grabbed from it. '*.c' so that we can compile it, ultimately, it is the one that contains the hooks functions. * The names of the hook functions. e.g `rsvg_port_init'. What would be a good way to take all of this information while building the library? A config file? Taking arguments with `./configure'? An easy way is, we could set a naming convention and ask the client user to follow it. So for example, we can ask the user to set a `prefix', for example, `rsvg' and then we require that the file names and function names should be: * rsvg_port.h * rsvg_port.c * rsvg_port_init * rsvg_port_render * rsvg_port_free * rsvg_port_get_buffer_size
_______________________________________________ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel