NetBSD Problem Report #51354

From www@NetBSD.org  Thu Jul 21 00:38:07 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F21197A3DB
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 21 Jul 2016 00:38:06 +0000 (UTC)
Message-Id: <20160721003805.8169A7AAB7@mollari.NetBSD.org>
Date: Thu, 21 Jul 2016 00:38:05 +0000 (UTC)
From: pkgsrc@xn--rvztrtkrfrgp-bbb7j2b8f0b9d7a21oft.com
Reply-To: pkgsrc@xn--rvztrtkrfrgp-bbb7j2b8f0b9d7a21oft.com
To: gnats-bugs@NetBSD.org
Subject: mail/postfix eai option does not work because of test in makedef
X-Send-Pr-Version: www-1.0

>Number:         51354
>Category:       pkg
>Synopsis:       mail/postfix eai option does not work because of test in makedef
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    maya
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 21 00:40:00 +0000 2016
>Closed-Date:    Mon Oct 31 13:36:35 +0000 2016
>Last-Modified:  Mon Oct 31 13:36:35 +0000 2016
>Originator:     Ben Gergely
>Release:        current
>Organization:
>Environment:
NetBSD amd64
>Description:
When building postfix with eai enabled a check in makedefs adds -DNO_EAI incorrectly to CCARGS:

-DHAS_EAI -I/usr/pkg/include -DNO_EAI

the eai option in options.mk is correct.
>How-To-Repeat:


cd /usr/pkgsrc/mail/postfix ; make clean ; make configure PKG_OPTIONS.postfix=eai ; grep "DHAS_EAI" ./work/postfix-3.0.2/Makefile
>Fix:
remove the test in makedefs as it's handled with the options framework

--- ./makedefs  2016-07-21 01:19:47.478264694 +0100
+++ /tmp/makedefs       2016-07-21 01:22:08.399316881 +0100
@@ -655,42 +655,6 @@
 esac

 #
-# Look for the ICU library and enable unicode email if available.
-#
-case "$CCARGS" in
- *-DNO_EAI*) ;;
-          *) trap 'rm -f makedefs.test makedefs.test.[co]' 1 2 3 15
-             cat >makedefs.test.c <<'EOF'
-#include <unicode/uidna.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
-    char    buf[1024];
-    UErrorCode error = U_ZERO_ERROR;
-    UIDNAInfo info = UIDNA_INFO_INITIALIZER;
-    UIDNA  *idna = uidna_openUTS46(UIDNA_DEFAULT, &error);
-
-    exit(uidna_labelToUnicodeUTF8(idna,
-                                 "xn--lgbbat1ad8j",    /* an arabic TLD */
-                                 15,
-                                 buf,
-                                 sizeof(buf),
-                                 &info,
-                                 &error) != 14);
-}
-EOF
-             ${CC-gcc} -o makedefs.test makedefs.test.c -I/usr/local/include \
-               -L/usr/local/lib -licuuc >/dev/null 2>&1
-             if ./makedefs.test 2>/dev/null ; then
-                 SYSLIBS="$SYSLIBS -L/usr/local/lib -licuuc"
-             else
-                 CCARGS="$CCARGS -DNO_EAI"
-             fi
-             rm -f makedefs.test makedefs.test.[co]
-esac
-
-#
 # OpenSSL has no configuration query utility, but we don't try to
 # guess. We assume includes in /usr/include/openssl and libraries in
 # /usr/lib, or in their /usr/local equivalents. If the OpenSSL files

>Release-Note:

>Audit-Trail:
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51354 CVS commit: pkgsrc/mail/postfix
Date: Mon, 31 Oct 2016 04:19:07 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Mon Oct 31 04:19:07 UTC 2016

 Modified Files:
 	pkgsrc/mail/postfix: Makefile.common distinfo
 	pkgsrc/mail/postfix/patches: patch-ai

 Log Message:
 postfix: use pkgconfig instead of icu-config to find icu cflags
 and ldflags. should help PR pkg/51354: mail/postfix eai option does not
 work because of test in makedef.

 bump PKGREVISION


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 pkgsrc/mail/postfix/Makefile.common
 cvs rdiff -u -r1.165 -r1.166 pkgsrc/mail/postfix/distinfo
 cvs rdiff -u -r1.35 -r1.36 pkgsrc/mail/postfix/patches/patch-ai

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pkg-manager->maya
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Mon, 31 Oct 2016 04:22:18 +0000
Responsible-Changed-Why:
take


State-Changed-From-To: open->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 31 Oct 2016 04:22:18 +0000
State-Changed-Why:
Does it work now?


State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 31 Oct 2016 13:36:35 +0000
State-Changed-Why:
confirmed fixed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.