7054723 X consolidation should move to perl 5.12
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Thu, 16 Jun 2011 11:26:12 -0700
changeset 1147 54bcc6a673bf
parent 1146 0a324d2613b3
child 1148 bf06d87c78ae
7054723 X consolidation should move to perl 5.12
open-src/app/xpm/Makefile
open-src/common/Makefile.inc
open-src/common/Makefile.init
open-src/common/set-elf-comments.pl
open-src/doc/xorg-docs/Makefile
open-src/driver/efb/Makefile
open-src/font/merge-fonts.scale.pl
open-src/xserver/xvnc/Makefile
pkg/Makefile
pkg/manifests/developer-opensolaris-X.p5m
pkg/manifests/x11-server-xvnc.p5m
--- a/open-src/app/xpm/Makefile	Tue Jun 07 03:19:14 2011 -0700
+++ b/open-src/app/xpm/Makefile	Thu Jun 16 11:26:12 2011 -0700
@@ -55,9 +55,6 @@
 # Additional arguments to pass to make
 #MODULE_MAKEFLAGS= -e SUBDIRS="cxpm sxpm"
 
-# Undo libtool use of libXpm.la to link with
-#MODULE_BUILD_DEPS=delibtoolize
-
 # Compatibility links from /usr/X11/bin to /usr/bin
 MODULE_X11_BINCOMPAT_LINKS = cxpm sxpm
 
--- a/open-src/common/Makefile.inc	Tue Jun 07 03:19:14 2011 -0700
+++ b/open-src/common/Makefile.inc	Thu Jun 16 11:26:12 2011 -0700
@@ -518,6 +518,7 @@
     CPPFLAGS="$(DEFAULT_CONFIG_CPPFLAGS) $(MODTYPE_CPPFLAGS) $(MODULE_CPPFLAGS)" \
     LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)" \
     PKG_CONFIG_PATH="$(DEFAULT_PKG_CONFIG_PATH)" \
+    PERL="$(PERL)" \
     PYTHON="$(PYTHON)" PYTHONPATH="$(PYTHON_PATH)" \
     INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p" \
     MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(CONFIG_SHELL)"
@@ -537,7 +538,7 @@
 	chmod a+x configure ; \
 	$(CONFIG_ENV) $(CONFIG_SHELL) ./configure $(CONFIG_OPTS) ; \
 	if [[ "$(DELIBTOOLIZE)" = "yes" ]] ; then \
-	    $(TOP)/open-src/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) . ; \
+	    $(PERL) $(TOP)/open-src/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) . ; \
 	fi
 
 default_configure: $(AUTOCONF_TARGET)
@@ -657,8 +658,8 @@
 ELF_COMMENTS_FLAGS += $(MODTYPE_ELF_COMMENTS_FLAGS) $(MODULE_ELF_COMMENTS_FLAGS)
 
 set-elf-comments: $(BUILD_TARGETS:set-elf-comments=)
-	$(TOP)/open-src/common/set-elf-comments.pl $(ELF_COMMENTS_FLAGS) \
-	 $(SOURCE_DIR)
+	$(PERL) $(TOP)/open-src/common/set-elf-comments.pl \
+	 $(ELF_COMMENTS_FLAGS) $(SOURCE_DIR)
 
 # Help generate templates for package manifests
 DEFAULT_LICENSE=$(PKG_LICENSE_DIR)/cr_Oracle $(PKG_LICENSE_DIR)/lic_X11
