Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2012 22:16:56 GMT
From:      Mamoru Sakaue <sakaue.mamoru@mwghennndo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/174406: Build error of japanese/mozc-server related to OPENSSL_LDFLAGS
Message-ID:  <201212122216.qBCMGuHm007351@red.freebsd.org>
Resent-Message-ID: <201212122220.qBCMK0tN003641@freefall.freebsd.org>

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

>Number:         174406
>Category:       ports
>Synopsis:       Build error of japanese/mozc-server related to OPENSSL_LDFLAGS
>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:   Wed Dec 12 22:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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