# $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