--- a/open-src/common/Makefile.init	Tue Jun 07 03:19:14 2011 -0700
+++ b/open-src/common/Makefile.init	Thu Jun 16 11:26:12 2011 -0700
@@ -287,6 +287,12 @@
 PYTHON=/usr/bin/python$(PYTHON_VERSION)
 PYTHON_PATH=$(PROTODIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages:$(PROTODIR)/usr/lib/python$(PYTHON_VERSION)/site-packages:/usr/lib/python$(PYTHON_VERSION)/vendor-packages:/usr/lib/python$(PYTHON_VERSION)/site-packages
 
+## Perl tools & paths
+# When changing PERL_VERSION, check that PERL_PKG_VERSION is
+# still set correctly in pkg/Makefile
+PERL_VERSION = 5.12
+PERL = /usr/perl5/$(PERL_VERSION)/bin/perl
+
 # Script used to install files in proto area
 INSTALL_SCRIPT=$(TOP)/open-src/common/install-sh -c
 
@@ -312,9 +318,6 @@
 # make output
 START_CMD_ECHO = PS4="" ; set -x
 
-# Other tools used during build
-PERL = /usr/perl5/bin/perl
-
 ### Sources, in-tree and upstream
 
 TARBALLDIR=$(TOP)/open-src/tarballs
--- a/open-src/common/set-elf-comments.pl	Tue Jun 07 03:19:14 2011 -0700
+++ b/open-src/common/set-elf-comments.pl	Thu Jun 16 11:26:12 2011 -0700
@@ -1,4 +1,4 @@
-#! /usr/perl5/5.10.0/bin/perl
+#! /usr/perl5/5.12/bin/perl
 #
 # Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 #
--- a/open-src/doc/xorg-docs/Makefile	Tue Jun 07 03:19:14 2011 -0700
+++ b/open-src/doc/xorg-docs/Makefile	Thu Jun 16 11:26:12 2011 -0700
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -59,7 +59,7 @@
 
 # Fix entity paths in DocBook files so that gnome-help can resolve them
 fix_entity_paths: $(UNPACK_TARGET)
-	find $(SOURCE_DIR) -name '*.xml' | xargs perl -i.orig -p -e \
+	find $(SOURCE_DIR) -name '*.xml' | xargs $(PERL) -i.orig -p -e \
 	 's{SYSTEM ".*/X11/defs.ent"}{SYSTEM "$(X11_DIR)/share/sgml/X11/defs.ent"}'
 
 MAN_DIR=$(PROTODIR)$(X11_MAN_DIR)
--- a/open-src/driver/efb/Makefile	Tue Jun 07 03:19:14 2011 -0700
+++ b/open-src/driver/efb/Makefile	Thu Jun 16 11:26:12 2011 -0700
@@ -95,5 +95,5 @@
 
 $(CLEAN_LINEFEED_TARGET): $(SOURCE_INIT_TARGET)
 	find $(BUILD_DIR) -type f -name '*.[ch]' | \
-		xargs perl -i -p -e 's{\r\n}{\n}g'
+		xargs $(PERL) -i -p -e 's{\r\n}{\n}g'
 	touch $(CLEAN_LINEFEED_TARGET)
--- a/open-src/font/merge-fonts.scale.pl	Tue Jun 07 03:19:14 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-#! /usr/perl5/bin/perl
-#
-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
-#
-
-# Merge fonts.scale files
-
-use strict;
-use warnings;
-use integer;
-
-use Getopt::Long;
-
-my @infiles;
-my $outfile;
-
-my $options_ok = GetOptions(
-	   "in=s" => \@infiles, 	# --in=<filename>, may be repeated
-	   "out=s" => \$outfile);	# --out=<filename>, only once	
-
-die "Invalid options" if !$options_ok;
-
-die "No input specified" if (scalar(@infiles) < 1);
-
-die "No output specified" if !defined($outfile);
-
-my %fonts = ();
-
-for my $f (@infiles) {
-  open my $IN, '<', $f or die "Couldn't open $f for reading: $!\n";
-
-  my $firstline = <$IN>;  # count of lines, ignore
-
-  while (my $l = <$IN>) {
-    chomp $l;
-    $l =~ m/(\S*)\s+(.*)/;
-    $fonts{$2} = $1;
-  }
-  close $IN;
-}
-
-open my $OUT, '>', $outfile or die "Couldn't open $outfile for writing: $!\n";
-
-print $OUT scalar(keys %fonts), "\n";
-
-for my $ft (sort {$fonts{$a} cmp $fonts{$b}} keys %fonts) {
-  print $OUT $fonts{$ft}, ' ', $ft, "\n";
-}
-
-close $OUT or die "Couldn't finish writing $outfile: $!\n";
--- a/open-src/xserver/xvnc/Makefile	Tue Jun 07 03:19:14 2011 -0700
+++ b/open-src/xserver/xvnc/Makefile	Thu Jun 16 11:26:12 2011 -0700
@@ -195,6 +195,8 @@
 		$(CONFIG_ENV) $(CONFIG_SHELL) ./configure $(XVNC_CONFIG_OPTS) )
 
 Xvnc_build: $(CONFIGURE_TARGETS)
