Makefile revision 2032
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#
1579N/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
1935N/ACOMPONENT_VERSION= 7.4
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)
1935N/ACOMPONENT_ARCHIVE_HASH= sha256:e7f4f411d9ff4c9dbf0ec57cc5da2e9d5e586e69fe3d69f31cbce9118e443507
379N/ACOMPONENT_HG_URL= https://vim.googlecode.com/hg
1935N/ACOMPONENT_HG_REV= v7-4
198N/A
1258N/ACOMPONENT_BUGDB= utility/vim
1258N/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
1935N/A# Create the tarball.
1935N/Ahgball: $(HGREPODIR)/.hg
1935N/A cd $(HGREPODIR); \
1935N/A hg pull; \
1935N/A if [[ -n "$(COMPONENT_HG_NEWREV)" ]]; then \
1935N/A newrev=$(COMPONENT_HG_NEWREV); \
1935N/A else \
1935N/A newrev=$$(hg tags | awk '$$1 ~ /^v7-/ {print $$1; exit}'); \
1935N/A fi; \
1935N/A hg archive -p vim-$$newrev -r $$newrev ../vim-$$newrev.tar.bz2; \
1935N/A hg stat -ar --rev $(COMPONENT_HG_REV):$$newrev runtime src/po; \
1935N/A digest=$$(digest -a sha256 ../vim-$$newrev.tar.bz2); \
1935N/A $(GSED) -i \
1935N/A -e "s/^COMPONENT_ARCHIVE_HASH=.*/COMPONENT_ARCHIVE_HASH= sha256:$$digest/" \
1935N/A -e "s/^COMPONENT_HG_REV=.*/COMPONENT_HG_REV= $$newrev/" \
1935N/A ../Makefile
379N/A
198N/APATCH_LEVEL = 0
198N/A
1935N/APKG_MACROS += VIMVER=vim74
198N/A
1579N/AASLR_MODE = $(ASLR_ENABLE)
1579N/A
1579N/AX_VARIANT = $(BUILD_DIR)/$(MACH64)-gvim
1579N/ANOX_VARIANT = $(BUILD_DIR)/$(MACH64)-vim
198N/A
198N/AVARIANTS = $(X_VARIANT) $(NOX_VARIANT)
198N/A
1579N/A$(VARIANTS:%=%/.configured): BITS=64
198N/A
1579N/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.
1579N/AINSTALL_64 = $(NOX_VARIANT)/.installed
1579N/A
1579N/ATEST_64 = $(NOX_VARIANT)/.tested
1579N/A
1579N/A# Necessary to pass 64-bit flags to the link stage.
1579N/ACC += $(CC_BITS)
198N/A
1579N/A# Put all the binaries directly in /usr/bin, not in /usr/bin/64.
1579N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
198N/A
1579N/A# Use the 64-bit versions of pkg-config files (or GTK+ will add -R/usr/lib)
1579N/ACONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
1579N/A
1579N/A# Necessary to pass 64-bit flags to the compilation stage.
1579N/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
198N/A
2032N/A# Below option keeps using ruby 1.8, no matter which ruby version is the default.
2032N/A# When ruby 1.9 becomes available, we may change
2032N/A# the below to explicitly call $(RUBY.1.9).
2032N/ACONFIGURE_OPTIONS += --with-ruby-command=$(RUBY.1.8)
2032N/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
1579N/Abuild: $(BUILD_64)
198N/A
1579N/Ainstall: $(INSTALL_64) $(X_VARIANT)/.built $(BUILD_DIR)/license
198N/A
1579N/Atest: $(TEST_64)
198N/A
198N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
198N/A
198N/Ainclude ../../make-rules/depend.mk