pidgin/purple-plugin-pack

Add the turtles target to keep the foot clan at bay
default tip
12 months ago, Gary Kramlich
63ad7e4f10b4
Add the turtles target to keep the foot clan at bay

Testing Done:
Ran `ninja turtles` and verified it worked correctly.

Reviewed at https://reviews.imfreedom.org/r/2409/
project('purple-plugin-pack', 'c',
version : '2.8.1dev')
#######################################################################
# Our header
#######################################################################
add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
conf = configuration_data()
conf.set_quoted('PP_VERSION', meson.project_version())
# I'm lazy and figured config.h is the best place for this ;)
conf.set_quoted('PP_WEBSITE', 'https://keep.imfreedom.org/pidgin/purple-plugin-pack')
#######################################################################
# Good ol' gettext
#######################################################################
GETTEXT_PACKAGE = 'plugin_pack'
conf.set_quoted('GETTEXT_PACKAGE', GETTEXT_PACKAGE)
#######################################################################
# Look for the C compiler
#######################################################################
compiler = meson.get_compiler('c')
#######################################################################
# Check for purple
#######################################################################
PURPLE = dependency('purple')
PURPLE_LIBDIR = PURPLE.get_pkgconfig_variable('plugindir')
PURPLE_DATADIR = PURPLE.get_pkgconfig_variable('datadir')
PP_LOCALEDIR = join_paths(get_option('prefix'), get_option('localedir'))
conf.set_quoted('PP_LOCALEDIR', PP_LOCALEDIR)
#######################################################################
# Check for pidgin
#######################################################################
PIDGIN = dependency('pidgin', required : false)
conf.set('HAVE_PIDGIN', PIDGIN.found())
if PIDGIN.found()
PIDGIN_LIBDIR = PIDGIN.get_pkgconfig_variable('plugindir')
PIDGIN_DATADIR = PIDGIN.get_pkgconfig_variable('datadir')
PIDGIN_PIXMAPSDIR = join_paths(PIDGIN_DATADIR, 'pixmaps/pidgin')
else
PIDGIN_LIBDIR = ''
PIDGIN_DATADIR = ''
PIDGIN_PIXMAPSDIR = ''
endif
#######################################################################
# Check for finch
#######################################################################
FINCH = dependency('finch', required : false)
conf.set('HAVE_FINCH', FINCH.found())
if FINCH.found()
FINCH_LIBDIR = FINCH.get_pkgconfig_variable('libdir')
FINCH_DATADIR = FINCH.get_pkgconfig_variable('datadir')
else
FINCH_LIBDIR = ''
FINCH_DATADIR = ''
endif
#######################################################################
# check for gtk
#######################################################################
GLIB = dependency('glib-2.0', version : '>= 2.32.0', required : true)
GTK = dependency('gtk+-2.0', version : '>= 2.10.0', required : false)
#######################################################################
# check for gnt
#######################################################################
GNT = dependency('gnt', required : false)
#######################################################################
# check for pango
#######################################################################
PANGO = dependency('pango', required : false)
#######################################################################
# check for cairo
#######################################################################
CAIRO = dependency('cairo', required : false)
#######################################################################
# Check for libjson-glib
#######################################################################
JSON_GLIB = dependency('json-glib-1.0', required : false)
#######################################################################
# Check for ZLib
#######################################################################
ZLIB = dependency('zlib', required : false)
#######################################################################
# Check for switchspell
#######################################################################
GTKSPELL = dependency('gtkspell-2.0', version : '>= 2.0.2', required : false)
BUILD_SWITCH_SPELL = false
if GTKSPELL.found()
# FIXME: This is a hack that should not exist.
if run_command('pkg-config', '--static', '--libs', 'gtkspell-2.0').stdout().contains('enchant')
ENCHANT = dependency('enchant-2', required : false)
ASPELL = []
BUILD_SWITCH_SPELL = ENCHANT.found()
conf.set('HAVE_ENCHANT', ENCHANT.found())
else
ASPELL = dependency('aspell', required : false)
ENCHANT = []
BUILD_SWITCH_SPELL = ASPELL.found()
endif
endif
#######################################################################
# Check for some basic headers
#######################################################################
if compiler.has_header('regex.h')
conf.set('HAS_REGEX_H', true)
else
error('regex.h cannot be found')
endif
#######################################################################
# Disable installation of translation files
#######################################################################
INSTALL_I18N = get_option('nls')
subdir('po')
conf.set('ENABLE_NLS', INSTALL_I18N)
#######################################################################
# Add all plugin directories:
#######################################################################
TYPES = get_option('types').split(',')
if TYPES.contains('all')
TYPES = ['default', 'abusive', 'incomplete']
else
foreach type : TYPES
if not ['default', 'abusive', 'incomplete'].contains(type)
error('"@0@" is not a supported plugin type'.format(type))
endif
endforeach
endif
PP_PURPLE_BUILD = []
PP_PIDGIN_BUILD = []
PP_FINCH_BUILD = []
subdir('album')
subdir('autoreply')
subdir('bash')
subdir('blistops')
subdir('capsnot')
subdir('colorize')
subdir('convbadger')
subdir('dewysiwygification')
subdir('dice')
subdir('difftopic')
subdir('eight_ball')
subdir('enhancedhist')
subdir('flip')
subdir('gRIM')
subdir('google')
subdir('groupmsg')
subdir('highlight')
subdir('icon-override')
subdir('ignore')
subdir('irc-more')
subdir('irchelper')
subdir('irssi')
subdir('lastseen')
subdir('listhandler')
subdir('listlog')
subdir('mystatusbox')
subdir('nicksaid')
subdir('ning')
subdir('oldlogger')
subdir('omegle')
subdir('plonkers')
subdir('schedule')
subdir('sepandtab')
subdir('showoffline')
subdir('simfix')
subdir('slashexec')
subdir('snpp')
subdir('splitter')
subdir('sslinfo')
subdir('switchspell')
subdir('timelog')
subdir('translate')
subdir('xmppprio')
if meson.backend() == 'ninja'
run_target('turtles',
command : ['ninja', '-C', '@BUILD_ROOT@', 'plugin_pack-pot', 'all'])
endif
#######################################################################
# Install the metainfo file
#######################################################################
install_data('purple-plugin-pack.metainfo.xml',
install_dir : get_option('datadir') / 'metainfo')
#######################################################################
# Output!!
#######################################################################
configure_file(
output : 'pp_config.h',
configuration : conf)
summary({
'install directory' : PURPLE_LIBDIR,
'data directory' : PURPLE_DATADIR,
'plugins' : PP_PURPLE_BUILD,
}, section : 'libpurple', list_sep : ', ')
summary({
'install directory' : PIDGIN_LIBDIR,
'data directory' : PIDGIN_DATADIR,
'plugins' : PP_PIDGIN_BUILD,
}, section : 'pidgin', list_sep : ', ')
summary({
'install directory' : FINCH_LIBDIR,
'data directory' : FINCH_DATADIR,
'plugins' : PP_FINCH_BUILD,
}, section : 'finch', list_sep : ', ')