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) 2013, 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 # I want to override PERL_VERSION and PERL_ARCH because when building |
|
30 # a new version of perl it probably isn't installed so shared-macros.mk |
|
31 # can't call it. |
|
32 |
|
33 COMPONENT_NAME= perl |
|
34 COMPONENT_VERSION= 5.16.2 |
|
35 PERL_VERSION= 5.16 |
|
36 COMPONENT_PROJECT_URL= http://www.perl.org/ |
|
37 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
38 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
|
39 COMPONENT_ARCHIVE_HASH= \ |
|
40 sha256:5ba91d9aa40220c615b644bb48fa5df7fbca4afb1c9e911bdc0ce2a93f072d7d |
|
41 COMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE) |
|
42 COMPONENT_BUGDB= utility/perl |
|
43 |
|
44 include $(WS_TOP)/make-rules/prep.mk |
|
45 include $(WS_TOP)/make-rules/configure.mk |
|
46 include $(WS_TOP)/make-rules/ips.mk |
|
47 |
|
48 # |
|
49 # Override these compiler settings because they are causing problems |
|
50 # in the ON build of the contrib components. |
|
51 # ON doesn't use or need these settings or the compiler has some of them |
|
52 # on by default. |
|
53 # This also produces a perl more inline with past perl's. For better |
|
54 # or worse. |
|
55 # |
|
56 studio_XBITS= |
|
57 studio_XREGS= |
|
58 studio_IROPTS= |
|
59 studio_C99MODE= |
|
60 studio_ALIGN= |
|
61 studio_MT= |
|
62 |
|
63 CONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure |
|
64 CONFIGURE_ENV += MAKE=$(GMAKE) |
|
65 CONFIGURE_ENV += PATH=$(dir $(CC)):$(PATH) |
|
66 |
|
67 # -Dperl_static_inline="static" turns OFF "static inline". |
|
68 # This was added because Configure probes |
|
69 # for static inline (C99 feature) and finds it in our default Studio |
|
70 # compiler. But in the ON build of the perl add-ons, sun-solaris, the |
|
71 # shadow build with gcc 3.4.3 doesn't understand static inline so errors. |
|
72 # |
|
73 CONFIGURE_OPTIONS = \ |
|
74 -de \ |
|
75 -Dmksymlinks \ |
|
76 -Ulocincpth= \ |
|
77 -Uloclibpth= \ |
|
78 -Dbin=/usr/perl5/$(PERL_VERSION)/bin \ |
|
79 -Dcc="cc" \ |
|
80 -Dcf_email="[email protected]" \ |
|
81 -Dcf_by="perl-bugs" \ |
|
82 -Dlibperl=libperl.so \ |
|
83 -Dmyhostname="localhost" \ |
|
84 -Dperl_static_inline="static" \ |
|
85 -Dprefix=/usr/perl5/$(PERL_VERSION) \ |
|
86 -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \ |
|
87 -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \ |
|
88 -Dsiteprefix=/usr/perl5/$(PERL_VERSION) \ |
|
89 -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \ |
|
90 -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \ |
|
91 -Duseshrplib \ |
|
92 -Dusedtrace \ |
|
93 -Duse64bitall \ |
|
94 -Uuselargefiles \ |
|
95 -Doptimize="$(CFLAGS.studio)" |
|
96 |
|
97 # The extra Configure parameters (cf_email, cf_by, myhostname) and |
|
98 # the gawk and sed that follow are attempting to sanatize the |
|
99 # resulting config.sh of values from our build environment that |
|
100 # are discoverable in perl's config via "perl -V". |
|
101 # I'm assuming our compilers live on a path that contains "SUNWspro". |
|
102 # If that changes the sed filter needs to change. |
|
103 # |
|
104 COMPONENT_POST_CONFIGURE_ACTION = \ |
|
105 (cd $(@D); \ |
|
106 cp config.sh config.sh_orig ; \ |
|
107 gawk \ |
|
108 '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \ |
|
109 !/^myuname=/ {print}' config.sh_orig \ |
|
110 | \ |
|
111 sed -e "s/[^ ']*SUNWspro[^ ']*//g" > config.sh ) |
|
112 |
|
113 |
|
114 # |
|
115 # Put studio compilers in PATH so we can tell Configure and gmake just |
|
116 # use cc. Trying to avoid the full path so it doesn't end up in |
|
117 # perl's config. |
|
118 # |
|
119 COMPONENT_BUILD_ENV += PATH=$(dir $(CC)):$(PATH) |
|
120 COMPONENT_INSTALL_ENV += PATH=$(dir $(CC)):$(PATH) |
|
121 COMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)" |
|
122 COMPONENT_TEST_ENV += PATH=$(dir $(CC)):$(PATH) |
|
123 |
|
124 # |
|
125 # perl's install path for sparc is based off the value of the |
|
126 # "arch" command. So we must package that way also. |
|
127 # |
|
128 PKG_MACROS += P_ARCH=$(shell arch) |
|
129 |
|
130 build: $(BUILD_64) |
|
131 |
|
132 install: $(INSTALL_64) |
|
133 |
|
134 test: $(TEST_64) |
|
135 # |
|
136 # |
|
137 # All tests should pass. |
|
138 # |
|
139 # |
|
140 |
|
141 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
142 |
|
143 include $(WS_TOP)/make-rules/depend.mk |
|