diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-06-06 14:40:49 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-06-07 10:04:14 +0300 |
commit | e928fda421a49b107b13c8e3913d4686c684f789 (patch) | |
tree | 6e5dc2d53da947a5dc438eac76108b3907a64d8a /data/ndk-build | |
parent | 577f883fab66a0af27ffe2dc24d2bc6a1b2f9806 (diff) |
android: Don't use 'sed -i' to be compatible with BSD sed
Based on a patch by Milos Pesic <msg4misa@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=767096
Diffstat (limited to 'data/ndk-build')
-rwxr-xr-x | data/ndk-build/gstreamer-1.0.mk | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/data/ndk-build/gstreamer-1.0.mk b/data/ndk-build/gstreamer-1.0.mk index 2d96e7ab..8f0bc091 100755 --- a/data/ndk-build/gstreamer-1.0.mk +++ b/data/ndk-build/gstreamer-1.0.mk @@ -207,11 +207,11 @@ genstatic_$(TARGET_ARCH_ABI): PRIV_G_R := $(G_IO_MODULES_DECLARE) genstatic_$(TARGET_ARCH_ABI): @$(HOST_ECHO) "GStreamer : [GEN] => $(PRIV_C)" @$(call host-mkdir,$(PRIV_B_DIR)) - @$(call host-cp,$(PRIV_C_IN),$(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) + cat $(PRIV_C_IN) | \ + $(SED) "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" | \ + $(SED) "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" | \ + $(SED) "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" | \ + $(SED) "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" > $(PRIV_C) # Compile the source file $(GSTREAMER_ANDROID_O): PRIV_C := $(GSTREAMER_ANDROID_C) @@ -229,29 +229,37 @@ buildsharedlibrary_$(TARGET_ARCH_ABI): $(GSTREAMER_ANDROID_O) @$(HOST_ECHO) "GStreamer : [LINK] => $(PRIV_SO)" @$(PRIV_CMD) -copyjavasource_$(TARGET_ARCH_ABI): - @$(call host-mkdir,$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer) - @$(call host-cp,$(GSTREAMER_NDK_BUILD_PATH)/GStreamer.java,$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer) - @$(foreach plugin,$(GSTREAMER_PLUGINS_WITH_CLASSES), \ - $(call host-mkdir,$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/$(plugin)) && ) echo Done mkdir - @$(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) - @$(SED) -i "s;@INCLUDE_FONTS@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java +GSTREAMER_INCLUDE_FONTS_SUBST="" else - @$(SED) -i "s;@INCLUDE_FONTS@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java +GSTREAMER_INCLUDE_FONTS_SUBST="//" endif + ifeq ($(GSTREAMER_INCLUDE_CA_CERTIFICATES),yes) - @$(SED) -i "s;@INCLUDE_CA_CERTIFICATES@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java +GSTREAMER_INCLUDE_CA_CERTIFICATES_SUBST="" else - @$(SED) -i "s;@INCLUDE_CA_CERTIFICATES@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java +GSTREAMER_INCLUDE_CA_CERTIFICATES_SUBST="//" endif + ifneq (,$(findstring yes,$(GSTREAMER_INCLUDE_FONTS)$(GSTREAMER_INCLUDE_CA_CERTIFICATES))) - @$(SED) -i "s;@INCLUDE_COPY_FILE@;;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java +GSTREAMER_COPY_FILE_SUBST="" else - @$(SED) -i "s;@INCLUDE_COPY_FILE@;//;g" $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java +GSTREAMER_COPY_FILE_SUBST="//" endif +copyjavasource_$(TARGET_ARCH_ABI): + @$(call host-mkdir,$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer) + @$(foreach plugin,$(GSTREAMER_PLUGINS_WITH_CLASSES), \ + $(call host-mkdir,$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/$(plugin)) && ) echo Done mkdir + @$(foreach file,$(GSTREAMER_PLUGINS_CLASSES), \ + $(call host-cp,$(GSTREAMER_NDK_BUILD_PATH)$(file),$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/$(file)) && ) echo Done cp + + cat $(GSTREAMER_NDK_BUILD_PATH)/GStreamer.java | \ + $(SED) "s;@INCLUDE_FONTS@;//;g" | \ + $(SED) "s;@INCLUDE_CA_CERTIFICATES@;//;g" | \ + $(SED) "s;@INCLUDE_COPY_FILE@;//;g" \ + > $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java + copyfontsres_$(TARGET_ARCH_ABI): @$(call host-mkdir,assets/fontconfig) @$(call host-mkdir,assets/fontconfig/fonts/truetype/) |