|
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 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 include ../../../make-rules/shared-macros.mk |
|
24 |
|
25 # |
|
26 # Note this perl is 64-bit only. |
|
27 # |
|
28 |
|
29 COMPONENT_NAME= perl |
|
30 COMPONENT_VERSION= 5.20.1 |
|
31 PERL_VERSION= 5.20 |
|
32 COMPONENT_PROJECT_URL= http://www.perl.org/ |
|
33 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
34 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
|
35 COMPONENT_ARCHIVE_HASH= \ |
|
36 sha256:ede5ded37e7fb6139b04728cfca826f17076f9888dbfd100a56834dbeb04657c |
|
37 COMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE) |
|
38 COMPONENT_BUGDB= utility/perl |
|
39 TPNO= 21449 |
|
40 |
|
41 include $(WS_MAKE_RULES)/prep.mk |
|
42 include $(WS_MAKE_RULES)/configure.mk |
|
43 include $(WS_MAKE_RULES)/ips.mk |
|
44 |
|
45 ifeq ($(strip $(PARFAIT_BUILD)),yes) |
|
46 PATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:/usr/bin |
|
47 endif |
|
48 |
|
49 # |
|
50 # Override these compiler settings because they are causing problems |
|
51 # in the ON build of the contrib components. |
|
52 # ON doesn't use or need these settings or the compiler has some of them |
|
53 # on by default. |
|
54 # This also produces a perl more inline with past perl's. For better |
|
55 # or worse. |
|
56 # |
|
57 studio_XBITS= |
|
58 studio_XREGS= |
|
59 studio_IROPTS= |
|
60 studio_C99MODE= |
|
61 studio_ALIGN= |
|
62 studio_MT= |
|
63 |
|
64 # Sparc optimization -xO4 causes issues with dtrace probes on Sparc |
|
65 studio_OPT.sparc.64=-xO3 |
|
66 |
|
67 CONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure |
|
68 CONFIGURE_ENV += MAKE=$(GMAKE) |
|
69 CONFIGURE_ENV += PATH=$(dir $(CC)):$(PATH) |
|
70 |
|
71 # -Dperl_static_inline="static" turns OFF "static inline". |
|
72 # This was added because Configure probes |
|
73 # for static inline (C99 feature) and finds it in our default Studio |
|
74 # compiler. But in the ON build of the perl add-ons, sun-solaris, the |
|
75 # shadow build with gcc 3.4.3 doesn't understand static inline so errors. |
|
76 # |
|
77 CONFIGURE_OPTIONS = \ |
|
78 -de \ |
|
79 -Dmksymlinks \ |
|
80 -Ulocincpth= \ |
|
81 -Uloclibpth= \ |
|
82 -Dbin=/usr/perl5/$(PERL_VERSION)/bin \ |
|
83 -Dcc="cc" \ |
|
84 -Dcf_email="[email protected]" \ |
|
85 -Dcf_by="perl-bugs" \ |
|
86 -Dlibperl=libperl.so \ |
|
87 -Dmyhostname="localhost" \ |
|
88 -Dperl_static_inline="static" \ |
|
89 -Dprefix=/usr/perl5/$(PERL_VERSION) \ |
|
90 -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \ |
|
91 -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \ |
|
92 -Dsiteprefix=/usr/perl5/$(PERL_VERSION) \ |
|
93 -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \ |
|
94 -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \ |
|
95 -Duseshrplib \ |
|
96 -Dusedtrace \ |
|
97 -Duse64bitall \ |
|
98 -Dusethreads \ |
|
99 -Doptimize="$(CFLAGS.studio)" |
|
100 |
|
101 # |
|
102 # The extra Configure parameters (cf_email, cf_by, myhostname) and |
|
103 # the gawk and sed that follow are attempting to sanatize the |
|
104 # resulting config.sh of values from our build environment that |
|
105 # are discoverable in perl's config via "perl -V". |
|
106 # I'm assuming our compilers live on a path that contains "SUNWspro". |
|
107 # If that changes the sed filter needs to change. |
|
108 # |
|
109 COMPONENT_POST_CONFIGURE_ACTION = \ |
|
110 (cd $(@D); \ |
|
111 cp config.sh config.sh_orig ; \ |
|
112 gawk \ |
|
113 '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \ |
|
114 !/^myuname=/ {print}' config.sh_orig \ |
|
115 | \ |
|
116 sed -e "s/[^ ']*SUNWspro[^ ']*//g" > config.sh ) |
|
117 |
|
118 |
|
119 # |
|
120 # Put studio compilers in PATH so we can tell Configure and gmake just |
|
121 # use cc. Trying to avoid the full path so it doesn't end up in |
|
122 # perl's config. |
|
123 # |
|
124 COMPONENT_BUILD_ENV += PATH=$(dir $(CC)):$(PATH) |
|
125 COMPONENT_INSTALL_ENV += PATH=$(dir $(CC)):$(PATH) |
|
126 COMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)" |
|
127 COMPONENT_TEST_ENV += PATH=$(dir $(CC)):$(PATH) |
|
128 COMPONENT_TEST_TRANSFORMS += \ |
|
129 '-e "s|\(^Skip\).*|\1|" ' \ |
|
130 '-e "s|\(^u=\).*|\1|" ' \ |
|
131 '-e "s|\(^cc\).*|\1|" ' |
|
132 |
|
133 # |
|
134 # perl's install path for sparc is based off the value of the |
|
135 # "arch" command. So we must package that way also. |
|
136 # |
|
137 PKG_MACROS += P_ARCH=$(shell arch) |
|
138 |
|
139 # Enable ASLR for this component |
|
140 ASLR_MODE = $(ASLR_ENABLE) |
|
141 |
|
142 configure: $(CONFIGURE_64) |
|
143 |
|
144 build: $(BUILD_64) |
|
145 |
|
146 parfait: PARFAIT_BUILD=yes install |
|
147 |
|
148 install: $(INSTALL_64) |
|
149 |
|
150 test: $(TEST_64) |
|
151 |
|
152 REQUIRED_PACKAGES += database/berkeleydb-5 |
|
153 REQUIRED_PACKAGES += library/database/gdbm |
|
154 REQUIRED_PACKAGES += system/library |
|
155 REQUIRED_PACKAGES += system/library/math |
|
156 REQUIRED_PACKAGES += system/linker |