From ce6a420d4b0d480c90c41aec65c9415d544ddddf Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Wed, 28 Feb 2024 15:45:36 +0000 Subject: [PATCH] Move third-party sources to separate sub-directory Move any third-party sources that have been copied verbatim to a separate sub-directory. This allows project checks to avoid these files. These files are unlikely to change and do not need to be tracked for changes. --- meson.build | 2 +- src/exif-common.cc | 3 +-- src/main.cc | 4 ++-- src/meson.build | 8 ++------ src/preferences.cc | 2 +- src/{ => third-party}/backward.h | 0 src/third-party/meson.build | 20 ++++++++++++++++++++ src/{ => third-party}/whereami.cc | 2 +- src/{ => third-party}/whereami.h | 0 src/{ => third-party}/zonedetect.cc | 0 src/{ => third-party}/zonedetect.h | 0 11 files changed, 28 insertions(+), 13 deletions(-) rename src/{ => third-party}/backward.h (100%) create mode 100644 src/third-party/meson.build rename src/{ => third-party}/whereami.cc (99%) rename src/{ => third-party}/whereami.h (100%) rename src/{ => third-party}/zonedetect.cc (100%) rename src/{ => third-party}/zonedetect.h (100%) diff --git a/meson.build b/meson.build index 4280b16f..e888e074 100644 --- a/meson.build +++ b/meson.build @@ -706,7 +706,7 @@ if running_from_git clang_tidy_exe = find_program('clang-tidy', required : false) if clang_tidy_exe.found() git_exe = find_program('git', required : true) - modified_file_list = run_command(git_exe, 'diff', 'origin/master', '--name-only', './src/*.cc', './src/pan-view/*.cc', './src/view-file/*.cc', check: true) + modified_file_list = run_command(git_exe, 'diff', 'origin/master', '--name-only', '--diff-filter=d', './src/*.cc', './src/pan-view/*.cc', './src/view-file/*.cc', check: true) modified_files = modified_file_list.stdout().strip().split('\n') foreach modified_file : modified_files diff --git a/src/exif-common.cc b/src/exif-common.cc index 7155d128..4dcdc4b9 100644 --- a/src/exif-common.cc +++ b/src/exif-common.cc @@ -51,10 +51,9 @@ #include "jpeg-parser.h" #include "main-defines.h" #include "misc.h" +#include "third-party/zonedetect.h" #include "typedefs.h" #include "ui-fileops.h" -#include "zonedetect.h" - struct ExifData; struct ExifItem; struct FileCacheData; diff --git a/src/main.cc b/src/main.cc index 4431dc89..b99f7d11 100644 --- a/src/main.cc +++ b/src/main.cc @@ -48,7 +48,7 @@ #endif #if HAVE_DEVELOPER -#include "backward.h" +#include "third-party/backward.h" #endif #include "cache-maint.h" @@ -77,10 +77,10 @@ #include "rcfile.h" #include "remote.h" #include "secure-save.h" +#include "third-party/whereami.h" #include "thumb.h" #include "ui-fileops.h" #include "ui-utildlg.h" -#include "whereami.h" gboolean thumb_format_changed = FALSE; static RemoteConnection *remote_connection = nullptr; diff --git a/src/meson.build b/src/meson.build index d1a00f2b..288c301d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -13,7 +13,6 @@ main_sources = files('advanced-exif.cc', 'advanced-exif.h', -'backward.h', 'bar.cc', 'bar-comment.cc', 'bar-comment.h', @@ -228,18 +227,15 @@ main_sources = files('advanced-exif.cc', 'view-dir-tree.cc', 'view-dir-tree.h', 'view-file.h', -'whereami.cc', -'whereami.h', 'window.cc', -'window.h', -'zonedetect.cc', -'zonedetect.h') +'window.h') project_sources += main_sources subdir('authors') subdir('icons') subdir('pan-view') +subdir('third-party') subdir('ui') subdir('view-file') diff --git a/src/preferences.cc b/src/preferences.cc index 248c9c33..6e987e02 100644 --- a/src/preferences.cc +++ b/src/preferences.cc @@ -69,6 +69,7 @@ #include "pixbuf-util.h" #include "rcfile.h" #include "slideshow.h" +#include "third-party/zonedetect.h" #include "toolbar.h" #include "trash.h" #include "typedefs.h" @@ -78,7 +79,6 @@ #include "ui-utildlg.h" #include "utilops.h" #include "window.h" -#include "zonedetect.h" struct ZoneDetect; diff --git a/src/backward.h b/src/third-party/backward.h similarity index 100% rename from src/backward.h rename to src/third-party/backward.h diff --git a/src/third-party/meson.build b/src/third-party/meson.build new file mode 100644 index 00000000..8d1d47bc --- /dev/null +++ b/src/third-party/meson.build @@ -0,0 +1,20 @@ +# This file is a part of Geeqie project (https://www.geeqie.org/). +# Copyright (C) 2008 - 2024 The Geeqie Team +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +third_party_sources = files('backward.h', +'whereami.cc', +'whereami.h', +'zonedetect.cc', +'zonedetect.h') + +project_sources += third_party_sources diff --git a/src/whereami.cc b/src/third-party/whereami.cc similarity index 99% rename from src/whereami.cc rename to src/third-party/whereami.cc index 5dfa0315..0c3bb583 100644 --- a/src/whereami.cc +++ b/src/third-party/whereami.cc @@ -9,7 +9,7 @@ // in case you want to #include "whereami.cc" in a larger compilation unit #if !defined(WHEREAMI_H) -#include +#include #endif #ifdef __cplusplus diff --git a/src/whereami.h b/src/third-party/whereami.h similarity index 100% rename from src/whereami.h rename to src/third-party/whereami.h diff --git a/src/zonedetect.cc b/src/third-party/zonedetect.cc similarity index 100% rename from src/zonedetect.cc rename to src/third-party/zonedetect.cc diff --git a/src/zonedetect.h b/src/third-party/zonedetect.h similarity index 100% rename from src/zonedetect.h rename to src/third-party/zonedetect.h -- 2.20.1