Move third-party sources to separate sub-directory
authorColin Clark <colin.clark@cclark.uk>
Wed, 28 Feb 2024 15:45:36 +0000 (15:45 +0000)
committerColin Clark <colin.clark@cclark.uk>
Wed, 28 Feb 2024 15:45:36 +0000 (15:45 +0000)
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
src/exif-common.cc
src/main.cc
src/meson.build
src/preferences.cc
src/third-party/backward.h [moved from src/backward.h with 100% similarity]
src/third-party/meson.build [new file with mode: 0644]
src/third-party/whereami.cc [moved from src/whereami.cc with 99% similarity]
src/third-party/whereami.h [moved from src/whereami.h with 100% similarity]
src/third-party/zonedetect.cc [moved from src/zonedetect.cc with 100% similarity]
src/third-party/zonedetect.h [moved from src/zonedetect.h with 100% similarity]

index 4280b16..e888e07 100644 (file)
@@ -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
index 7155d12..4dcdc4b 100644 (file)
 #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;
index 4431dc8..b99f7d1 100644 (file)
@@ -48,7 +48,7 @@
 #endif
 
 #if HAVE_DEVELOPER
-#include "backward.h"
+#include "third-party/backward.h"
 #endif
 
 #include "cache-maint.h"
 #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;
index d1a00f2..288c301 100644 (file)
@@ -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')
 
index 248c9c3..6e987e0 100644 (file)
@@ -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;
 
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 (file)
index 0000000..8d1d47b
--- /dev/null
@@ -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
similarity index 99%
rename from src/whereami.cc
rename to src/third-party/whereami.cc
index 5dfa031..0c3bb58 100644 (file)
@@ -9,7 +9,7 @@
 
 // in case you want to #include "whereami.cc" in a larger compilation unit
 #if !defined(WHEREAMI_H)
-#include <whereami.h>
+#include <third-party/whereami.h>
 #endif
 
 #ifdef __cplusplus
similarity index 100%
rename from src/whereami.h
rename to src/third-party/whereami.h