From 4a075bb5cb7d01545e8835a7c37506d831665d16 Mon Sep 17 00:00:00 2001 From: des Date: Tue, 6 May 2008 11:52:45 +0000 Subject: Better version of the previous commit, with an unconditional patch this time. The patch has been submitted upstream. --- shells/zsh/Makefile | 9 ++---- shells/zsh/files/extra-patch-ncurses | 58 ---------------------------------- shells/zsh/files/patch-ncurses | 60 ++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 65 deletions(-) delete mode 100644 shells/zsh/files/extra-patch-ncurses create mode 100644 shells/zsh/files/patch-ncurses (limited to 'shells') diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile index 7172e8c95c7f..48182f50650e 100644 --- a/shells/zsh/Makefile +++ b/shells/zsh/Makefile @@ -35,7 +35,7 @@ ZSH_VER= ${PORTVERSION} USE_BZIP2= yes USE_ICONV= yes -USE_AUTOTOOLS= autoconf:261:env +USE_AUTOTOOLS= autoconf:261 GNU_CONFIGURE= yes USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME} @@ -73,11 +73,6 @@ SHELLS= /etc/shells .include -.if ${OSVERSION} < 602107 -# also needed for early versions of 7.0-CURRENT, but we don't care -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ncurses -.endif - .if defined(WITH_ZSH_PCRE) CONFIGURE_ARGS+= --enable-pcre LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre @@ -109,7 +104,7 @@ CONFIGURE_ARGS+= --enable-multibyte .endif .if ${OSVERSION} >= 503000 -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsdtar +EXTRA_PATCHES= ${FILESDIR}/extra-patch-bsdtar .endif post-patch: diff --git a/shells/zsh/files/extra-patch-ncurses b/shells/zsh/files/extra-patch-ncurses deleted file mode 100644 index f0a1bc2c7f28..000000000000 --- a/shells/zsh/files/extra-patch-ncurses +++ /dev/null @@ -1,58 +0,0 @@ ---- configure.ac.orig 2008-03-28 12:49:32.000000000 +0100 -+++ configure.ac 2008-05-05 09:47:30.860369561 +0200 -@@ -669,20 +669,20 @@ - termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;; - esac])dnl - --AH_TEMPLATE([ZSH_CURSES_NEEDS_XOPEN], --[Define if the curses libraries need _XOPEN_SOURCE_EXTENDED defined]) --AC_CACHE_CHECK(if the curses library needs _XOPEN_SOURCE_EXTENDED, --zsh_cv_curses_needs_xopen, -+AH_TEMPLATE([ZSH_NO_XOPEN], -+[Define if _XOPEN_SOURCE_EXTENDED should not be defined to avoid clashes]) -+AC_CACHE_CHECK(if _XOPEN_SOURCE_EXTENDED should not be defined, -+zsh_cv_no_xopen, - [case "$host_os" in -- *openbsd*) -- zsh_cv_curses_needs_xopen=no -+ *openbsd*|*freebsd*) -+ zsh_cv_no_xopen=yes - ;; - *) -- zsh_cv_curses_needs_xopen=yes -+ zsh_cv_no_xopen=no - ;; - esac]) --if test x$zsh_cv_curses_needs_xopen = xyes; then -- AC_DEFINE(ZSH_CURSES_NEEDS_XOPEN) -+if test x$zsh_cv_no_xopen = xyes; then -+ AC_DEFINE(ZSH_NO_XOPEN) - fi - - dnl Check for tigetflag (terminfo) before tgetent (termcap). ---- Src/system.h.orig 2007-12-14 13:43:33.000000000 +0100 -+++ Src/system.h 2008-05-05 09:50:17.333164563 +0200 -@@ -52,9 +52,20 @@ - # undef HAVE_SYS_UTSNAME_H - #endif - --#if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN) --#define _XOPEN_SOURCE_EXTENDED 1 --#endif -+#ifndef ZSH_NO_XOPEN -+# ifdef ZSH_CURSES_SOURCE -+# define _XOPEN_SOURCE_EXTENDED 1 -+# else -+# ifdef MULTIBYTE_SUPPORT -+/* -+ * Needed for wcwidth() which is part of XSI. -+ * Various other uses of the interface mean we can't get away with just -+ * _XOPEN_SOURCE. -+ */ -+# define _XOPEN_SOURCE_EXTENDED 1 -+# endif /* MULTIBYTE_SUPPORT */ -+# endif /* ZSH_CURSES_SOURCE */ -+#endif /* ZSH_NO_XOPEN */ - - /* - * Solaris by default zeroes all elements of the tm structure in diff --git a/shells/zsh/files/patch-ncurses b/shells/zsh/files/patch-ncurses new file mode 100644 index 000000000000..6a84cac3a901 --- /dev/null +++ b/shells/zsh/files/patch-ncurses @@ -0,0 +1,60 @@ +--- configure.ac.orig 2008-03-28 12:49:32.000000000 +0100 ++++ configure.ac 2008-05-05 09:47:30.860369561 +0200 +@@ -669,20 +669,20 @@ + termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;; + esac])dnl + +-AH_TEMPLATE([ZSH_CURSES_NEEDS_XOPEN], +-[Define if the curses libraries need _XOPEN_SOURCE_EXTENDED defined]) +-AC_CACHE_CHECK(if the curses library needs _XOPEN_SOURCE_EXTENDED, +-zsh_cv_curses_needs_xopen, ++AH_TEMPLATE([ZSH_NO_XOPEN], ++[Define if _XOPEN_SOURCE_EXTENDED should not be defined to avoid clashes]) ++AC_CACHE_CHECK(if _XOPEN_SOURCE_EXTENDED should not be defined, ++zsh_cv_no_xopen, +-[case "$host_os" in +- *openbsd*) +- zsh_cv_curses_needs_xopen=no ++[[case "$host_os" in ++ *openbsd*|*freebsd5*|*freebsd6.[012]*) ++ zsh_cv_no_xopen=yes + ;; + *) +- zsh_cv_curses_needs_xopen=yes ++ zsh_cv_no_xopen=no + ;; +-esac]) ++esac]]) +-if test x$zsh_cv_curses_needs_xopen = xyes; then +- AC_DEFINE(ZSH_CURSES_NEEDS_XOPEN) ++if test x$zsh_cv_no_xopen = xyes; then ++ AC_DEFINE(ZSH_NO_XOPEN) + fi + + dnl Check for tigetflag (terminfo) before tgetent (termcap). +--- Src/system.h.orig 2007-12-14 13:43:33.000000000 +0100 ++++ Src/system.h 2008-05-05 09:50:17.333164563 +0200 +@@ -52,9 +52,20 @@ + # undef HAVE_SYS_UTSNAME_H + #endif + +-#if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN) +-#define _XOPEN_SOURCE_EXTENDED 1 +-#endif ++#ifndef ZSH_NO_XOPEN ++# ifdef ZSH_CURSES_SOURCE ++# define _XOPEN_SOURCE_EXTENDED 1 ++# else ++# ifdef MULTIBYTE_SUPPORT ++/* ++ * Needed for wcwidth() which is part of XSI. ++ * Various other uses of the interface mean we can't get away with just ++ * _XOPEN_SOURCE. ++ */ ++# define _XOPEN_SOURCE_EXTENDED 1 ++# endif /* MULTIBYTE_SUPPORT */ ++# endif /* ZSH_CURSES_SOURCE */ ++#endif /* ZSH_NO_XOPEN */ + + /* + * Solaris by default zeroes all elements of the tm structure in -- cgit