commit | author | age
|
e2ca11
|
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 |
# |
|
23 |
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
a76fc2
|
24 |
# Copyright 2017 Andreas Grueninger, Grueninger GmbH, (grueni). All rights reserved. |
aaf2eb
|
25 |
# Copyright 2023 Friedrich Kink. All rights reserved. |
e2ca11
|
26 |
# |
a76fc2
|
27 |
|
e2ca11
|
28 |
include ../../../make-rules/shared-macros.mk |
AP |
29 |
|
aaf2eb
|
30 |
COMPONENT_NAME= ocaml |
6958de
|
31 |
COMPONENT_VERSION_MAJOR= 5.1 |
5b0f7d
|
32 |
COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).1 |
AW |
33 |
COMPONENT_SUMMARY= Objective Caml compiler and programming environment |
|
34 |
COMPONENT_DESCRIPTION= Objective Caml is a high-level, strongly-typed, functional and object-oriented programming language \ |
|
35 |
from the ML family of languages. This package comprises two batch compilers \ |
|
36 |
(a fast bytecode compiler and an optimizing native-code compiler), an interactive toplevel system, \ |
|
37 |
parsing tools (Lex,Yacc,Camlp4), a replay debugger, documentation generator, and a comprehensive library. |
e21c69
|
38 |
COMPONENT_PROJECT_URL= https://ocaml.org |
aaf2eb
|
39 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
F |
40 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
e21c69
|
41 |
COMPONENT_ARCHIVE_SRC= $(COMPONENT_VERSION).tar.gz |
5b0f7d
|
42 |
COMPONENT_ARCHIVE_HASH= sha256:57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17 |
e21c69
|
43 |
COMPONENT_ARCHIVE_URL= https://github.com/$(COMPONENT_NAME)/$(COMPONENT_NAME)/archive/$(COMPONENT_ARCHIVE_SRC) |
5b0f7d
|
44 |
COMPONENT_FMRI= runtime/ocaml |
e21c69
|
45 |
COMPONENT_CLASSIFICATION= Development/System |
5b0f7d
|
46 |
COMPONENT_LICENSE= QPLv1, GPLv2 |
AW |
47 |
COMPONENT_LICENSE_FILE= LICENSE |
e2ca11
|
48 |
|
AP |
49 |
# Documentation sources |
|
50 |
# |
e21c69
|
51 |
COMPONENT_ARCHIVE_1= ocaml-$(COMPONENT_VERSION_MAJOR)-refman-html.tar.gz |
5b0f7d
|
52 |
COMPONENT_ARCHIVE_HASH_1= sha256:ef07f27e1556ab783972fb3e06afce64a270bf24f620a258c7651febc20f5ec3 |
e21c69
|
53 |
COMPONENT_ARCHIVE_URL_1= https://caml.inria.fr/distrib/ocaml-$(COMPONENT_VERSION_MAJOR)/$(COMPONENT_ARCHIVE_1) |
e2ca11
|
54 |
|
e21c69
|
55 |
COMPONENT_ARCHIVE_2= ocaml-$(COMPONENT_VERSION_MAJOR)-refman.pdf |
5b0f7d
|
56 |
COMPONENT_ARCHIVE_HASH_2= sha256:d8b1501b356242ef83240144f940887fb17154e94c20acbaad1b2e28897dbd76 |
e21c69
|
57 |
COMPONENT_ARCHIVE_URL_2= https://caml.inria.fr/distrib/ocaml-$(COMPONENT_VERSION_MAJOR)/$(COMPONENT_ARCHIVE_2) |
e2ca11
|
58 |
|
e21c69
|
59 |
COMPONENT_ARCHIVE_3= ocaml-$(COMPONENT_VERSION_MAJOR)-refman.info.tar.gz |
5b0f7d
|
60 |
COMPONENT_ARCHIVE_HASH_3= sha256:d7faad8769682b2f361c79c6a3fb727b4e2016026ce718704c969ccc15b96575 |
e21c69
|
61 |
COMPONENT_ARCHIVE_URL_3= https://caml.inria.fr/distrib/ocaml-$(COMPONENT_VERSION_MAJOR)/$(COMPONENT_ARCHIVE_3) |
e2ca11
|
62 |
|
AP |
63 |
|
e21c69
|
64 |
include $(WS_MAKE_RULES)/common.mk |
e2ca11
|
65 |
|
5b0f7d
|
66 |
COMPONENT_BUILD_ARGS= -j1 |
a76fc2
|
67 |
|
G |
68 |
# Set up some environment variables to make things look nicer. |
|
69 |
# We make an 64 build and use /usr/bin/ for the commands |
|
70 |
UL_OCAML_PDFDOC = $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_2) |
e2ca11
|
71 |
|
aaf2eb
|
72 |
CONFIGURE_OPTIONS = --bindir=$(CONFIGURE_BINDIR.$(BITS)) |
F |
73 |
CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS))/$(COMPONENT_NAME) |
|
74 |
CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR) |
|
75 |
CONFIGURE_OPTIONS += --datarootdir=$(CONFIGURE_PREFIX)/share/$(COMPONENT_NAME) |
|
76 |
CONFIGURE_OPTIONS += --disable-debug-runtime |
|
77 |
CONFIGURE_OPTIONS += --without-gnu-ld |
|
78 |
CONFIGURE_OPTIONS += --enable-installing-bytecode-programs |
|
79 |
CONFIGURE_OPTIONS += --enable-flambda |
|
80 |
# otherwise no tests possible |
|
81 |
CONFIGURE_OPTIONS += --enable-ocamltest |
e2ca11
|
82 |
|
AP |
83 |
COMPONENT_PRE_CONFIGURE_ACTION = \ |
a76fc2
|
84 |
($(CLONEY) $(SOURCE_DIR) $(@D)) |
6958de
|
85 |
|
F |
86 |
# otherwise test run would not succeed |
|
87 |
COMPONENT_POST_CONFIGURE_ACTION = $(GSED) -i -e 's:$(SOURCE_DIR):$(@D):' $(@D)/ocamltest/ocamltest_config.ml |
e2ca11
|
88 |
|
AP |
89 |
COMPONENT_BUILD_TARGETS = world opt opt.opt |
|
90 |
|
|
91 |
COMPONENT_POST_BUILD_ACTION = (cd $(@D); \ |
a76fc2
|
92 |
$(GTAR) xf $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_1); \ |
aaf2eb
|
93 |
$(GTAR) xf $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_3); ) |
e2ca11
|
94 |
|
AP |
95 |
# This action moves additional files we want to install into the proto area. |
|
96 |
# I prefer using "cp -R" for copying the documentation tarball and example |
|
97 |
# contents since it will make it easier to see new files need to be packaged |
|
98 |
# when Ocaml is updated. |
|
99 |
# |
aaf2eb
|
100 |
COMPONENT_POST_INSTALL_ACTION = ( \ |
a76fc2
|
101 |
cd $(@D) &&\ |
aaf2eb
|
102 |
$(MKDIR) $(PROTOUSRSHAREDIR)/info &&\ |
F |
103 |
$(MKDIR) $(PROTOUSRSHAREDOCDIR)/$(COMPONENT_NAME) &&\ |
|
104 |
$(CP) $(@D)/infoman/ocaml*.gz $(PROTOUSRSHAREDIR)/info &&\ |
|
105 |
$(CP) $(UL_OCAML_PDFDOC) $(PROTOUSRSHAREDOCDIR)/$(COMPONENT_NAME)/refman.pdf &&\ |
|
106 |
$(CP) -R $(@D)/htmlman $(PROTOUSRSHAREDOCDIR)/$(COMPONENT_NAME)) |
e2ca11
|
107 |
|
a76fc2
|
108 |
# target all uses the new ocamltests, legacy uses the Makefile based tests. |
G |
109 |
# All tests succeed but the parsing of the ocamltest results is wrong and |
|
110 |
# leads to erroneously failing tests. |
|
111 |
# Only native tests are concerned. |
aaf2eb
|
112 |
COMPONENT_TEST_TARGETS = all |
F |
113 |
#COMPONENT_TEST_TARGETS = legacy |
a76fc2
|
114 |
COMPONENT_TEST_ARGS += SHELL=$(SHELL) |
G |
115 |
COMPONENT_TEST_DIR = $(@D)/testsuite |
|
116 |
COMPONENT_TEST_TRANSFORMER = $(NAWK) |
|
117 |
COMPONENT_TEST_TRANSFORMS = "'/tests passed|tests skipped|tests failed|unexpected errors|tests considered/'" |
|
118 |
|
|
119 |
# ASLR should be enabled when 64-bit support is enabled |
aaf2eb
|
120 |
ASLR_MODE = $(ASLR_ENABLE) |
480d0e
|
121 |
|
AL |
122 |
# Auto-generated dependencies |
6958de
|
123 |
REQUIRED_PACKAGES += compress/zstd |
e2ca11
|
124 |
REQUIRED_PACKAGES += system/library |
AP |
125 |
REQUIRED_PACKAGES += system/library/math |