summary refs log tree commit diff stats
path: root/data/misc/Makefile.am
blob: 45036a3c9293bbf92fcb88a007cd06390178be0a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
n>.stdout().strip().split(' ') if flag.startswith('-I') or flag.startswith('-D') perl_cflags += flag endif endforeach ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ldopts']) if ret.returncode() != 0 error('perl: Failed to get ldflags') endif perl_ldflags = [] perl_rpath = '' foreach flag : ret.stdout().strip().split(' ') if flag.startswith('-L') or flag.startswith('-l') perl_ldflags += flag endif if flag.startswith('-Wl,-rpath,') # Install rpath split = flag.split(',') perl_rpath = split[split.length() - 1] # For in tree perl_ldflags += flag endif endforeach perl_cflags += [ # Perl has its own 'config.h' that we must override # TODO: Just rename ours to something more unique. '-include', meson.build_root() + '/config.h' ] if not cc.links(''' #define PERL_NO_INLINE_FUNCTIONS #include <EXTERN.h> #include <perl.h> int main(void) { PerlInterpreter *my_perl = perl_alloc(); return 0; } ''', args: perl_cflags + perl_ldflags) error('found perl not suitable for plugin') endif shared_module('perl', sources: ['perl.c', hexchat_perl_module, irc_perl_module], dependencies: [libgio_dep, hexchat_plugin_dep], c_args: perl_cflags, link_args: perl_ldflags, install: true, install_dir: plugindir, install_rpath: perl_rpath, name_prefix: '', )