mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
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
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
SUBDIRS =
|
||||
|
||||
if DO_PLUGIN
|
||||
SUBDIRS += pkgconfig
|
||||
endif
|
||||
|
||||
if DO_GTK
|
||||
SUBDIRS += icons misc man
|
||||
else
|
||||
if WITH_TM
|
||||
SUBDIRS += misc
|
||||
endif
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
hexchat.gresource.xml
|
||||
@@ -1,15 +0,0 @@
|
||||
icon_DATA = hexchat.png
|
||||
icondir = $(datadir)/icons/hicolor/48x48/apps
|
||||
|
||||
hicolor_DATA = hexchat.svg
|
||||
hicolordir = $(datadir)/icons/hicolor/scalable/apps
|
||||
|
||||
UPDATE_ICON_CACHE = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor || :
|
||||
|
||||
install-data-hook:
|
||||
$(UPDATE_ICON_CACHE);
|
||||
|
||||
uninstall-hook:
|
||||
$(UPDATE_ICON_CACHE);
|
||||
|
||||
EXTRA_DIST = $(icon_DATA) $(hicolor_DATA)
|
||||
9
data/icons/meson.build
Normal file
9
data/icons/meson.build
Normal file
@@ -0,0 +1,9 @@
|
||||
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
||||
install_data(
|
||||
'hexchat.png',
|
||||
install_dir: join_paths(icondir, '48x48/apps')
|
||||
)
|
||||
install_data(
|
||||
'hexchat.svg',
|
||||
install_dir: join_paths(icondir, 'scalable/apps')
|
||||
)
|
||||
@@ -1,3 +0,0 @@
|
||||
man_MANS = hexchat.1
|
||||
|
||||
EXTRA_DIST = hexchat.1.in
|
||||
10
data/man/meson.build
Normal file
10
data/man/meson.build
Normal file
@@ -0,0 +1,10 @@
|
||||
man_conf = configuration_data()
|
||||
man_conf.set('VERSION', meson.project_version())
|
||||
|
||||
configure_file(
|
||||
input: 'hexchat.1.in',
|
||||
output: 'hexchat.1',
|
||||
configuration: man_conf,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('mandir'), 'man1')
|
||||
)
|
||||
11
data/meson.build
Normal file
11
data/meson.build
Normal file
@@ -0,0 +1,11 @@
|
||||
if get_option('with-plugin')
|
||||
subdir('pkgconfig')
|
||||
endif
|
||||
|
||||
if get_option('with-gtk')
|
||||
subdir('icons')
|
||||
subdir('misc')
|
||||
subdir('man')
|
||||
elif get_option('with-theme-manager')
|
||||
subdir('misc')
|
||||
endif
|
||||
@@ -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
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Desktop Entry]
|
||||
_Name=HexChat Theme Manager
|
||||
Name=HexChat Theme Manager
|
||||
Exec=thememan %f
|
||||
Icon=hexchat
|
||||
Terminal=false
|
||||
|
||||
48
data/misc/meson.build
Normal file
48
data/misc/meson.build
Normal file
@@ -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
|
||||
@@ -1,4 +0,0 @@
|
||||
pkgcfgdir = $(pkgconfigdir)
|
||||
pkgcfg_DATA = hexchat-plugin.pc
|
||||
|
||||
EXTRA_DIST = hexchat-plugin.pc.in
|
||||
14
data/pkgconfig/meson.build
Normal file
14
data/pkgconfig/meson.build
Normal file
@@ -0,0 +1,14 @@
|
||||
pkg_conf = configuration_data()
|
||||
prefix = get_option('prefix')
|
||||
pkg_conf.set('prefix', prefix)
|
||||
pkg_conf.set('VERSION', meson.project_version())
|
||||
pkg_conf.set('hexchatlibdir', join_paths(prefix, plugindir))
|
||||
pkg_conf.set('includedir', join_paths(prefix, get_option('includedir')))
|
||||
|
||||
configure_file(
|
||||
input: 'hexchat-plugin.pc.in',
|
||||
output: 'hexchat-plugin.pc',
|
||||
configuration: pkg_conf,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
||||
)
|
||||
Reference in New Issue
Block a user