From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 9 20:20:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E3776AD1 for ; Thu, 9 May 2013 20:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id C553FFB3 for ; Thu, 9 May 2013 20:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r49KK1uo026750 for ; Thu, 9 May 2013 20:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r49KK18A026749; Thu, 9 May 2013 20:20:01 GMT (envelope-from gnats) Resent-Date: Thu, 9 May 2013 20:20:01 GMT Resent-Message-Id: <201305092020.r49KK18A026749@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, John Marino Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0A1108C9 for ; Thu, 9 May 2013 20:11:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id EFFA2F77 for ; Thu, 9 May 2013 20:11:18 +0000 (UTC) Received: from oldred.FreeBSD.org ([127.0.1.6]) by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r49KBID7052075 for ; Thu, 9 May 2013 20:11:18 GMT (envelope-from nobody@oldred.FreeBSD.org) Received: (from nobody@localhost) by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r49KBIol052073; Thu, 9 May 2013 20:11:18 GMT (envelope-from nobody) Message-Id: <201305092011.r49KBIol052073@oldred.FreeBSD.org> Date: Thu, 9 May 2013 20:11:18 GMT From: John Marino To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/178465: [PATCH] www/sarg: fix configure bugs and missing libiconv linkage X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 20:20:01 -0000 >Number: 178465 >Category: ports >Synopsis: [PATCH] www/sarg: fix configure bugs and missing libiconv linkage >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: Thu May 09 20:20:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: John Marino >Release: >Organization: >Environment: >Description: The www/sarg configure script is geared for bash (I guess) as it uses "==" for string equality. This causes all the LDFLAGS and CFLAGS determinations to fail, among other things. A second problem is that libiconv needs to be linked into binary (if iconv option selected which is default) and this causes sarg to break using modern binutils that don't indirect link by default. Two fixes are provided: The diff needs for the port makefile (below) and a the contents of "patch-configure.in" (attached). https://raw.github.com/jrmarino/DeltaPorts/c2dde3dfdb6201d9e205ca121326977d9ed76bfa/ports/www/sarg/dragonfly/patch-configure.in (attached) https://raw.github.com/jrmarino/DeltaPorts/c2dde3dfdb6201d9e205ca121326977d9ed76bfa/ports/www/sarg/diffs/Makefile.diff (below) --- Makefile.orig 2013-05-09 19:20:43.860789000 +0000 +++ Makefile @@ -34,6 +34,7 @@ MAN1= sarg.1 .if ${PORT_OPTIONS:MNLS} PLIST_SUB+= NLS="" USES+= gettext +RPL1= -lintl .else PLIST_SUB+= NLS="@comment " CONFIGURE_ARGS+=--disable-nls @@ -71,6 +72,7 @@ CONFIGURE_ARGS+=--without-ldap .if ${PORT_OPTIONS:MICONV} CONFIGURE_ARGS+=--with-iconv USES+= iconv +RPL2= -liconv .else CONFIGURE_ARGS+=--without-iconv .endif @@ -80,8 +82,8 @@ post-extract: @${CHMOD} 0755 ${WRKSRC}/configure post-patch: -.if ${PORT_OPTIONS:MNLS} - @${REINPLACE_CMD} -e '/^LIBS/ s/$$/ -lintl/' ${WRKSRC}/Makefile.in +.if ${PORT_OPTIONS:MNLS} || ${PORT_OPTIONS:MICONV} + @${REINPLACE_CMD} -e '/^LIBS/ s/$$/ ${RPL1} ${RPL2}/' ${WRKSRC}/Makefile.in .endif pre-configure: >How-To-Repeat: >Fix: Patch attached with submission follows: --- configure.in.orig 2013-04-21 15:22:35.000000000 +0000 +++ configure.in @@ -36,7 +36,7 @@ saved_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter" AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_extra_warnings="yes"],[have_extra_warnings="no"]) AC_MSG_RESULT($have_extra_warnings) -if test "$have_extra_warnings" == "no" ; then +if test "$have_extra_warnings" = "no" ; then CFLAGS="${saved_CFLAGS}" fi @@ -45,7 +45,7 @@ saved_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -Werror=implicit-function-declaration" AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes"],[have_implicit_function_declaration="no"]) AC_MSG_RESULT($have_implicit_function_declaration) -if test "$have_implicit_function_declaration" == "no" ; then +if test "$have_implicit_function_declaration" = "no" ; then CFLAGS="${saved_CFLAGS}" fi @@ -54,7 +54,7 @@ saved_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -Werror=format" AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_format="no"]) AC_MSG_RESULT($have_error_format) -if test "$have_error_format" == "no" ; then +if test "$have_error_format" = "no" ; then CFLAGS="${saved_CFLAGS}" fi @@ -88,7 +88,7 @@ AS_HELP_STRING([--with-gd],[Compile with [],[with_gd=check]) if ( test "x$with_gd" != "xno" ) ; then AC_CHECK_HEADERS(gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h) - if ( test "x$ac_cv_header_gd_h" == "xyes" ) ; then + if ( test "x$ac_cv_header_gd_h" = "xyes" ) ; then AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes", HAVE_GD_LIB="") if ( test "x$HAVE_GD_LIB" != "xyes" ) ; then AC_MSG_ERROR([ligbd is required to compile sarg with gd]) @@ -132,7 +132,7 @@ AS_HELP_STRING([--with-pcre],[Compile wi [],[with_pcre=check]) if ( test "x$with_pcre" != "xno" ) ; then AC_CHECK_HEADERS(pcre.h) - if ( test "x$ac_cv_header_pcre_h" == "xyes" ) ; then + if ( test "x$ac_cv_header_pcre_h" = "xyes" ) ; then LDFLAGS="$LDFLAGS $(pcre-config --libs)" CFLAGS="$CFLAGS $(pcre-config --cflags)" else @@ -238,7 +238,7 @@ AS_HELP_STRING([--enable-fontdir=fontdir fi ],[FONTDIR="${datarootdir}/sarg/fonts"]) if test "$FONTDIR" ; then - if test "x$prefix" == "xNONE" ; then + if test "x$prefix" = "xNONE" ; then tempfullpath=`prefix=$ac_default_prefix ; eval "echo $FONTDIR"` else tempfullpath=`eval "echo $FONTDIR"` @@ -256,7 +256,7 @@ AS_HELP_STRING([--enable-imagedir=imaged IMAGEDIR=$enableval fi ],[IMAGEDIR="${datarootdir}/sarg/images"]) -if test "x$prefix" == "xNONE" ; then +if test "x$prefix" = "xNONE" ; then tempfullpath=`prefix=$ac_default_prefix ; eval "echo $IMAGEDIR"` else tempfullpath=`eval "echo $IMAGEDIR"` @@ -280,7 +280,7 @@ AS_HELP_STRING([--enable-extraprotection CFLAGS="${CFLAGS} -Wformat -Werror=format-security" AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_format_security="yes"],[have_format_security="no"]) AC_MSG_RESULT($have_format_security) - if test "$have_format_security" == "no" ; then + if test "$have_format_security" = "no" ; then CFLAGS="${saved_CFLAGS}" fi @@ -289,7 +289,7 @@ AS_HELP_STRING([--enable-extraprotection CFLAGS="${CFLAGS} -Wempty-body" AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_empty_body="yes"],[have_empty_body="no"]) AC_MSG_RESULT($have_empty_body) - if test "$have_empty_body" == "no" ; then + if test "$have_empty_body" = "no" ; then CFLAGS="${saved_CFLAGS}" fi fi @@ -361,14 +361,14 @@ AC_SUBST(VERSION,"$PACKAGE_VERSION") AC_CONFIG_FILES([Makefile po/Makefile.in]) AC_OUTPUT -if ( test "x$gd_status" == "xdisabled" ) ; then +if ( test "x$gd_status" = "xdisabled" ) ; then AC_MSG_NOTICE([Not building with gd as requested on the configuration command line]) -elif ( test "x$gd_status" == "xnot found" ) ; then +elif ( test "x$gd_status" = "xnot found" ) ; then AC_MSG_NOTICE([gd.h was not found so the graphs won't be available in the report]) fi -if ( test "x$pcre_status" == "xdisabled" ) ; then +if ( test "x$pcre_status" = "xdisabled" ) ; then AC_MSG_NOTICE([Not building with pcre as requested on the configuration command line]) -elif ( test "x$pcre_status" == "xnot found" ) ; then +elif ( test "x$pcre_status" = "xnot found" ) ; then AC_MSG_NOTICE([pcre.h was not found so the regexp won't be available in the hostalias]) fi >Release-Note: >Audit-Trail: >Unformatted: