198N/A#
198N/A# CDDL HEADER START
198N/A#
198N/A# The contents of this file are subject to the terms of the
198N/A# Common Development and Distribution License (the "License").
198N/A# You may not use this file except in compliance with the License.
198N/A#
198N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
198N/A# or http://www.opensolaris.org/os/licensing.
198N/A# See the License for the specific language governing permissions
198N/A# and limitations under the License.
198N/A#
198N/A# When distributing Covered Code, include this CDDL HEADER in each
198N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
198N/A# If applicable, add the following below this CDDL HEADER, with the
198N/A# fields enclosed by brackets "[]" replaced with your own identifying
198N/A# information: Portions Copyright [yyyy] [name of copyright owner]
198N/A#
198N/A# CDDL HEADER END
198N/A#
198N/A
198N/A#
3857N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
198N/A#
198N/A
198N/Ainclude ../../make-rules/shared-macros.mk
198N/A
198N/APATH=/usr/bin:/usr/gnu/bin
198N/A
198N/ACOMPONENT_NAME= vim
379N/ACOMPONENT_VERSION= 7.3
379N/AIPS_COMPONENT_VERSION= $(shell echo $(COMPONENT_HG_REV) | sed -e 's/-/./g' -e 's/v//')
379N/ACOMPONENT_SRC= vim-$(COMPONENT_HG_REV)
198N/ACOMPONENT_PROJECT_URL= http://www.vim.org/
379N/ACOMPONENT_ARCHIVE= vim-$(COMPONENT_HG_REV).tar.bz2
379N/ACOMPONENT_ARCHIVE_URL= $(EXTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE)
998N/ACOMPONENT_ARCHIVE_HASH= sha256:809275aa3c59a658c16e53cc6f61736251201892519fc29721cba97afe54417c
379N/ACOMPONENT_HG_URL= https://vim.googlecode.com/hg
998N/ACOMPONENT_HG_REV= v7-3-600
998N/ACOMPONENT_HG_REV_OLD= v7-3-600
198N/A
1273N/ACOMPONENT_BUGDB= utility/vim
1273N/A
3661N/ATPNO= 9187
3661N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
198N/A
379N/AHGREPODIR= $(COMPONENT_NAME).hg
379N/ATARBALLDIR= $(COMPONENT_NAME)-$(COMPONENT_HG_REV)
379N/A
379N/A$(HGREPODIR)/.hg:
379N/A hg clone -U $(COMPONENT_HG_URL) $(@D)
379N/A
689N/Ahgball-pull: $(HGREPODIR)/.hg
689N/A hg -R $(HGREPODIR) pull
689N/A
689N/Ahgball: COMPONENT_HG_REV = $(shell hg -R $(HGREPODIR) tags | awk '$$1 ~ /^v7-/ {print $$1; exit}')
689N/A
379N/A# Create the tarball. It should contain the working directory of the repo at
379N/A# the desired revision, but not the .hg directory. Note that the digest will
379N/A# be different every time because .hg doesn't set the timestamps of the files
379N/A# in the working directory.
689N/Ahgball: hgball-pull
379N/A rm -rf $(TARBALLDIR)
379N/A hg clone -u $(COMPONENT_HG_REV) $(HGREPODIR) $(TARBALLDIR)
379N/A rm -rf $(TARBALLDIR)/.hg
379N/A tar jcf $(COMPONENT_ARCHIVE) $(TARBALLDIR)
870N/A hg --cwd $(HGREPODIR) stat -ar --rev $(COMPONENT_HG_REV_OLD):tip runtime src/po
844N/A digest=$$(digest -a sha256 $(COMPONENT_ARCHIVE)); \
689N/A /usr/gnu/bin/sed -i \
844N/A -e "s/^COMPONENT_ARCHIVE_HASH=.*/COMPONENT_ARCHIVE_HASH= sha256:$$digest/" \
689N/A -e "s/^COMPONENT_HG_REV=.*/COMPONENT_HG_REV= $(COMPONENT_HG_REV)/" \
870N/A -e "s/^COMPONENT_HG_REV_OLD=.*/COMPONENT_HG_REV_OLD= $(COMPONENT_HG_REV)/" \
689N/A Makefile
379N/A
198N/APATCH_LEVEL = 0
198N/A
379N/APKG_MACROS += VIMVER=vim73
198N/A
3857N/AX_VARIANT = $(BUILD_DIR)/$(MACH64)-gvim
3857N/ANOX_VARIANT = $(BUILD_DIR)/$(MACH64)-vim
198N/A
198N/AVARIANTS = $(X_VARIANT) $(NOX_VARIANT)
198N/A
3857N/A$(VARIANTS:%=%/.configured): BITS=64
198N/A
3857N/ABUILD_64 = $(VARIANTS:%=%/.built)
198N/A
198N/A# Only install the non-X variant. We will cherry-pick gvim out of the build
198N/A# directory to avoid re-installing everything.
3857N/AINSTALL_64 = $(NOX_VARIANT)/.installed
3857N/A
3857N/ATEST_64 = $(NOX_VARIANT)/.tested
3857N/A
3857N/A# Necessary to pass 64-bit flags to the link stage.
3857N/ACC += $(CC_BITS)
198N/A
3857N/A# Put all the binaries directly in /usr/bin, not in /usr/bin/64.
3857N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
198N/A
3857N/A# Use the 64-bit versions of pkg-config files (or GTK+ will add -R/usr/lib)
3857N/ACONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
3857N/A
3857N/A# Necessary to pass 64-bit flags to the compilation stage.
3857N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
198N/ACONFIGURE_OPTIONS += --with-features=huge
379N/ACONFIGURE_OPTIONS += --with-compiledby="the Solaris Userland build environment"
379N/ACONFIGURE_OPTIONS += --with-modified-by="Solaris Userland <userland-discuss@opensolaris.org>"
379N/ACONFIGURE_OPTIONS += --enable-luainterp=dynamic
379N/A# XXX Perl compilation fails, for some reason.
379N/A# - Perl_croak_nocontext is redefined (embed.h, line 5157), having something to
379N/A# do with PERL_IMPLICIT_CONTEXT, which is discussed in perlguts(1). This is
379N/A# just a warning, but looks like it might have nasty consequences.
379N/A# - The declaration of Perl_Gthr_key_ptr() has a problem with its argument of
379N/A# type pTHX. if_perl.xs defines that to void if it's not already defined,
379N/A# but perl.h probably does something else to it, not sure what yet. This
379N/A# also appears to have something to do with PERL_IMPLICIT_CONTEXT.
379N/A# CONFIGURE_OPTIONS += --enable-perlinterp=dynamic
379N/ACONFIGURE_OPTIONS += --enable-pythoninterp=dynamic
379N/ACONFIGURE_OPTIONS += --enable-rubyinterp=dynamic
3857N/ACONFIGURE_OPTIONS += --with-ruby-command=$(RUBY.1.9)
2127N/A
198N/A# We build two variants: with and without X support.
198N/A$(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --without-x
198N/A$(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gui
198N/A$(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gtktest
198N/A$(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-vim-name=gvim
198N/A$(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-x
198N/A$(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-gui=gtk2
198N/A$(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-gtk2-check
198N/A
198N/A# Vim's build is too smart for itself and configure can't run outside of a
198N/A# complete source tree.
198N/ACOMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
198N/A
885N/ACOMPONENT_TEST_TARGETS = test
885N/A
198N/A$(SOURCE_DIR)/runtime/doc/uganda.txt: prep
198N/A
198N/A$(BUILD_DIR)/license: $(SOURCE_DIR)/runtime/doc/uganda.txt
198N/A nawk '/begin of license/ {p=1; getline; next} /end of license/ {p=0} p == 1 {print}' $< > $@
198N/A
198N/A# common targets
3857N/Abuild: $(BUILD_64)
198N/A
3857N/Ainstall: $(INSTALL_64) $(X_VARIANT)/.built $(BUILD_DIR)/license
198N/A
3857N/Atest: $(TEST_64)
198N/A
198N/A
3996N/AREQUIRED_PACKAGES += library/desktop/gtk2
3996N/AREQUIRED_PACKAGES += library/desktop/pango
3996N/AREQUIRED_PACKAGES += library/glib2
3996N/AREQUIRED_PACKAGES += library/ncurses
3996N/AREQUIRED_PACKAGES += shell/ksh93
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += system/library/math
3996N/AREQUIRED_PACKAGES += x11/library/libice
3996N/AREQUIRED_PACKAGES += x11/library/libsm
3996N/AREQUIRED_PACKAGES += x11/library/libx11
3996N/AREQUIRED_PACKAGES += x11/library/libxcursor
3996N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt