[nas] [Petr.Salinger at seznam.cz: Bug#379758: nas: FTBFS on GNU/kFreeBSD]

Steve McIntyre steve at einval.com
Sun Aug 13 14:29:32 MDT 2006


Extra patches needed for 1.8 on GNU/kFreeBSD...

----- Forwarded message from Petr Salinger <Petr.Salinger at seznam.cz> -----

From: Petr Salinger <Petr.Salinger at seznam.cz>
Date: Tue, 25 Jul 2006 13:56:44 +0200 (CEST)
To: submit at bugs.debian.org
Reply-To: Petr Salinger <Petr.Salinger at seznam.cz>, 379758 at bugs.debian.org
Subject: Bug#379758: nas: FTBFS on GNU/kFreeBSD
X-Debian-PR-Message: report 379758
X-Debian-PR-Package: nas
X-Debian-PR-Keywords: patch
X-Debian-PR-Source: nas
X-X-Sender: salinger at sci.felk.cvut.cz
X-FELK-MailScanner-Information: Please contact the ISP for more information
X-FELK-MailScanner: Found to be clean
X-FELK-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=1.541, required 5, ALL_TRUSTED -1.80, BAYES_50 0.00,
	DNS_FROM_RFC_POST 1.71, SARE_FREE_WEBM_CZSEZNA 0.25,
	SPF_SOFTFAIL 1.38)
X-FELK-MailScanner-SpamScore: s
X-FELK-MailScanner-From: petr.salinger at seznam.cz
X-Spam-Status: No, hits=-1.5 required=5.0
	tests=BAYES_20,DATE_IN_FUTURE_06_12,USER_AGENT_PINE,X_LOOP
	version=2.55
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)

Package: nas
Severity: important
Version: 1.8-1
Tags: patch


Hi,

the current version fails to build on GNU/kFreeBSD.
It needs updated libtool and small tweaks.

Please, apply attached patch and after that
perform following steps (to update libtool):

cd config
libtoolize -c -f
aclocal-1.7
autoconf

The patch contains also fix for #368726.

It would also be nice if you can ask upstream
to include this changes.

Thanks in advance

                        Petr

diff -u nas-1.8/lib/audio/Imakefile nas-1.8/lib/audio/Imakefile
--- nas-1.8/lib/audio/Imakefile	2006-07-25 15:44:03.000000000 +0200
+++ nas-1.8/lib/audio/Imakefile	2006-07-25 15:44:03.000000000 +0200
@@ -146,7 +146,7 @@
 
 XAULIB = 
 
-#if defined(LinuxArchitecture) || defined(GNUArchitecture)
+#if defined(LinuxArchitecture) || defined(GNUArchitecture) || defined(__FreeBSD_kernel__)
 REQUIREDLIBS = -L$(USRLIBDIR) -lXt $(XAULIB) -lm 
 #endif
 
diff -u nas-1.8/server/Imakefile nas-1.8/server/Imakefile
--- nas-1.8/server/Imakefile
+++ nas-1.8/server/Imakefile
@@ -96,7 +96,7 @@
 #endif
 
 
-#if defined(i386SVR4Architecture) || defined(__FreeBSD__) || defined(FreeBSDArchitecture) || defined(LinuxArchitecture) || defined(i386BsdArchitecture) || defined(USLArchitecture) || defined(cygwinArchitecture) || defined(__DragonFly__)
+#if defined(i386SVR4Architecture) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(FreeBSDArchitecture) || defined(LinuxArchitecture) || defined(i386BsdArchitecture) || defined(USLArchitecture) || defined(cygwinArchitecture) || defined(__DragonFly__)
 # define CanBuildAuServer	YES
 
 #if !defined(GNUMachArchitecture)
only in patch2:
unchanged:
--- nas-1.8.orig/server/dia/auservertype.h
+++ nas-1.8/server/dia/auservertype.h
@@ -14,7 +14,7 @@
 # define SGI_SERVER
 #endif						/* sgi */
 
-#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(linux) || (defined(SVR4) && (defined(SYSV386) || defined(i386))) || defined(__CYGWIN__)
+#if defined(__DragonFly__) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(linux) || (defined(SVR4) && (defined(SYSV386) || defined(i386))) || defined(__CYGWIN__)
 # define VOXWARE_SERVER
 #endif                                          /* voxware */
 
only in patch2:
unchanged:
--- nas-1.8.orig/config/acinclude.m4
+++ nas-1.8/config/acinclude.m4
@@ -0,0 +1,72 @@
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_func_snprintf.html
+
+AC_DEFUN([AC_FUNC_SNPRINTF],
+[AC_CHECK_FUNCS(snprintf vsnprintf)
+AC_MSG_CHECKING(for working snprintf)
+AC_CACHE_VAL(ac_cv_have_working_snprintf,
+[AC_TRY_RUN(
+[#include <stdio.h>
+
+int main(void)
+{
+    char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
+    char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
+    int i;
+    i = snprintf (bufs, 2, "%s", "111");
+    if (strcmp (bufs, "1")) exit (1);
+    if (i != 3) exit (1);
+    i = snprintf (bufd, 2, "%d", 111);
+    if (strcmp (bufd, "1")) exit (1);
+    if (i != 3) exit (1);
+    exit(0);
+}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
+AC_MSG_RESULT([$ac_cv_have_working_snprintf])
+AC_MSG_CHECKING(for working vsnprintf)
+AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
+[AC_TRY_RUN(
+[#include <stdio.h>
+#include <stdarg.h>
+
+int my_vsnprintf (char *buf, const char *tmpl, ...)
+{
+    int i;
+    va_list args;
+    va_start (args, tmpl);
+    i = vsnprintf (buf, 2, tmpl, args);
+    va_end (args);
+    return i;
+}
+
+int main(void)
+{
+    char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
+    char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
+    int i;
+    i = my_vsnprintf (bufs, "%s", "111");
+    if (strcmp (bufs, "1")) exit (1);
+    if (i != 3) exit (1);
+    i = my_vsnprintf (bufd, "%d", 111);
+    if (strcmp (bufd, "1")) exit (1);
+    if (i != 3) exit (1);
+    exit(0);
+}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
+AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
+if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
+  AC_LIBOBJ(snprintf)
+  AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.])
+  AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken")
+fi])
+
+
+


----- End forwarded message -----
-- 
Steve McIntyre, Cambridge, UK.                                steve at einval.com
Google-bait:       http://www.debian.org/CD/free-linux-cd
  Debian does NOT ship free CDs. Please do NOT contact the mailing
  lists asking us to send them to you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://radscan.com/pipermail/nas/attachments/20060813/68e67025/attachment.pgp>


More information about the Nas mailing list