aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Robert S. Gerus <arachnist@gmail.com> 2006-05-24 11:02:20 +0000
committerAvatar Robert S. Gerus <arachnist@gmail.com> 2006-05-24 11:02:20 +0000
commitffb8cef8fdb03cef8d7d7f517ef9e2b8a414948f (patch)
tree7664c6e466df82ff0bb7cc65d4a4f299f1388ede
parent30916ed405874988d66b313abf1e4fd3fd8d8b86 (diff)
downloadpaludis-ffb8cef8fdb03cef8d7d7f517ef9e2b8a414948f.tar.gz
paludis-ffb8cef8fdb03cef8d7d7f517ef9e2b8a414948f.tar.xz
Add sed wrapper script which calls gsed. Installed only if sed isn't gnu sed.
-rw-r--r--configure.ac13
-rw-r--r--ebuild/utils/Makefile.am7
-rw-r--r--ebuild/utils/sed2
3 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 737ebca..90c5dbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -347,6 +347,19 @@ else
fi
dnl }}}
+dnl {{{ is sed gnu sed
+AC_MSG_CHECKING([if we need a sed wrapper])
+AC_SUBST([NEED_SED_WRAPPER])
+AM_CONDITIONAL([NEED_SED_WRAPPER], test x`sed --version &>/dev/null || echo yes` = "xyes")
+if test x`sed --version &>/dev/null || echo yes` = "xyes"; then
+ AC_DEFINE([NEED_SED_WRAPPER], 1, [Do we need sed wrapper?])
+ AC_MSG_RESULT([yes])
+else
+ AC_DEFINE([NEED_SED_WRAPPER], 0)
+ AC_MSG_RESULT([no])
+fi
+dnl }}}
+
dnl {{{ built sources
GENERATED_FILE=misc/generated-file.txt
AC_SUBST_FILE(GENERATED_FILE)
diff --git a/ebuild/utils/Makefile.am b/ebuild/utils/Makefile.am
index d9fae96..9540389 100644
--- a/ebuild/utils/Makefile.am
+++ b/ebuild/utils/Makefile.am
@@ -3,6 +3,10 @@ CLEANFILES = *~ newlib.so newlib.a dolib.so dolib.a
libexecprogdir = $(libexecdir)/paludis/utils
+if NEED_SED_WRAPPER
+libexecprog_SCRIPTS_extra = sed
+endif
+
libexecprog_SCRIPTS = \
dobin \
doconfd \
@@ -38,7 +42,8 @@ libexecprog_SCRIPTS = \
newlib.so \
newman \
newsbin \
- unmerge
+ unmerge \
+ $(libexecprog_SCRIPTS_extra)
TESTS_ENVIRONMENT = env \
PALUDIS_EBUILD_DIR="$(top_srcdir)/ebuild/" \
diff --git a/ebuild/utils/sed b/ebuild/utils/sed
new file mode 100644
index 0000000..8be311a
--- /dev/null
+++ b/ebuild/utils/sed
@@ -0,0 +1,2 @@
+#!/bin/bash
+gsed $@