Commit 705ee955 authored by Sean McGovern's avatar Sean McGovern Committed by Rafaël Carré

tools: add GNU sed

Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent e3b2ec7e
...@@ -32,6 +32,17 @@ then ...@@ -32,6 +32,17 @@ then
fi 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() { check() {
if ! $1 --version >/dev/null 2>&1 if ! $1 --version >/dev/null 2>&1
then then
...@@ -63,6 +74,7 @@ check cmake ...@@ -63,6 +74,7 @@ check cmake
check yasm check yasm
check_tar check_tar
check ragel check ragel
check_sed
[ -n "$NEEDED" ] && mkdir -p build/ [ -n "$NEEDED" ] && mkdir -p build/
......
...@@ -37,3 +37,6 @@ GAS_URL=http://git.libav.org/?p=gas-preprocessor.git;a=snapshot;h=$(GAS_VERSION) ...@@ -37,3 +37,6 @@ GAS_URL=http://git.libav.org/?p=gas-preprocessor.git;a=snapshot;h=$(GAS_VERSION)
RAGEL_VERSION=6.8 RAGEL_VERSION=6.8
RAGEL_URL=http://www.complang.org/ragel/ragel-$(RAGEL_VERSION).tar.gz 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
...@@ -248,6 +248,23 @@ CLEAN_FILE += .ragel ...@@ -248,6 +248,23 @@ CLEAN_FILE += .ragel
CLEAN_PKG += ragel CLEAN_PKG += ragel
DISTCLEAN_PKG += ragel-$(RAGEL_VERSION).tar.gz 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
# #
# #
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment