]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
build: Re-add support for the legacy perl api
authorPatrick Griffis <redacted>
Sun, 18 Mar 2018 15:02:54 +0000 (11:02 -0400)
committerPatrick Griffis <redacted>
Sun, 18 Mar 2018 15:09:53 +0000 (11:09 -0400)
This was accidentally left behind, expose it beind an option as
with the old build system but default to false now. Enough time
has passed and only distros that care about it can enable it.

meson_options.txt
plugins/perl/meson.build

index 9b5d620b10a12894fb30d4d2e2c4f669c62b4ec8..eee217918e53a7f4aa186ea6d3618221d2255e62 100644 (file)
@@ -60,3 +60,6 @@ option('with-winamp', type: 'boolean',
 option('install-plugin-metainfo', type: 'boolean', value: false,
   description: 'Installs metainfo files for enabled plugins, useful when distros create split packages'
 )
+option('with-perl-legacy-api', type: 'boolean', value: false,
+  description: 'Enables the legacy IRC perl module for compatibility with old scripts'
+)
index 5e5d6d710164595c0ebcf15b0152252bd6bbc604..180797ee764eb205f836ca36936ab96814128919 100644 (file)
@@ -13,11 +13,17 @@ hexchat_perl_module = custom_target('hexchat-perl-header',
   command: [generate_perl_header, '@OUTPUT@', '@INPUT@']
 )
 
-irc_perl_module = custom_target('irc-perl-header',
-  input: 'lib/IRC.pm',
-  output: 'irc.pm.h',
-  command: [generate_perl_header, '@OUTPUT@', '@INPUT@']
-)
+perl_cflags = []
+irc_perl_module = []
+
+if get_option('with-perl-legacy-api')
+  irc_perl_module = custom_target('irc-perl-header',
+    input: 'lib/IRC.pm',
+    output: 'irc.pm.h',
+    command: [generate_perl_header, '@OUTPUT@', '@INPUT@']
+  )
+  perl_cflags += '-DOLD_PERL'
+endif
 
 perl = find_program('perl')
 
@@ -25,7 +31,6 @@ ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ccopts'])
 if ret.returncode() != 0
   error('perl: Failed to get cflags')
 endif
-perl_cflags = []
 foreach flag : ret.stdout().strip().split(' ')
   if flag.startswith('-I') or flag.startswith('-D')
     perl_cflags += flag