ports/147861: [patch] fix maxima with LC_MESSAGES

Kuan-Chung Chiu buganini at gmail.com
Tue Jun 15 05:40:02 UTC 2010


>Number:         147861
>Category:       ports
>Synopsis:       [patch] fix maxima with LC_MESSAGES
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 15 05:40:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Kuan-Chung Chiu
>Release:        9.0-CURRENT
>Organization:
N/A
>Environment:
FreeBSD security-hole.info 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Fri May 28 22:25:02 CST 2010     root at security-hole.info:/usr/obj/usr/src/sys/SECURITYHOLE  i386

>Description:
> locale
LANG=zh_TW.UTF-8
LC_CTYPE="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_ALL=

> ktrace maxima
Maxima 5.21.1 http://maxima.sourceforge.net

*** - UNIX error 20 (ENOTDIR): Not a directory
The following restarts are available:
MACSYMA-QUIT   :R1      Maxima top-level
Break 1 [1]> 
[eval.d:573] reset() found no driver frame (sp=0x7fbfe5d0-0x7fbf8250)

Exiting on signal 6
kAbort (core dumped)

> kdump -f ktrace.out | grep -C 3 "a dir"
 67098 lisp.run RET   lstat 0
 67098 lisp.run CALL  lstat(0x7fbf8f50,0x7fbf93e4)
 67098 lisp.run NAMI  "/usr/share/locale/zh_TW.UTF-8/LC_MESSAGES/maxima.mo"
 67098 lisp.run RET   lstat -1 errno 20 Not a directory
 67098 lisp.run CALL  setitimer(0,0x7fbf8e8c,0x7fbf8e7c)
 67098 lisp.run RET   setitimer 0
 67098 lisp.run CALL  getuid

>How-To-Repeat:
set LC_MESSAGES other than C and run maxima
>Fix:
${WRKSRC}/src/intl.lisp (installed as /usr/local/share/maxima/5.21.1/src/intl.lisp)
has a line (defvar *locale-directories* '(#p"/usr/share/locale/"))
that is the problem, /usr/share/locale/zh_TW.UTF-8/LC_MESSAGES is a file but not a directory in FreeBSD system.

Patch attached with submission follows:

--- Makefile.orig	2010-06-15 13:21:46.000000000 +0800
+++ Makefile	2010-06-15 13:26:15.000000000 +0800
@@ -7,6 +7,7 @@
 
 PORTNAME=	maxima
 PORTVERSION=	5.21.1
+PORTREVISION=	1
 CATEGORIES=	math tk
 MASTER_SITES=	SF/maxima/Maxima-source/${PORTVERSION}-source
 
@@ -81,6 +82,7 @@
 	 -name "Makefile*" | ${XARGS} ${REINPLACE_CMD} -e "s;tclsh;${TCLSH};g"
 	( cd ${WRKSRC}/doc/info ; ${LOCALBASE}/bin/bash ./fix_crlf ; \
 	${LOCALBASE}/bin/bash ./fix_tab )
+	${REINPLACE_CMD} -e "s;/usr/;${LOCALBASE}/;g" ${WRKSRC}/src/intl.lisp
 
 regression-test: build
 	${LOCALBASE}/bin/bash ${WRKSRC}/maxima-local --batch-string='run_testsuite();'


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list