From: Parichay Kapoor Date: Thu, 19 Sep 2019 03:18:51 +0000 (+0900) Subject: [build] Added cleanup after android/ubuntu build X-Git-Tag: accepted/tizen/unified/20190925.220436~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=357098a5c84254fcd54b6e48e9773bc616afab75;p=platform%2Fupstream%2Fnnstreamer.git [build] Added cleanup after android/ubuntu build Added cleanup of patches after android/ubuntu build Changed relative path of files to patches in patch file Signed-off-by: Parichay Kapoor --- diff --git a/api/android/build-android-lib.sh b/api/android/build-android-lib.sh index 1d5be8f..25a68f2 100644 --- a/api/android/build-android-lib.sh +++ b/api/android/build-android-lib.sh @@ -51,6 +51,7 @@ function check_package() { # 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 @@ -71,11 +72,10 @@ echo "NNStreamer root directory: $NNSTREAMER_ROOT" 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 @@ -138,3 +138,6 @@ popd # Remove build directory rm -rf build_android_lib + +# Clean the applied patches +patch -R -sfp1 -i $NNSTREAMER_ROOT/packaging/non_tizen_build.patch diff --git a/api/capi/meson.build b/api/capi/meson.build index 31b688d..09b24c0 100644 --- a/api/capi/meson.build +++ b/api/capi/meson.build @@ -47,15 +47,6 @@ if (get_option('enable-tizen')) 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 = [ diff --git a/debian/rules b/debian/rules index 4c447ef..a296c6d 100755 --- a/debian/rules +++ b/debian/rules @@ -58,4 +58,5 @@ override_dh_auto_install: 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. diff --git a/meson.build b/meson.build index 14b4606..98ba382 100644 --- a/meson.build +++ b/meson.build @@ -230,6 +230,16 @@ endif # 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/packaging/non_tizen_build.patch b/packaging/non_tizen_build.patch index fe39d38..3138220 100644 --- a/packaging/non_tizen_build.patch +++ b/packaging/non_tizen_build.patch @@ -1,7 +1,7 @@ -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