estraier / tkrzw

a set of implementations of DBM
Apache License 2.0
177 stars 23 forks source link

Porting to Conan #49

Open GioPat opened 4 months ago

GioPat commented 4 months ago

Is there any plan to add this library to conan? If so, I could be available in working on this issue.

amirouche commented 4 months ago

What is conan?

GioPat commented 4 months ago

Conan is a modern package manager for C/C++ project. I'm asking this because I've recently tried to add TKRZW Libraries as a static dependencies using LZ4 compress lib. I've struggled to set up the project and I have not been able to get rid of the binaries. By having the project relying on modern systems such as Conan could ease the adoption.

estraier commented 4 months ago

I'm not familiar with Conan either so there's no plan about it. Does it require updating/writing some configuration files?

GioPat commented 4 months ago

It has a setup file conanfile.py that allows you to configure the depencies, source etc. The only thing is that their preferred make tool is CMake, I know that they support also Makefiles but I'm not 100% sure how to set it up.

estraier commented 4 months ago

Thanks for clarification. Adding conanfile.py seems fine. If you have a working version of it to shere with other people, please make a pull request.

GioPat commented 4 months ago

The quicker solution I though was first porting TKRZW to CMAKE, do you think is it easy to do? I see there are lots of conditions in the configure so it might be painful but maybe could help in segregating libraries, binaries and features. What do you think @estraier ?

estraier commented 4 months ago

I don't have experience with cmake so keeping makefile is preferrable. In fact, I'm now bicycling around Japan and I don't carry any PC with me.

rafal98 commented 4 months ago

Porting to CMAKE will be a good idea to support VCPKG too

Le mar. 23 juil. 2024 à 15:49, Mikio Hirabayashi @.***> a écrit :

I don't have experience with cmake so keeping makefile is preferrable. In fact, I'm now bicycling around Japan and I don't carry any PC with me.

— Reply to this email directly, view it on GitHub https://github.com/estraier/tkrzw/issues/49#issuecomment-2245312865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3EBAHTDNATTYMXNPGSL3ZNZNNTAVCNFSM6AAAAABLJB63E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVGMYTEOBWGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

GioPat commented 4 months ago

@rafal98 If we use Conan you could use it for adding the dependency in a comfortable way in the CMake of your project. @estraier Is there any configuration (AFAICS there is no option for this) to exclude tests and command binaries?

estraier commented 4 months ago

The "configure" file doesn't have such an option. Although running "make libtkrzw.a libtkrzw.so" will build only the library files, "make install" doesn't work if the command files are not built. Probably, "make -i install" does the job though it's a bit ugly to ignore error messages.

GioPat commented 4 months ago

@estraier So I guess that if we want to distribute it as a static/shared library we could use the command that you propose. The only thing to manage are the compression dependencies (zlib, lz4, etc.). Do you agree?

GioPat commented 4 months ago

I have built a working conanfile.py but it's only building using Autotools. No windows support as of now, if you agree I can open a PR. It's running a plain and simple make and make install, but packaging only the libraries, this is the output: image

estraier commented 4 months ago

sounds good. just adding a file causes no side effect so it's only beneficial.

On Fri, Jul 26, 2024, 21:32 Giovanni Patruno @.***> wrote:

I have built a working conanfile.py but it's only building using Autotools. No windows support as of now, if you agree I can open a PR.

— Reply to this email directly, view it on GitHub https://github.com/estraier/tkrzw/issues/49#issuecomment-2252666269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQGJVRH74NEV4BNIYEPFPSLZOI6ULAVCNFSM6AAAAABLJB63E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSGY3DMMRWHE . You are receiving this because you were mentioned.Message ID: @.***>