Convert gtkdebug meson rule to GResource. meson

Thu, 15 Jun 2017 23:40:59 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Thu, 15 Jun 2017 23:40:59 -0400
branch
meson
changeset 38496
825de094a34b
parent 38495
d0aa9c0cd002
child 38497
fcf50c9e4138

Convert gtkdebug meson rule to GResource.

meson.build file | annotate | diff | comparison | revisions
pidgin/meson.build file | annotate | diff | comparison | revisions
--- a/meson.build	Thu Jun 15 23:40:18 2017 -0400
+++ b/meson.build	Thu Jun 15 23:40:59 2017 -0400
@@ -104,7 +104,6 @@
     fallback : meson.project_version())
 
 sedpath = find_program('sed')
-xxdpath = find_program('xxd')
 
 # Storing configure arguments
 # conf.set('CONFIG_ARGS', ac_configure_args)
--- a/pidgin/meson.build	Thu Jun 15 23:40:18 2017 -0400
+++ b/pidgin/meson.build	Thu Jun 15 23:40:59 2017 -0400
@@ -102,28 +102,9 @@
 	'pidgin.c'
 ]
 
-# FIXME: Need to write a portable way to do this.
-
-gtkdebug_html_body1 = custom_target('gtkdebug.html.body1.h',
-    input : 'gtkdebug.html',
-    output : 'gtkdebug.html.body1.h',
-	command : [sedpath,
-               '-e', 's/^[ 	]\+//g',
-               '-e', 's/[ 	]\+/ /g',
-               '@INPUT@'],
-    capture : true)
-gtkdebug_html_body2 = custom_target('gtkdebug.html.body2.h',
-    input : gtkdebug_html_body1,
-    output : 'gtkdebug.html.body2.h',
-	command : [xxdpath, '-i', '@INPUT@', '@OUTPUT@'])
-gtkdebug_html_h = custom_target('gtkdebug.html.h',
-    input : gtkdebug_html_body2,
-    output : 'gtkdebug.html.h',
-	command : [sedpath,
-               '-e', 's/\(0x[0-9a-f][0-9a-f]\)$/\1, 0x00/',
-               '-e', 's/pidgin_gtkdebug_html_body1_h/gtkdebug_html/g',
-               '@INPUT@'],
-    capture : true)
+gtkdebug_html = gnome.compile_resources('gtkdebug.gresource', 'gtkdebug.gresource.xml',
+  c_name : 'gtkdebug')
+libpidgin_SOURCES += gtkdebug_html
 
 if IS_WIN32
 	libpidgin_SOURCES += [

mercurial