From 628100c19f5d82747170acdf2917cba8c119ccbf Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Tue, 13 Dec 2016 16:12:03 -0500 Subject: build: Replace Autotools with Meson Quick rundown of benefits: - Much faster: - Autotools (with autogen): 22 seconds - Meson: 7 seconds - Meson (with ccache): 2 seconds - Simpler: - ~1000 lines smaller - Single simple language - Potentially better Windows (Visual Studio) support What is not done: - Complete Windows support - OSX support (easy) Closes #2013 Closes #1937 Closes #1803 --- data/misc/Makefile.am | 50 ---------------------------------------- data/misc/hexchat.appdata.xml.in | 6 ++--- data/misc/hexchat.desktop.in.in | 10 ++++---- data/misc/htm.desktop.in | 2 +- data/misc/meson.build | 48 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 59 deletions(-) delete mode 100644 data/misc/Makefile.am create mode 100644 data/misc/meson.build (limited to 'data/misc') diff --git a/data/misc/Makefile.am b/data/misc/Makefile.am deleted file mode 100644 index 45036a3c..00000000 --- a/data/misc/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ - -appdatadir = $(datadir)/appdata -appdata_in_files = - -if DO_GTK -appdata_in_files += hexchat.appdata.xml.in -endif - -appdata_DATA = $(appdata_in_files:.xml.in=.xml) -@INTLTOOL_XML_RULE@ - -if USE_DBUS -exec_command = 'hexchat --existing %U' -else -exec_command = 'hexchat %U' -endif - -hexchat.desktop.in: hexchat.desktop.in.in - $(AM_V_GEN)sed -e s!\@exec_command\@!$(exec_command)! < $< > $@ - -data_desktopdir = $(datadir)/applications -data_desktop_in_files = - -if DO_GTK -data_desktop_in_files += hexchat.desktop.in -endif - -if WITH_TM -data_desktop_in_files += htm.desktop.in -mime_DATA = htm-mime.xml -mimedir = $(datadir)/mime/packages -endif - -data_desktop_DATA = $(data_desktop_in_files:.desktop.in=.desktop) -@INTLTOOL_DESKTOP_RULE@ - -UPDATE_MIME_DATABASE = update-mime-database "$(datadir)/mime" || : -UPDATE_DESKTOP_DATABASE = update-desktop-database -q "$(datadir)/applications" || : - -install-data-hook: - $(UPDATE_MIME_DATABASE); - $(UPDATE_DESKTOP_DATABASE); - -uninstall-hook: - $(UPDATE_MIME_DATABASE); - $(UPDATE_DESKTOP_DATABASE); - -EXTRA_DIST = hexchat.appdata.xml.in hexchat.desktop.in.in htm.desktop.in htm-mime.xml - -CLEANFILES = $(appdata_DATA) $(data_desktop_DATA) hexchat.desktop.in diff --git a/data/misc/hexchat.appdata.xml.in b/data/misc/hexchat.appdata.xml.in index 8b5b3ee8..7ffaf3dc 100644 --- a/data/misc/hexchat.appdata.xml.in +++ b/data/misc/hexchat.appdata.xml.in @@ -8,8 +8,8 @@ hexchat IRC Client - <_p>HexChat is an easy to use yet extensible IRC Client. It allows you to securely join multiple networks and talk to users privately or in channels using a customizable interface. You can even transfer files. - <_p>HexChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, logging, custom themes, and Python/Perl scripts. +

HexChat is an easy to use yet extensible IRC Client. It allows you to securely join multiple networks and talk to users privately or in channels using a customizable interface. You can even transfer files.

+

HexChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, logging, custom themes, and Python/Perl scripts.

http://hexchat.github.io https://github.com/hexchat/hexchat @@ -19,7 +19,7 @@ http://i.imgur.com/tLMguQz.png - <_caption>Main Chat Window + Main Chat Window diff --git a/data/misc/hexchat.desktop.in.in b/data/misc/hexchat.desktop.in.in index a778e9b5..a5ff40d8 100644 --- a/data/misc/hexchat.desktop.in.in +++ b/data/misc/hexchat.desktop.in.in @@ -1,8 +1,8 @@ [Desktop Entry] -_Name=HexChat -_GenericName=IRC Client -_Comment=Chat with other people online -_Keywords=IM;Chat; +Name=HexChat +GenericName=IRC Client +Comment=Chat with other people online +Keywords=IM;Chat; Exec=@exec_command@ Icon=hexchat Terminal=false @@ -14,5 +14,5 @@ MimeType=x-scheme-handler/irc;x-scheme-handler/ircs; Actions=SafeMode; [Desktop Action SafeMode] -_Name=Open Safe Mode +Name=Open Safe Mode Exec=hexchat --no-auto --no-plugins diff --git a/data/misc/htm.desktop.in b/data/misc/htm.desktop.in index 0971ac77..53cac289 100644 --- a/data/misc/htm.desktop.in +++ b/data/misc/htm.desktop.in @@ -1,5 +1,5 @@ [Desktop Entry] -_Name=HexChat Theme Manager +Name=HexChat Theme Manager Exec=thememan %f Icon=hexchat Terminal=false diff --git a/data/misc/meson.build b/data/misc/meson.build new file mode 100644 index 00000000..ec79b757 --- /dev/null +++ b/data/misc/meson.build @@ -0,0 +1,48 @@ +appdir = join_paths(get_option('datadir'), 'applications') + +if get_option('with-gtk') + i18n.merge_file( + input: 'hexchat.appdata.xml.in', + output: 'hexchat.appdata.xml', + po_dir: '../../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'appdata') + ) + + desktop_conf = configuration_data() + if get_option('with-dbus') + desktop_conf.set('exec_command', 'hexchat --existing %U') + else + desktop_conf.set('exec_command', 'hexchat %U') + endif + + desktop_file = configure_file( + input: 'hexchat.desktop.in.in', + output: 'hexchat.desktop.in', + configuration: desktop_conf + ) + + i18n.merge_file( + input: desktop_file, + output: 'hexchat.desktop', + po_dir: '../../po', + type: 'desktop', + install: true, + install_dir: appdir + ) +endif + +if get_option('with-theme-manager') + i18n.merge_file( + input: 'htm.desktop.in', + output: 'htm.desktop', + po_dir: '../../po', + type: 'desktop', + install: true, + install_dir: appdir + ) + + install_data('htm-mime.xml', + install_dir: join_paths(get_option('datadir'), 'mime/packages') + ) +endif -- cgit 1.4.1