Patchwork [meta-oe] zsh: Add initial recipe for version 4.3.17.

login
register
mail settings
Submitter Peter Tworek
Date March 5, 2012, 8:53 p.m.
Message ID <1330980801-19523-1-git-send-email-tworaz666@gmail.com>
Download mbox | patch
Permalink /patch/22715/
State Accepted
Commit fe04de5c6d979d06b683dc0e44e019546bb79ac8
Headers show

Comments

Peter Tworek - March 5, 2012, 8:53 p.m.
Run tested on netbook pro.

Signed-off-by: Peter Tworek <tworaz666@gmail.com>
---
 meta-oe/recipes-extended/zsh/zsh_4.3.17.bb |   51 ++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
Khem Raj - March 6, 2012, 1:59 a.m.
On (05/03/12 21:53), Peter Tworek wrote:
> Run tested on netbook pro.
> 
> Signed-off-by: Peter Tworek <tworaz666@gmail.com>
> ---
>  meta-oe/recipes-extended/zsh/zsh_4.3.17.bb |   51 ++++++++++++++++++++++++++++
>  1 files changed, 51 insertions(+), 0 deletions(-)
>  create mode 100644 meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
> 
> diff --git a/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
> new file mode 100644
> index 0000000..9192f20
> --- /dev/null
> +++ b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
> @@ -0,0 +1,51 @@
> +DESCRIPTION = "UNIX Shell similar to the Korn shell"
> +HOMEPAGE="http://www.zsh.org"
> +SECTION = "base/shell"
> +
> +LICENSE = "ZSH"
> +LIC_FILES_CHKSUM = "file://LICENCE;md5=ad234d4b46db63491c4a9789da4fb341"
> +
> +DEPENDS = "ncurses libcap libpcre gdbm groff-native"
> +
> +SRC_URI = "ftp://ftp.zsh.org/pub/${P}.tar.bz2"
> +SRC_URI[md5sum] = "8258967060b2654f30001a011946ac6a"
> +SRC_URI[sha256sum] = "054e0452afd9c742c9f1489465175e1d4d7db50d88b602d132551d850cf7a704"
> +
> +FILES_${PN}-dbg += "\
> +    ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
> +    ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
> +    ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
> +    "
> +
> +inherit autotools
> +
> +EXTRA_OECONF = " \
> +    --bindir=${base_bindir} \
> +    --enable-etcdir=${sysconfdir} \
> +    --enable-fndir=${datadir}/${PN}/${PV}/functions \
> +    --enable-site-fndir=${datadir}/${PN}/site-functions \
> +    --enable-function-subdirs \
> +    --with-term-lib='ncursesw ncurses' \
> +    --with-tcsetpgrp \
> +    --enable-pcre \
> +    --enable-cap \
> +    --enable-multibyte \
> +    --enable-gdbm \
> +    --enable-dynamic \
> +    zsh_cv_shared_environ=yes \
> +    "
> +
> +do_configure () {
> +    oe_runconf
> +}
> +

why do you need to run oe_runconf explicitly.
Peter Tworek - March 6, 2012, 7:14 p.m.
On 03/06/2012 02:59 AM, Khem Raj wrote:
> On (05/03/12 21:53), Peter Tworek wrote:
>> Run tested on netbook pro.
>>
>> Signed-off-by: Peter Tworek <tworaz666@gmail.com>
>> ---
>>  meta-oe/recipes-extended/zsh/zsh_4.3.17.bb |   51 ++++++++++++++++++++++++++++
>>  1 files changed, 51 insertions(+), 0 deletions(-)
>>  create mode 100644 meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>>
>> diff --git a/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>> new file mode 100644
>> index 0000000..9192f20
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>> @@ -0,0 +1,51 @@
>> +DESCRIPTION = "UNIX Shell similar to the Korn shell"
>> +HOMEPAGE="http://www.zsh.org"
>> +SECTION = "base/shell"
>> +
>> +LICENSE = "ZSH"
>> +LIC_FILES_CHKSUM = "file://LICENCE;md5=ad234d4b46db63491c4a9789da4fb341"
>> +
>> +DEPENDS = "ncurses libcap libpcre gdbm groff-native"
>> +
>> +SRC_URI = "ftp://ftp.zsh.org/pub/${P}.tar.bz2"
>> +SRC_URI[md5sum] = "8258967060b2654f30001a011946ac6a"
>> +SRC_URI[sha256sum] = "054e0452afd9c742c9f1489465175e1d4d7db50d88b602d132551d850cf7a704"
>> +
>> +FILES_${PN}-dbg += "\
>> +    ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
>> +    ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
>> +    ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
>> +    "
>> +
>> +inherit autotools
>> +
>> +EXTRA_OECONF = " \
>> +    --bindir=${base_bindir} \
>> +    --enable-etcdir=${sysconfdir} \
>> +    --enable-fndir=${datadir}/${PN}/${PV}/functions \
>> +    --enable-site-fndir=${datadir}/${PN}/site-functions \
>> +    --enable-function-subdirs \
>> +    --with-term-lib='ncursesw ncurses' \
>> +    --with-tcsetpgrp \
>> +    --enable-pcre \
>> +    --enable-cap \
>> +    --enable-multibyte \
>> +    --enable-gdbm \
>> +    --enable-dynamic \
>> +    zsh_cv_shared_environ=yes \
>> +    "
>> +
>> +do_configure () {
>> +    oe_runconf
>> +}
>> +
> why do you need to run oe_runconf explicitly.