+	$(PERL) -i -p -e 's{/usr/bin/env perl}{$(PERL)}' \
+		$(SOURCE_DIR)/unix/vncserver
 	(cd $(SOURCE_DIR) ; \
 	 $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
 	(cd $(XORG_BUILD_DIR) ; \
--- a/pkg/Makefile	Tue Jun 07 03:19:14 2011 -0700
+++ b/pkg/Makefile	Thu Jun 16 11:26:12 2011 -0700
@@ -209,6 +209,10 @@
 PKGMOG_DEFINES += ARCH32=$(SUBDIR32_$(PKGMACH))
 PKGMOG_DEFINES += ARCH64=$(SUBDIR64_$(PKGMACH))
 
+# Perl version string used in package names, such as pkg:/runtime/perl-512
+PERL_PKG_VERSION_CMD = print $(PERL_VERSION) | tr -d '.'
+PKGMOG_DEFINES += PERL_PKG_VERSION=$(PERL_PKG_VERSION_CMD:sh)
+
 # Python version string used in path names, such as /usr/lib/python2.6
 PKGMOG_DEFINES += PYTHON_PATH_VERSION=$(PYTHON_VERSION)
 # Python version string used in package names, such as pkg:/runtime/python-26
--- a/pkg/manifests/developer-opensolaris-X.p5m	Tue Jun 07 03:19:14 2011 -0700
+++ b/pkg/manifests/developer-opensolaris-X.p5m	Thu Jun 16 11:26:12 2011 -0700
@@ -131,9 +131,7 @@
 depend fmri=pkg:/library/zlib type=require
 
 # Build runs a number of perl scripts
-depend fmri=pkg:/runtime/perl-510 type=require
-depend fmri=pkg:/runtime/perl-584 type=require
-depend fmri=pkg:/runtime/perl-584/extra type=require
+depend fmri=pkg:/runtime/perl-$(PERL_PKG_VERSION) type=require
 
 # xcb & mesa require python interpreter/compiler
 depend fmri=pkg:/runtime/python-$(PYTHON_PKG_VERSION) type=require
--- a/pkg/manifests/x11-server-xvnc.p5m	Tue Jun 07 03:19:14 2011 -0700
+++ b/pkg/manifests/x11-server-xvnc.p5m	Thu Jun 16 11:26:12 2011 -0700
@@ -61,9 +61,6 @@
 $(i386_ONLY)link path=usr/bin/$(ARCH64)/Xvnc target=../Xvnc
 link path=usr/X11/bin/Xvnc target=../../bin/Xvnc
 link path=usr/lib/mdb/proc/$(ARCH64)/Xvnc.so target=Xserver.so
-# /usr/bin/vncserver is a perl script, but pkgdep doesn't pick up the
-# dependency automatically
-depend fmri=pkg:/runtime/perl-584 type=require
 # X servers require xkbcomp & data-xkb for keyboard layouts
 depend fmri=pkg:/x11/keyboard/data-xkb type=require
 depend fmri=pkg:/x11/keyboard/xkbcomp type=require