Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add meson build system for building the packages from the sources. #147

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

saxa
Copy link

@saxa saxa commented Oct 19, 2024

Hello @geoffreybennett , I have been working on this for some time now and would like to see
this pushed into the main branch so who wants to build the sources for your project could use the meson build system.

This PR will only add the needed files to benefit packagers and other people building it from sources.
It can coexist with the Makefiles you use and it has no need to change anything at all.

I would like to hear your comments on this if something else is needed to be changed. So I could work on implementing it.

To build the project now it involves few steps as below:

  1. create a build directory where you will want to have thesources built, something likw mkdir _build
  2. cd _build
  3. meson setup ..
  4. ninja

Rgds
Sasa

@geoffreybennett
Copy link
Owner

Hi Sasa,

I'm not clear on the intent behind adding Meson. My current Makefile automatically detects source files, so I don’t need to update it manually when files are added or removed. From my perspective, introducing Meson only adds maintenance overhead, and requires me to learn another build system. Could you clarify what problem Meson solves for this project?

Thanks,
Geoffrey.

@saxa
Copy link
Author

saxa commented Oct 20, 2024

@geoffreybennett hi, thanks for answering it. I see it as a benefit in long term of the project, where you need to add some other dependencies, configuring options, and especially for packagers. I use slackware and I packaged a lot of gnome software for my long term project during the years (droplinegnome.org) , gnome mostly moved to meson for simplicity in maintaining and speed on comipling , maybe there are other benefits to it. I have to inform that I am all new to meson build system, and did this mostly for learning it a bit.
Autotools is an old project , was used and still is used in a lot of software in OSS world, but in my opinion is a difficult one to learn, due to the scripting language used. In meson build you have python which is one of the simpliest languages to learn in my opinion. This is a good plus in my point of view.

Now my push request is a draft because I have not finished it yet and could not get some feedback from you or knew how to get in touch with you.

I have to still finish the "ninja install" and then this will be at par with your makefiles I think.

As for the automatic detection of the source files and headers that is easy to do it I am sure of it. I have just started by translating your makefiles to meson with what I knew and therefore just added a list of sources.
But with a simple for loop we can collect all .c and .h files get them them in a list. This would automate the
addition of the source files to the build system.

My intention is not to force the project to adopt this PR, because I did it for myself learning. So I just tought that it could be nicer to have a more modern build system, and be more close to other GTK4 projects.

Thats it, but probably there are other benefits of having meson in.

Rgds
Saxa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants