Aurelien Larcher
2018-01-20 2136604c82fa97645ec6488d4a395fdaebb7eba4
commit | author | age
9840ef 1 #
AP 2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL)". You may
4 # only use this file in accordance with the terms of the CDDL.
5 #
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
9 #
10
11 #
12 # Copyright (c) 2016 Alexander Pyhalov
922cd3 13 # Copyright (c) 2017 Ken Mays
9840ef 14 #
AP 15
16 include ../../../make-rules/shared-macros.mk
17
18 COMPONENT_NAME=           hunspell
922cd3 19 COMPONENT_VERSION=        1.6.2
9840ef 20 COMPONENT_PROJECT_URL=    http://hunspell.github.io/
AP 21 COMPONENT_SUMMARY=        Improved spellchecker
22 COMPONENT_SRC=            $(COMPONENT_NAME)-$(COMPONENT_VERSION)
23 COMPONENT_ARCHIVE=        $(COMPONENT_SRC).tar.gz
24 COMPONENT_ARCHIVE_HASH=        \
922cd3 25     sha256:3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce180cac4d6f4c4 
9840ef 26 COMPONENT_ARCHIVE_URL=        https://github.com/hunspell/hunspell/archive/v$(COMPONENT_VERSION).tar.gz
922cd3 27 COMPONENT_LICENSE=    GPLv3, LGPLv3, MPLv1.1
9840ef 28 COMPONENT_FMRI= text/hunspell
AP 29 COMPONENT_CLASSIFICATION = System/Text Tools
30
922cd3 31 include $(WS_MAKE_RULES)/prep.mk
AL 32 include $(WS_MAKE_RULES)/configure.mk
33 include $(WS_MAKE_RULES)/ips.mk
9840ef 34
922cd3 35 PATH=$(PATH.gnu)
9840ef 36
AP 37 CPPFLAGS += -I/usr/include/ncurses
38 # We need to check headers with C++ compiler, but configure uses $(CC).
39 # We can't use $(CXX) as $(CC) as $(CC) is used to compile C files.
40 # So we make $(CC) behave more like $(CXX) during configure.
41 CFLAGS += -D_XOPEN_SOURCE=600
42 CFLAGS += -std=c99
43
922cd3 44 COMPONENT_PREP_ACTION = ( cd $(@D) && autoreconf -vif )
9840ef 45
AP 46 # Missing files in build dir without this.
47 COMPONENT_PRE_CONFIGURE_ACTION =    ($(CLONEY) $(SOURCE_DIR) $(@D))
48
49 CONFIGURE_SCRIPT = $(@D)/configure
50
51 CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
52
53 CONFIGURE_OPTIONS+=        --with-ui
54 CONFIGURE_OPTIONS+=        --with-readline
55
922cd3 56 unexport SHELLOPTS
AL 57
58 COMPONENT_TEST_MASTER =     $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
59
60 COMPONENT_TEST_TRANSFORMS += \
61      '-n ' \
62      '-e "/TOTAL:/p" ' \
63      '-e "/SKIP:/p" ' \
64      '-e "/PASS:/p" ' \
65      '-e "/FAIL:/p" ' \
66      '-e "/ERROR:/p" '
9840ef 67
AP 68 # common targets
69 build:        $(BUILD_32_and_64)
70
71 install:    $(INSTALL_32_and_64)
72
922cd3 73 test:        $(TEST_32_and_64)
AL 74
75 # Auto-generated dependencies
76 REQUIRED_PACKAGES += SUNWcs
77 REQUIRED_PACKAGES += library/ncurses
78 REQUIRED_PACKAGES += library/readline
79 REQUIRED_PACKAGES += runtime/perl-522
80 REQUIRED_PACKAGES += system/library
81 REQUIRED_PACKAGES += system/library/g++-4-runtime
213660 82 REQUIRED_PACKAGES += system/library/gcc-6-runtime