From nobody@FreeBSD.org  Wed Dec 12 22:16:57 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 011C6170
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Dec 2012 22:16:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C203F8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Dec 2012 22:16:56 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qBCMGuf7007352
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Dec 2012 22:16:56 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qBCMGuHm007351;
	Wed, 12 Dec 2012 22:16:56 GMT
	(envelope-from nobody)
Message-Id: <201212122216.qBCMGuHm007351@red.freebsd.org>
Date: Wed, 12 Dec 2012 22:16:56 GMT
From: Mamoru Sakaue <sakaue.mamoru@mwghennndo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Build error of japanese/mozc-server related to OPENSSL_LDFLAGS
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174406
>Category:       ports
>Synopsis:       Build error of japanese/mozc-server related to OPENSSL_LDFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    daichi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 12 22:20:00 UTC 2012
>Closed-Date:    Fri Dec 14 08:01:33 UTC 2012
>Last-Modified:  Fri Dec 14 08:01:33 UTC 2012
>Originator:     Mamoru Sakaue
>Release:        FreeBSD 8.3-RELEASE-p3 i386
>Organization:
MwGhennndo
>Environment:
FreeBSD Dossier.mmg-internal 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Mon Jun 11 23:52:38 UTC 2012     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Recent changes of bsd.openssl.mk on the default value of OPENSSL_LDFLAGS confuses the build of japanese/mozc-server and its slave ports (japanese/mozc-el and japanese/mozc-tool).
This reason is that the new OPENSSL_LDFLAGS value includes a string "-Wl," while Makefile of japanese/mozc-server invokes it into sed commands where "," is used as the delimiter.
So I propose a patch to escape problematic characters in variable values invoked in sed commands.
I also include codes for escaping LOCALBASE values invoked in sed commands just in case as well.
>How-To-Repeat:
In the current ports tree (updated at 4:08, 11 Dec 2012, +9:00), execute

make -C /usr/ports/japanese/mozc-server

Then the build fails by complaining about the above matter.
>Fix:
Apply the following patch.

japanese:mozc-server-1.6.1187.102_2.patch
================================================================
diff -urN /usr/ports/japanese/mozc-server/Makefile.orig /usr/ports/japanese/mozc-server/Makefile
--- /usr/ports/japanese/mozc-server/Makefile.orig	2012-11-17 14:58:37.000000000 +0900
+++ /usr/ports/japanese/mozc-server/Makefile	2012-12-13 06:23:52.000000000 +0900
@@ -73,8 +73,9 @@
 		third_party/gyp/pylib/gyp/generator/make.py
 SSL_REINPLACE_STR=
 .for V in OPENSSL_CFLAGS OPENSSLLIB OPENSSLINC OPENSSL_LDFLAGS
-SSL_REINPLACE_STR+=	-e "s,%%${V}%%,${${V}},"
+SSL_REINPLACE_STR+=	-e "s,%%${V}%%,${${V}:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\,/g},"
 .endfor
+LOCALBASE_PTN=	${LOCALBASE:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\,/g}
 
 GYP_DEFINES="use_libprotobuf=1"
 
@@ -88,7 +89,7 @@
 
 post-patch:
 	cd ${WRKSRC} && \
-		${REINPLACE_CMD} "s,@@LOCALBASE@@,${LOCALBASE},g" \
+		${REINPLACE_CMD} "s,@@LOCALBASE@@,${LOCALBASE_PTN},g" \
 		${LOCALBASE_REPLACE_FILES}
 	cd ${WRKSRC} && \
 		${REINPLACE_CMD} ${SSL_REINPLACE_STR} base/base.gyp
@@ -97,7 +98,7 @@
 		${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \
 		unix/fcitx/gen_fcitx_mozc_i18n.sh
 	cd ${WRKSRC} && \
-		${REINPLACE_CMD} "s,/usr,${LOCALBASE}," \
+		${REINPLACE_CMD} "s,/usr,${LOCALBASE_PTN}," \
 		unix/fcitx/mozc.conf
 .endif
 
================================================================


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->daichi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Dec 12 22:20:10 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174406 
State-Changed-From-To: open->closed 
State-Changed-By: daichi 
State-Changed-When: Fri Dec 14 08:01:18 UTC 2012 
State-Changed-Why:  
committed. thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174406 
>Unformatted:
