From umq@ueo.co.jp  Mon Jun 11 11:57:23 2007
Return-Path: <umq@ueo.co.jp>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id CF6CF16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Jun 2007 11:57:23 +0000 (UTC)
	(envelope-from umq@ueo.co.jp)
Received: from msa3-25.plala.or.jp (msa3.plala.or.jp [58.93.251.203])
	by mx1.freebsd.org (Postfix) with ESMTP id 49C4113C48A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Jun 2007 11:57:22 +0000 (UTC)
	(envelope-from umq@ueo.co.jp)
Received: from eupheme.kaumoge.org ([121.112.76.77]) by msa3-25.plala.or.jp
          with ESMTP
          id <20070611115721.ZSDC25212.msa3-25.plala.or.jp@eupheme.kaumoge.org>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Mon, 11 Jun 2007 20:57:21 +0900
Received: from calliope.kaumoge.org (calliope.kaumoge.org [192.168.24.120])
	by eupheme.kaumoge.org (8.12.11/8.12.11/20030713) with ESMTP id l5BBvgn2001352
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Jun 2007 20:57:43 +0900 (JST)
	(envelope-from umq@ueo.co.jp)
Message-Id: <86zm36hffj.wl%umq@ueo.co.jp>
Date: Mon, 11 Jun 2007 20:57:20 +0900
From: Hirohisa Yamaguchi <umq@ueo.co.jp>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] japanese/sj3 is broken
X-Send-Pr-Version: 3.113

>Number:         113572
>Category:       ports
>Synopsis:       [patch] japanese/sj3 is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 11 12:00:11 GMT 2007
>Closed-Date:    Sun Sep 09 07:08:13 GMT 2007
>Last-Modified:  Sun Sep  9 07:10:07 GMT 2007
>Originator:     Hirohisa Yamaguchi
>Release:        FreeBSD 7.0-CURRENT amd64
>Organization:
<organization of PR author (multiple lines)>
>Environment:
System: FreeBSD calliope.****.org 7.0-CURRENT FreeBSD 7.0-CURRENT #8: Mon May 28 02:37:30 JST 2007 root@calliope.****.org:/usr/obj/usr/src/sys/CALLIOPE64 amd64

>Description:
	There are several problems with japanese/sj3 port.

	 1. Original MASTER_SITES don't seem to work any longer.
	 2. With the current patchset it builds okay, but it is said that it does not work correctly.
	 3. It does not build under 7-CURRENT (i.e. with gcc4.2).

>How-To-Repeat:
	cd ports/japanese/sj3
	make && make install
	/usr/local/etc/rc.d/sj3.sh start
	(run sj3 client)

