After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782540 - Add Meson build rules
Add Meson build rules
Status: RESOLVED FIXED
Product: gnome-mines
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-mines-maint
gnome-mines-maint
Depends on:
Blocks: 782980
 
 
Reported: 2017-05-12 04:08 UTC by Robert Ancell
Modified: 2017-05-25 15:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Meson build rules (8.20 KB, patch)
2017-05-12 04:08 UTC, Robert Ancell
committed Details | Review

Description Robert Ancell 2017-05-12 04:08:37 UTC
Created attachment 351696 [details] [review]
Add Meson build rules

Meson is a popular replacement for Autotools - here is a patch that adds support for it.
Comment 1 Robert Roth 2017-05-22 15:04:11 UTC
Brilliant, thanks for the patch. I've had this in mind since Meson got
around and everyone started porting from Autotools, but never had the time.

Attachment 351696 [details] pushed as 1e5d34d - Add Meson build rules
Comment 2 Robert Ancell 2017-05-22 22:54:59 UTC
I kept the Autotools rules to be conservative, but I would recommend dropping them unless you specifically want to be able to continue to use Autotools.
Comment 3 Michael Catanzaro 2017-05-22 23:08:25 UTC
FWIW: I'm planning to immediately remove Autotools support from Chess and Sudoku whenever I get around to porting them to Meson. Already did Epiphany. Couldn't be happier with Meson!
Comment 4 Robert Roth 2017-05-23 05:44:09 UTC
I would keep the Autotools rules around this cycle, and drop them next cycle, as I remember reading that as a "recommendation" somewhere GNOME-development-related. In any case, I am also pretty happy with Meson, it really does a good job, I'll need to get used to it and port some of my projects to it, as the improvement is significant, it's A LOT faster, and seems more concise to me.
Comment 5 Michael Catanzaro 2017-05-23 13:07:58 UTC
That was my recommendation... for last cycle. ;) I wanted to make sure all of GNOME 3.24 was buildable without Meson, so distros would have more time to prepare for it. You can remove the Autotools build whenever you want now.
Comment 6 Robert Ancell 2017-05-25 00:04:30 UTC
I think the .desktop file translations are not working correctly with these Meson rules, need to check the correct way to do this.
Comment 7 Michael Catanzaro 2017-05-25 01:54:09 UTC
You want to use i18n.merge_file. Something like:

i18n.merge_file('desktop-file',
  input: 'org.gnome.Epiphany.desktop.in',
  output: 'org.gnome.Epiphany.desktop',
  install: true,
  install_dir: join_paths(datadir, 'applications'),
  po_dir: '../po',
  type: 'desktop'
)

i18n.merge_file('appdata-file',
  input: 'org.gnome.Epiphany.appdata.xml.in',
  output: 'org.gnome.Epiphany.appdata.xml',
  install: true,
  install_dir: join_paths(datadir, 'appdata'),
  po_dir: '../po'
)

That does not prevent the icon field from being translated. Currently that happens because it's mandated by the desktop file spec. There's another bug for that... somewhere.... Many GNOME modules have been copy/pasting the following translator comment:

# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.Epiphany
Comment 8 Robert Ancell 2017-05-25 02:38:14 UTC
commit 0f32eeee89c9c0592d04f2eecd55cb56d0604501
Author: Robert Ancell <robert.ancell@canonical.com>
Date:   Thu May 25 14:37:38 2017 +1200

    Fix up .desktop and appdata translations with meson
Comment 9 Michael Catanzaro 2017-05-25 11:42:31 UTC
I should mention, there is another good standard comment to add to desktop files:

# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=web;browser;internet;
Comment 10 Piotr Drąg 2017-05-25 15:03:02 UTC
(In reply to Michael Catanzaro from comment #7)
> That does not prevent the icon field from being translated. Currently that
> happens because it's mandated by the desktop file spec. There's another bug
> for that... somewhere.... Many GNOME modules have been copy/pasting the
> following translator comment:
> 

That would be <https://savannah.gnu.org/support/?108887>. I never followed up on it. :(