From 2e4361dc8d5012e691c8157388d3e2cf9676dac3 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Sun, 27 Mar 2016 11:59:49 +0300 Subject: ndk-build: Set SED ourselves instead of relying on Android's HOST_SED ... which disappeared with NDK r11. https://bugzilla.gnome.org/show_bug.cgi?id=763999 --- data/ndk-build/gstreamer-1.0.mk | 34 ++++++++++++---------------------- data/ndk-build/tools.mk | 8 ++++---- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/data/ndk-build/gstreamer-1.0.mk b/data/ndk-build/gstreamer-1.0.mk index 41b76b59..2d96e7ab 100755 --- a/data/ndk-build/gstreamer-1.0.mk +++ b/data/ndk-build/gstreamer-1.0.mk @@ -63,20 +63,10 @@ include $(GSTREAMER_NDK_BUILD_PATH)/tools.mk G_IO_MODULES_PATH := $(GSTREAMER_ROOT)/lib/gio/modules/static # Host tools -HOST_SED := $(strip $(NDK_HOST_SED)) -ifdef HOST_PREBUILT - ifndef HOST_SED - HOST_SED := $(strip $(wildcard $(HOST_PREBUILT)/sed$(HOST_EXEEXT))) - endif -endif -ifndef HOST_SED - HOST_CMP := sed -endif - ifeq ($(HOST_OS),windows) - HOST_SED := $(GSTREAMER_NDK_BUILD_PATH)/tools/windows/sed - GSTREAMER_LD := + SED := $(GSTREAMER_NDK_BUILD_PATH)/tools/windows/sed else + SED := sed endif ifndef GSTREAMER_ANDROID_MODULE_NAME @@ -218,10 +208,10 @@ genstatic_$(TARGET_ARCH_ABI): @$(HOST_ECHO) "GStreamer : [GEN] => $(PRIV_C)" @$(call host-mkdir,$(PRIV_B_DIR)) @$(call host-cp,$(PRIV_C_IN),$(PRIV_C)) - @$(HOST_SED) -i "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" $(PRIV_C) - @$(HOST_SED) -i "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" $(PRIV_C) - @$(HOST_SED) -i "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" $(PRIV_C) - @$(HOST_SED) -i "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" $(PRIV_C) + @$(SED) -i "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" $(PRIV_C) + @$(SED) -i "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" $(PRIV_C) + @$(SED) -i "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" $(PRIV_C) + @$(SED) -i "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" $(PRIV_C) # Compile the source file $(GSTREAMER_ANDROID_O): PRIV_C := $(GSTREAMER_ANDROID_C) @@ -247,19 +237,19 @@ copyjavasource_$(TARGET_ARCH_ABI): @$(foreach file,$(GSTREAMER_PLUGINS_CLASSES), \ $(call host-cp,$(GSTREAMER_NDK_BUILD_PATH)$(file),$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/$(file)) && ) echo Done cp ifeq ($(GSTREAMER_INCLUDE_FONTS),yes) - @$(HOST_SED) -i "s;@INCLUDE_FONTS@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java + @$(SED) -i "s;@INCLUDE_FONTS@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java else - @$(HOST_SED) -i "s;@INCLUDE_FONTS@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java + @$(SED) -i "s;@INCLUDE_FONTS@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java endif ifeq ($(GSTREAMER_INCLUDE_CA_CERTIFICATES),yes) - @$(HOST_SED) -i "s;@INCLUDE_CA_CERTIFICATES@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java + @$(SED) -i "s;@INCLUDE_CA_CERTIFICATES@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java else - @$(HOST_SED) -i "s;@INCLUDE_CA_CERTIFICATES@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java + @$(SED) -i "s;@INCLUDE_CA_CERTIFICATES@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java endif ifneq (,$(findstring yes,$(GSTREAMER_INCLUDE_FONTS)$(GSTREAMER_INCLUDE_CA_CERTIFICATES))) - @$(HOST_SED) -i "s;@INCLUDE_COPY_FILE@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java + @$(SED) -i "s;@INCLUDE_COPY_FILE@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java else - @$(HOST_SED) -i "s;@INCLUDE_COPY_FILE@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java + @$(SED) -i "s;@INCLUDE_COPY_FILE@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java endif copyfontsres_$(TARGET_ARCH_ABI): diff --git a/data/ndk-build/tools.mk b/data/ndk-build/tools.mk index c8f5a05d..5aa46889 100644 --- a/data/ndk-build/tools.mk +++ b/data/ndk-build/tools.mk @@ -61,7 +61,7 @@ pkg-config-get-libs = \ pkg-config-get-libs-no-deps = \ $(eval __tmpvar.libs := ) \ $(foreach package,$1,\ - $(eval __tmpvar.libs += $(shell $(HOST_SED) -n 's/^Libs: \(.*\)/\1/p' $(GSTREAMER_ROOT)/lib/pkgconfig/$(package).pc)))\ + $(eval __tmpvar.libs += $(shell $(SED) -n 's/^Libs: \(.*\)/\1/p' $(GSTREAMER_ROOT)/lib/pkgconfig/$(package).pc)))\ $(filter -l%, $(__tmpvar.libs)) # ----------------------------------------------------------------------------- @@ -71,7 +71,7 @@ pkg-config-get-libs-no-deps = \ # Usage : $(call pkg-config-get-prefix,) # ----------------------------------------------------------------------------- pkg-config-get-prefix = \ - $(shell $(HOST_SED) -n 's/^prefix=\(.*\)/\1/p' $(GSTREAMER_ROOT)/lib/pkgconfig/$1.pc) + $(shell $(SED) -n 's/^prefix=\(.*\)/\1/p' $(GSTREAMER_ROOT)/lib/pkgconfig/$1.pc) # ----------------------------------------------------------------------------- # Function : libtool-whole-archive @@ -259,10 +259,10 @@ libtool-get-search-paths = \ $(filter -L%,$1) libtool-get-dependency-libs = \ - $(shell $(HOST_SED) -n "s/^dependency_libs='\(.*\)'/\1/p" $1) + $(shell $(SED) -n "s/^dependency_libs='\(.*\)'/\1/p" $1) libtool-replace-prefixes = \ $(subst $(BUILD_PREFIX),$(GSTREAMER_ROOT),$1 ) libtool-get-static-library = \ - $(shell $(HOST_SED) -n "s/^old_library='\(.*\)'/\1/p" $1) + $(shell $(SED) -n "s/^old_library='\(.*\)'/\1/p" $1) -- cgit v1.2.3