Makefile revision 155
325N/A#
325N/A# CDDL HEADER START
325N/A#
325N/A# The contents of this file are subject to the terms of the
911N/A# Common Development and Distribution License (the "License").
919N/A# You may not use this file except in compliance with the License.
325N/A#
325N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
919N/A#
919N/Ainclude ../../make-rules/shared-macros.mk
919N/A
919N/ACOMPONENT_NAME= perl
325N/ACOMPONENT_VERSION= 5.12.3
325N/APERL_VERSION= 5.12
325N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
325N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
493N/ACOMPONENT_ARCHIVE_HASH= sha1:86d77c6cbc7a60068dc14c88ffd0729324d1174f
325N/ACOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
325N/A
493N/Ainclude ../../make-rules/prep.mk
325N/Ainclude ../../make-rules/justmake.mk
911N/Ainclude ../../make-rules/ips.mk
911N/A
911N/A#
911N/A# The extra Configure parameters (cf_email, cf_by, myhostname) and
325N/A# the gawk and sed that follow are attempting to sanatize the
325N/A# resulting config.sh of values from our build environment that
325N/A# are discoverable in perl's config via "perl -V".
325N/A# I'm assuming our compilers live on a path that contains "SUNWspro".
325N/A# If that changes the sed filter needs to change.
325N/A#
325N/A
325N/ACOMPONENT_PRE_BUILD_ACTION= \
325N/A (cd $(@D); $(ENV) -i \
493N/A MAKE=$(GMAKE) \
493N/A PATH=$(dir $(CC.studio.32)):$(PATH) \
325N/A ./Configure -Dprefix=/usr/perl5/$(PERL_VERSION) \
325N/A -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \
325N/A -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
493N/A -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \
325N/A -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
493N/A -Dlibperl=libperl.so \
325N/A -Duseshrplib \
493N/A -Dusedtrace \
325N/A -Duse64bitint \
325N/A -Dcc="cc" \
493N/A -Doptimize="$(CFLAGS.studio)" \
325N/A -Dcf_email="perl-bugs@sun.com" \
493N/A -Dcf_by="perl-bugs" \
325N/A -Dmyhostname="localhost" \
325N/A -O \
325N/A -de ) ; \
325N/A (cd $(@D); \
325N/A 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 )
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)
build: $(BUILD_32)
install: $(INSTALL_32)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
test: build
#
# 2 expected failures because of the use of cloney in this build.
# Without cloney all tests pass.
#
@cd $(BUILD_DIR_32); $(MAKE) check
include ../../make-rules/depend.mk