# $NetBSD: Makefile.common,v 1.60 2011/04/06 11:27:59 ryoon Exp $ DISTNAME= zsh-${ZSH_VERSION} CATEGORIES= shells MASTER_SITES= ftp://mirrors.dotsrc.org/zsh/ \ ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/ \ http://www.math.technion.ac.il/pub/zsh/ \ ftp://ftp.zsh.org/zsh/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= ${ZSH_MAINTAINER} HOMEPAGE= http://zsh.sourceforge.net/ COMMENT= The Z shell PKG_DESTDIR_SUPPORT= user-destdir GNU_CONFIGURE= yes CONFIGURE_ARGS+= --enable-etcdir=${PKG_SYSCONFDIR:Q} USE_TOOLS+= makeinfo INFO_FILES= # PLIST TEXINFO_REQD= 4.0 PKG_INSTALLATION_TYPES= overwrite pkgviews .include "../../mk/bsd.prefs.mk" # Handle any PKG_OPTIONS that this package might have. .sinclude "options.mk" BUILD_DEFS+= ZSH_STATIC 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]) PLIST.terminfo= yes .endif ### curses .if empty(MACHINE_PLATFORM:MNetBSD-[0-9]*) CHECK_BUILTIN.curses= yes .include "../../mk/curses.builtin.mk" .if !empty(USE_BUILTIN.curses:M[Yy][Ee][Ss]) 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 ZSH_STATIC?= no .if !empty(ZSH_STATIC:M[Yy][Ee][Ss]) _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 pre-install: @cd ${WRKSRC}/Completion; ${FIND} . -name \*.orig -exec ${RM} \{\} \; post-install: ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/zsh 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: @${_PKG_SILENT}${_PKG_DEBUG} \ ${ECHO_MSG} "*** Warning: This test needs to be run as root" @${_PKG_SILENT}${_PKG_DEBUG} \ realtarget="real-su-test"; \ action="install"; \ ${_SU_TARGET} real-su-test: @${_PKG_SILENT}${_PKG_DEBUG} \ ${ECHO_MSG} "${_PKGSRC_IN}> Testing for ${PKGNAME}" @cd ${WRKSRC} && ${MAKE} check @cd ${WRKSRC}/Test && ${MAKE} clean