Because I want to avoid invoking autotools, I just need to run
configure. I wrote this recipe some time ago, but from what I remember
zsh comes with some preloaded m4 macros that cause problems when default
autootols do_configure() step is executed. The preloaded configure
scripts works fine, even when cross-compiling. IMO it's better to use it
than to patch the package.

/ptw
Khem Raj - March 6, 2012, 9:25 p.m.
On Tue, Mar 6, 2012 at 11:14 AM, Piotr Tworek <tworaz666@gmail.com> wrote:
> On 03/06/2012 02:59 AM, Khem Raj wrote:
>> On (05/03/12 21:53), Peter Tworek wrote:
>>> Run tested on netbook pro.
>>>
>>> Signed-off-by: Peter Tworek <tworaz666@gmail.com>
>>> ---
>>>  meta-oe/recipes-extended/zsh/zsh_4.3.17.bb |   51 ++++++++++++++++++++++++++++
>>>  1 files changed, 51 insertions(+), 0 deletions(-)
>>>  create mode 100644 meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>>>
>>> diff --git a/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>>> new file mode 100644
>>> index 0000000..9192f20
>>> --- /dev/null
>>> +++ b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>>> @@ -0,0 +1,51 @@
>>> +DESCRIPTION = "UNIX Shell similar to the Korn shell"
>>> +HOMEPAGE="http://www.zsh.org"
>>> +SECTION = "base/shell"
>>> +
>>> +LICENSE = "ZSH"
>>> +LIC_FILES_CHKSUM = "file://LICENCE;md5=ad234d4b46db63491c4a9789da4fb341"
>>> +
>>> +DEPENDS = "ncurses libcap libpcre gdbm groff-native"
>>> +
>>> +SRC_URI = "ftp://ftp.zsh.org/pub/${P}.tar.bz2"
>>> +SRC_URI[md5sum] = "8258967060b2654f30001a011946ac6a"
>>> +SRC_URI[sha256sum] = "054e0452afd9c742c9f1489465175e1d4d7db50d88b602d132551d850cf7a704"
>>> +
>>> +FILES_${PN}-dbg += "\
>>> +    ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
>>> +    ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
>>> +    ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
>>> +    "
>>> +
>>> +inherit autotools
>>> +
>>> +EXTRA_OECONF = " \
>>> +    --bindir=${base_bindir} \
>>> +    --enable-etcdir=${sysconfdir} \
>>> +    --enable-fndir=${datadir}/${PN}/${PV}/functions \
>>> +    --enable-site-fndir=${datadir}/${PN}/site-functions \
>>> +    --enable-function-subdirs \
>>> +    --with-term-lib='ncursesw ncurses' \
>>> +    --with-tcsetpgrp \
>>> +    --enable-pcre \
>>> +    --enable-cap \
>>> +    --enable-multibyte \
>>> +    --enable-gdbm \
>>> +    --enable-dynamic \
>>> +    zsh_cv_shared_environ=yes \
>>> +    "
>>> +
>>> +do_configure () {
>>> +    oe_runconf
>>> +}
>>> +
>> why do you need to run oe_runconf explicitly.
>
> Because I want to avoid invoking autotools, I just need to run
> configure. I wrote this recipe some time ago, but from what I remember
> zsh comes with some preloaded m4 macros that cause problems when default
> autootols do_configure() step is executed. The preloaded configure
> scripts works fine, even when cross-compiling. IMO it's better to use it
> than to patch the package.

