aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/zsh/files/dot.zshrc16
-rw-r--r--meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch58
-rw-r--r--meta-oe/recipes-extended/zsh/files/zsh_profile.sh4
-rw-r--r--meta-oe/recipes-extended/zsh/zsh_5.0.5.bb61
-rw-r--r--meta-oe/recipes-extended/zsh/zsh_5.2.bb137
5 files changed, 215 insertions, 61 deletions
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..cb359f4f5d
--- /dev/null
+++ b/meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch
@@ -0,0 +1,58 @@
+diff --git a/Src/Modules/pcre.mdd b/Src/Modules/pcre.mdd
+index 6eb3c69..12c1070 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/aclocal.m4 b/aclocal.m4
+index e91be3c..5580d13 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -75,3 +75,4 @@ AC_SUBST(LN)dnl
+ ])
+
+ builtin(include, aczsh.m4)
++builtin(include, pkg.m4)
+diff --git a/configure.ac b/configure.ac
+index c3bd713..918657c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -661,17 +661,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 \
+@@ -925,7 +923,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="`pcre-config --libs` $LIBS"
++ LIBS="$PCRE_LIB $LIBS"
+ fi
+
+ dnl ---------------------
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..ea34deda28
--- /dev/null
+++ b/meta-oe/recipes-extended/zsh/files/zsh_profile.sh
@@ -0,0 +1,4 @@
+if [ "$ZSH_VERSION" ]; then
+ emulate -R zsh
+ [ "PS1" = '\u@\h:\w\$ ' ] && PS1='%n@%m:%~%# '
+fi
diff --git a/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb b/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
deleted file mode 100644
index 39b2d95a69..0000000000
--- a/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-SUMMARY = "UNIX Shell similar to the Korn shell"
-DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \
- powerful scripting language. Many of the useful features of bash, \
- ksh, and tcsh were incorporated into zsh; many original features were added."
-HOMEPAGE = "http://www.zsh.org"
-SECTION = "base/shell"
-
-LICENSE = "zsh"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=b7bc853894664be455a922db9805288e"
-
-DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz"
-SRC_URI[md5sum] = "6fb0e3e52a0f8de5ca63138391b81ce0"
-SRC_URI[sha256sum] = "b35cf19e4a6ba39fd03c6372b8a8760a491cc2e2e4aba3d15023ff291c2894b4"
-
-inherit autotools gettext update-alternatives
-
-EXTRA_OECONF = " \
- --bindir=${base_bindir} \
- --enable-etcdir=${sysconfdir} \
- --enable-fndir=${datadir}/${PN}/${PV}/functions \
- --enable-site-fndir=${datadir}/${PN}/site-functions \
- --with-term-lib='ncursesw ncurses' \
- --with-tcsetpgrp \
- --enable-cap \
- --enable-multibyte \
- --disable-gdbm \
- --disable-dynamic \
- zsh_cv_shared_environ=yes \
-"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-ALTERNATIVE_${PN} = "sh"
-ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
-ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
-ALTERNATIVE_PRIORITY = "100"
-
-export AUTOHEADER = "true"
-
-do_configure () {
- gnu-configize --force ${S}
- oe_runconf
-}
-
-do_install_append () {
- rm -fr ${D}/usr/share
-}
-
-pkg_postinst_${PN} () {
- touch $D${sysconfdir}/shells
- grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells
- grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
-}
-
-FILES_${PN}-dbg += "\
- ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
- ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
- ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
-"
diff --git a/meta-oe/recipes-extended/zsh/zsh_5.2.bb b/meta-oe/recipes-extended/zsh/zsh_5.2.bb
new file mode 100644
index 0000000000..13f071d7c6
--- /dev/null
+++ b/meta-oe/recipes-extended/zsh/zsh_5.2.bb
@@ -0,0 +1,137 @@
+SUMMARY = "UNIX Shell similar to the Korn shell"
+DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \
+ powerful scripting language. Many of the useful features of bash, \
+ ksh, and tcsh were incorporated into zsh; many original features were added."
+HOMEPAGE = "http://www.zsh.org"
+SECTION = "base/shell"
+
+LICENSE = "zsh"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=b7bc853894664be455a922db9805288e"
+
+DEPENDS = "ncurses bison-native libcap groff-native"
+
+SRC_URI = " \
+ http://www.zsh.org/pub/zsh-${PV}.tar.xz;name=zsh \
+ http://www.zsh.org/pub/zsh-${PV}-doc.tar.xz;name=zsh-docs \
+ file://pcre-pkgconfig.patch \
+ file://zsh_profile.sh \
+ file://dot.zshrc \
+"
+
+SRC_URI[zsh.md5sum] = "afe96fde08b70e23c1cab1ca7a68fb34"
+SRC_URI[zsh.sha256sum] = "f17916320ffaa844bbd7ce48ceeb5945fc5f3eff64b149b4229bbfbdf3795a9d"
+SRC_URI[zsh-docs.md5sum] = "873f1ade1fa5d0d15f9cba16d3ba5f98"
+SRC_URI[zsh-docs.sha256sum] = "328352cf3d5d0ec4b6e31dcefd25ff5b4c0e6b8077d1fe84448ebb50d6ada52a"
+
+inherit autotools gettext update-alternatives pkgconfig
+
+PACKAGECONFIG ??= "static \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+"
+
+PACKAGECONFIG[static] = "--disable-dynamic,--enable-dynamic,,"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[maildir] = "--enable-maildir-support,--disable-maildir-support,,"
+PACKAGECONFIG[nls] = "--enable-locale,--disable-locale,,"
+PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre,"
+PACKAGECONFIG[gdbm] = "--enable-gdbm,--disable-gdbm,gdbm,"
+PACKAGECONFIG[secure] = "--enable-zsh-mem --enable-zsh-secure-free,--disable-zsh-mem --disable-zsh-secure-free,,"
+
+CACHED_CONFIGUREVARS = " zsh_cv_shared_environ=yes "
+
+EXTRA_OECONF = " \
+ --bindir=${base_bindir} \
+ --enable-etcdir=${sysconfdir} \
+ --enable-fndir=${datadir}/${BPN}/${PV}/functions \
+ --enable-site-fndir=${datadir}/${BPN}/site-functions \
+ --with-term-lib='ncursesw ncurses' \
+ --with-tcsetpgrp \
+ --enable-cap \
+ --enable-multibyte \
+"
+
+EXTRA_OECONF_append_libc-musl = " --enable-libc-musl "
+
+EXTRA_OEMAKE += " LLIST='-Wl,-rpath=${libdir}/${BPN}' "
+
+ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
+ALTERNATIVE_PRIORITY = "80"
+
+export AUTOHEADER = "true"
+
+do_configure () {
+ gnu-configize --force ${S}
+ (cd ${S}; autoconf -I ${ACLOCALDIR}; autoheader -f -I ${ACLOCALDIR})
+ touch ${S}/stamp-h.in
+ oe_runconf
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install.bin install.modules install.fns install.runhelp
+ oe_runmake 'DESTDIR=${D}' install.man || true
+
+ # Info dir listing isn't interesting at this point so remove it if it exists.
+ if [ -e "${D}${infodir}/dir" ]; then
+ rm -f ${D}${infodir}/dir
+ fi
+
+ # Remove versioned zsh binary
+ rm -f ${D}${base_bindir}/${BPN}-${PV} || true
+
+ # Set up restricted shells
+ ln -sf ${BPN} ${D}${base_bindir}/rzsh
+
+ # install etc files
+ install -d ${D}${sysconfdir}/profile.d
+ install -m 0644 ${WORKDIR}/zsh_profile.sh ${D}${sysconfdir}/profile.d
+ install -d ${D}${sysconfdir}/skel
+ install -m 0644 ${WORKDIR}/dot.zshrc ${D}${sysconfdir}/skel/.zshrc
+
+ # install configuration examples
+ install -d ${D}${datadir}/examples/${BPN}
+ install -m 644 ${S}/StartupFiles/* ${D}${datadir}/examples/${BPN}
+}
+
+pkg_postinst_${PN} () {
+ grep -q "^${base_bindir}/zsh$" $D${sysconfdir}/shells || echo ${base_bindir}/zsh >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+ printf "$(grep -v "^${base_bindir}/zsh$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
+
+PACKAGES =+ "${PN}-examples ${PN}-functions"
+
+FILES_${PN}-examples += "${datadir}/examples/${BPN}/*"
+
+FILES_${PN}-functions += " \
+ ${datadir}/${BPN}/${PV}/scripts \
+ ${datadir}/${BPN}/${PV}/functions \
+ ${datadir}/${BPN}/site-functions \
+"
+
+FILES_${PN}-dbg += "\
+ ${libdir}/${BPN}/.debug/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/.debug/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/db/.debug/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/net/.debug/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/param/.debug/*.so \
+"
+
+FILES_${PN}-doc += "\
+ ${datadir}/${BPN}/${PV}/help \
+ ${datadir}/${BPN}/${PV}/help/* \
+"
+
+FILES_${PN} += "\
+ ${libdir}/${BPN}/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/db/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/net/*.so \
+ ${libdir}/${BPN}/${PV}/zsh/param/*.so \
+"
+
+RRECOMMENDS_${PN} += "${PN}-functions"
+RRECOMMENDS_${PN}-doc += "${PN}-examples"