pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/shells/zsh Completely overhaul the zsh package.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8aac24884839
branches:  trunk
changeset: 362322:8aac24884839
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu May 11 13:49:06 2017 +0000

description:
Completely overhaul the zsh package.

 - Get rid of useless Makefile.common and pointless variables since there is
   no longer a zsh-current package.

 - Remove non-standard per-OS non-checksummed patch file in FILESDIR.
   Integrate it correctly in the normal way.

 - Ensure our patched configure.ac is actually regenerated.

 - Use REPLACE_INTERPRETER instead of homegrown subst replacements.

 - Remove esoteric and fragile configuration variables, a bunch of legacy OS
   based options, and simply depend correctly on terminfo and curses.

 - Remove custom test targets and requirements for root access, the test suite
   works fine as a non-root user and can be done in the normal way.

 - Use options.mk

 - Set maintainer to pkgsrc-users, uebayasi resigned.

Fixes build on at least SunOS.  Tested on SunOS, Darwin, NetBSD (with and
without the "static" option), and Linux.

diffstat:

 shells/zsh/Makefile                   |   89 ++++++++++----
 shells/zsh/Makefile.common            |  160 ---------------------------
 shells/zsh/PLIST                      |    6 +-
 shells/zsh/distinfo                   |    4 +-
 shells/zsh/files/patch-ac             |  199 ----------------------------------
 shells/zsh/hacks.mk                   |   24 ----
 shells/zsh/patches/patch-configure.ac |   17 ++-
 7 files changed, 81 insertions(+), 418 deletions(-)

diffs (truncated from 572 to 300 lines):

diff -r afa3a25a5619 -r 8aac24884839 shells/zsh/Makefile
--- a/shells/zsh/Makefile       Thu May 11 13:30:24 2017 +0000
+++ b/shells/zsh/Makefile       Thu May 11 13:49:06 2017 +0000
@@ -1,35 +1,70 @@
-# $NetBSD: Makefile,v 1.78 2017/04/20 09:12:05 jperkin Exp $
+# $NetBSD: Makefile,v 1.79 2017/05/11 13:49:06 jperkin Exp $
+
+DISTNAME=      zsh-5.3.1
+CATEGORIES=    shells
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=zsh/}
+EXTRACT_SUFX=  .tar.xz
 
-.include "../../shells/zsh/Makefile.common"
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://zsh.sourceforge.net/
+COMMENT=       The Z shell
+LICENSE=       gnu-gpl-v2 AND zsh
 
-ZSH_VERSION=   5.3.1
-ZSH_MAINTAINER=        uebayasi%NetBSD.org@localhost
+USE_LANGUAGES=         c c99
+USE_TOOLS+=            automake autoconf makeinfo
+GNU_CONFIGURE=         yes
+INFO_FILES=            yes
+TEXINFO_REQD=          4.0
 
 CONFIGURE_ARGS+=       --disable-gdbm
+CONFIGURE_ARGS+=       --enable-etcdir=${PKG_SYSCONFDIR:Q}
 
