Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 1997 19:14:16 +0900 (JST)
From:      sanpei@yy.cs.keio.ac.jp
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/3322: setlocale problem in lang/perl5
Message-ID:  <199704181014.TAA01544@lavender.yy.cs.keio.ac.jp>
Resent-Message-ID: <199704181020.DAA22844@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3322
>Category:       ports
>Synopsis:       setlocale problem in lang/perl5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 18 03:20:03 PDT 1997
>Last-Modified:
>Originator:     MIHIRA Yoshiro
>Organization:
Keio Univ. Japan
>Release:        FreeBSD 2.2-961014-SNAP i386
>Environment:

	  If set environment variable LANG to except ``C,''
	for example ``ja_JP.EUC.''

>Description:

  I think current perl5 ports has two problems.

(I) Setlocale problem
	(1) setlocale function is used in perl5.
	(2) shared library which has setlocale is libc and libxpg4.
	    setlocale in libc is only support LANG C.
	    on the other, setlocale in libxpg4 is support other
	    LANGs, one is ja_JP.EUC.
	(3) And perl5 is linked only libc, not libxpg4.
	(4) If set environment variable LANG to ja_JP.EUC, perl5
	    outputted some warnings.

	Solution
	    link libxpg4 (before libc.)

	* This problem was still solved in japanese/perl5.

(II) Patch for 2 files was mixed one patch file(patch-aa)
	    I separate patch file for each file to be patched.
		patch-aa to ``Configure'' file
		(new)patch-ae to ``installperl'' file

>How-To-Repeat:
	(1) install lang/perl5 packages.

	(2) set enviroment variable LANG ja_JP.EUC (for example with tcsh)
		> setenv LANG ja_JP.EUC

	(3) execute perl
	* > /usr/local/bin/perl -v
	* lavender: {147} perl -v
	* warning: setlocale(LC_CTYPE, "") failed.
	* warning: LC_ALL = "(null)", LC_CTYPE = "(null)", LANG = "ja_JP.EUC",
	* warning: falling back to the "C" locale.
	* <omit>

>Fix:

please apply below path.
	
diff -u -rN perl5.org/patches/patch-aa perl5/patches/patch-aa
--- perl5.org/patches/patch-aa	Sun Jul 14 04:29:47 1996
+++ perl5/patches/patch-aa	Sun Apr 13 14:22:55 1997
@@ -1,5 +1,5 @@
---- perl5.002.ORG/Configure	Tue Feb 27 23:06:34 1996
-+++ Configure	Sat Mar 16 11:21:52 1996
+--- Configure.orig	Mon Mar 25 15:04:01 1996
++++ Configure	Sun Apr 13 14:22:45 1997
 @@ -85,11 +85,12 @@
  PATH=.$p_$PATH
  export PATH
@@ -18,49 +18,12 @@
  
  : On HP-UX, large Configure scripts may exercise a bug in /bin/sh
  if test -f /hp-ux -a -f /bin/ksh; then
-*** installperl.orig	Mon Jun 24 22:08:25 1996
---- installperl	Wed Jun 26 22:21:05 1996
-***************
-*** 89,95 ****
-  &safe_unlink("$installbin/sperl$ver$exe_ext");
-  if ($d_dosuid) {
-      &cmd("cp suidperl$exe_ext $installbin/sperl$ver$exe_ext");
-!     &chmod(04711, "$installbin/sperl$ver$exe_ext");
-  }
-  
-  exit 0 if $versiononly;
---- 89,95 ----
-  &safe_unlink("$installbin/sperl$ver$exe_ext");
-  if ($d_dosuid) {
-      &cmd("cp suidperl$exe_ext $installbin/sperl$ver$exe_ext");
-!     &chmod(04111, "$installbin/sperl$ver$exe_ext");
-  }
-  
-  exit 0 if $versiononly;
-***************
-*** 203,212 ****
-  	      ((readlink "$mainperldir/perl$exe_ext") eq "$binexp/perl$exe_ext"));
-      }
-      if ((! $mainperl_is_instperl) &&
-! 	(&yn("Many scripts expect perl to be installed as " .
-! 	     "$mainperldir/perl.\n" . 
-! 	     "Do you wish to have $mainperldir/perl be the same as\n" .
-! 	     "$binexp/perl? [y] ")))
-      {	
-  	unlink("$mainperldir/perl$exe_ext");
-  	eval 'link("$installbin/perl$exe_ext", "$mainperldir/perl$exe_ext")' ||
---- 203,216 ----
-  	      ((readlink "$mainperldir/perl$exe_ext") eq "$binexp/perl$exe_ext"));
-      }
-      if ((! $mainperl_is_instperl) &&
-! 	0)
-! #	Disable Perl5 from 'taking' over from the system Perl.
-! #	(nasty hack, but it is only for the FreeBSD build, so WTH.
-! #
-! #	(&yn("Many scripts expect perl to be installed as " .
-! #	     "$mainperldir/perl.\n" . 
-! #	     "Do you wish to have $mainperldir/perl be the same as\n" .
-! #	     "$binexp/perl? [y] ")))
-      {	
-  	unlink("$mainperldir/perl$exe_ext");
-  	eval 'link("$installbin/perl$exe_ext", "$mainperldir/perl$exe_ext")' ||
+@@ -708,7 +709,7 @@
+ : List of libraries we want.
+ libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl'
+ libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
+-libswanted="$libswanted ucb bsd BSD PW x"
++libswanted="xpg4 $libswanted ucb bsd BSD PW x"
+ : We probably want to search /usr/shlib before most other libraries.
+ : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
+ glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
diff -u -rN perl5.org/patches/patch-ae perl5/patches/patch-ae
--- perl5.org/patches/patch-ae	Thu Jan  1 09:00:00 1970
+++ perl5/patches/patch-ae	Sun Apr 13 14:22:21 1997
@@ -0,0 +1,30 @@
+--- installperl.orig	Tue Jun 25 05:08:25 1996
++++ installperl	Sun Apr 13 14:20:30 1997
+@@ -89,7 +89,7 @@
+ &safe_unlink("$installbin/sperl$ver$exe_ext");
+ if ($d_dosuid) {
+     &cmd("cp suidperl$exe_ext $installbin/sperl$ver$exe_ext");
+-    &chmod(04711, "$installbin/sperl$ver$exe_ext");
++    &chmod(04111, "$installbin/sperl$ver$exe_ext");
+ }
+ 
+ exit 0 if $versiononly;
+@@ -203,10 +203,14 @@
+ 	      ((readlink "$mainperldir/perl$exe_ext") eq "$binexp/perl$exe_ext"));
+     }
+     if ((! $mainperl_is_instperl) &&
+-	(&yn("Many scripts expect perl to be installed as " .
+-	     "$mainperldir/perl.\n" . 
+-	     "Do you wish to have $mainperldir/perl be the same as\n" .
+-	     "$binexp/perl? [y] ")))
++	0)
++#	Disable Perl5 from 'taking' over from the system Perl.
++#	(nasty hack, but it is only for the FreeBSD build, so WTH.
++#
++#	(&yn("Many scripts expect perl to be installed as " .
++#	     "$mainperldir/perl.\n" . 
++#	     "Do you wish to have $mainperldir/perl be the same as\n" .
++#	     "$binexp/perl? [y] ")))
+     {	
+ 	unlink("$mainperldir/perl$exe_ext");
+ 	eval 'link("$installbin/perl$exe_ext", "$mainperldir/perl$exe_ext")' ||
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704181014.TAA01544>