I've been working on gbuildification of 'external libraires'
taking the approach of untar - patch - configure - post_patch
(sometimes it may be easier/useful to patch the result of configure,
rather that the input) - make - make install (--prefix=solver)
and make uninstall to clean the 'delivered stuff
Th make install/uninstall approch seems nice because it avoid the need
to enumerate the file to be delivered (hence reduce maintenance cost
and mishap). sure it 'deliver' more than we strictly need (like man
pages and the like) but overall I think that is still a win.
Now, the question is: is there any scenario where one would build the
internal library but only use the internal library for some module and
the system library for others?
iow, why does the current code use a separate name for the internal
library, like libzlib or libjpeglib ? is this really (still) needed ?
in the same vein, why is there zlib/zlib.h and external/zlib/zlib.h ?
if it is still needed then for these modules I guess I will have to
'install' in workdir and still have a 'packaging' step to deliver to
solver...
or, when possible patch the external library (I did that to zlib to
add a configure option to change the library name.. )
ps: I started a ExternalLib.mk extention of gbuild.
use will look something like:
$(eval $(call gb_ExternalLib_ExternalLib,zlib,autotools))
$(eval $(call
gb_ExternalLib_set_src_package,zlib,c735eab2d659a96e5a594c9e8541ad63-zlib-1.2.5.tar.gz))
$(eval $(call gb_ExternalLib_add_patches,zlib, \
zlib/zlib-1.2.5.basename.patch \
))
$(eval $(call gb_ExternalLib_add_cflags,zlib,-fPIC))
$(eval $(call gb_ExternalLib_add_conf_arg,zlib,--zprefix --basename=libloz))
# vim: set noet sw=4 ts=4:
note: the 3rd argument of gb_ExternalLib_ExternalLib is meant to allow
for the support of different kind of build system (like ant, some
custom script, etc.)
I am planning also to expend it to have a 'fetch' target so that make
fetch would be gbuildified too, and that would also allow for
'as-needed' download of external package, based on autogen settings...
Norbert
Context
- [Libreoffice] gbuild of external libraries and question about apparently special case like zlib, jpeg etc. · Norbert Thiebaud
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.