From a78e9f2261687c6f0b48107db717877f063371c8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 11 Mar 2018 12:18:16 -0400 Subject: [PATCH] Consolidate print backends into one directory This will let us use GTK_PATH to load them uninstalled, which is useful for in-tree tests. --- modules/printbackends/cloudprint/meson.build | 11 --- modules/printbackends/cups/meson.build | 22 ------ modules/printbackends/file/meson.build | 10 --- .../{cloudprint => }/gtkcloudprintaccount.c | 0 .../{cloudprint => }/gtkcloudprintaccount.h | 0 .../{cups => }/gtkcupssecretsutils.c | 0 .../{cups => }/gtkcupssecretsutils.h | 0 .../printbackends/{cups => }/gtkcupsutils.c | 0 .../printbackends/{cups => }/gtkcupsutils.h | 0 .../gtkprintbackendcloudprint.c | 0 .../gtkprintbackendcloudprint.h | 0 .../{cups => }/gtkprintbackendcups.c | 0 .../{cups => }/gtkprintbackendcups.h | 0 .../{file => }/gtkprintbackendfile.c | 0 .../{file => }/gtkprintbackendfile.h | 0 .../{lpr => }/gtkprintbackendlpr.c | 0 .../{lpr => }/gtkprintbackendlpr.h | 0 .../{cloudprint => }/gtkprintercloudprint.c | 0 .../{cloudprint => }/gtkprintercloudprint.h | 0 .../printbackends/{cups => }/gtkprintercups.c | 0 .../printbackends/{cups => }/gtkprintercups.h | 0 modules/printbackends/lpr/meson.build | 10 --- modules/printbackends/meson.build | 68 ++++++++++++++++++- 23 files changed, 65 insertions(+), 56 deletions(-) delete mode 100644 modules/printbackends/cloudprint/meson.build delete mode 100644 modules/printbackends/cups/meson.build delete mode 100644 modules/printbackends/file/meson.build rename modules/printbackends/{cloudprint => }/gtkcloudprintaccount.c (100%) rename modules/printbackends/{cloudprint => }/gtkcloudprintaccount.h (100%) rename modules/printbackends/{cups => }/gtkcupssecretsutils.c (100%) rename modules/printbackends/{cups => }/gtkcupssecretsutils.h (100%) rename modules/printbackends/{cups => }/gtkcupsutils.c (100%) rename modules/printbackends/{cups => }/gtkcupsutils.h (100%) rename modules/printbackends/{cloudprint => }/gtkprintbackendcloudprint.c (100%) rename modules/printbackends/{cloudprint => }/gtkprintbackendcloudprint.h (100%) rename modules/printbackends/{cups => }/gtkprintbackendcups.c (100%) rename modules/printbackends/{cups => }/gtkprintbackendcups.h (100%) rename modules/printbackends/{file => }/gtkprintbackendfile.c (100%) rename modules/printbackends/{file => }/gtkprintbackendfile.h (100%) rename modules/printbackends/{lpr => }/gtkprintbackendlpr.c (100%) rename modules/printbackends/{lpr => }/gtkprintbackendlpr.h (100%) rename modules/printbackends/{cloudprint => }/gtkprintercloudprint.c (100%) rename modules/printbackends/{cloudprint => }/gtkprintercloudprint.h (100%) rename modules/printbackends/{cups => }/gtkprintercups.c (100%) rename modules/printbackends/{cups => }/gtkprintercups.h (100%) delete mode 100644 modules/printbackends/lpr/meson.build diff --git a/modules/printbackends/cloudprint/meson.build b/modules/printbackends/cloudprint/meson.build deleted file mode 100644 index f5217cbc46..0000000000 --- a/modules/printbackends/cloudprint/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -shared_module('printbackend-cloudprint', - 'gtkprintbackendcloudprint.c', - 'gtkprintercloudprint.c', - 'gtkcloudprintaccount.c', - c_args: [ - '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', - '-DGTK_DISABLE_DEPRECATION_WARNINGS', - ], - dependencies: [ libgtk_dep, rest_dep, json_glib_dep ], - install_dir: printbackends_install_dir, - install : true) diff --git a/modules/printbackends/cups/meson.build b/modules/printbackends/cups/meson.build deleted file mode 100644 index ef7a30ee9a..0000000000 --- a/modules/printbackends/cups/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -enable_colord = get_option('colord') -if enable_colord != 'no' - want_colord = enable_colord == 'yes' - colord_dep = dependency('colord', version: '>= 0.1.9', required: want_colord) - cdata.set('HAVE_COLORD', colord_dep.found()) -else - colord_dep = [] -endif - -shared_module('printbackend-cups', - 'gtkprintbackendcups.c', - 'gtkprintercups.c', - 'gtkcupsutils.c', - 'gtkcupssecretsutils.c', - c_args: [ - '-DGTK_COMPILATION', - '-DGTK_DISABLE_DEPRECATION_WARNINGS', - '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', - ], - dependencies: [libgtk_dep, libcups, colord_dep], - install_dir: printbackends_install_dir, - install : true) diff --git a/modules/printbackends/file/meson.build b/modules/printbackends/file/meson.build deleted file mode 100644 index b1604be0f6..0000000000 --- a/modules/printbackends/file/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -shared_module('printbackend-file', - 'gtkprintbackendfile.c', - c_args: [ - '-DGTK_COMPILATION', - '-DGTK_DISABLE_DEPRECATION_WARNINGS', - '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', - ], - dependencies: libgtk_dep, - install_dir: printbackends_install_dir, - install : true) diff --git a/modules/printbackends/cloudprint/gtkcloudprintaccount.c b/modules/printbackends/gtkcloudprintaccount.c similarity index 100% rename from modules/printbackends/cloudprint/gtkcloudprintaccount.c rename to modules/printbackends/gtkcloudprintaccount.c diff --git a/modules/printbackends/cloudprint/gtkcloudprintaccount.h b/modules/printbackends/gtkcloudprintaccount.h similarity index 100% rename from modules/printbackends/cloudprint/gtkcloudprintaccount.h rename to modules/printbackends/gtkcloudprintaccount.h diff --git a/modules/printbackends/cups/gtkcupssecretsutils.c b/modules/printbackends/gtkcupssecretsutils.c similarity index 100% rename from modules/printbackends/cups/gtkcupssecretsutils.c rename to modules/printbackends/gtkcupssecretsutils.c diff --git a/modules/printbackends/cups/gtkcupssecretsutils.h b/modules/printbackends/gtkcupssecretsutils.h similarity index 100% rename from modules/printbackends/cups/gtkcupssecretsutils.h rename to modules/printbackends/gtkcupssecretsutils.h diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/gtkcupsutils.c similarity index 100% rename from modules/printbackends/cups/gtkcupsutils.c rename to modules/printbackends/gtkcupsutils.c diff --git a/modules/printbackends/cups/gtkcupsutils.h b/modules/printbackends/gtkcupsutils.h similarity index 100% rename from modules/printbackends/cups/gtkcupsutils.h rename to modules/printbackends/gtkcupsutils.h diff --git a/modules/printbackends/cloudprint/gtkprintbackendcloudprint.c b/modules/printbackends/gtkprintbackendcloudprint.c similarity index 100% rename from modules/printbackends/cloudprint/gtkprintbackendcloudprint.c rename to modules/printbackends/gtkprintbackendcloudprint.c diff --git a/modules/printbackends/cloudprint/gtkprintbackendcloudprint.h b/modules/printbackends/gtkprintbackendcloudprint.h similarity index 100% rename from modules/printbackends/cloudprint/gtkprintbackendcloudprint.h rename to modules/printbackends/gtkprintbackendcloudprint.h diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/gtkprintbackendcups.c similarity index 100% rename from modules/printbackends/cups/gtkprintbackendcups.c rename to modules/printbackends/gtkprintbackendcups.c diff --git a/modules/printbackends/cups/gtkprintbackendcups.h b/modules/printbackends/gtkprintbackendcups.h similarity index 100% rename from modules/printbackends/cups/gtkprintbackendcups.h rename to modules/printbackends/gtkprintbackendcups.h diff --git a/modules/printbackends/file/gtkprintbackendfile.c b/modules/printbackends/gtkprintbackendfile.c similarity index 100% rename from modules/printbackends/file/gtkprintbackendfile.c rename to modules/printbackends/gtkprintbackendfile.c diff --git a/modules/printbackends/file/gtkprintbackendfile.h b/modules/printbackends/gtkprintbackendfile.h similarity index 100% rename from modules/printbackends/file/gtkprintbackendfile.h rename to modules/printbackends/gtkprintbackendfile.h diff --git a/modules/printbackends/lpr/gtkprintbackendlpr.c b/modules/printbackends/gtkprintbackendlpr.c similarity index 100% rename from modules/printbackends/lpr/gtkprintbackendlpr.c rename to modules/printbackends/gtkprintbackendlpr.c diff --git a/modules/printbackends/lpr/gtkprintbackendlpr.h b/modules/printbackends/gtkprintbackendlpr.h similarity index 100% rename from modules/printbackends/lpr/gtkprintbackendlpr.h rename to modules/printbackends/gtkprintbackendlpr.h diff --git a/modules/printbackends/cloudprint/gtkprintercloudprint.c b/modules/printbackends/gtkprintercloudprint.c similarity index 100% rename from modules/printbackends/cloudprint/gtkprintercloudprint.c rename to modules/printbackends/gtkprintercloudprint.c diff --git a/modules/printbackends/cloudprint/gtkprintercloudprint.h b/modules/printbackends/gtkprintercloudprint.h similarity index 100% rename from modules/printbackends/cloudprint/gtkprintercloudprint.h rename to modules/printbackends/gtkprintercloudprint.h diff --git a/modules/printbackends/cups/gtkprintercups.c b/modules/printbackends/gtkprintercups.c similarity index 100% rename from modules/printbackends/cups/gtkprintercups.c rename to modules/printbackends/gtkprintercups.c diff --git a/modules/printbackends/cups/gtkprintercups.h b/modules/printbackends/gtkprintercups.h similarity index 100% rename from modules/printbackends/cups/gtkprintercups.h rename to modules/printbackends/gtkprintercups.h diff --git a/modules/printbackends/lpr/meson.build b/modules/printbackends/lpr/meson.build deleted file mode 100644 index 581ca77a48..0000000000 --- a/modules/printbackends/lpr/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -shared_module('printbackend-lpr', - 'gtkprintbackendlpr.c', - c_args: [ - '-DGTK_COMPILATION', - '-DGTK_DISABLE_DEPRECATION_WARNINGS', - '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', - ], - dependencies: libgtk_dep, - install_dir: printbackends_install_dir, - install : true) diff --git a/modules/printbackends/meson.build b/modules/printbackends/meson.build index f8a363a668..76b5c3789e 100644 --- a/modules/printbackends/meson.build +++ b/modules/printbackends/meson.build @@ -84,6 +84,68 @@ printbackends_install_dir = join_paths(get_option('libdir'), printbackends_subdi cdata.set_quoted('GTK_PRINT_BACKENDS', ','.join(print_backends)) -foreach print_backend : print_backends - subdir(print_backend) -endforeach + +enable_colord = get_option('colord') +if enable_colord != 'no' + want_colord = enable_colord == 'yes' + colord_dep = dependency('colord', version: '>= 0.1.9', required: want_colord) + cdata.set('HAVE_COLORD', colord_dep.found()) +else + colord_dep = [] +endif + +if print_backends.contains('cups') + shared_module('printbackend-cups', + 'gtkprintbackendcups.c', + 'gtkprintercups.c', + 'gtkcupsutils.c', + 'gtkcupssecretsutils.c', + c_args: [ + '-DGTK_COMPILATION', + '-DGTK_DISABLE_DEPRECATION_WARNINGS', + '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', + ], + dependencies: [libgtk_dep, libcups, colord_dep], + install_dir: printbackends_install_dir, + install : true) +endif + +if print_backends.contains('cloudprint') + shared_module('printbackend-cloudprint', + 'gtkprintbackendcloudprint.c', + 'gtkprintercloudprint.c', + 'gtkcloudprintaccount.c', + c_args: [ + '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', + '-DGTK_DISABLE_DEPRECATION_WARNINGS', + ], + dependencies: [ libgtk_dep, rest_dep, json_glib_dep ], + install_dir: printbackends_install_dir, + install : true) +endif + +if print_backends.contains('file') + shared_module('printbackend-file', + 'gtkprintbackendfile.c', + c_args: [ + '-DGTK_COMPILATION', + '-DGTK_DISABLE_DEPRECATION_WARNINGS', + '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', + ], + dependencies: libgtk_dep, + install_dir: printbackends_install_dir, + install : true) +endif + +if print_backends.contains('lpr') + shared_module('printbackend-lpr', + 'gtkprintbackendlpr.c', + c_args: [ + '-DGTK_COMPILATION', + '-DGTK_DISABLE_DEPRECATION_WARNINGS', + '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', + ], + dependencies: libgtk_dep, + install_dir: printbackends_install_dir, + install : true) +endif \ No newline at end of file