summary refs log tree commit diff stats
path: root/data/misc
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-12-13 16:12:03 -0500
committerPatrick Griffis <tingping@tingping.se>2017-06-13 23:54:51 -0400
commit628100c19f5d82747170acdf2917cba8c119ccbf (patch)
tree351a7e9714a1a58390ba349808df5703cef25c3e /data/misc
parent2edf50d4ddc61ce6f73bf02263c9bdd09632c66b (diff)
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
Diffstat (limited to 'data/misc')
-rw-r--r--data/misc/Makefile.am50
-rw-r--r--data/misc/hexchat.appdata.xml.in6
-rw-r--r--data/misc/hexchat.desktop.in.in10
-rw-r--r--data/misc/htm.desktop.in2
-rw-r--r--data/misc/meson.build48
5 files changed, 57 insertions, 59 deletions
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 @@
   <translation type="gettext">hexchat</translation>
   <summary>IRC Client</summary>
   <description>
-    <_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>
-    <_p>HexChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, logging, custom themes, and Python/Perl scripts.</_p>
+    <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>
+    <p>HexChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, logging, custom themes, and Python/Perl scripts.</p>
   </description>
   <url type="homepage">http://hexchat.github.io</url>
   <url type="bugtracker">https://github.com/hexchat/hexchat</url>
@@ -19,7 +19,7 @@
   <screenshots>
     <screenshot type="default">
       <image>http://i.imgur.com/tLMguQz.png</image>
-      <_caption>Main Chat Window</_caption>
+      <caption>Main Chat Window</caption>
     </screenshot>
   </screenshots>
   <releases>
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