ports/123469: [PATCH] net/rsync: fix WITHOUT_ICONV build

Dan Nelson dnelson at allantgroup.com
Tue May 6 16:40:05 UTC 2008


>Number:         123469
>Category:       ports
>Synopsis:       [PATCH] net/rsync: fix WITHOUT_ICONV build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 06 16:40:04 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dan Nelson
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
The Allant Group
>Environment:
System: FreeBSD dan.emsphone.com 7.0-STABLE FreeBSD 7.0-STABLE #546: Thu May 1 13:34:56 CDT 2008 zsh at dan.emsphone.com:/usr/src-7/sys/i386/compile/DANSMP i386


	
>Description:
	

The options dialog lets you ask for iconv support to be disabled, but
just adding --disable-iconv isn't enough.  That simply disables rsync's
--iconv flag but still allows libiconv to be linked into the binary...

>How-To-Repeat:
	

Install libiconv, uncheck "Add iconv support" in the rsync options
screen, build rsync.  The link stage will fail with:

rsync.o(.text+0xffe): In function `iconvbufs':
: undefined reference to `libiconv'
rsync.o(.text+0x1132): In function `iconvbufs':
: undefined reference to `libiconv'
rsync.o(.text+0x11b8): In function `setup_iconv':
: undefined reference to `locale_charset'
rsync.o(.text+0x11de): In function `setup_iconv':
: undefined reference to `libiconv_open'
*** Error code 1

>Fix:

Set the appropriate autoconf cache variables so that rsync's configure
script completely skips iconv detection, even if it's present on the
system.  As a bonus, no post-configure fixup is needed:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/rsync/Makefile,v
retrieving revision 1.131
diff -u -r1.131 Makefile
--- Makefile	8 Apr 2008 19:24:06 -0000	1.131
+++ Makefile	6 May 2008 15:28:33 -0000
@@ -55,6 +55,8 @@
 CONFIGURE_ENV+=	LDFLAGS="${LDFLAGS}" CONFIGUREDCFLAGS="${CONFIGUREDCFLAGS}"
 .else
 CONFIGURE_ARGS+=	--disable-iconv
+CONFIGURE_ENV+=		ac_cv_search_libiconv_open=no
+CONFIGURE_ENV+=		ac_cv_header_iconv_h=no
 .endif
 
 .if defined(WITH_FLAGS)
@@ -71,7 +73,7 @@
 
 .if defined(WITH_POPT_PORT)
 LIB_DEPENDS+=	popt.0:${PORTSDIR}/devel/popt
-CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+CONFIGURE_ENV+=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
 		LIBS="-L${LOCALBASE}/lib"
 .else
 CONFIGURE_ARGS+=	--with-included-popt
@@ -91,11 +93,6 @@
 	@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \
 		${WRKSRC}/rsync.h ${WRKSRC}/zlib/zutil.h
 
-.if defined(WITHOUT_ICONV)
-post-configure:
-	@${REINPLACE_CMD} -e 's|-liconv||' ${WRKSRC}/Makefile
-.endif
-
 post-install:
 	@${STRIP_CMD} ${PREFIX}/bin/rsync
 	@${INSTALL_DATA} ${FILESDIR}/rsyncd.conf.sample ${PREFIX}/etc/


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



More information about the freebsd-ports-bugs mailing list