switch to gcc 6 runtimes
[unleashed-userland.git] / components / editor / vim / Makefile
blobba31d0422999f8bc4ca4372f06c8eb75709aef49
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
26 include ../../../make-rules/shared-macros.mk
28 PATH=/usr/bin:/usr/gnu/bin
30 COMPONENT_NAME= vim
31 COMPONENT_VERSION= 8.0.0104
32 COMPONENT_REVISION= 2
33 IPS_COMPONENT_VERSION= $(shell echo $(COMPONENT_VERSION) | sed -e 's/\.0*\([1-9]\)/.\1/')
34 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
35 COMPONENT_PROJECT_URL= http://www.vim.org/
36 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
37 COMPONENT_ARCHIVE_URL= https://github.com/vim/vim/archive/v$(COMPONENT_VERSION).tar.gz
38 COMPONENT_ARCHIVE_HASH= sha256:b200636f743ea250d655bc03f053dc177a27e066d3e00db4ee0efe3c4de5f666
39 COMPONENT_BUGDB= utility/vim
41 include $(WS_MAKE_RULES)/prep.mk
42 include $(WS_MAKE_RULES)/configure.mk
43 include $(WS_MAKE_RULES)/ips.mk
45 COMPONENT_POST_UNPACK_ACTION += ( chmod +x $(@D)/configure $(@D)/src/auto/configure $(@D)/src/configure $(@D)/src/mkinstalldirs ; \
46 find $(@D) -name \*.sh -exec chmod +x '{}' ';' )
48 PKG_MACROS += VIMVER=vim80
50 X_VARIANT = $(BUILD_DIR)/$(MACH32)-gvim
51 NOX_VARIANT = $(BUILD_DIR)/$(MACH32)-vim
53 VARIANTS = $(X_VARIANT) $(NOX_VARIANT)
55 BUILD_32 = $(VARIANTS:%=%/.built)
57 INSTALL_32 = $(VARIANTS:%=%/.installed)
59 TEST_32 = $(NOX_VARIANT)/.tested
61 # vim uses self-defined INFINITY/NAN, which don't work well on illumos
62 CFLAGS += -std=c99 -D_XOPEN_SOURCE=600
64 # Make sure we use a default perl
65 CONFIGURE_ENV += vi_cv_path_perl=$(PERL)
66 CONFIGURE_ENV += SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH)
68 CONFIGURE_OPTIONS += --with-features=huge
69 CONFIGURE_OPTIONS += --with-compiledby="oi-userland build environment"
70 CONFIGURE_OPTIONS += --with-modified-by="OpenIndiana <oi-dev@openindiana.org>"
71 CONFIGURE_OPTIONS += --enable-luainterp=dynamic
72 CONFIGURE_OPTIONS += --enable-perlinterp=dynamic
73 CONFIGURE_OPTIONS += --enable-pythoninterp=dynamic
74 CONFIGURE_OPTIONS += --enable-rubyinterp=dynamic
76 # We build two variants: with and without X support.
77 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --without-x
78 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gui
79 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gtktest
80 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-vim-name=gvim
81 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-x
82 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-gui=gtk2
83 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-gtk2-check
85 # Vim's build is too smart for itself and configure can't run outside of a
86 # complete source tree.
87 COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
89 # For the GUI, install only the executable itself.
90 $(X_VARIANT)/.installed: COMPONENT_INSTALL_ARGS += -C src
91 $(X_VARIANT)/.installed: COMPONENT_INSTALL_TARGETS = installvimbin
93 COMPONENT_TEST_TARGETS = test
95 $(SOURCE_DIR)/runtime/doc/uganda.txt: prep
97 $(BUILD_DIR)/license: $(SOURCE_DIR)/runtime/doc/uganda.txt
98 nawk '/begin of license/ {p=1; getline; next} /end of license/ {p=0} p == 1 {print}' $< > $@
100 # common targets
101 build: $(BUILD_32)
103 install: $(INSTALL_32) $(BUILD_DIR)/license
105 # A lot of tests fail with 'Cannot create directory'
106 test: $(TEST_32)
108 REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
109 REQUIRED_PACKAGES += library/desktop/gtk2
110 REQUIRED_PACKAGES += library/desktop/pango
111 REQUIRED_PACKAGES += library/glib2
112 REQUIRED_PACKAGES += library/ncurses
113 REQUIRED_PACKAGES += runtime/perl-522
114 REQUIRED_PACKAGES += SUNWcs
115 REQUIRED_PACKAGES += system/library
116 REQUIRED_PACKAGES += system/library/g++-6-runtime
117 REQUIRED_PACKAGES += system/library/math
118 REQUIRED_PACKAGES += x11/library/libice
119 REQUIRED_PACKAGES += x11/library/libsm
120 REQUIRED_PACKAGES += x11/library/libx11
121 REQUIRED_PACKAGES += x11/library/toolkit/libxt