78N/A#
78N/A# CDDL HEADER START
78N/A#
78N/A# The contents of this file are subject to the terms of the
78N/A# Common Development and Distribution License (the "License").
78N/A# You may not use this file except in compliance with the License.
78N/A#
78N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
78N/A# or http://www.opensolaris.org/os/licensing.
78N/A# See the License for the specific language governing permissions
78N/A# and limitations under the License.
78N/A#
78N/A# When distributing Covered Code, include this CDDL HEADER in each
78N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
78N/A# If applicable, add the following below this CDDL HEADER, with the
78N/A# fields enclosed by brackets "[]" replaced with your own identifying
78N/A# information: Portions Copyright [yyyy] [name of copyright owner]
78N/A#
78N/A# CDDL HEADER END
78N/A#
6464N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
78N/A#
78N/Ainclude ../../make-rules/shared-macros.mk
78N/A
78N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
6464N/A
618N/A# I want to override PERL_VERSION and PERL_ARCH because when building
78N/A# a new version of perl it probably isn't installed so shared-macros.mk
2630N/A# can't call it.
844N/A
6464N/ACOMPONENT_NAME= perl
78N/ACOMPONENT_VERSION= 5.12.5
1273N/APERL_VERSION= 5.12
78N/ACOMPONENT_PROJECT_URL= http://www.perl.org/
6464N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
3489N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
3996N/ACOMPONENT_ARCHIVE_HASH= \
3996N/A sha256:10749417fd3010aae320a34181ad4cd6a4855c1fc63403b87fa4d630b18e966c
3996N/ACOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
78N/ACOMPONENT_BUGDB= utility/perl
2630N/ATPNO= 9223
2630N/A
2630N/Ainclude $(WS_MAKE_RULES)/prep.mk
2630N/Ainclude $(WS_MAKE_RULES)/configure.mk
2630N/Ainclude $(WS_MAKE_RULES)/ips.mk
78N/A
78N/A#
78N/A# Override these compiler settings because they are causing problems
2630N/A# in the ON build of the contrib components.
78N/A# ON doesn't use or need these settings or the compiler has some of them
78N/A# on by default.
78N/A# This also produces a perl more inline with past perl's. For better
78N/A# or worse.
2630N/A#
3489N/Astudio_XBITS=
3489N/Astudio_XREGS=
3489N/Astudio_IROPTS=
2630N/Astudio_C99MODE=
2630N/Astudio_ALIGN=
3489N/Astudio_MT=
2630N/A
3489N/A# Sparc optimization -xO4 makes perl dtrace probes broken
3489N/Astudio_OPT.sparc.32=-xO3
3489N/A
2630N/A#
2630N/A# The extra Configure parameters (cf_email, cf_by, myhostname) and
2630N/A# the gawk and sed that follow are attempting to sanatize the
2630N/A# resulting config.sh of values from our build environment that
3489N/A# are discoverable in perl's config via "perl -V".
2630N/A# I'm assuming our compilers live on a path that contains "SUNWspro".
2630N/A# If that changes the sed filter needs to change.
2630N/A#
3489N/A
3489N/A# That last bit re-runs bison to regenerate perly.h.
3489N/A
3489N/ACONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure
78N/ACONFIGURE_ENV += MAKE=$(GMAKE)
2630N/ACONFIGURE_ENV += PATH=$(dir $(CC)):$(PATH)
2630N/ACONFIGURE_OPTIONS = \
78N/A -Dprefix=/usr/perl5/$(PERL_VERSION) \
2630N/A -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \
2630N/A -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
2630N/A -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \
2630N/A -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
2630N/A -Dlibperl=libperl.so \
83N/A -Duseshrplib \
78N/A -Dusedtrace \
3996N/A -Duse64bitint \
6464N/A -Dcc="cc" \
3996N/A -Doptimize="$(CFLAGS.studio)" \
3996N/A -Dcf_email="perl@solaris-userland.java.net" \
3996N/A -Dcf_by="perl-bugs" \
3996N/A -Dmyhostname="localhost" \
-Dmksymlinks \
-O \
-de
CONFIGURE_THREAD_OPTIONS = -Dusethreads \
-Duseithreads
COMPONENT_POST_CONFIGURE_ACTION = \
(cd $(@D); \
cp config.sh config.sh_orig ; \
gawk \
'/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
!/^myuname=/ {print}' config.sh_orig \
| \
sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh ) ; \
( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
cd $(@D) ; $(GMAKE) regen_perly )
COMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)"
#
# perl's install path for sparc is based off the value of the
# "arch" command. So we must package that way also.
#
PKG_MACROS += PERL_ARCH=$(shell arch)
PKG_MACROS += PERL_VERSION=$(PERL_VERSION)
#
# Put studio compilers in PATH so we can tell Configure and gmake just
# use cc. Trying to avoid the full path so it doesn't end up in
# perl's config.
#
COMPONENT_BUILD_ENV += PATH=$(dir $(CC.studio.32)):$(PATH)
# ST=single-thread. MT=multi-thread. The only difference in the build is that
# $(CONFIGURE_THREAD_OPTIONS) gets added to $(CONFIGURE_OPTIONS) in the MT case.
#
ST_VARIANT = $(BUILD_DIR)/$(MACH32)-st
MT_VARIANT = $(BUILD_DIR)/$(MACH32)-mt
VARIANTS = $(MT_VARIANT) $(ST_VARIANT)
$(VARIANTS:%=%/.configured): BITS=32
$(MT_VARIANT)/.configured: CONFIGURE_OPTIONS += $(CONFIGURE_THREAD_OPTIONS)
BUILD_32 = $(VARIANTS:%=%/.built)
INSTALL_32 = $(VARIANTS:%=%/.installed)
TEST_32 = $(VARIANTS:%=%/.tested)
configure: $(CONFIGURE_32)
build: $(BUILD_32)
install: $(INSTALL_32)
test: $(TEST_32)
#
#
# All tests should pass.
#
#
REQUIRED_PACKAGES += database/berkeleydb-5
REQUIRED_PACKAGES += library/database/gdbm
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/linker