diff options
Diffstat (limited to 'meta-oe/recipes-extended/zsh/files')
-rw-r--r-- | meta-oe/recipes-extended/zsh/files/configure.ac.patch | 172 | ||||
-rw-r--r-- | meta-oe/recipes-extended/zsh/files/dot.zshrc | 16 | ||||
-rw-r--r-- | meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch | 49 | ||||
-rw-r--r-- | meta-oe/recipes-extended/zsh/files/zprofile | 6 | ||||
-rw-r--r-- | meta-oe/recipes-extended/zsh/files/zsh_profile.sh | 5 | ||||
-rw-r--r-- | meta-oe/recipes-extended/zsh/files/zshrc | 45 |
6 files changed, 293 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/zsh/files/configure.ac.patch b/meta-oe/recipes-extended/zsh/files/configure.ac.patch new file mode 100644 index 0000000000..8e479cd23c --- /dev/null +++ b/meta-oe/recipes-extended/zsh/files/configure.ac.patch @@ -0,0 +1,172 @@ +diff --git a/aclocal.m4 b/acinclude.m4 +similarity index 98% +rename from aclocal.m4 +rename to acinclude.m4 +index e91be3c0d..26e0ae228 100644 +--- a/aclocal.m4 ++++ b/acinclude.m4 +@@ -52,7 +52,7 @@ case "x$fp_cv_prog_cc_stdc" in + esac + ]) + +-AC_DEFUN(AC_PROG_LN, ++AC_DEFUN([AC_PROG_LN], + [AC_MSG_CHECKING(whether ln works) + AC_CACHE_VAL(ac_cv_prog_LN, + [rm -f conftestdata conftestlink +@@ -64,14 +64,14 @@ then + else + rm -f conftestdata + ac_cv_prog_LN="cp" +-fi])dnl ++fi]) + LN="$ac_cv_prog_LN" + if test "$ac_cv_prog_LN" = "ln"; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi +-AC_SUBST(LN)dnl ++AC_SUBST(LN) + ]) + + builtin(include, aczsh.m4) +diff --git a/aczsh.m4 b/aczsh.m4 +index 0219ae2fb..3eb1ac6fc 100644 +--- a/aczsh.m4 ++++ b/aczsh.m4 +@@ -38,7 +38,7 @@ dnl This macro does not produce messages as it may be run several times + dnl before finding the right type. + dnl + +-AC_DEFUN(zsh_64_BIT_TYPE, ++AC_DEFUN([zsh_64_BIT_TYPE], + [AC_TRY_RUN([ + #ifdef HAVE_SYS_TYPES_H + #include <sys/types.h> +@@ -67,7 +67,7 @@ dnl + dnl Usage: zsh_SHARED_FUNCTION(name[,rettype[,paramtype]]) + dnl + +-AC_DEFUN(zsh_SHARED_FUNCTION, ++AC_DEFUN([zsh_SHARED_FUNCTION], + [zsh_SHARED_SYMBOL($1, ifelse([$2], ,[int ],[$2]) $1 [(]ifelse([$3], ,[ ],[$3])[)], $1)]) + + dnl +@@ -78,7 +78,7 @@ dnl + dnl Usage: zsh_SHARED_VARIABLE(name[,type]) + dnl + +-AC_DEFUN(zsh_SHARED_VARIABLE, ++AC_DEFUN([zsh_SHARED_VARIABLE], + [zsh_SHARED_SYMBOL($1, ifelse([$2], ,[int ],[$2]) $1, [&$1])]) + + dnl +@@ -94,7 +94,7 @@ dnl Usage: zsh_SHARED_SYMBOL(name,declaration,address) + dnl Sets zsh_cv_shared_$1 cache variable to yes/no + dnl + +-AC_DEFUN(zsh_SHARED_SYMBOL, ++AC_DEFUN([zsh_SHARED_SYMBOL], + [AC_CACHE_CHECK([if $1 is available in shared libraries], + zsh_cv_shared_$1, + [if test "$zsh_cv_func_dlsym_needs_underscore" = yes; then +@@ -184,7 +184,7 @@ dnl zsh_SYS_DYNAMIC_CLASH + dnl Check whether symbol name clashes in shared libraries are acceptable. + dnl + +-AC_DEFUN(zsh_SYS_DYNAMIC_CLASH, ++AC_DEFUN([zsh_SYS_DYNAMIC_CLASH], + [AC_CACHE_CHECK([if name clashes in shared objects are OK], + zsh_cv_sys_dynamic_clash_ok, + [if test "$zsh_cv_func_dlsym_needs_underscore" = yes; then +@@ -259,7 +259,7 @@ dnl Check whether symbols in one dynamically loaded library are + dnl available to another dynamically loaded library. + dnl + +-AC_DEFUN(zsh_SYS_DYNAMIC_GLOBAL, ++AC_DEFUN([zsh_SYS_DYNAMIC_GLOBAL], + [AC_CACHE_CHECK([for working RTLD_GLOBAL], + zsh_cv_sys_dynamic_rtld_global, + [if test "$zsh_cv_func_dlsym_needs_underscore" = yes; then +@@ -329,7 +329,7 @@ dnl Check whether symbols in the executable are available to dynamically + dnl loaded libraries. + dnl + +-AC_DEFUN(zsh_SYS_DYNAMIC_EXECSYMS, ++AC_DEFUN([zsh_SYS_DYNAMIC_EXECSYMS], + [AC_CACHE_CHECK([whether symbols in the executable are available], + zsh_cv_sys_dynamic_execsyms, + [if test "$zsh_cv_func_dlsym_needs_underscore" = yes; then +@@ -398,7 +398,7 @@ dnl zsh_SYS_DYNAMIC_STRIP_EXE + dnl Check whether it is safe to strip executables. + dnl + +-AC_DEFUN(zsh_SYS_DYNAMIC_STRIP_EXE, ++AC_DEFUN([zsh_SYS_DYNAMIC_STRIP_EXE], + [AC_REQUIRE([zsh_SYS_DYNAMIC_EXECSYMS]) + AC_CACHE_CHECK([whether executables can be stripped], + zsh_cv_sys_dynamic_strip_exe, +@@ -471,7 +471,7 @@ dnl zsh_SYS_DYNAMIC_STRIP_EXE + dnl Check whether it is safe to strip dynamically loaded libraries. + dnl + +-AC_DEFUN(zsh_SYS_DYNAMIC_STRIP_LIB, ++AC_DEFUN([zsh_SYS_DYNAMIC_STRIP_LIB], + [AC_CACHE_CHECK([whether libraries can be stripped], + zsh_cv_sys_dynamic_strip_lib, + [if test "$zsh_cv_func_dlsym_needs_underscore" = yes; then +@@ -535,7 +535,7 @@ dnl zsh_PATH_UTMP(filename) + dnl Search for a specified utmp-type file. + dnl + +-AC_DEFUN(zsh_PATH_UTMP, ++AC_DEFUN([zsh_PATH_UTMP], + [AC_CACHE_CHECK([for $1 file], [zsh_cv_path_$1], + [for dir in /etc /usr/etc /var/adm /usr/adm /var/run /var/log ./conftest; do + zsh_cv_path_$1=${dir}/$1 +@@ -556,7 +556,7 @@ dnl zsh_TYPE_EXISTS(#includes, type name) + dnl Check whether a specified type exists. + dnl + +-AC_DEFUN(zsh_TYPE_EXISTS, ++AC_DEFUN([zsh_TYPE_EXISTS], + [AC_CACHE_CHECK([for $2], [zsh_cv_type_exists_[]translit($2, [ ], [_])], + [AC_TRY_COMPILE([$1], [$2 testvar;], + [zsh_cv_type_exists_[]translit($2, [ ], [_])=yes], +@@ -575,7 +575,7 @@ dnl Check whether a specified aggregate type exists and contains + dnl a specified member. + dnl + +-AC_DEFUN(zsh_STRUCT_MEMBER, ++AC_DEFUN([zsh_STRUCT_MEMBER], + [AC_CACHE_CHECK([for $3 in $2], [zsh_cv_struct_member_[]translit($2, [ ], [_])_$3], + [AC_TRY_COMPILE([$1], [$2 testvar; testvar.$3;], + [zsh_cv_struct_member_[]translit($2, [ ], [_])_$3=yes], +@@ -595,7 +595,7 @@ dnl After processing this macro, the configure script may refer to + dnl and $tzsh_name, and @tzsh@ is defined for make substitutions. + dnl + +-AC_DEFUN(zsh_ARG_PROGRAM, ++AC_DEFUN([zsh_ARG_PROGRAM], + [AC_ARG_PROGRAM + # Un-double any \ or $ (doubled by AC_ARG_PROGRAM). + cat <<\EOF_SED > conftestsed +@@ -613,7 +613,7 @@ rm -f conftestsed + AC_SUBST(tzsh)dnl + ]) + +-AC_DEFUN(zsh_COMPILE_FLAGS, ++AC_DEFUN([zsh_COMPILE_FLAGS], + [AC_ARG_ENABLE(cppflags, + AC_HELP_STRING([--enable-cppflags=...], [specify C preprocessor flags]), + if test "$enableval" = "yes" +@@ -669,7 +669,7 @@ AC_DEFUN([zsh_CHECK_SOCKLEN_T],[ + ) + + dnl Check for limit $1 e.g. RLIMIT_RSS. +-AC_DEFUN(zsh_LIMIT_PRESENT, ++AC_DEFUN([zsh_LIMIT_PRESENT], + [AH_TEMPLATE([HAVE_]$1, + [Define to 1 if ]$1[ is present (whether or not as a macro).]) + AC_CACHE_CHECK([for limit $1], diff --git a/meta-oe/recipes-extended/zsh/files/dot.zshrc b/meta-oe/recipes-extended/zsh/files/dot.zshrc new file mode 100644 index 0000000000..e7a3f3d11d --- /dev/null +++ b/meta-oe/recipes-extended/zsh/files/dot.zshrc @@ -0,0 +1,16 @@ +# ~/.zshrc: executed by zsh(1) for login shells. + +export PS1='%n@%m:%~%# ' +umask 022 + +# You may uncomment the following lines if you want `ls' to be colorized: +# export LS_OPTIONS='--color=auto' +# eval `dircolors` +# alias ls='ls $LS_OPTIONS' +# alias ll='ls $LS_OPTIONS -l' +# alias l='ls $LS_OPTIONS -lA' +# +# Some more alias to avoid making mistakes: +# alias rm='rm -i' +# alias cp='cp -i' +# alias mv='mv -i' diff --git a/meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch b/meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch new file mode 100644 index 0000000000..ebbd03f071 --- /dev/null +++ b/meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch @@ -0,0 +1,49 @@ +diff --git a/Src/Modules/pcre.mdd b/Src/Modules/pcre.mdd +index 6eb3c691b..12c10704e 100644 +--- a/Src/Modules/pcre.mdd ++++ b/Src/Modules/pcre.mdd +@@ -1,5 +1,5 @@ + name=zsh/pcre +-link=`if test x$enable_pcre = xyes && (pcre-config --version >/dev/null 2>/dev/null); then echo dynamic; else echo no; fi` ++link=`if test x$enable_pcre = xyes ; then echo dynamic; else echo no; fi` + load=no + + autofeatures="b:pcre_compile b:pcre_study b:pcre_match" +diff --git a/configure.ac b/configure.ac +index 920c2fc17..d1512291c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -671,17 +671,15 @@ AC_HEADER_TIME + AC_HEADER_STAT + AC_HEADER_SYS_WAIT + +-oldcflags="$CFLAGS" + if test x$enable_pcre = xyes; then +-AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config) +-dnl Typically (meaning on this single RedHat 9 box in front of me) +-dnl pcre-config --cflags produces a -I output which needs to go into +-dnl CPPFLAGS else configure's preprocessor tests don't pick it up, +-dnl producing a warning. +-if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then +- CPPFLAGS="$CPPFLAGS `pcre-config --cflags`" +-fi ++PKG_CHECK_MODULES(PCREPKG, [libpcre], [ ++ PCRE_LIB="${PCREPKG_LIBS}" ++ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" ++ ], [ ++ AC_MSG_ERROR([pcre not found, install the pcre-devel package or build with --disable-pcre]) ++ ]) + fi ++oldcflags="$CFLAGS" + + AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ + termios.h sys/param.h sys/filio.h string.h memory.h \ +@@ -935,7 +933,7 @@ fi + if test x$enable_pcre = xyes; then + dnl pcre-config should probably be employed here + dnl AC_SEARCH_LIBS(pcre_compile, pcre) +- LIBS="`$ac_cv_prog_PCRECONF --libs` $LIBS" ++ LIBS="$PCRE_LIB $LIBS" + fi + + dnl --------------------- diff --git a/meta-oe/recipes-extended/zsh/files/zprofile b/meta-oe/recipes-extended/zsh/files/zprofile new file mode 100644 index 0000000000..2a5d983485 --- /dev/null +++ b/meta-oe/recipes-extended/zsh/files/zprofile @@ -0,0 +1,6 @@ +# /etc/zprofile: system-wide .profile file for the Z shell (zsh(1)) + +[ -z "$PS1" ] || PS1='%n@%m:%~%# ' + +# Source the system-wide bourne .profile +. /etc/profile diff --git a/meta-oe/recipes-extended/zsh/files/zsh_profile.sh b/meta-oe/recipes-extended/zsh/files/zsh_profile.sh new file mode 100644 index 0000000000..eaa947e5bf --- /dev/null +++ b/meta-oe/recipes-extended/zsh/files/zsh_profile.sh @@ -0,0 +1,5 @@ +# In case zsh is called as /bin/sh +if [ "$ZSH_VERSION" ]; then + emulate -R zsh + [ "PS1" = '\u@\h:\w\$ ' ] && PS1='%n@%m:%~%# ' +fi diff --git a/meta-oe/recipes-extended/zsh/files/zshrc b/meta-oe/recipes-extended/zsh/files/zshrc new file mode 100644 index 0000000000..37918523a9 --- /dev/null +++ b/meta-oe/recipes-extended/zsh/files/zshrc @@ -0,0 +1,45 @@ +# /etc/zshrc: system-wide .zshrc file for zsh(1). +# +# This file is sourced only for interactive shells. It +# should contain commands to set up aliases, functions, +# options, key bindings, etc. +# +# Global Order: zshenv, zprofile, zshrc, zlogin + +typeset -A key + +key[Home]=${terminfo[khome]} +key[End]=${terminfo[kend]} +key[Insert]=${terminfo[kich1]} +key[Delete]=${terminfo[kdch1]} +key[Up]=${terminfo[kcuu1]} +key[Down]=${terminfo[kcud1]} +key[Left]=${terminfo[kcub1]} +key[Right]=${terminfo[kcuf1]} +key[PageUp]=${terminfo[kpp]} +key[PageDown]=${terminfo[knp]} + +# setup key accordingly +[[ -n "${key[Home]}" ]] && bindkey -e "${key[Home]}" beginning-of-line +[[ -n "${key[End]}" ]] && bindkey -e "${key[End]}" end-of-line +[[ -n "${key[Insert]}" ]] && bindkey -e "${key[Insert]}" overwrite-mode +[[ -n "${key[Delete]}" ]] && bindkey -e "${key[Delete]}" delete-char +[[ -n "${key[Up]}" ]] && bindkey -e "${key[Up]}" up-line-or-history +[[ -n "${key[Down]}" ]] && bindkey -e "${key[Down]}" down-line-or-history +[[ -n "${key[Left]}" ]] && bindkey -e "${key[Left]}" backward-char +[[ -n "${key[Right]}" ]] && bindkey -e "${key[Right]}" forward-char + +unset key + +# Finally, make sure the terminal is in application mode, when zle is +# active. Only then are the values from $terminfo valid. +function zle-line-init () { + emulate -L zsh + printf '%s' $terminfo[smkx] +} +function zle-line-finish () { + emulate -L zsh + printf '%s' $terminfo[rmkx] +} +zle -N zle-line-init +zle -N zle-line-finish |