generated .la files will not work which may not be so much of an issue
for zsh. Usually we autoreconf and thats to avoid compatibility issues
Peter Tworek - March 7, 2012, 7:40 a.m.
On 03/06/2012 10:25 PM, Khem Raj wrote:
> On Tue, Mar 6, 2012 at 11:14 AM, Piotr Tworek <tworaz666@gmail.com> wrote:
>> On 03/06/2012 02:59 AM, Khem Raj wrote:
>>> On (05/03/12 21:53), Peter Tworek wrote:
>>>> Run tested on netbook pro.
>>>>
>>>> Signed-off-by: Peter Tworek <tworaz666@gmail.com>
>>>> ---
>>>>  meta-oe/recipes-extended/zsh/zsh_4.3.17.bb |   51 ++++++++++++++++++++++++++++
>>>>  1 files changed, 51 insertions(+), 0 deletions(-)
>>>>  create mode 100644 meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>>>>
>>>> diff --git a/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>>>> new file mode 100644
>>>> index 0000000..9192f20
>>>> --- /dev/null
>>>> +++ b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
>>>> @@ -0,0 +1,51 @@
>>>> +DESCRIPTION = "UNIX Shell similar to the Korn shell"
>>>> +HOMEPAGE="http://www.zsh.org"
>>>> +SECTION = "base/shell"
>>>> +
>>>> +LICENSE = "ZSH"
>>>> +LIC_FILES_CHKSUM = "file://LICENCE;md5=ad234d4b46db63491c4a9789da4fb341"
>>>> +
>>>> +DEPENDS = "ncurses libcap libpcre gdbm groff-native"
>>>> +
>>>> +SRC_URI = "ftp://ftp.zsh.org/pub/${P}.tar.bz2"
>>>> +SRC_URI[md5sum] = "8258967060b2654f30001a011946ac6a"
>>>> +SRC_URI[sha256sum] = "054e0452afd9c742c9f1489465175e1d4d7db50d88b602d132551d850cf7a704"
>>>> +
>>>> +FILES_${PN}-dbg += "\
>>>> +    ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
>>>> +    ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
>>>> +    ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
>>>> +    "
>>>> +
>>>> +inherit autotools
>>>> +
>>>> +EXTRA_OECONF = " \
>>>> +    --bindir=${base_bindir} \
>>>> +    --enable-etcdir=${sysconfdir} \
>>>> +    --enable-fndir=${datadir}/${PN}/${PV}/functions \
>>>> +    --enable-site-fndir=${datadir}/${PN}/site-functions \
>>>> +    --enable-function-subdirs \
>>>> +    --with-term-lib='ncursesw ncurses' \
>>>> +    --with-tcsetpgrp \
>>>> +    --enable-pcre \
>>>> +    --enable-cap \
>>>> +    --enable-multibyte \
>>>> +    --enable-gdbm \
>>>> +    --enable-dynamic \
>>>> +    zsh_cv_shared_environ=yes \
>>>> +    "
>>>> +
>>>> +do_configure () {
>>>> +    oe_runconf
>>>> +}
>>>> +
>>> why do you need to run oe_runconf explicitly.
>> Because I want to avoid invoking autotools, I just need to run
>> configure. I wrote this recipe some time ago, but from what I remember
>> zsh comes with some preloaded m4 macros that cause problems when default
>> autootols do_configure() step is executed. The preloaded configure
>> scripts works fine, even when cross-compiling. IMO it's better to use it
>> than to patch the package.
> generated .la files will not work which may not be so much of an issue
> for zsh. Usually we autoreconf and thats to avoid compatibility issues
Not a problem:
$ find tmp/work/armv5te-oe-linux-gnueabi/zsh-4.3.17-r0/image -type f
-name '*.la' | wc
-l                                                                                                                                                    

$ 0

In general, compiled version of zsh doesn't come with any files that
could be shipped in -dev or -staticdev packages. In fact the only
packages that contain some files are zsh and zsh-dbg. I've only tested
zsh and I can't find anything that's broken. I've used the same zshrc
file as on my desktop and all the modules load fine.

/ptw

Patch

diff --git a/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
new file mode 100644
index 0000000..9192f20
--- /dev/null
+++ b/meta-oe/recipes-extended/zsh/zsh_4.3.17.bb
@@ -0,0 +1,51 @@ 
+DESCRIPTION = "UNIX Shell similar to the Korn shell"
+HOMEPAGE="http://www.zsh.org"
+SECTION = "base/shell"
+
+LICENSE = "ZSH"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=ad234d4b46db63491c4a9789da4fb341"
+
+DEPENDS = "ncurses libcap libpcre gdbm groff-native"
+
+SRC_URI = "ftp://ftp.zsh.org/pub/${P}.tar.bz2"
+SRC_URI[md5sum] = "8258967060b2654f30001a011946ac6a"
+SRC_URI[sha256sum] = "054e0452afd9c742c9f1489465175e1d4d7db50d88b602d132551d850cf7a704"
+
+FILES_${PN}-dbg += "\
+    ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
+    ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
+    ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
+    "
+
+inherit autotools
+
+EXTRA_OECONF = " \
+    --bindir=${base_bindir} \
+    --enable-etcdir=${sysconfdir} \
+    --enable-fndir=${datadir}/${PN}/${PV}/functions \
+    --enable-site-fndir=${datadir}/${PN}/site-functions \
+    --enable-function-subdirs \
+    --with-term-lib='ncursesw ncurses' \
+    --with-tcsetpgrp \
+    --enable-pcre \
+    --enable-cap \
+    --enable-multibyte \
+    --enable-gdbm \
+    --enable-dynamic \
+    zsh_cv_shared_environ=yes \
+    "
+
+do_configure () {
+    oe_runconf
+}
+
+pkg_postinst_${PN} () {
+    touch $D${sysconfdir}/shells
+    grep -q "bin/zsh" $D${sysconfdir}/shells || echo "/bin/zsh" >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+    if [ -e $D${sysconfdir}/shells ]; then
+        sed -i -e '/\/bin\/zsh/d' $D${sysconfdir}/shells
+    fi
+}