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 2022 Gary Mills
24 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
27 include ..
/..
/..
/make-rules
/shared-macros.mk
30 # This is an ancient version, but a dependency of the ant package
31 COMPONENT_VERSION
= 2.7.7
33 COMPONENT_SUMMARY
= ANother Tool for Language Recognition
34 COMPONENT_DESCRIPTION
= ANTLR
, ANother Tool for Language Recognition
, (formerly PCCTS
) is a language tool that provides a framework \
35 for constructing recognizers
, compilers
, and translators from grammatical descriptions containing C
++ or \
36 Java actions
[You can use PCCTS
1.xx to generate C-based parsers
].
37 COMPONENT_PROJECT_URL
= https
://www.antlr.org
/
38 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
39 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
40 COMPONENT_ARCHIVE_HASH
= sha256
:853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9
41 COMPONENT_ARCHIVE_URL
= https
://www.antlr2.org
/download
/$(COMPONENT_ARCHIVE
)
42 COMPONENT_FMRI
= developer
/parser
/antlr-2
43 COMPONENT_CLASSIFICATION
= Development
/Other Languages
44 COMPONENT_LICENSE
= Public Domain
45 COMPONENT_LICENSE_FILE
= LICENSE.txt
47 # Use version of Java defined in ../../make-rules/shared-macros.mk
48 PATH
=$(JAVA_HOME
)/bin
:/usr
/bin
50 include $(WS_MAKE_RULES
)/common.mk
54 CONFIGURE_OPTIONS
+= --without-examples
55 # Omit python 2.7 from this build
56 CONFIGURE_OPTIONS
+= --disable-python
58 COMPONENT_INSTALL_ARGS
+= prefix=$(PROTOUSRDIR
)
59 COMPONENT_INSTALL_ARGS
+= libdir=$(PROTOUSRLIBDIR
)
60 COMPONENT_INSTALL_ARGS
+= bindir=$(PROTOUSRBINDIR
)
61 COMPONENT_INSTALL_ARGS
+= sbindir
=$(PROTOUSRSBINDIR
)
63 # Needed to find the antlr man page.
64 PKG_PROTO_DIRS
+= $(COMPONENT_DIR
)/files
66 COMPONENT_TEST_TARGETS
= test
68 ASLR_MODE
= $(ASLR_ENABLE
)
70 # Rename some files to accomodate newer versions of antlr
71 COMPONENT_POST_INSTALL_ACTION
+= \
72 (cd
$(PROTOUSRBINDIR
); $(MV
) antlr antlr-
$(COMPONENT_VERSION
); \
73 $(MV
) antlr-config antlr-config-
$(COMPONENT_VERSION
)) ;
74 COMPONENT_POST_INSTALL_ACTION
+= \
75 (cd
$(PROTOUSRLIBDIR
); $(MV
) antlr.jar antlr-
$(COMPONENT_VERSION
).jar
) ;
77 # Added build dependencies
78 REQUIRED_PACKAGES
+= developer
/documentation-tool
/doxygen
80 # Auto-generated dependencies
81 REQUIRED_PACKAGES
+= shell/ksh93