Experiments with buildung mousepad with meson

André Miranda andreldm1989 at gmail.com
Fri Oct 21 05:28:45 CEST 2016


Lately I've been playing with build systems and package managers for 
C/C++, and Meson is one of the most promising.
People from Gnome is already has been experimenting this tool [1][2].
I was able to build mousepad as Flo instructed, even though I knew it's 
so easy to set up, I was impressed by how fast Ninja is, it took 3.5s to 
build while make made me wait for 10s.
I hope Meson gets to be widely adopted, including in Xfce, and some day 
we don't have keep messing around with autotools (or CMake).

1 - https://www.phoronix.com/scan.php?page=news_item&px=GUADEC-2016-Meson
2 - https://git.gnome.org/browse/pitivi/tree/meson.build

Cheers,
André Miranda

On 10/17/2016 01:30 PM, flo.xfce at gmx-topmail.de wrote:
>
> On 10/17/16 17:51, Matthew Brush wrote:
>> On 2016-10-17 08:12 AM, flo.xfce at gmx-topmail.de wrote:
>>> Hey everyone,
>>> Meson is a rather new build system, designed to "not suck". More details
>>> here: https://github.com/mesonbuild/meson/wiki
>>> I took mousepad and added support for building it with meson. You can
>>> find my efforts here: https://github.com/Flow-It/mousepad
>>> If you want to try out how fast it builds compared to autotools you need
>>> meson and ninja installed and this patch for exo:
>>> https://bugzilla.xfce.org/show_bug.cgi?id=12901
>>> After that you need to run (in the source root directory):
>>> mkdir build
>>> meson build -Denable-maintainer-mode=true
>>> cd build
>>> ninja
>>>
>>> I don't intend to replace autotools building but just offer a second
>>> option. In general it should not be necessary to touch any existing
>>> files. However, I changed the #include directives because of some
>>> include search path problems
>> You need to add the top source and build dirs to the include paths, for
>> example in autotools it would be:
>>
>> *_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
>>
> I figured that out, too. But at this point I already changed the
> includes from <mousepad/myheader.h> to "myheader.h". And actually, I
> prefer quotes over angle brackets for including headers from the same
> source tree.
>
>>> and I added a new .desktop template and
>>> renamed an .ui file (all these changes however could be applied to
>>> mousepad without supporting meson, it makes building a bit more
>>> straightforward and increases consistency).
>>>
>> How? I just quickly looked but a lot of the changes seem unrelated to
>> build system stuff.
>>
> Using the new mousepad.desktop.in.in.gettext file we can use gettext to
> translate it instead of using intltool. We need gettext anyway for the
> source translations, so why having two tools when one (gettext) can do
> the job? (I know that the intltool stuff was needed when gettext did not
> have the ability to translate desktop files. Our configure scripts where
> never updated so I thought it was a good idea at this point).
> The .ui file change is for consistency:
> mousepad-window-ui.xml -> mousepad-window-ui.h -> mousepad_window_ui
> mousepad-prefs-dialog.glade -> mousepad-prefs-dialog-ui.h ->
> mousepad_prefs_dialog_ui
> is not consistent (original file -> header -> internal variable name)
> because for the prefs-dialog a "-ui" is added to the file name which was
> not in the original file name. It's just a minor change but it makes the
> build script better readable.
>
>> Cheers,
>> Matthew Brush
>> _______________________________________________
>> Xfce4-dev mailing list
>> Xfce4-dev at xfce.org
>> https://mail.xfce.org/mailman/listinfo/xfce4-dev
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev



More information about the Xfce4-dev mailing list