Makefile revision 2426
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#
2127N/A# Copyright (c) 2011, 2013, 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
198N/Ainclude ../../make-rules/prep.mk
198N/Ainclude ../../make-rules/configure.mk
198N/Ainclude ../../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
198N/AX_VARIANT = $(BUILD_DIR)/$(MACH32)-gvim
198N/ANOX_VARIANT = $(BUILD_DIR)/$(MACH32)-vim
198N/A
198N/AVARIANTS = $(X_VARIANT) $(NOX_VARIANT)
198N/A
198N/A$(VARIANTS:%=%/.configured): BITS=32
198N/A
198N/ABUILD_32 = $(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.
198N/AINSTALL_32 = $(NOX_VARIANT)/.installed
198N/A
198N/ATEST_32 = $(NOX_VARIANT)/.tested
198N/A
578N/A# Override a broken imake that's always providing a 64-bit library directory.
578N/ACONFIGURE_OPTIONS += --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
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
198N/A
2127N/A# Below option keeps using ruby 1.8, no matter which ruby version is the default.
2127N/A# When ruby 1.9 becomes available, we may change
2127N/A# the below to explicitly call $(RUBY.1.9).
2127N/ACONFIGURE_OPTIONS += --with-ruby-command=$(RUBY.1.8)
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
198N/Abuild: $(BUILD_32)
198N/A
198N/Ainstall: $(INSTALL_32) $(X_VARIANT)/.built $(BUILD_DIR)/license
198N/A
198N/Atest: $(TEST_32)
198N/A
198N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
198N/A
198N/Ainclude ../../make-rules/depend.mk