Andreas Wacknitz
2023-12-03 87d91919dbf8c9744ca62356275bb0ddd60c4285
commit | author | age
946865 1 #
AP 2 # CDDL HEADER START
3 #
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.
7 #
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.
12 #
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]
18 #
19 # CDDL HEADER END
20 #
21
22 #
123758 23 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
389a70 24 # Copyright (c) 2017, Ken Mays
7ffa83 25 # Copyright (c) 2019, Michal Nowak
465ad4 26 # Copyright (c) 2020, Nona Hansel
a1c2c3 27 # Copyright (c) 2022-2023 Niklas Poslovski
946865 28 #
AP 29
30 include ../../../make-rules/shared-macros.mk
31
32 COMPONENT_NAME=        vim
87d919 33 COMPONENT_VERSION=    9.0.2143
6a0a17 34 COMPONENT_SRC=        $(COMPONENT_NAME)-$(HUMAN_VERSION)
389a70 35 COMPONENT_PROJECT_URL=    https://www.vim.org/
946865 36 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
6a0a17 37 COMPONENT_ARCHIVE_URL=    https://github.com/vim/vim/archive/v$(HUMAN_VERSION).tar.gz
87d919 38 COMPONENT_ARCHIVE_HASH=    sha256:830ef5ef61778a8b2095f71b010dc545f1cc2bf75133368932e41c894b190ef7
946865 39
465ad4 40 include $(WS_MAKE_RULES)/common.mk
946865 41
AP 42 COMPONENT_POST_UNPACK_ACTION += ( chmod +x $(@D)/configure  $(@D)/src/auto/configure $(@D)/src/configure $(@D)/src/mkinstalldirs ; \
123758 43                   find $(@D) -name \*.sh  -exec chmod +x '{}' ';' ; rm $(@D)/src/po/{ko.po,zh_CN.po} ; )
946865 44
82cf06 45 NOX_VARIANT = $(BUILD_DIR)/$(MACH64)-vim
123758 46 X_VARIANT =    $(BUILD_DIR)/$(MACH64)-gvim
946865 47
82cf06 48 VARIANTS = $(X_VARIANT) $(NOX_VARIANT)
946865 49
82cf06 50 $(VARIANTS:%=%/.configured): BITS=64
946865 51
82cf06 52 BUILD_64 = $(VARIANTS:%=%/.built)
AW 53 INSTALL_64 = $(VARIANTS:%=%/.installed)
123758 54 # Test only the terminal variant.
82cf06 55 TEST_64 = $(NOX_VARIANT)/.tested
946865 56
AP 57 # vim uses self-defined INFINITY/NAN, which don't work well on illumos
a0bfb2 58 CFLAGS += -std=c99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
1114cc 59
82cf06 60 CONFIGURE_ENV += PATH=$(PATH.gnu)
123758 61 # Make sure we use a 64-bit, multithreaded perl
82cf06 62 CONFIGURE_ENV += vi_cv_path_perl=/usr/perl5/5.36/bin/perl
123758 63 # Vim's configure script looks for a "python3" executable, per PEP 394
82cf06 64 CONFIGURE_ENV += vi_cv_path_python3=/usr/bin/python$(PYTHON_VERSION)
946865 65 # zh_CN.cp936.po has invalid characters which GNU msgfmt seems to be able to ignore.
82cf06 66 CONFIGURE_ENV += MSGFMT=gmsgfmt
946865 67
82cf06 68 CONFIGURE_OPTIONS += --with-features=huge
AW 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-rubyinterp=dynamic
74 CONFIGURE_OPTIONS += --with-ruby-command=/usr/bin/ruby26
75 CONFIGURE_OPTIONS += --enable-pythoninterp=dynamic
76 CONFIGURE_OPTIONS += --enable-python3interp=dynamic
77 CONFIGURE_OPTIONS += --enable-terminal
946865 78
AP 79 # We build two variants: with and without X support.
82cf06 80 $(NOX_VARIANT)/.configured:    CONFIGURE_OPTIONS += --without-x
AW 81 $(NOX_VARIANT)/.configured:    CONFIGURE_OPTIONS += --disable-gui
82 $(NOX_VARIANT)/.configured:    CONFIGURE_OPTIONS += --disable-gtktest
83 $(NOX_VARIANT)/.configured:    CONFIGURE_OPTIONS += --disable-canberra
123758 84 $(X_VARIANT)/.configured:    CONFIGURE_OPTIONS += --with-vim-name=gvim
MN 85 $(X_VARIANT)/.configured:    CONFIGURE_OPTIONS += --with-x
86 $(X_VARIANT)/.configured:    CONFIGURE_OPTIONS += --enable-gui=gtk3
87 $(X_VARIANT)/.configured:    CONFIGURE_OPTIONS += --enable-gtk3-check
88 $(X_VARIANT)/.configured:    CONFIGURE_OPTIONS += --enable-canberra
946865 89
AP 90 # Vim's build is too smart for itself and configure can't run outside of a
91 # complete source tree.
123758 92 COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D) ; cd $(@D)/src ; aclocal ; autoconf ; )
946865 93
AP 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
97
98 COMPONENT_TEST_TARGETS = test
99
100 $(SOURCE_DIR)/runtime/doc/uganda.txt: prep
101
102 $(BUILD_DIR)/license: $(SOURCE_DIR)/runtime/doc/uganda.txt
103     nawk '/begin of license/ {p=1; getline; next} /end of license/ {p=0} p == 1 {print}' $< > $@
104
123758 105 install:    $(INSTALL_64) $(BUILD_DIR)/license
946865 106
1114cc 107 # Manually added build dependencies
6f184e 108 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
252f40 109 # libssp is in $(GCC_RUNTIME_PKG) since gcc-10
82cf06 110 # Manually added dependency on python runtime
365c83 111 PYTHON_REQUIRED_PACKAGES += runtime/python
55bcea 112
123758 113 # Auto-generated dependencies
MN 114 REQUIRED_PACKAGES += library/desktop/cairo
946865 115 REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
123758 116 REQUIRED_PACKAGES += library/desktop/gtk3
946865 117 REQUIRED_PACKAGES += library/desktop/pango
123758 118 REQUIRED_PACKAGES += library/desktop/xdg/libcanberra
946865 119 REQUIRED_PACKAGES += library/glib2
AP 120 REQUIRED_PACKAGES += library/ncurses
55bcea 121 REQUIRED_PACKAGES += library/security/libsodium
AW 122 REQUIRED_PACKAGES += shell/ksh93
946865 123 REQUIRED_PACKAGES += system/library
AP 124 REQUIRED_PACKAGES += system/library/math
125 REQUIRED_PACKAGES += x11/library/libice
126 REQUIRED_PACKAGES += x11/library/libsm
127 REQUIRED_PACKAGES += x11/library/libx11
128 REQUIRED_PACKAGES += x11/library/toolkit/libxt