4059N/A#
4059N/A# CDDL HEADER START
4059N/A#
4059N/A# The contents of this file are subject to the terms of the
4059N/A# Common Development and Distribution License (the "License").
4059N/A# You may not use this file except in compliance with the License.
4059N/A#
4059N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4059N/A# or http://www.opensolaris.org/os/licensing.
4059N/A# See the License for the specific language governing permissions
4059N/A# and limitations under the License.
4059N/A#
4059N/A# When distributing Covered Code, include this CDDL HEADER in each
4059N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4059N/A# If applicable, add the following below this CDDL HEADER, with the
4059N/A# fields enclosed by brackets "[]" replaced with your own identifying
4059N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4059N/A#
4059N/A# CDDL HEADER END
4059N/A#
4059N/A
4059N/A#
5552N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4059N/A#
4059N/A
5552N/Ainclude ../../../make-rules/shared-macros.mk
5552N/A
4059N/ACOMPONENT_NAME= perl
5552N/ACOMPONENT_VERSION= 5.22.1
5795N/APERL_VERSION_LOCAL= 5.22
4059N/ACOMPONENT_PROJECT_URL= http://www.perl.org/
4059N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4059N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
4059N/ACOMPONENT_ARCHIVE_HASH= \
5552N/A sha256:e98e4075a3167fa40524abe447c30bcca10c60e02a54ee1361eff278947a1221
4059N/ACOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
4059N/ACOMPONENT_BUGDB= utility/perl
5552N/ATPNO= 26810
4059N/A
4059N/Ainclude $(WS_MAKE_RULES)/prep.mk
4059N/Ainclude $(WS_MAKE_RULES)/configure.mk
4059N/Ainclude $(WS_MAKE_RULES)/ips.mk
4059N/A
4059N/Aifeq ($(strip $(PARFAIT_BUILD)),yes)
4059N/APATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:/usr/bin
4059N/Aendif
4059N/A
4059N/A#
4059N/A# Override these compiler settings because they are causing problems
4059N/A# in the ON build of the contrib components.
4059N/A# ON doesn't use or need these settings or the compiler has some of them
4059N/A# on by default.
4059N/A# This also produces a perl more inline with past perl's. For better
4059N/A# or worse.
4059N/A#
4059N/Astudio_XBITS=
4059N/Astudio_XREGS=
4059N/Astudio_IROPTS=
4059N/Astudio_C99MODE=
4059N/Astudio_ALIGN=
4059N/Astudio_MT=
4059N/A
4059N/A# Sparc optimization -xO4 causes issues with dtrace probes on Sparc
4059N/Astudio_OPT.sparc.64=-xO3
4059N/A
4059N/ACONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure
4059N/ACONFIGURE_ENV += MAKE=$(GMAKE)
4059N/ACONFIGURE_ENV += PATH=$(dir $(CC)):$(PATH)
4059N/A
4059N/A# -Dperl_static_inline="static" turns OFF "static inline".
4059N/A# This was added because Configure probes
4059N/A# for static inline (C99 feature) and finds it in our default Studio
4059N/A# compiler. But in the ON build of the perl add-ons, sun-solaris, the
4059N/A# shadow build with gcc 3.4.3 doesn't understand static inline so errors.
4059N/A#
4059N/ACONFIGURE_OPTIONS = \
4059N/A -de \
4059N/A -Dmksymlinks \
4059N/A -Ulocincpth= \
5795N/A -Dbin=/usr/perl5/$(PERL_VERSION_LOCAL)/bin \
4059N/A -Dcc="cc" \
4059N/A -Dcf_email="discuss@solaris-userland.java.net" \
4059N/A -Dcf_by="perl-bugs" \
4059N/A -Dlibperl=libperl.so \
4059N/A -Dmyhostname="localhost" \
4059N/A -Dperl_static_inline="static" \
5795N/A -Dprefix=/usr/perl5/$(PERL_VERSION_LOCAL) \
5795N/A -Dprivlib=/usr/perl5/$(PERL_VERSION_LOCAL)/lib \
5795N/A -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION_LOCAL) \
5795N/A -Dsiteprefix=/usr/perl5/$(PERL_VERSION_LOCAL) \
5795N/A -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION_LOCAL) \
5795N/A -Dvendorprefix=/usr/perl5/$(PERL_VERSION_LOCAL) \
4059N/A -Duseshrplib \
4059N/A -Dusedtrace \
4059N/A -Duse64bitall \
4059N/A -Dusethreads \
5552N/A -Dlibpth="/lib/64 /usr/lib/64" \
4059N/A -Doptimize="$(CFLAGS.studio)"
4059N/A
4059N/A#
4059N/A# The extra Configure parameters (cf_email, cf_by, myhostname) and
4059N/A# the gawk and sed that follow are attempting to sanatize the
4059N/A# resulting config.sh of values from our build environment that
4059N/A# are discoverable in perl's config via "perl -V".
4059N/A# I'm assuming our compilers live on a path that contains "SUNWspro".
4059N/A# If that changes the sed filter needs to change.
4059N/A#
4059N/ACOMPONENT_POST_CONFIGURE_ACTION = \
4059N/A (cd $(@D); \
4059N/A cp config.sh config.sh_orig ; \
4059N/A gawk \
4059N/A '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
4059N/A !/^myuname=/ {print}' config.sh_orig \
4059N/A | \
4059N/A sed -e "s/[^ ']*SUNWspro[^ ']*//g" > config.sh )
4059N/A
4059N/A
4059N/A#
4059N/A# Put studio compilers in PATH so we can tell Configure and gmake just
4059N/A# use cc. Trying to avoid the full path so it doesn't end up in
4059N/A# perl's config.
4059N/A#
4059N/ACOMPONENT_BUILD_ENV += PATH=$(dir $(CC)):$(PATH)
4059N/ACOMPONENT_INSTALL_ENV += PATH=$(dir $(CC)):$(PATH)
4059N/ACOMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)"
4059N/ACOMPONENT_TEST_ENV += PATH=$(dir $(CC)):$(PATH)
5552N/A#
5552N/A# Getting 1 different result between sparc and x86.
5552N/A#
5552N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
4059N/A
5552N/A#
5552N/A# Throw out everything prior to test results.
5552N/A# 2 x delete timings
5552N/A#
5522N/ACOMPONENT_TEST_TRANSFORMS += \
5552N/A '-e "1,/runtests choose/d"' \
5552N/A '-e "/^u=/d" ' \
5552N/A '-e "/^Elapsed/d"'
5522N/A
4059N/A#
4059N/A# perl's install path for sparc is based off the value of the
4059N/A# "arch" command. So we must package that way also.
4059N/A#
5795N/APKG_MACROS += P_ARCH=$(shell arch)
5795N/APKG_MACROS += PERL_VERSION=$(PERL_VERSION_LOCAL)
4059N/A
4059N/Aconfigure: $(CONFIGURE_64)
4059N/A
4059N/Abuild: $(BUILD_64)
4059N/A
4059N/Aparfait: PARFAIT_BUILD=yes install
4059N/A
4059N/Ainstall: $(INSTALL_64)
4059N/A
4059N/Atest: $(TEST_64)
4059N/A
4337N/Asystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
4337N/A
4059N/AREQUIRED_PACKAGES += database/berkeleydb-5
4059N/AREQUIRED_PACKAGES += library/database/gdbm
4059N/AREQUIRED_PACKAGES += system/library
4059N/AREQUIRED_PACKAGES += system/library/math