aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timothy Redaelli <drizzt@gentoo.org> 2006-12-28 16:27:17 +0000
committerAvatar Timothy Redaelli <drizzt@gentoo.org> 2006-12-28 16:27:17 +0000
commit1576fd24b9bb38e6a7ed1d9ad74e27e5bde5d31d (patch)
treee79d9580ebfcccaaf8dacefedc8b8ee4b0ddbfed
parenta659cffe4e82e6f89c1570781d4c6bf9d4788360 (diff)
downloadpaludis-1576fd24b9bb38e6a7ed1d9ad74e27e5bde5d31d.tar.gz
paludis-1576fd24b9bb38e6a7ed1d9ad74e27e5bde5d31d.tar.xz
Add make, awk and patch wrapper to make sure to use the GNU ones
-rw-r--r--configure.ac48
-rw-r--r--ebuild/utils/Makefile.am25
-rw-r--r--ebuild/utils/awk.in2
-rw-r--r--ebuild/utils/make.in2
-rw-r--r--ebuild/utils/patch.in2
-rw-r--r--[-rwxr-xr-x]ebuild/utils/sed.in2
6 files changed, 77 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9b2aa8c..3d72ee4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -743,10 +743,12 @@ AC_SUBST([BUILD_CLIENTS])
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_CACHE_VAL(paludis_need_sed_wrapper,[sed --version &>/dev/null || paludis_need_sed_wrapper=yes])
+AM_CONDITIONAL([NEED_SED_WRAPPER], test x$paludis_need_sed_wrapper = "xyes")
+if test x$paludis_need_sed_wrapper = "xyes"; then
AC_DEFINE([NEED_SED_WRAPPER], 1, [Do we need sed wrapper?])
AC_MSG_RESULT([yes])
else
@@ -755,6 +757,48 @@ else
fi
dnl }}}
+dnl {{{ is awk gnu awk
+AC_MSG_CHECKING([if we need an awk wrapper])
+AC_SUBST([NEED_AWK_WRAPPER])
+AC_CACHE_VAL(paludis_need_awk_wrapper,[awk --version &>/dev/null || paludis_need_awk_wrapper=yes])
+AM_CONDITIONAL([NEED_AWK_WRAPPER], test x$paludis_need_awk_wrapper = "xyes")
+if test x$paludis_need_awk_wrapper = "xyes"; then
+ AC_DEFINE([NEED_AWK_WRAPPER], 1, [Do we need awk wrapper?])
+ AC_MSG_RESULT([yes])
+else
+ AC_DEFINE([NEED_AWK_WRAPPER], 0)
+ AC_MSG_RESULT([no])
+fi
+dnl }}}
+
+dnl {{{ is make gnu make
+AC_MSG_CHECKING([if we need a make wrapper])
+AC_SUBST([NEED_MAKE_WRAPPER])
+AC_CACHE_VAL(paludis_need_make_wrapper,[make --version &>/dev/null || paludis_need_make_wrapper=yes])
+AM_CONDITIONAL([NEED_MAKE_WRAPPER], test x$paludis_need_make_wrapper = "xyes")
+if test x$paludis_need_make_wrapper = "xyes"; then
+ AC_DEFINE([NEED_MAKE_WRAPPER], 1, [Do we need make wrapper?])
+ AC_MSG_RESULT([yes])
+else
+ AC_DEFINE([NEED_MAKE_WRAPPER], 0)
+ AC_MSG_RESULT([no])
+fi
+dnl }}}
+
+dnl {{{ is patch gnu patch
+AC_MSG_CHECKING([if we need a patch wrapper])
+AC_SUBST([NEED_PATCH_WRAPPER])
+AC_CACHE_VAL(paludis_need_patch_wrapper,[patch -g0 < /dev/null &>/dev/null || paludis_need_patch_wrapper=yes])
+AM_CONDITIONAL([NEED_PATCH_WRAPPER], test x$paludis_need_patch_wrapper = "xyes")
+if test x$paludis_need_patch_wrapper = "xyes"; then
+ AC_DEFINE([NEED_PATCH_WRAPPER], 1, [Do we need patch wrapper?])
+ AC_MSG_RESULT([yes])
+else
+ AC_DEFINE([NEED_PATCH_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 c098a09..0791f77 100644
--- a/ebuild/utils/Makefile.am
+++ b/ebuild/utils/Makefile.am
@@ -2,8 +2,22 @@ MAINTAINERCLEANFILES = Makefile.in
libexecprogdir = $(libexecdir)/paludis/utils
+libexecprog_SCRIPTS_extra =
+
if NEED_SED_WRAPPER
-libexecprog_SCRIPTS_extra = sed
+libexecprog_SCRIPTS_extra += sed
+endif
+
+if NEED_AWK_WRAPPER
+libexecprog_SCRIPTS_extra += awk
+endif
+
+if NEED_MAKE_WRAPPER
+libexecprog_SCRIPTS_extra += make
+endif
+
+if NEED_PATCH_WRAPPER
+libexecprog_SCRIPTS_extra += patch
endif
libexecprog_SCRIPTS = \
@@ -89,6 +103,15 @@ dolib.a : dolib.a.in
sed : sed.in
cat $< > $@
+awk: awk.in
+ cat $< > $@
+
+make: make.in
+ cat $< > $@
+
+patch: patch.in
+ cat $< > $@
+
$(prep_scripts) : prep.in
cat $< > $@
diff --git a/ebuild/utils/awk.in b/ebuild/utils/awk.in
new file mode 100644
index 0000000..da814c3
--- /dev/null
+++ b/ebuild/utils/awk.in
@@ -0,0 +1,2 @@
+#!/bin/bash
+gawk "$@"
diff --git a/ebuild/utils/make.in b/ebuild/utils/make.in
new file mode 100644
index 0000000..0b03c26
--- /dev/null
+++ b/ebuild/utils/make.in
@@ -0,0 +1,2 @@
+#!/bin/bash
+gmake "$@"
diff --git a/ebuild/utils/patch.in b/ebuild/utils/patch.in
new file mode 100644
index 0000000..f6b1394
--- /dev/null
+++ b/ebuild/utils/patch.in
@@ -0,0 +1,2 @@
+#!/bin/bash
+gpatch "$@"
diff --git a/ebuild/utils/sed.in b/ebuild/utils/sed.in
index 8be311a..1077e99 100755..100644
--- a/ebuild/utils/sed.in
+++ b/ebuild/utils/sed.in
@@ -1,2 +1,2 @@
#!/bin/bash
-gsed $@
+gsed "$@"