-SUBST_CLASSES+=                        prefix-fixup
-SUBST_STAGE.prefix-fixup=      pre-configure
-SUBST_FILES.prefix-fixup= \
-       Misc/globtests \
-       Misc/globtests.ksh \
-       Test/ztst.zsh \
-       Test/runtests.zsh \
-       Util/reporter \
-       Functions/Calendar/calendar_add \
-       Functions/Misc/run-help \
-       Functions/Misc/run-help-ip \
-       Functions/Misc/checkmail \
-       Functions/Misc/sticky-note \
-       Functions/Misc/zcalc \
-       Functions/Misc/zkbd \
-       Functions/Misc/zed \
-       Functions/Example/cat \
-       Functions/Example/zless
-SUBST_SED.prefix-fixup=                -e 's|^\#\!/bin/zsh|\#\!${PREFIX}/bin/zsh|g'
-SUBST_SED.prefix-fixup+=       -e 's|^\#\! /bin/zsh|\#\! ${PREFIX}/bin/zsh|g'
-SUBST_SED.prefix-fixup+=       -e 's|^\#\!/usr/local/bin/zsh|\#\!${PREFIX}/bin/zsh|g'
-SUBST_SED.prefix-fixup+=       -e 's|^\#\! /usr/local/bin/zsh|\#\! ${PREFIX}/bin/zsh|g'
-SUBST_SED.prefix-fixup+=       -e 's|^\#\! zsh|\#\! ${PREFIX}/bin/zsh|g'
+# Ensure we can find initscr(3) otherwise the curses module will not be built.
+CONFIGURE_ARGS+=        --with-term-lib="${BUILDLINK_LIBNAME.curses} ${BUILDLINK_LIBNAME.terminfo}"
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${USE_CROSS_COMPILE:U:tl} == "yes"
+# These can't be detected automagically in cross-builds.
+CONFIGURE_ENV.NetBSD+= zsh_cv_shared_environ=yes
+CONFIGURE_ENV.NetBSD+= zsh_cv_shared_tgetent=yes
+CONFIGURE_ENV.NetBSD+= zsh_cv_shared_tigetstr=yes
+CONFIGURE_ENV.NetBSD+= zsh_cv_sys_dynamic_execsyms=yes
+.endif
+
+INSTALLATION_DIRS+=    share/doc/zsh
+
+PLIST_VARS+=   xattr
+.if exists(/usr/include/sys/xattr.h)
+PLIST.xattr=   yes
+.endif
+
+MAKE_JOBS_SAFE=                no
+INSTALL_TARGET=                install install.info
+TEST_TARGET=           check
+PKG_SHELL=             bin/zsh
+
+REPLACE_INTERPRETER+=  zsh
+REPLACE.zsh.old=       .*zsh
+REPLACE.zsh.new=       ${PREFIX}/bin/zsh
+REPLACE_FILES.zsh=     Functions/Calendar/*
+REPLACE_FILES.zsh+=    Functions/Example/*
+REPLACE_FILES.zsh+=    Functions/Misc/*
+REPLACE_FILES.zsh+=    Misc/globtests*
+REPLACE_FILES.zsh+=    Test/runtests.zsh Test/ztst.zsh
+REPLACE_FILES.zsh+=    Util/check-tmux-state Util/reporter
+
+.include "options.mk"
+
+pre-configure:
+       cd ${WRKSRC};  autoreconf -fiv
+
+post-install:
+.for f in FEATURES NEWS Etc/BUGS Etc/FAQ
+       ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/share/doc/zsh
+.endfor
 
 .include "../../converters/libiconv/buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/terminfo.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r afa3a25a5619 -r 8aac24884839 shells/zsh/Makefile.common
--- a/shells/zsh/Makefile.common        Thu May 11 13:30:24 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-# $NetBSD: Makefile.common,v 1.80 2016/06/11 23:34:07 dholland Exp $
-# used by shells/zsh/Makefile
-
-DISTNAME=      zsh-${ZSH_VERSION}
-CATEGORIES=    shells
-MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=zsh/}
-EXTRACT_SUFX=  .tar.xz
-
-MAINTAINER=    ${ZSH_MAINTAINER}
-HOMEPAGE=      http://zsh.sourceforge.net/
-COMMENT=       The Z shell
-
-GNU_CONFIGURE=         yes
-
-CONFIGURE_ARGS+=       --enable-etcdir=${PKG_SYSCONFDIR:Q}
-
-USE_LANGUAGES=         c c99
-USE_TOOLS+=            awk makeinfo
-INFO_FILES=            yes
-TEXINFO_REQD=          4.0
-
-.include "../../mk/bsd.prefs.mk"
-
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) && ${OPSYS} == "NetBSD"
-# These can't be detected automagically in cross-builds.
-CONFIGURE_ENV+=                zsh_cv_shared_environ=yes
-CONFIGURE_ENV+=                zsh_cv_shared_tgetent=yes
-CONFIGURE_ENV+=                zsh_cv_shared_tigetstr=yes
-CONFIGURE_ENV+=                zsh_cv_sys_dynamic_execsyms=yes
-.endif
-
-PLIST_VARS+=   xattr
-.if exists(/usr/include/sys/xattr.h)
-PLIST.xattr=   yes
-.endif
-
-PKG_OPTIONS_VAR=               PKG_OPTIONS.zsh
-PKG_SUPPORTED_OPTIONS=         static
-
-.include "../../mk/bsd.options.mk"
-
-MAKE_JOBS_SAFE=        no
-INSTALL_TARGET=        install install.info
-PKG_SHELL=     bin/zsh
-PLIST_VARS+=   dynamic terminfo curses
-
-################################################################################
-
-_ZSH_OPSYS.OpenBSD=            ldflags tcsetpgrp
-_ZSH_OPSYS.Linux=              ldflags tcsetpgrp
-_ZSH_OPSYS.IRIX=               ldflags tcsetpgrp
-_ZSH_OPSYS.Interix=            ldflags notcsetpgrp
-_ZSH_OPSYS.DragonFly=          ldflags tcsetpgrp
-_ZSH_OPSYS.FreeBSD=            ldflags tcsetpgrp
-_ZSH_OPSYS.SunOS=              -       tcsetpgrp
-
-_ZSH_OPSYS.${OPSYS}?=          ldflags tcsetpgrp
-
-################################################################################
-
-### static
-
-_ZSH_LINKAGE.static.CONFIGURE_ARGS=                    --disable-dynamic
-_ZSH_LINKAGE.static.BUILDLINK_PASSTHRU_RPATHDIRS?=
-_ZSH_LINKAGE.static.LDFLAGS?=                          -static
-
-### dynamic
-
-_ZSH_DYNAMIC_VARS.ldflags=     ${COMPILER_RPATH_FLAG}${PREFIX}/lib/zsh
-
-_ZSH_LINKAGE.dynamic.CONFIGURE_ARGS=
-_ZSH_LINKAGE.dynamic.BUILDLINK_PASSTHRU_RPATHDIRS=
-# XXXUEBAYASI old make(1) has problems to handle :?true_str:false_str
-#_ZSH_LINKAGE.dynamic.LDFLAGS= \
-#      ${_ZSH_OPSYS.${OPSYS}:Mldflags:?${_ZSH_DYNAMIC_VARS.ldflags}:}
-.if !empty(_ZSH_OPSYS.${OPSYS}:Mldflags)
-_ZSH_LINKAGE.dynamic.LDFLAGS=  ${_ZSH_DYNAMIC_VARS.ldflags}
-.endif
-
-### tcsetpgrp
-
-_ZSH_OPSYS_VARS.tcsetpgrp=     --with-tcsetpgrp
-_ZSH_OPSYS_VARS.notcsetpgrp=   --without-tcsetpgrp
-
-### terminfo
-CHECK_BUILTIN.terminfo=        yes
-.include "../../mk/terminfo.builtin.mk"
-.if !empty(USE_BUILTIN.terminfo:M[Yy][Ee][Ss]) || ${OPSYS} == "SunOS" || ${OPSYS} == "Linux"
-PLIST.terminfo=        yes
-.endif
-
-### curses
-.if empty(MACHINE_PLATFORM:MNetBSD-[0-9]*) && empty(MACHINE_PLATFORM:MGNUkFreeBSD-[0-9]*)
-CHECK_BUILTIN.curses=  yes
-.include "../../mk/curses.builtin.mk"
-.  if !empty(USE_BUILTIN.curses:M[Yy][Ee][Ss]) || ${OPSYS} == "SunOS" || ${OPSYS} == "Linux"
-PLIST.curses=  yes
-.  endif
-.endif
-
-################################################################################
-
-# XXXUEBAYASI old make(1) has problems to handle :?true_str:false_str
-#_ZSH_LINKAGE= ${ZSH_STATIC:M[Yy][Ee][Ss]:?static:dynamic}     # static / dynamic
-.if !empty(PKG_OPTIONS:Mstatic)
-_ZSH_LINKAGE=  static
-.else
-_ZSH_LINKAGE=  dynamic
-.endif
-
-CONFIGURE_ARGS+=               ${_ZSH_LINKAGE.${_ZSH_LINKAGE}.CONFIGURE_ARGS} \
-                               ${_ZSH_OPSYS_VARS.${_ZSH_OPSYS.${OPSYS}:Mtcsetpgrp}} \
-                               ${_ZSH_OPSYS_VARS.${_ZSH_OPSYS.${OPSYS}:Mnotcsetpgrp}}
-BUILDLINK_PASSTHRU_RPATHDIRS+= ${_ZSH_LINKAGE.${_ZSH_LINKAGE}.BUILDLINK_PASSTHRU_RPATHDIRS}
-LDFLAGS+=                      ${_ZSH_LINKAGE.${_ZSH_LINKAGE}.LDFLAGS}
-.if ${_ZSH_LINKAGE} == dynamic
-PLIST.dynamic=                 yes
-.endif
-
-################################################################################
-
-.undef MANZ
-
-.if ${OPSYS} == "SunOS" || ${OPSYS} == "Interix"
-do-patch:
-# $ sha1 files/patch-ac
-# SHA1 (files/patch-ac) = 0ef6928bbb277dfbcd8aff4f6fde9bdf1c3de483
-       ${PATCH} -d ${WRKSRC} -i ${FILESDIR}/patch-ac
-.endif
-
-pre-install:
-       cd ${WRKSRC}/Completion; ${FIND} . -name \*.orig -exec ${RM} \{\} \;
-
-INSTALLATION_DIRS+=    share/doc/zsh
-post-install:
-       cd ${WRKSRC}/Etc && ${INSTALL_DATA} BUGS FAQ    \
-               ${DESTDIR}${PREFIX}/share/doc/zsh
-       cd ${WRKSRC} && ${INSTALL_DATA} FEATURES NEWS   \
-               ${DESTDIR}${PREFIX}/share/doc/zsh
-
-# Utilize Zsh's test framework.
-# Testing of dynamic shell only works after install has been done
-#
-.PHONY: do-test do-su-test real-su-test
-
-do-test: do-su-test
-
-do-su-test:
-       ${RUN}                                                          \
-       ${ECHO_MSG} "*** Warning: This test needs to be run as root"
-       ${RUN}                                                          \
-       realtarget="real-su-test";                                      \
-       action="install";                                               \
-       ${_SU_TARGET}
-
-real-su-test:
-       ${RUN}                                                          \
-       ${ECHO_MSG} "${_PKGSRC_IN}> Testing for ${PKGNAME}"
-       cd ${WRKSRC} && ${MAKE} check
-       cd ${WRKSRC}/Test && ${MAKE} clean
diff -r afa3a25a5619 -r 8aac24884839 shells/zsh/PLIST
--- a/shells/zsh/PLIST  Thu May 11 13:30:24 2017 +0000
+++ b/shells/zsh/PLIST  Thu May 11 13:49:06 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.35 2016/12/25 12:01:44 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.36 2017/05/11 13:49:06 jperkin Exp $
 bin/zsh
 bin/${PKGNAME}
 info/zsh.info
@@ -9,6 +9,7 @@
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/complete.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/complist.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/computil.so
+${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/curses.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/datetime.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/deltochar.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/example.so
@@ -27,8 +28,7 @@
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/stat.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/system.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/termcap.so
-${PLIST.dynamic}${PLIST.curses}lib/zsh/${PKGVERSION}/zsh/curses.so
-${PLIST.dynamic}${PLIST.terminfo}lib/zsh/${PKGVERSION}/zsh/terminfo.so
+${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/terminfo.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/zftp.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/zle.so
 ${PLIST.dynamic}lib/zsh/${PKGVERSION}/zsh/zleparameter.so
diff -r afa3a25a5619 -r 8aac24884839 shells/zsh/distinfo
--- a/shells/zsh/distinfo       Thu May 11 13:30:24 2017 +0000
+++ b/shells/zsh/distinfo       Thu May 11 13:49:06 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.58 2017/01/29 05:31:13 mef Exp $
+$NetBSD: distinfo,v 1.59 2017/05/11 13:49:06 jperkin Exp $
 
 SHA1 (zsh-5.3.1.tar.xz) = ec2a98c080f213c1c6c465c0c64662b5eae6818f



Home | Main Index | Thread Index | Old Index