[vlc-commits] tools: add GNU sed
Sean McGovern
git at videolan.org
Sun Mar 23 01:03:44 CET 2014
vlc | branch: master | Sean McGovern <gseanmcg at gmail.com> | Tue Mar 11 15:12:36 2014 -0400| [705ee955b8b3a9b81685185b4da8be08face8ff0] | committer: Rafaël Carré
tools: add GNU sed
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=705ee955b8b3a9b81685185b4da8be08face8ff0
---
extras/tools/bootstrap | 12 ++++++++++++
extras/tools/packages.mak | 3 +++
extras/tools/tools.mak | 17 +++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/extras/tools/bootstrap b/extras/tools/bootstrap
index 578d8e6..0133d66 100755
--- a/extras/tools/bootstrap
+++ b/extras/tools/bootstrap
@@ -32,6 +32,17 @@ then
fi
}
+check_sed() {
+tmp="`pwd`/check_sed"
+trap "rm $tmp" EXIT
+echo "test file for GNU sed" > $tmp
+if ! sed -i -e 's/sed//' $tmp >/dev/null 2>&1
+then
+ echo "sed doesn't do in-place editing (-i option)"
+ NEEDED="$NEEDED .sed"
+fi
+}
+
check() {
if ! $1 --version >/dev/null 2>&1
then
@@ -63,6 +74,7 @@ check cmake
check yasm
check_tar
check ragel
+check_sed
[ -n "$NEEDED" ] && mkdir -p build/
diff --git a/extras/tools/packages.mak b/extras/tools/packages.mak
index a4ce1db..9e3d3d3 100644
--- a/extras/tools/packages.mak
+++ b/extras/tools/packages.mak
@@ -37,3 +37,6 @@ GAS_URL=http://git.libav.org/?p=gas-preprocessor.git;a=snapshot;h=$(GAS_VERSION)
RAGEL_VERSION=6.8
RAGEL_URL=http://www.complang.org/ragel/ragel-$(RAGEL_VERSION).tar.gz
+
+SED_VERSION=4.2.2
+SED_URL=$(GNU)/sed/sed-$(SED_VERSION).tar.bz2
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index ab7a404..3c20446 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -248,6 +248,23 @@ CLEAN_FILE += .ragel
CLEAN_PKG += ragel
DISTCLEAN_PKG += ragel-$(RAGEL_VERSION).tar.gz
+# GNU sed
+
+sed-$(SED_VERSION).tar.bz2:
+ $(call download,$(SED_URL))
+
+sed: sed-$(SED_VERSION).tar.bz2
+ $(UNPACK)
+ $(MOVE)
+
+.sed: sed
+ (cd $<; ./configure --prefix=$(PREFIX) && $(MAKE) && $(MAKE) install)
+ touch $@
+
+CLEAN_PKG += sed
+DISTCLEAN_PKG += sed-$(SED_VERSION).tar.bz2
+CLEAN_FILE += .sed
+
#
#
#
More information about the vlc-commits
mailing list