components/perl/perl522/Makefile
changeset 5554 63d6ec724bea
parent 5524 7c50b6f98812
child 5797 432ac76de3b0
equal deleted inserted replaced
5553:58119a697acd 5554:63d6ec724bea
       
     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 
       
    22 #
       
    23 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 include ../../../make-rules/shared-macros.mk
       
    27 
       
    28 COMPONENT_NAME=		perl
       
    29 COMPONENT_VERSION=	5.22.1
       
    30 PERL_VERSION=		5.22
       
    31 COMPONENT_PROJECT_URL=	http://www.perl.org/
       
    32 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    33 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
       
    34 COMPONENT_ARCHIVE_HASH=	\
       
    35      sha256:e98e4075a3167fa40524abe447c30bcca10c60e02a54ee1361eff278947a1221
       
    36 COMPONENT_ARCHIVE_URL=	http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
       
    37 COMPONENT_BUGDB=	utility/perl
       
    38 TPNO=			26810
       
    39 
       
    40 include $(WS_MAKE_RULES)/prep.mk
       
    41 include $(WS_MAKE_RULES)/configure.mk
       
    42 include $(WS_MAKE_RULES)/ips.mk
       
    43 
       
    44 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
       
    45 PATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:/usr/bin
       
    46 endif
       
    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 # Sparc optimization -xO4 causes issues with dtrace probes on Sparc
       
    64 studio_OPT.sparc.64=-xO3
       
    65 
       
    66 CONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure
       
    67 CONFIGURE_ENV += MAKE=$(GMAKE)
       
    68 CONFIGURE_ENV += PATH=$(dir $(CC)):$(PATH)
       
    69 
       
    70 # -Dperl_static_inline="static" turns OFF "static inline".
       
    71 # This was added because Configure probes
       
    72 # for static inline (C99 feature) and finds it in our default Studio
       
    73 # compiler.  But in the ON build of the perl add-ons, sun-solaris, the
       
    74 # shadow build with gcc 3.4.3 doesn't understand static inline so errors.
       
    75 #
       
    76 CONFIGURE_OPTIONS = \
       
    77 			-de \
       
    78 			-Dmksymlinks \
       
    79 			-Ulocincpth= \
       
    80                         -Dbin=/usr/perl5/$(PERL_VERSION)/bin \
       
    81 			-Dcc="cc" \
       
    82 			-Dcf_email="[email protected]" \
       
    83 			-Dcf_by="perl-bugs" \
       
    84 			-Dlibperl=libperl.so \
       
    85 			-Dmyhostname="localhost" \
       
    86 			-Dperl_static_inline="static" \
       
    87 			-Dprefix=/usr/perl5/$(PERL_VERSION) \
       
    88                         -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \
       
    89 			-Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
       
    90 			-Dsiteprefix=/usr/perl5/$(PERL_VERSION) \
       
    91 			-Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
       
    92 			-Dvendorprefix=/usr/perl5/$(PERL_VERSION) \
       
    93 			-Duseshrplib \
       
    94 			-Dusedtrace \
       
    95 			-Duse64bitall \
       
    96                         -Dusethreads \
       
    97 			-Dlibpth="/lib/64 /usr/lib/64" \
       
    98 			-Doptimize="$(CFLAGS.studio)"
       
    99 
       
   100 #
       
   101 # The extra Configure parameters (cf_email, cf_by, myhostname) and
       
   102 # the gawk and sed that follow are attempting to sanatize the
       
   103 # resulting config.sh of values from our build environment that
       
   104 # are discoverable in perl's config via "perl -V".
       
   105 # I'm assuming our compilers live on a path that contains "SUNWspro".
       
   106 # If that changes the sed filter needs to change.
       
   107 #
       
   108 COMPONENT_POST_CONFIGURE_ACTION = \
       
   109 	(cd $(@D); \
       
   110 	    cp config.sh config.sh_orig ; \
       
   111 	    gawk \
       
   112 	    '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
       
   113 	    		!/^myuname=/ {print}' config.sh_orig \
       
   114 		| \
       
   115 		sed -e "s/[^ ']*SUNWspro[^ ']*//g" > config.sh )
       
   116 
       
   117 
       
   118 #
       
   119 # Put studio compilers in PATH so we can tell Configure and gmake just
       
   120 # use cc.  Trying to avoid the full path so it doesn't end up in
       
   121 # perl's config.
       
   122 #
       
   123 COMPONENT_BUILD_ENV	  +=	PATH=$(dir $(CC)):$(PATH)
       
   124 COMPONENT_INSTALL_ENV	  +=	PATH=$(dir $(CC)):$(PATH)
       
   125 COMPONENT_INSTALL_ENV	  +=	DESTDIR="$(PROTO_DIR)"
       
   126 COMPONENT_TEST_ENV	  +=	PATH=$(dir $(CC)):$(PATH)
       
   127 #
       
   128 # Getting 1 different result between sparc and x86.
       
   129 #
       
   130 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
       
   131 
       
   132 #
       
   133 # Throw out everything prior to test results.
       
   134 # 2 x delete timings
       
   135 #
       
   136 COMPONENT_TEST_TRANSFORMS += \
       
   137 	'-e "1,/runtests choose/d"' \
       
   138 	'-e "/^u=/d" ' \
       
   139 	'-e "/^Elapsed/d"'
       
   140 
       
   141 #
       
   142 # perl's install path for sparc is based off the value of the
       
   143 # "arch" command.  So we must package that way also.
       
   144 #
       
   145 PKG_MACROS		+=	P_ARCH=$(shell arch)
       
   146 
       
   147 ASLR_MODE = $(ASLR_ENABLE)
       
   148 
       
   149 configure:	$(CONFIGURE_64)
       
   150 
       
   151 build:		$(BUILD_64)
       
   152 
       
   153 parfait:	PARFAIT_BUILD=yes install
       
   154 
       
   155 install:	$(INSTALL_64)
       
   156 
       
   157 test:		$(TEST_64)
       
   158 
       
   159 system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
       
   160 
       
   161 REQUIRED_PACKAGES += database/berkeleydb-5
       
   162 REQUIRED_PACKAGES += library/database/gdbm
       
   163 REQUIRED_PACKAGES += system/library
       
   164 REQUIRED_PACKAGES += system/library/math