# Check required packages
check_package svn
check_package sed
+check_package patch
# Android SDK (Set your own path)
[ -z "$ANDROID_HOME" ] && echo "Need to set ANDROID_HOME." && exit 1
echo "Start to build NNStreamer library for Android."
# Modify header for Android
-cd $NNSTREAMER_ROOT/api/capi
+cd $NNSTREAMER_ROOT
if ! patch -R --dry-run -sfp1 -i $NNSTREAMER_ROOT/packaging/non_tizen_build.patch; then
patch -sfp1 -i $NNSTREAMER_ROOT/packaging/non_tizen_build.patch
fi
-cd $NNSTREAMER_ROOT
# Make directory to build NNStreamer library
mkdir -p build_android_lib
# Remove build directory
rm -rf build_android_lib
+
+# Clean the applied patches
+patch -R -sfp1 -i $NNSTREAMER_ROOT/packaging/non_tizen_build.patch
dependency('capi-system-info'),
dependency('dlog')
]
-else
- r = run_command('patch', '-R', '--dry-run', '-sfp1', '-i', patch_file)
- if (r.returncode() != 0)
- r = run_command('patch', '-p1', '-i', patch_file)
- if (r.returncode() != 0)
- message('Non-Tizen mode support failed')
- endif
- endif
- message('CAPI is in non-Tizen mode')
endif
capi_deps = [
override_dh_install:
dh_install --sourcedir=debian/tmp --list-missing
+ patch -R -p1 -i ./packaging/non_tizen_build.patch
# Add --fail-missing option after adding *.install files for all subpackages.
# Patch for non-tizen build
patch_file = join_paths(meson.current_source_dir(), 'packaging', 'non_tizen_build.patch')
+if (not get_option('enable-tizen')) and get_option('enable-capi')
+ r = run_command('patch', '-R', '--dry-run', '-sfp1', '-i', patch_file)
+ if (r.returncode() != 0)
+ r = run_command('patch', '-p1', '-i', patch_file)
+ if (r.returncode() != 0)
+ message('Non-Tizen mode support failed')
+ endif
+ endif
+ message('CAPI is in non-Tizen mode')
+endif
# Build nnstreamer (common, plugins)
subdir('gst')
-diff --git a/include/nnstreamer.h b/include/nnstreamer.h
+diff --git a/api/capi/include/nnstreamer.h b/api/capi/include/nnstreamer.h
index a18a066..ab1808c 100644
---- a/include/nnstreamer.h
-+++ b/include/nnstreamer.h
+--- a/api/capi/include/nnstreamer.h
++++ b/api/capi/include/nnstreamer.h
@@ -28,7 +28,15 @@
#include <stdbool.h>