24 # |
24 # |
25 BUILD_BITS= 64 |
25 BUILD_BITS= 64 |
26 include ../../make-rules/shared-macros.mk |
26 include ../../make-rules/shared-macros.mk |
27 |
27 |
28 COMPONENT_NAME= vim |
28 COMPONENT_NAME= vim |
29 COMPONENT_VERSION= 7.4 |
29 COMPONENT_VERSION= 8.0 |
30 IPS_COMPONENT_VERSION= $(shell echo $(HG_REV) | sed -e 's/-/./g' -e 's/v//') |
30 COMPONENT_FULL_VERSION= $(shell echo $(GIT_TAG) | sed -e 's/v//') |
|
31 IPS_COMPONENT_VERSION= $(shell echo $(GIT_TAG) | sed -e 's/v//' -e 's/\.0*\([1-9]\)/.\1/') |
|
32 COMPONENT_LABEL= $(COMPONENT_FULL_VERSION) |
31 # COMPONENT_SRC* is autodefined by the prep-{SCM} Makefile fragment |
33 # COMPONENT_SRC* is autodefined by the prep-{SCM} Makefile fragment |
32 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
34 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
33 COMPONENT_PROJECT_URL= http://www.vim.org/ |
35 COMPONENT_PROJECT_URL= http://www.vim.org/ |
34 |
36 |
35 HG_REPO= https://vim.googlecode.com/hg |
37 GIT_REPO= git://github.com/vim/vim |
36 HG_REV= v7-4 |
38 GIT_TAG= v8.0.0016 |
37 HG_HASH= sha256:0c823290aebf4ea341be2f8280cc5906cdbbf772c54fa675afb0845983f23b60 |
39 GIT_COMMIT_ID= 0e77b76 |
|
40 GIT_HASH= sha256:1a5f704a68f844ababa932ac8522d87ede599c062ff7fe1dd48beaaaf5417246 |
38 |
41 |
|
42 TPNO= 31881 |
39 |
43 |
40 TPNO= 21780 |
44 PKG_MACROS += VIMVER=vim$(subst .,,$(COMPONENT_VERSION)) |
41 |
|
42 INSTALL_TARGET= |
|
43 include $(WS_MAKE_RULES)/common.mk |
|
44 |
|
45 PATCH_LEVEL = 0 |
|
46 |
|
47 PKG_MACROS += VIMVER=vim74 |
|
48 |
45 |
49 X_VARIANT = $(BUILD_DIR)/$(MACH64)-gvim |
46 X_VARIANT = $(BUILD_DIR)/$(MACH64)-gvim |
50 NOX_VARIANT = $(BUILD_DIR)/$(MACH64)-vim |
47 NOX_VARIANT = $(BUILD_DIR)/$(MACH64)-vim |
51 |
48 |
52 VARIANTS = $(X_VARIANT) $(NOX_VARIANT) |
49 VARIANTS = $(X_VARIANT) $(NOX_VARIANT) |
53 |
50 |
54 $(VARIANTS:%=%/.configured): BITS=64 |
51 $(VARIANTS:%=%/.configured): BITS=64 |
55 |
52 |
56 BUILD_64 = $(VARIANTS:%=%/.built) |
53 BUILD_64 = $(VARIANTS:%=%/.built) |
57 |
54 INSTALL_64 = $(VARIANTS:%=%/.installed) |
58 # Only install the non-X variant. We will cherry-pick gvim out of the build |
55 # Test only the terminal variant. |
59 # directory to avoid re-installing everything. |
|
60 INSTALL_64 = $(NOX_VARIANT)/.installed |
|
61 |
|
62 TEST_64 = $(NOX_VARIANT)/.tested |
56 TEST_64 = $(NOX_VARIANT)/.tested |
63 |
57 |
64 # Necessary to pass 64-bit flags to the link stage. |
58 include $(WS_MAKE_RULES)/common.mk |
65 CC += $(CC_BITS) |
59 |
|
60 # Studio 12.3 and 12.4 allow unknown __attribute__s, but complain about them, |
|
61 # making the build pretty loud about unknown "unused" attributes. If we make |
|
62 # it an error, configure will turn off its use. See bug 20230791. |
|
63 CFLAGS += -errwarn=E_ATTRIBUTE_UNKNOWN |
|
64 |
|
65 # Make sure we use a 64-bit, multithreaded perl |
|
66 CONFIGURE_ENV += vi_cv_path_perl=/usr/perl5/5.22/bin/perl |
|
67 # Vim's configure script looks for a "python3" executable, per PEP 394 |
|
68 CONFIGURE_ENV += vi_cv_path_python3=/usr/bin/python3.5 |
|
69 # zh_CN.cp936.po has invalid characters which GNU msgfmt seems to be able to ignore. |
|
70 CONFIGURE_ENV += MSGFMT=gmsgfmt |
|
71 CONFIGURE_ENV += SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) |
66 |
72 |
67 CONFIGURE_OPTIONS += --with-features=huge |
73 CONFIGURE_OPTIONS += --with-features=huge |
68 CONFIGURE_OPTIONS += --with-compiledby="the Solaris Userland build environment" |
74 CONFIGURE_OPTIONS += --with-compiledby="the Solaris Userland build environment" |
69 CONFIGURE_OPTIONS += --with-modified-by="Solaris Userland <[email protected]>" |
75 CONFIGURE_OPTIONS += --with-modified-by="Solaris Userland <[email protected]>" |
70 CONFIGURE_OPTIONS += --enable-luainterp=dynamic |
76 CONFIGURE_OPTIONS += --enable-luainterp=dynamic |
71 # XXX Perl compilation fails, for some reason. |
77 CONFIGURE_OPTIONS += --enable-perlinterp=dynamic |
72 # - Perl_croak_nocontext is redefined (embed.h, line 5157), having something to |
|
73 # do with PERL_IMPLICIT_CONTEXT, which is discussed in perlguts(1). This is |
|
74 # just a warning, but looks like it might have nasty consequences. |
|
75 # - The declaration of Perl_Gthr_key_ptr() has a problem with its argument of |
|
76 # type pTHX. if_perl.xs defines that to void if it's not already defined, |
|
77 # but perl.h probably does something else to it, not sure what yet. This |
|
78 # also appears to have something to do with PERL_IMPLICIT_CONTEXT. |
|
79 # CONFIGURE_OPTIONS += --enable-perlinterp=dynamic |
|
80 CONFIGURE_OPTIONS += --enable-pythoninterp=dynamic |
78 CONFIGURE_OPTIONS += --enable-pythoninterp=dynamic |
|
79 CONFIGURE_OPTIONS += --enable-python3interp=dynamic |
81 CONFIGURE_OPTIONS += --enable-rubyinterp=dynamic |
80 CONFIGURE_OPTIONS += --enable-rubyinterp=dynamic |
82 |
81 |
83 # We build two variants: with and without X support. |
82 # We build two variants: with and without X support. |
84 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --without-x |
83 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --without-x |
85 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gui |
84 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gui |
86 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gtktest |
85 $(NOX_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-gtktest |
87 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-vim-name=gvim |
86 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-vim-name=gvim |
88 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-x |
87 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-x |
89 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-gui=gtk2 |
88 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-gui=gtk3 |
90 $(X_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-gtk2-check |
|
91 |
89 |
92 # Vim's build is too smart for itself and configure can't run outside of a |
90 # Vim's build is too smart for itself and configure can't run outside of a |
93 # complete source tree. |
91 # complete source tree. |
94 COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D)) |
92 COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D)) |
|
93 |
|
94 # For the GUI, install only the executable itself. |
|
95 $(X_VARIANT)/.installed: COMPONENT_INSTALL_ARGS += -C src |
|
96 $(X_VARIANT)/.installed: COMPONENT_INSTALL_TARGETS = installvimbin |
95 |
97 |
96 COMPONENT_TEST_TARGETS = test |
98 COMPONENT_TEST_TARGETS = test |
97 |
99 |
98 $(SOURCE_DIR)/runtime/doc/uganda.txt: prep |
100 $(SOURCE_DIR)/runtime/doc/uganda.txt: prep |
99 |
101 |
100 $(BUILD_DIR)/license: $(SOURCE_DIR)/runtime/doc/uganda.txt |
102 $(BUILD_DIR)/license: $(SOURCE_DIR)/runtime/doc/uganda.txt |
101 nawk '/begin of license/ {p=1; getline; next} /end of license/ {p=0} p == 1 {print}' $< > $@ |
103 nawk '/begin of license/ {p=1; getline; next} /end of license/ {p=0} p == 1 {print}' $< > $@ |
102 |
104 |
103 # common targets |
105 # common targets |
104 install: $(INSTALL_64) $(X_VARIANT)/.built $(BUILD_DIR)/license |
106 install: $(INSTALL_64) $(BUILD_DIR)/license |
105 |
107 |
|
108 |
|
109 REQUIRED_PACKAGES += library/desktop/cairo |
106 REQUIRED_PACKAGES += library/desktop/gdk-pixbuf |
110 REQUIRED_PACKAGES += library/desktop/gdk-pixbuf |
107 REQUIRED_PACKAGES += library/desktop/gtk2 |
111 REQUIRED_PACKAGES += library/desktop/gtk3 |
108 REQUIRED_PACKAGES += library/desktop/pango |
112 REQUIRED_PACKAGES += library/desktop/pango |
109 REQUIRED_PACKAGES += library/glib2 |
113 REQUIRED_PACKAGES += library/glib2 |
110 REQUIRED_PACKAGES += library/ncurses |
114 REQUIRED_PACKAGES += library/ncurses |
|
115 REQUIRED_PACKAGES += runtime/lua |
|
116 REQUIRED_PACKAGES += runtime/perl-522 |
|
117 REQUIRED_PACKAGES += runtime/python-27 |
|
118 REQUIRED_PACKAGES += runtime/python-35 |
|
119 REQUIRED_PACKAGES += runtime/ruby-21 |
111 REQUIRED_PACKAGES += shell/ksh93 |
120 REQUIRED_PACKAGES += shell/ksh93 |
112 REQUIRED_PACKAGES += system/library/math |
121 REQUIRED_PACKAGES += system/library/math |
|
122 REQUIRED_PACKAGES += text/gnu-gettext |
113 REQUIRED_PACKAGES += x11/library/libice |
123 REQUIRED_PACKAGES += x11/library/libice |
114 REQUIRED_PACKAGES += x11/library/libsm |
124 REQUIRED_PACKAGES += x11/library/libsm |
115 REQUIRED_PACKAGES += x11/library/libx11 |
125 REQUIRED_PACKAGES += x11/library/libx11 |
116 REQUIRED_PACKAGES += x11/library/libxcursor |
126 REQUIRED_PACKAGES += x11/library/libxcursor |
117 REQUIRED_PACKAGES += x11/library/toolkit/libxt |
127 REQUIRED_PACKAGES += x11/library/toolkit/libxt |