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]
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
31 COMPONENT_VERSION
= 8.0.0104
32 IPS_COMPONENT_VERSION
= $(shell echo
$(COMPONENT_VERSION
) | sed
-e
's/\.0*\([1-9]\)/.\1/')
33 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
34 COMPONENT_PROJECT_URL
= http
://www.vim.org
/
35 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
36 COMPONENT_ARCHIVE_URL
= https
://github.com
/vim
/vim
/archive
/v
$(COMPONENT_VERSION
).
tar.gz
37 COMPONENT_ARCHIVE_HASH
= sha256
:b200636f743ea250d655bc03f053dc177a27e066d3e00db4ee0efe3c4de5f666
38 COMPONENT_BUGDB
= utility
/vim
40 include $(WS_MAKE_RULES
)/prep.mk
41 include $(WS_MAKE_RULES
)/configure.mk
42 include $(WS_MAKE_RULES
)/ips.mk
44 COMPONENT_POST_UNPACK_ACTION
+= ( chmod
+x
$(@D
)/configure
$(@D
)/src
/auto
/configure
$(@D
)/src
/configure
$(@D
)/src
/mkinstalldirs
; \
45 find
$(@D
) -name \
*.sh
-exec chmod
+x
'{}' ';' )
47 PKG_MACROS
+= VIMVER
=vim80
49 X_VARIANT
= $(BUILD_DIR
)/$(MACH32
)-gvim
50 NOX_VARIANT
= $(BUILD_DIR
)/$(MACH32
)-vim
52 VARIANTS
= $(X_VARIANT
) $(NOX_VARIANT
)
54 BUILD_32
= $(VARIANTS
:%=%/.built
)
56 INSTALL_32
= $(VARIANTS
:%=%/.installed
)
58 TEST_32
= $(NOX_VARIANT
)/.tested
60 # vim uses self-defined INFINITY/NAN, which don't work well on illumos
61 CFLAGS
+= -std
=c99
-D_XOPEN_SOURCE
=600
63 # Make sure we use a default perl
64 CONFIGURE_ENV
+= vi_cv_path_perl
=$(PERL
)
65 # zh_CN.cp936.po has invalid characters which GNU msgfmt seems to be able to ignore.
66 CONFIGURE_ENV
+= MSGFMT
=gmsgfmt
67 CONFIGURE_ENV
+= SOURCE_DATE_EPOCH
=$(SOURCE_DATE_EPOCH
)
69 CONFIGURE_OPTIONS
+= --with-features
=huge
70 CONFIGURE_OPTIONS
+= --with-compiledby
="oi-userland build environment"
71 CONFIGURE_OPTIONS
+= --with-modified-by
="OpenIndiana <oi-dev@openindiana.org>"
72 CONFIGURE_OPTIONS
+= --enable-luainterp
=dynamic
73 CONFIGURE_OPTIONS
+= --enable-perlinterp
=dynamic
74 CONFIGURE_OPTIONS
+= --enable-pythoninterp
=dynamic
75 CONFIGURE_OPTIONS
+= --enable-rubyinterp
=dynamic
77 # We build two variants: with and without X support.
78 $(NOX_VARIANT
)/.configured
: CONFIGURE_OPTIONS
+= --without-x
79 $(NOX_VARIANT
)/.configured
: CONFIGURE_OPTIONS
+= --disable-gui
80 $(NOX_VARIANT
)/.configured
: CONFIGURE_OPTIONS
+= --disable-gtktest
81 $(X_VARIANT
)/.configured
: CONFIGURE_OPTIONS
+= --with-vim-name
=gvim
82 $(X_VARIANT
)/.configured
: CONFIGURE_OPTIONS
+= --with-x
83 $(X_VARIANT
)/.configured
: CONFIGURE_OPTIONS
+= --enable-gui
=gtk2
84 $(X_VARIANT
)/.configured
: CONFIGURE_OPTIONS
+= --enable-gtk2-check
86 # Vim's build is too smart for itself and configure can't run outside of a
87 # complete source tree.
88 COMPONENT_PRE_CONFIGURE_ACTION
= ($(CLONEY
) $(SOURCE_DIR
) $(@D
))
90 # For the GUI, install only the executable itself.
91 $(X_VARIANT
)/.installed
: COMPONENT_INSTALL_ARGS
+= -C src
92 $(X_VARIANT
)/.installed
: COMPONENT_INSTALL_TARGETS
= installvimbin
94 COMPONENT_TEST_TARGETS
= test
96 $(SOURCE_DIR
)/runtime
/doc
/uganda.txt
: prep
98 $(BUILD_DIR
)/license
: $(SOURCE_DIR
)/runtime
/doc
/uganda.txt
99 nawk
'/begin of license/ {p=1; getline; next} /end of license/ {p=0} p == 1 {print}' $< > $@
104 install: $(INSTALL_32
) $(BUILD_DIR
)/license
106 # A lot of tests fail with 'Cannot create directory'
109 REQUIRED_PACKAGES
+= library
/desktop
/gdk-pixbuf
110 REQUIRED_PACKAGES
+= library
/desktop
/gtk2
111 REQUIRED_PACKAGES
+= library
/desktop
/pango
112 REQUIRED_PACKAGES
+= library
/glib2
113 REQUIRED_PACKAGES
+= library
/ncurses
114 REQUIRED_PACKAGES
+= runtime
/perl-522
115 REQUIRED_PACKAGES
+= SUNWcs
116 REQUIRED_PACKAGES
+= system
/library
117 REQUIRED_PACKAGES
+= system
/library
/g
++-4-runtime
118 REQUIRED_PACKAGES
+= system
/library
/math
119 REQUIRED_PACKAGES
+= x11
/library
/libice
120 REQUIRED_PACKAGES
+= x11
/library
/libsm
121 REQUIRED_PACKAGES
+= x11
/library
/libx11
122 REQUIRED_PACKAGES
+= x11
/library
/toolkit
/libxt