emscripten-ports / libpng

Other
12 stars 8 forks source link

[Question]: library ports configuration - .pc file #2

Closed cancerberoSgx closed 5 years ago

cancerberoSgx commented 5 years ago

Hello! This is a great project and having library ports that can be easily used in CLI is a great idea. I would like to contribute, but first I have a question. So, instead of hacking a ./configure.ac so library checking pass I would like to configure environment variables such as PKG_CONFIG_PATH and add ports .pc paths there. Unfortunately I cannot find any .pc file nor in .emscripten_ports or .emscripten_cache. Is it possible to obtain the port's package files so there's no need to hack the master project configure.ac file ? In my case I'm working with https://github.com/KnicKnic/WASM-ImageMagick trying to use ports instead of our own forks for zlib, libpng, and freetype. Also we have a couple of libaries we could contribute as ports, libjpeg and libtiff (and libwebp is WIP).

Thanks! Could you please give me any direction, I'm kind of lost here... THanks in advanced, and keep it up! I promise to PR with some documentation regarding this when I grasp this problem. Currently I'm configuring the ports projects again so .pc file is generated but I suspect this has already been done .

cancerberoSgx commented 5 years ago

BTW, after some research, I see that harfbuzz port keeps its .pc file in emscripten_ports folder while libpng (and I think all the others don't). I think it's because https://github.com/kripken/emscripten/blob/master/tools/ports/harfbuzz.py is actually running configure and make install while others like https://github.com/kripken/emscripten/blob/master/tools/ports/freetype.py#L91 have the configuration hardcoded in the python file. Will try to investigate more, any tip is very appreciated. Thanks

kripken commented 5 years ago

I think your last comment is most of the answer here: some ports are built with configure, which may make them easier to link with other configure/autotools projects. To be honest, we could use help in that area - we have some cmake-using people here, but that's about it.

cancerberoSgx commented 5 years ago

Thanks! so I'm closing this issue, do more research and see how I can improve this area. Thanks