components/perl/perl516/Makefile
changeset 1146 94088715b2bf
parent 1058 34d7aaa03423
child 1170 63707ad3c24c
equal deleted inserted replaced
1145:ebafad4abba7 1146:94088715b2bf
       
     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 			-Doptimize="$(CFLAGS.studio)"
       
    95 
       
    96 # The extra Configure parameters (cf_email, cf_by, myhostname) and
       
    97 # the gawk and sed that follow are attempting to sanatize the
       
    98 # resulting config.sh of values from our build environment that
       
    99 # are discoverable in perl's config via "perl -V".
       
   100 # I'm assuming our compilers live on a path that contains "SUNWspro".
       
   101 # If that changes the sed filter needs to change.
       
   102 #
       
   103 COMPONENT_POST_CONFIGURE_ACTION = \
       
   104 	(cd $(@D); \
       
   105 	    cp config.sh config.sh_orig ; \
       
   106 	    gawk \
       
   107 	    '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
       
   108 	    		!/^myuname=/ {print}' config.sh_orig \
       
   109 		| \
       
   110 		sed -e "s/[^ ']*SUNWspro[^ ']*//g" > config.sh )
       
   111 
       
   112 
       
   113 #
       
   114 # Put studio compilers in PATH so we can tell Configure and gmake just
       
   115 # use cc.  Trying to avoid the full path so it doesn't end up in
       
   116 # perl's config.
       
   117 #
       
   118 COMPONENT_BUILD_ENV	+=	PATH=$(dir $(CC)):$(PATH)
       
   119 COMPONENT_INSTALL_ENV	+=	PATH=$(dir $(CC)):$(PATH)
       
   120 COMPONENT_INSTALL_ENV	+=	DESTDIR="$(PROTO_DIR)"
       
   121 COMPONENT_TEST_ENV	+=	PATH=$(dir $(CC)):$(PATH)
       
   122 
       
   123 #
       
   124 # perl's install path for sparc is based off the value of the
       
   125 # "arch" command.  So we must package that way also.
       
   126 #
       
   127 PKG_MACROS		+=	P_ARCH=$(shell arch)
       
   128 
       
   129 build:		$(BUILD_64)
       
   130 
       
   131 install:	$(INSTALL_64)
       
   132 
       
   133 test:		$(TEST_64)
       
   134 	#
       
   135 	#
       
   136 	# All tests should pass.
       
   137 	#
       
   138 	#
       
   139 
       
   140 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
       
   141 
       
   142 include $(WS_TOP)/make-rules/depend.mk