summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/ed/files/ed-0.5-build.patch')
-rw-r--r--sys-apps/ed/files/ed-0.5-build.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/sys-apps/ed/files/ed-0.5-build.patch b/sys-apps/ed/files/ed-0.5-build.patch
new file mode 100644
index 000000000000..c7d6ee5c2c9f
--- /dev/null
+++ b/sys-apps/ed/files/ed-0.5-build.patch
@@ -0,0 +1,68 @@
+2007-04-16 Mike Frysinger <vapier@gentoo.org>
+
+ * Clean locale vars from environment to maintain a sane state.
+ * Do not set CC/CXX/CPPFLAGS/LDFLAGS to "" so that user can
+ override if they so choose.
+ * Only set CFLAGS/CXXFLAGS if user did not specify any.
+
+--- ed/configure
++++ ed/configure
+@@ -14,6 +14,19 @@
+ progversion=0.5
+ srctrigger=ed.h
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ unset $as_var
++ fi
++done
++
+ # clear some things potentially inherited from environment.
+ srcdir=
+ prefix=/usr/local
+@@ -23,12 +36,6 @@
+ infodir='$(datadir)/info'
+ mandir='$(datadir)/man'
+ sysconfdir='$(prefix)/etc'
+-CC=
+-CXX=
+-CPPFLAGS=
+-CFLAGS='-Wall -W -O2'
+-CXXFLAGS='-Wall -W -O2'
+-LDFLAGS=
+
+ # Loop over all args
+ while [ x"$1" != x ] ; do
+@@ -102,6 +109,14 @@
+ esac
+ done
+
++# Defaults if the user did not select any
++if [ x"${CFLAGS}" = x ] ; then
++ CFLAGS='-Wall -W -O2'
++fi
++if [ x"${CXXFLAGS}" = x ] ; then
++ CXXFLAGS='-Wall -W -O2'
++fi
++
+ # Find the source files, if location was not specified.
+ srcdirtext=
+ if [ x"${srcdir}" = x ] ; then
+--- ed/Makefile.in
++++ ed/Makefile.in
+@@ -48,7 +48,7 @@
+ if test ! -d $(DESTDIR)$(bindir) ; then $(INSTALL) -d $(DESTDIR)$(bindir) ; fi
+ $(INSTALL_PROGRAM) ./$(progname) $(DESTDIR)$(bindir)/$(progname)
+ -rm -f $(DESTDIR)$(bindir)/r$(progname)
+- cd $(DESTDIR)$(bindir) ; ln $(progname) r$(progname)
++ cd $(DESTDIR)$(bindir) ; ln -s $(progname) r$(progname)
+
+ install-info :
+ if test ! -d $(DESTDIR)$(infodir) ; then $(INSTALL) -d $(DESTDIR)$(infodir) ; fi