1 # |
|
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, 2015, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 |
|
26 COMPILER= gcc |
|
27 |
|
28 include ../../make-rules/shared-macros.mk |
|
29 |
|
30 COMPONENT_NAME= clisp |
|
31 COMPONENT_VERSION= 2.49 |
|
32 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
33 COMPONENT_PROJECT_URL= http://clisp.cons.org/ |
|
34 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
|
35 COMPONENT_ARCHIVE_HASH= \ |
|
36 sha256:8132ff353afaa70e6b19367a25ae3d5a43627279c25647c220641fed00f8e890 |
|
37 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/clisp/release/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
|
38 COMPONENT_BUGDB= utility/clisp |
|
39 |
|
40 TPNO= 8347 |
|
41 |
|
42 include $(WS_MAKE_RULES)/prep.mk |
|
43 include $(WS_MAKE_RULES)/configure.mk |
|
44 include $(WS_MAKE_RULES)/ips.mk |
|
45 |
|
46 # To include correct locale header file in .../modules/regexp/gllib/regex.c |
|
47 CPPFLAGS += -I/usr/share/gettext/intl |
|
48 |
|
49 # Required to configure correctly. |
|
50 COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
51 ($(CLONEY) $(SOURCE_DIR) $(@D)) |
|
52 |
|
53 # There is a compiler optimization problem when using -O2 on io.c and |
|
54 # lisparit.c on SPARC with the gcc 4.7.X compilers. Remove the '-O2" |
|
55 # just for those two source files. |
|
56 COMPONENT_POST_CONFIGURE_ACTION.sparc = \ |
|
57 $(GSED) -i -e '/^CFLAGS/aCFLAGSNOOPT = \$$\(CFLAGS:-O2=)' \ |
|
58 -e 's/(CFLAGS) -c io.c/(CFLAGSNOOPT) -c io.c/' \ |
|
59 -e 's/(CFLAGS) -c lisparit.c/(CFLAGSNOOPT) -c lisparit.c/' \ |
|
60 $(BUILD_DIR_32)/Makefile |
|
61 |
|
62 COMPONENT_POST_CONFIGURE_ACTION = \ |
|
63 $(COMPONENT_POST_CONFIGURE_ACTION.$(MACH)) |
|
64 |
|
65 PATCH_LEVEL= 0 |
|
66 |
|
67 # SHELLOPTS appears to cause clisp's configure script to fail while |
|
68 # checking the compiler. |
|
69 unexport SHELLOPTS |
|
70 |
|
71 # clisp's configure script is not a GNU auto* tools generated configure script |
|
72 # and doesn't take --sbindir, so we need to override the default values. |
|
73 CONFIGURE_OPTIONS = CC="$(CC) -DNO_GENERATIONAL_GC" |
|
74 ifeq ($(strip $(PARFAIT_BUILD)),yes) |
|
75 CONFIGURE_OPTIONS = CC="$(CC) -DNO_GENERATIONAL_GC -DNO_ASM" |
|
76 endif |
|
77 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
|
78 CONFIGURE_OPTIONS += CFLAGS= |
|
79 CONFIGURE_OPTIONS += --prefix=$(CONFIGURE_PREFIX) |
|
80 CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR) |
|
81 CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS)) |
|
82 CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS)) |
|
83 CONFIGURE_OPTIONS += --srcdir=$(SOURCE_DIR) |
|
84 CONFIGURE_OPTIONS += --with-libsigsegv-prefix=$(CONFIGURE_PREFIX) |
|
85 CONFIGURE_OPTIONS += --with-libreadline-prefix=$(CONFIGURE_PREFIX) |
|
86 |
|
87 # For now keep ASLR disabled for clisp (the default); build may core dump with ASLR |
|
88 ASLR_MODE = $(ASLR_DISABLE) |
|
89 |
|
90 # Prevent clisp.ps and clisp.pdf having different versions for SPARC |
|
91 # and x86 in the clisp package, because of embedded dates. |
|
92 TIME_CONSTANT = 1348000000 |
|
93 COMPONENT_BUILD_ENV += $(CONSTANT_TIME) |
|
94 |
|
95 # Adjust the "/ID [ ... ]" line in clisp.pdf to set it to a fixed value |
|
96 # to prevent it having different versions for SPARC and x86 in the clisp |
|
97 # package. This value is normally generated by ghostscript, and is |
|
98 # different on each machine. The fixed value that's been used comes from |
|
99 # value generated when building clisp on the Userland SPARC build machine. |
|
100 COMPONENT_POST_INSTALL_ACTION = \ |
|
101 (cd $(PROTOUSRSHAREDOCDIR)/clisp/doc ; \ |
|
102 $(GSED) -i 's|^/ID.*|/ID [<DEA6B2ECA0DB714B6BEB6209A211AEF0><DEA6B2ECA0DB714B6BEB6209A211AEF0>]|' clisp.pdf) |
|
103 |
|
104 # One of the tests now needs the GNU tail command. |
|
105 COMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)" |
|
106 |
|
107 COMPONENT_SYSTEM_TEST_ARGS += LISP="LC_MESSAGES=en_US /usr/bin/clisp -E utf-8 -norc -m 30MW -L english" |
|
108 COMPONENT_SYSTEM_TEST_ENV += PATH="$(GNUBIN):$(PATH)" |
|
109 |
|
110 # different results for different architectures |
|
111 COMPONENT_TEST_MASTER = \ |
|
112 $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master |
|
113 |
|
114 # extract the test result summaries |
|
115 COMPONENT_TEST_TRANSFORMS += \ |
|
116 '-n ' \ |
|
117 '-e "/error[s]* out of.*test[s]*$$/p" ' |
|
118 |
|
119 |
|
120 configure: $(CONFIGURE_32) |
|
121 |
|
122 build: $(BUILD_32) |
|
123 |
|
124 install: $(INSTALL_32) |
|
125 |
|
126 test: $(TEST_32) |
|
127 |
|
128 # system-test on sparc segfaults and produces a different result on x86 |
|
129 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
130 |
|
131 |
|
132 REQUIRED_PACKAGES += library/libsigsegv |
|
133 REQUIRED_PACKAGES += library/ncurses |
|
134 REQUIRED_PACKAGES += library/readline |
|
135 REQUIRED_PACKAGES += shell/ksh93 |
|
136 REQUIRED_PACKAGES += system/library |
|
137 REQUIRED_PACKAGES += system/library/math |
|
138 REQUIRED_PACKAGES += text/groff/groff-core |
|