Marcel Telka
2024-04-08 5d8bcb58722b250c296fc0324f9d06470fb3d7d0
commit | author | age
20fea4 1 #
AW 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 #
23 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2020, Michal Nowak
25 # Copyright 2021, Andreas Wacknitz
26 #
27
8ff6e4 28 BUILD_BITS= 64
20fea4 29 include ../../../make-rules/shared-macros.mk
AW 30
31 COMPONENT_NAME=        bison
32 COMPONENT_MAJOR_VERSION=    3.7
33 COMPONENT_MAJOR_VERSION_=    $(subst .,,$(COMPONENT_MAJOR_VERSION))
34 COMPONENT_VERSION=    $(COMPONENT_MAJOR_VERSION).6
8ff6e4 35 COMPONENT_REVISION=    3
20fea4 36 COMPONENT_SUMMARY=    bison - A YACC Replacement
AW 37 COMPONENT_DESCRIPTION=    A general-purpose parser generator that converts an annotated context-free grammar into an LALR(1) or GLR parser for that grammar
d88ed7 38 COMPONENT_PROJECT_URL=    https://www.gnu.org/software/bison/
AW 39 COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
20fea4 40 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.xz
AW 41 COMPONENT_ARCHIVE_HASH=    sha256:67d68ce1e22192050525643fc0a7a22297576682bef6a5c51446903f5aeef3cf
42 COMPONENT_ARCHIVE_URL=    https://ftp.gnu.org/gnu/bison/$(COMPONENT_ARCHIVE)
43 COMPONENT_FMRI=        developer/parser/bison-$(COMPONENT_MAJOR_VERSION_)
d88ed7 44 COMPONENT_CLASSIFICATION=    Development/Other Languages
20fea4 45 COMPONENT_LICENSE=    GPLv2, FDLv1.2
AW 46
47 include $(WS_MAKE_RULES)/common.mk
48
49 PKG_MACROS += COMPONENT_MAJOR_VERSION=$(COMPONENT_MAJOR_VERSION)
50
51 # Tests need this
d88ed7 52 COMPONENT_PRE_CONFIGURE_ACTION = ( $(CLONEY) $(SOURCE_DIR) $(@D) )
20fea4 53
AW 54 CONFIGURE_LIBDIR.32 =   $(GNULIB)/$(COMPONENT_NAME)-$(COMPONENT_MAJOR_VERSION)/
55 CONFIGURE_LIBDIR.64 =   $(GNULIB)/$(MACH64)/$(COMPONENT_NAME)-$(COMPONENT_MAJOR_VERSION)/
56
57 CONFIGURE_OPTIONS +=    --program-transform-name=s/$$/-$(COMPONENT_MAJOR_VERSION)/
58 CONFIGURE_OPTIONS +=    --datarootdir=$(CONFIGURE_PREFIX)/share/$(COMPONENT_NAME)-$(COMPONENT_MAJOR_VERSION)/
59 CONFIGURE_OPTIONS +=    --docdir=$(CONFIGURE_PREFIX)/share/doc/$(COMPONENT_NAME)-$(COMPONENT_MAJOR_VERSION)
60 CONFIGURE_OPTIONS +=    --disable-silent-rules
61 CONFIGURE_OPTIONS +=     --disable-dependency-tracking
62 CONFIGURE_OPTIONS +=    --disable-yacc
63
64 # the shared library we create needs to be built pic
65 COMPONENT_BUILD_ARGS += CC_PIC="$(CC_PIC)"
66
67 # this is cheesy but the tests don't seem to
68 # get compiled with the CFLAGS we built bison
69 # with, so they are 32-bit otherwise.
70 CONFIGURE_OPTIONS +=    WARN_CXXFLAGS_TEST="$(CFLAGS)"
71
72 CONFIGURE_ENV +=     M4="/usr/bin/gm4"
5c37f5 73 CONFIGURE_ENV +=    RANLIB="/usr/bin/ranlib"
20fea4 74
AW 75 # Strip compilation lines from test output
76 # and strange backslash lines. and random output,
77 # including rm complaints over nfs
78 COMPONENT_TEST_TRANSFORMS += \
79     $(CONFIGURE_TEST_TRANSFORMS) \
80     ' -e "/^\#/p" ' \
81     ' -e "/^[\s]*[0-9][0-9]*:/p" ' \
82     ' -e "/tests were/p" ' 
83
5c37f5 84 GENERATE_EXTRA_CMD += | \
MT 85     $(GSED) -e 's/bison-$(shell echo $(COMPONENT_MAJOR_VERSION) | $(GSED) -e 's/\./\\./g')/bison-$$(COMPONENT_MAJOR_VERSION)/'
86
20fea4 87 # Two test suite cases utilitize Doxygen
5c37f5 88 TEST_REQUIRED_PACKAGES += developer/documentation-tool/doxygen
20fea4 89
AW 90 # Auto-generated dependencies
91 REQUIRED_PACKAGES += developer/macro/gnu-m4
92 REQUIRED_PACKAGES += system/library
93 REQUIRED_PACKAGES += system/library/math
94 REQUIRED_PACKAGES += text/gnu-gettext