[build] Remove unnecessary BuildRequires
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Fri, 5 Jan 2024 08:20:36 +0000 (17:20 +0900)
committerwooksong <wook16.song@samsung.com>
Tue, 9 Jan 2024 01:58:34 +0000 (10:58 +0900)
- The latest tflite2 tizen package has its own flatbuffers header
  internally. Let's remove the `BuildRequires: flatbuffers-debvel`
- Let meson check the header when build_platform is not tizen

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
ext/nnstreamer/tensor_filter/meson.build
packaging/nnstreamer.spec

index 0c98fb3..9c36376 100644 (file)
@@ -184,7 +184,9 @@ if tflite2_support_is_available
   )
   message('TensorFlow2-lite version: ' + tflite2_ver)
 
-  if not cxx.check_header('flatbuffers/flatbuffers.h')
+  # check flatbuffers header
+  ## Note that tizen tflite package has its own flatbuffers header internally.
+  if build_platform != 'tizen' and not cxx.check_header('flatbuffers/flatbuffers.h')
     error('flatbuffers header files are required to build tensorflow2-lite subplugin. Please install compatible version for tensorflow-lite library. Or disable tflite2-support in meson_options.txt')
   endif
 
index d11724b..fd3b852 100644 (file)
@@ -207,7 +207,6 @@ BuildRequires: tensorflow-lite-devel
 %if 0%{?tensorflow2_lite_support}
 # for tensorflow2-lite
 BuildRequires: tensorflow2-lite-devel
-BuildRequires: flatbuffers-devel
 # tensorflow2-lite-custom requires scripts for rpm >= 4.9
 BuildRequires:  rpm >= 4.9
 %global __requires_exclude ^libtensorflow2-lite-custom.*$