>Fix:

	1. As long as the current version is mirrored in MASTER_SITE_LOCAL
	   this might not be a problem.
	2.,3. There's a new set of patch
	   http://quasiquote.org/log2/SJ3/2007/04/01/patch

	The patch against the port skelton follows.
	 deleted:
	  files/patch-aa
	  files/patch-ab
	 needs fix:
	  pkg-install needs to get appropriate UID number for a dedicated user `_sj3'
	  (and ports/UIDs has to be updated).

diff -Npru ports.orig/japanese/sj3/Makefile ports/japanese/sj3/Makefile
--- ports.orig/japanese/sj3/Makefile	Fri Sep 17 12:21:00 2004
+++ ports/japanese/sj3/Makefile	Mon Jun 11 18:05:37 2007
@@ -7,41 +7,39 @@
 
 PORTNAME=	sj3
 PORTVERSION=	2.0.1.20
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	japanese
 MASTER_SITES=	ftp://ftp.sony.co.jp/pub/unsupported/src/ \
 		ftp://ftp.cs.titech.ac.jp/pub/japanese/sj3/
 MASTER_SITES+=	${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	nork
 
-PATCH_SITES=	http://oikumene.que.ne.jp/misc/
-PATCHFILES=	${PORTNAME}-patches-20040916.bz2
+PATCH_SITES=	http://quasiquote.org/files/
+PATCHFILES=	${PORTNAME}-qq-2.0.1.21.diff.gz
+PATCH_DIST_STRIP=	-p1
 
 MAINTAINER=	hiroo+freebsd@oikumene.gcd.org
 COMMENT=	A Japanese input method
 
-BUILD_DEPENDS=	xmkmf:${X_IMAKE_PORT}
+USE_RC_SUBR=	sj3.sh
+USE_IMAKE=	yes
 
 MAN1=		sj3.1 sj3dic.1 sj3mkdic.1 sj3serv.1
 MANLANG=	ja
+MANCOMPRESSED=	no
+PORTDOCS=	Nihongo.ps.Z hinsi.ms makedict.ms sj3lib.ms sj3serv.ms
 
-STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/sj3.sh
-
-# This port requires xmkmf but installs in /usr/local
-#
 # NOTE : You must not use 'xmkmf -a', because the running 'make depend' caused a error.
 
 .include <bsd.port.pre.mk>
 
-do-configure:
-	( cd $(WRKSRC) ; xmkmf ; make Makefiles )
+pre-configure:
+	${REINPLACE_CMD} -e "\#^SJ3TOP#s#=.*#= ${PREFIX}#" \
+		-e "\#^SJ3DICTDIR#s#=.*#= \\$$\(SJ3LIBDIR)/sj3/dict#" \
+		-e "\#^SJ3VARRUNDIR#s#=.*#= ${DESTDIR}\\$$\(VARDIR)/run/sj3#" \
+		${WRKSRC}/sj3.tmpl
 
-post-install:
-	if [ ! -f ${STARTUP_SCRIPT} ]; then 				\
-		${ECHO_MSG} "Installing ${STARTUP_SCRIPT} startup file."; 	\
-		${INSTALL_SCRIPT} ${FILESDIR}/sj3.sh.in ${STARTUP_SCRIPT};	\
-	fi
-	${SETENV} PKG_PREFIX=${PREFIX} \
-		${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+do-configure:
+	( cd $(WRKSRC) ; ${XMKMF} ; make Makefiles )
 
 .include <bsd.port.post.mk>
diff -Npru ports.orig/japanese/sj3/distinfo ports/japanese/sj3/distinfo
--- ports.orig/japanese/sj3/distinfo	Sun Jan 22 21:39:08 2006
+++ ports/japanese/sj3/distinfo	Sat Jun  9 09:05:33 2007
@@ -1,6 +1,6 @@
 MD5 (sj3-2.0.1.20.tar.gz) = 36cc23702e2295e4552271b9d481c863
 SHA256 (sj3-2.0.1.20.tar.gz) = 6195e0252382032f99a2597590283acbcf43180df1d9a0a3754c4c8ad4945292
 SIZE (sj3-2.0.1.20.tar.gz) = 584065
-MD5 (sj3-patches-20040916.bz2) = a55b0094e5e55fd32c5f5f2cd038d9bd
-SHA256 (sj3-patches-20040916.bz2) = ee3ee636015a5b6fa2ee44eee9c10b9b35acb991b43e211880448c639ad30cd5
-SIZE (sj3-patches-20040916.bz2) = 53266
+MD5 (sj3-qq-2.0.1.21.diff.gz) = 906ecafa79ea6b9d5d0f90f6322cb0bd
+SHA256 (sj3-qq-2.0.1.21.diff.gz) = 0c362d623ce10a18fab604f1f79e498ec33fbdf9a3236066a2c0b0e4960b2d28
+SIZE (sj3-qq-2.0.1.21.diff.gz) = 102686
diff -Npru ports.orig/japanese/sj3/files/patch-sj3.tmpl ports/japanese/sj3/files/patch-sj3.tmpl
--- ports.orig/japanese/sj3/files/patch-sj3.tmpl	Thu Jan  1 09:00:00 1970
+++ ports/japanese/sj3/files/patch-sj3.tmpl	Mon Jun 11 17:57:53 2007
@@ -0,0 +1,21 @@
+--- ./sj3.tmpl.orig	Sat Jun  9 23:22:10 2007
++++ ./sj3.tmpl	Sat Jun  9 23:22:45 2007
+@@ -56,18 +56,6 @@
+ 
+ #define Sj3LibRev 1.21
+ 
+-/*
+- * Change for FreeBSD.
+- * Because When the LANG variable is EUC, setlocale function in library libc 
+- * return NULL, use it in library libxpg4 
+- * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+- */
+-#if defined(FreeBSDArchitecture)
+-
+-CODE_LIBS	= -lxpg4
+-
+-#endif
+-
+ #if SystemV4 || SystemV
+ USETLI          = -DTLI
+ #else
diff -Npru ports.orig/japanese/sj3/files/sj3.sh.in ports/japanese/sj3/files/sj3.sh.in
--- ports.orig/japanese/sj3/files/sj3.sh.in	Wed Jul  5 21:36:36 2000
+++ ports/japanese/sj3/files/sj3.sh.in	Mon Jun 11 19:52:38 2007
@@ -1,22 +1,28 @@
 #!/bin/sh
+#
+# $FreeBSD$
+#
 
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
-    echo "$0: Cannot determine the PREFIX" >&2
-    exit 1
-fi
+# PROVIDE: sj3
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
 
-case "$1" in
-start)
-	sj3=${PREFIX}/bin/sj3serv
-	if [ -f $sj3 ]; then
-	     $sj3
-	fi
-	;;
-stop)
-	;;
-*)
-	echo "Usage: `basename $0` {start|stop}" >&2
-	;;
-esac
+# Define these sj3_* variables in one of these files:
+#	/etc/rc.conf
+#	/etc/rc.conf.local
+#	/etc/rc.conf.d/sj3
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+sj3_enable=${sj3_enable:-"NO"}		# Enable sj3
+#sj3_program="%%PREFIX%%/sbin/sj3serv"	# Location of sj3
 
-exit 0
+. %%RC_SUBR%%
+
+name="sj3"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/sj3serv"
+
+load_rc_config $name
+run_rc_command "$1"
diff -Npru ports.orig/japanese/sj3/pkg-install ports/japanese/sj3/pkg-install
--- ports.orig/japanese/sj3/pkg-install	Sun Apr 11 02:26:40 2004
+++ ports/japanese/sj3/pkg-install	Mon Jun 11 18:09:15 2007
@@ -1,9 +1,36 @@
 #!/bin/sh
 
+PATH=/bin:/usr/sbin
+
 case $2 in
     POST-INSTALL)
-	dic="${PKG_PREFIX}/lib/sj3/dict/user"
-	mkdir -p $dic
-	chown bin:bin $dic
+	USER=_sj3
+	GROUP=${USER}
+	UID=****_CHANGE_ME_****
+	GID=${UID}
+
+	if pw group show "${GROUP}" 2>/dev/null; then
+		echo "You already have a group \"${GROUP}\", so I will use it."
+	else
+		if pw groupadd ${GROUP} -g ${GID}; then
+			echo "Added group \"${GROUP}\"."
+		else
+			echo "Adding group \"${GROUP}\" failed..."
+			exit 1
+		fi
+	fi
+
+	if pw user show "${USER}" 2>/dev/null; then
+		echo "You already have a user \"${USER}\", so I will use it."
+	else
+		if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+			-d /nonexistent -s /sbin/nologin -c "SJ3 Daemon"
+		then
+			echo "Added user \"${USER}\"."
+		else
+			echo "Adding user \"${USER}\" failed..."
+			exit 1
+		fi
+	fi
 	;;
 esac
diff -Npru ports.orig/japanese/sj3/pkg-plist ports/japanese/sj3/pkg-plist
--- ports.orig/japanese/sj3/pkg-plist	Fri Oct  9 15:10:47 1998
+++ ports/japanese/sj3/pkg-plist	Mon Jun 11 17:10:16 2007
@@ -1,24 +1,21 @@
 bin/sj3
 bin/sj3dic
 bin/sj3mkdic
-bin/sj3serv
 bin/sj3stat
+etc/sj3/cvtkey.news
+etc/sj3/cvtkey.nwp511
+etc/sj3/cvtkey.nwp517
+etc/sj3/cvtkey.xterm
+etc/sj3/serverrc
+etc/sj3/sjrc
+etc/sj3/sjrk
 include/sj3lib.h
 lib/libsj3lib.a
-lib/sj3/Nihongo.ps.Z
-lib/sj3/cvtkey.news
-lib/sj3/cvtkey.nwp511
-lib/sj3/cvtkey.nwp517
-lib/sj3/cvtkey.xterm
+lib/libsj3lib.so
+lib/libsj3lib.so.1
 lib/sj3/dict/sj3main.dic
-lib/sj3/hinsi.ms
-lib/sj3/makedict.ms
-lib/sj3/serverrc
-lib/sj3/sj3lib.ms
-lib/sj3/sj3serv.ms
-lib/sj3/sjrc
-lib/sj3/sjrk
-etc/rc.d/sj3.sh
+sbin/sj3serv
 @dirrm lib/sj3/dict/user
 @dirrm lib/sj3/dict
 @dirrm lib/sj3
+@dirrm etc/sj3
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Jun 11 12:00:27 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113572 
State-Changed-From-To: feedback->open 
State-Changed-By: pav 
State-Changed-When: Mon Jul 2 18:36:14 UTC 2007 
State-Changed-Why:  
Maintainer timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113572 
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Sun Sep 9 07:08:09 UTC 2007 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113572 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/113572: commit references a PR
Date: Sun,  9 Sep 2007 07:08:13 +0000 (UTC)

 edwin       2007-09-09 07:08:07 UTC
 
   FreeBSD ports repository
 
   Modified files:
     japanese/sj3         Makefile distinfo pkg-install pkg-plist 
     japanese/sj3/files   sj3.sh.in 
   Added files:
     japanese/sj3/files   patch-sj3.tmpl 
   Removed files:
     japanese/sj3/files   patch-aa patch-ab 
   Log:
   [patch] japanese/sj3 is broken
   
           There are several problems with japanese/sj3 port.
   
           1. Original MASTER_SITES don't seem to work any longer.
           2. With the current patchset it builds okay, but it is said that it does not work correctly.
           3. It does not build under 7-CURRENT (i.e. with gcc4.2).
   
   PR:             ports/113572
   Submitted by:   Hirohisa Yamaguchi <umq@ueo.co.jp>
   Approved by:    maintainer timeout
   
   Revision  Changes    Path
   1.27      +17 -16    ports/japanese/sj3/Makefile
   1.9       +3 -3      ports/japanese/sj3/distinfo
   1.9       +0 -361    ports/japanese/sj3/files/patch-aa (dead)
   1.2       +0 -21     ports/japanese/sj3/files/patch-ab (dead)
   1.1       +21 -0     ports/japanese/sj3/files/patch-sj3.tmpl (new)
   1.2       +24 -18    ports/japanese/sj3/files/sj3.sh.in
   1.4       +31 -4     ports/japanese/sj3/pkg-install
   1.4       +11 -14    ports/japanese/sj3/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/113572: commit references a PR
Date: Sun,  9 Sep 2007 07:09:26 +0000 (UTC)

 edwin       2007-09-09 07:09:21 UTC
 
   FreeBSD ports repository
 
   Modified files:
     .                    UIDs 
   Log:
   Add _sj3 for japanese/sj3 with UID 912
   Fix iserv UID to 911.
   
   PR:             ports/113572 (_sj3)
   Submitted by:   Hirohisa Yamaguchi <umq@ueo.co.jp>
   
   Revision  Changes    Path
   1.51      +3 -2      ports/UIDs
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
