Makefile revision 844
168N/A#
168N/A# CDDL HEADER START
168N/A#
168N/A# The contents of this file are subject to the terms of the
168N/A# Common Development and Distribution License (the "License").
168N/A# You may not use this file except in compliance with the License.
168N/A#
168N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
168N/A# or http://www.opensolaris.org/os/licensing.
168N/A# See the License for the specific language governing permissions
168N/A# and limitations under the License.
168N/A#
168N/A# When distributing Covered Code, include this CDDL HEADER in each
168N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
168N/A# If applicable, add the following below this CDDL HEADER, with the
168N/A# fields enclosed by brackets "[]" replaced with your own identifying
168N/A# information: Portions Copyright [yyyy] [name of copyright owner]
168N/A#
168N/A# CDDL HEADER END
168N/A#
168N/A# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
168N/A#
844N/Ainclude ../../make-rules/shared-macros.mk
168N/A
168N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
168N/A
168N/A# I want to override PERL_VERSION and PERL_ARCH because when building
168N/A# a new version of perl it probably isn't installed so shared-macros.mk
168N/A# can't call it.
168N/A
168N/ACOMPONENT_NAME= perl
168N/ACOMPONENT_VERSION= 5.12.4
168N/APERL_VERSION= 5.12
586N/ACOMPONENT_PROJECT_URL= http://www.perl.org/
618N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
168N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
168N/ACOMPONENT_ARCHIVE_HASH= \
844N/A sha256:c920fa01a34b7752e8cbbc99c6921b908df60611d84a29c4377e4a798604767e
844N/ACOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
168N/A
1258N/Ainclude ../../make-rules/prep.mk
168N/Ainclude ../../make-rules/justmake.mk
168N/Ainclude ../../make-rules/ips.mk
168N/A
168N/A#
168N/A# Override these compiler settings because they are causing problems
519N/A# in the ON build of the contrib components.
519N/A# ON doesn't use or need these settings or the compiler has some of them
168N/A# on by default.
168N/A# This also produces a perl more inline with past perl's. For better
168N/A# or worse.
168N/A#
168N/Astudio_XBITS=
168N/Astudio_XREGS=
168N/Astudio_IROPTS=
168N/Astudio_C99MODE=
168N/Astudio_ALIGN=
168N/Astudio_MT=
168N/A
168N/A#
168N/A# The extra Configure parameters (cf_email, cf_by, myhostname) and
168N/A# the gawk and sed that follow are attempting to sanatize the
168N/A# resulting config.sh of values from our build environment that
501N/A# are discoverable in perl's config via "perl -V".
168N/A# I'm assuming our compilers live on a path that contains "SUNWspro".
168N/A# If that changes the sed filter needs to change.
168N/A#
168N/A
168N/A# That last bit re-runs bison to regenerate perly.h.
485N/A
485N/ACOMPONENT_PRE_BUILD_ACTION= \
485N/A (cd $(@D); $(ENV) -i \
485N/A MAKE=$(GMAKE) \
485N/A PATH=$(dir $(CC.studio.32)):$(PATH) \
168N/A $(CONFIG_SHELL) ./Configure \
206N/A -Dprefix=/usr/perl5/$(PERL_VERSION) \
168N/A -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \
168N/A -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
168N/A -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \
168N/A -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
577N/A -Dlibperl=libperl.so \
277N/A -Duseshrplib \
383N/A -Dusedtrace \
168N/A -Duse64bitint \
168N/A -Dcc="cc" \
168N/A -Doptimize="$(CFLAGS.studio)" \
168N/A -Dcf_email="userland-discuss@opensolaris.org" \
168N/A -Dcf_by="perl-bugs" \
168N/A -Dmyhostname="localhost" \
168N/A -O \
168N/A -de ) ; \
168N/A (cd $(@D); \
168N/A cp config.sh config.sh_orig ; \
168N/A gawk \
168N/A '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
181N/A !/^myuname=/ {print}' config.sh_orig \
168N/A | \
168N/A sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh ) ; \
168N/A ( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
168N/A cd $(@D) ; $(GMAKE) regen_perly )
168N/A
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)
test: $(TEST_32)
#
# 2 expected failures because of the use of cloney in this build.
# Without cloney all tests pass.
#
# Failed 2 tests out of 1697, 99.88% okay.
# ../cpan/Archive-Tar/t/02_methods.t
# ../lib/File/stat.t
#
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk