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