[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#651263: daemon: FTBFS on hurd-i386: new platform



Source: daemon
Version: 0.6.4-1
Severity: normal
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hi,

The attached patch adds support for GNU/Hurd for daemon package. Build-
but not run tested (yet) on hurd-i386. Some of the libslack tests fails
but they don't not seem to be critical since the complete package
builds.

Thanks!
diff -urN daemon-0.6.4/conf/gnu daemon-0.6.4.modified/conf/gnu
--- daemon-0.6.4/conf/gnu	1970-01-01 01:00:00.000000000 +0100
+++ daemon-0.6.4.modified/conf/gnu	2011-12-07 09:14:27.000000000 +0100
@@ -0,0 +1,134 @@
+#!/bin/sh
+#
+# daemon - http://libslack.org/daemon/
+#
+# Copyright (C) 1999-2010 raf <raf@raf.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+# or visit http://www.gnu.org/copyleft/gpl.html
+#
+
+# Modify the macros.mk make include files to exercise optional code
+#
+# 20100612 raf <raf@raf.org>
+
+perl -pi \
+	-e 's/^(\S+ \+= xnet)$/# $1/;' \
+	-e 's/^(\S+ \+= socket)$/# $1/;' \
+	-e 's/^(\S+ \+= nsl)$/# $1/;' \
+	-e 's/^(\S+ \+= m)$/# $1/;' \
+	-e 's/^(GETOPT := getopt)$/# $1/;' \
+	-e 's/^(SNPRINTF := snprintf)$/# $1/;' \
+	-e 's/^(VSSCANF := vsscanf)$/# $1/;' \
+	-e 's/^# (\S+ \+= -DHAVE_GETOPT_LONG=1)$/$1/;' \
+	-e 's/^# (\S+ \+= -DHAVE_VSSCANF=1)$/$1/;' \
+	-e 's/^# (\S+ \+= -DHAVE_PTHREAD_RWLOCK=1)$/$1/;' \
+	-e 's/^(\S+ \+= -DNO_POSIX_C_SOURCE=1)$/# $1/;' \
+	-e 's/^(\S+ \+= -DNO_POSIX_SOURCE=1)$/# $1/;' \
+	-e 's/^(\S+ \+= -DNO_XOPEN_SOURCE=1)$/# $1/;' \
+	-e 's/^(\S+ \+= -DROOT_PID_DIR)=.*$/# $1=\\"\/var\/run\\"/;' \
+	-e 's/^(CC := cc)$/# $1/;' \
+	-e 's/^# (CC := gcc)$/$1/;' \
+	-e 's/^# (\S+ \+= -Wno-long-long)$/$1/;' \
+	-e 's/^# (\S+ \+= -Wno-overlength-strings)$/$1/;' \
+	-e 's/^# (\w*CCFLAGS \+= -O3)$/$1/;' \
+	-e 's/^# (\w*CCFLAGS \+= -Wall -pedantic)$/$1/;' \
+	-e 's/^(\w*(?:CC|LD)FLAGS \+= -m64)$/# $1/;' \
+	-e 's/^(\w*CCFLAGS \+= -xO4)$/# $1/;' \
+	-e 's/^# (\w*LIBS \+= pthread)$/$1/;' \
+	-e 's/^# (\w*LIBS \+= util)$/$1/;' \
+	-e 's/^(\w*LDFLAGS \+= -pthread)$/# $1/;' \
+	-e 's/^MAN_GZIP := 0$/MAN_GZIP := 1/;' \
+	-e 's/^(MAN_LOCDIR\s*:=).*$/$1 \$(PREFIX)\/share\/man/;' \
+	`find . -name Makefile` \
+	`find . -name macros.mk`
+
+perl -pi \
+	-e 's/\.\/myinstall -m/install -m/' \
+	`find . -name rules.mk`
+
+perl -pi \
+	-e 's/^#define (NO_POSIX_SOURCE) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (NO_XOPEN_SOURCE) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_STDARG_H) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_STDINT_H) 1$/\/\* #undef $1 \*\//;' \
+	-e 's/^\/\* #undef (HAVE_POLL_H) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_SYS_POLL_H) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_SYS_SELECT_H) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_REGEX_H) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_LONG_DOUBLE) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_LONG_LONG) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_SNPRINTF) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_VSNPRINTF) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_GETOPT_LONG) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_VSSCANF) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_STRCASECMP) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_STRNCASECMP) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_STRLCPY) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_STRLCAT) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_ASPRINTF) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_VSPRINTF) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_FLOCKFILE) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_FCNTL_THAT_CAN_LOCK_FIFOS) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_ISOC_REALLOC) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_POLL) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_LINUX_POLL_BUG) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_MLOCK) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_FUNC_GETHOSTBYNAME_R_6) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_FUNC_GETHOSTBYNAME_R_5) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_FUNC_GETHOSTBYNAME_R_3) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_FUNC_GETSERVBYNAME_R_6) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_FUNC_GETSERVBYNAME_R_5) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_FUNC_GETSERVBYNAME_R_4) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_PTHREAD_PROCESS_PRIVATE) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTHREAD_PROCESS_SHARED) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTHREAD_CONDATTR_INIT) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTHREAD_CONDATTR_SETPSHARED) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTHREAD_MUTEXATTR_SETPSHARED) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTHREAD_RWLOCK) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_MSGHDR_MSG_CONTROL) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_IFREQ_IFR_IFINDEX) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_IFREQ_IFR_MTU) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_SOCKADDR_SA_LEN) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_IF_INDEXTONAME) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_IF_NAMETOINDEX) \*\/$/#define $1 1/;' \
+	-e 's/^#define (MLOCK_REQUIRES_PAGE_BOUNDARY) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_PRINTF_PTR_FMT_ALTERNATE) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PRINTF_PTR_FMT_SIGNED) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PRINTF_PTR_FMT_NIL) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PRINTF_STR_FMT_NULL) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_PRINTF_FLT_FMT_G_STD) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_PRINTF_PTR_FMT_NOALT) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_PRINTF_WITH_SOLARIS_NEGATIVE_WIDTH_BEHAVIOUR) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_PRINTF_WITH_SOLARIS8_ZERO_PRECISION_ALT_OCTAL_BEHAVIOUR) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_UNIX_DOMAIN_WILDCARD) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (SVR4) \*\/$/#define $1 1/;' \
+	-e 's/^#define (SOCKS) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_CYGWIN) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_DEV_PTMX) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_DEV_PTS_AND_PTC) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_OPENPTY) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTY_H) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_UTIL_H) 1$/\/* #undef $1 *\//;' \
+	-e 's/^#define (HAVE_LIBUTIL_H) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_SYS_STROPTS_H) \*\/$/#define $1 1/;' \
+	-e 's/^#undef (HAVE_VHANGUP) 1$/\/* #define $1 *\//;' \
+	-e 's/^#define (HAVE__GETPTY) 1$/\/* #undef $1 *\//;' \
+	-e 's/^\/\* #undef (HAVE_TTYNAME_R) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTSNAME_R) \*\/$/#define $1 1/;' \
+	-e 's/^\/\* #undef (HAVE_PTSNAME) \*\/$/#define $1 1/;' \
+	-e 's/^#define (HAVE_POLL_THAT_ABORTS_WHEN_POLLFDS_IS_NULL) 1$/\/* #undef $1 *\//;' \
+	`find . -name config.h`
+
diff -urN daemon-0.6.4/configure daemon-0.6.4.modified/configure
--- daemon-0.6.4/configure	2010-06-13 21:18:35.000000000 +0200
+++ daemon-0.6.4.modified/configure	2011-12-07 09:36:26.000000000 +0100
@@ -35,6 +35,11 @@
 		conf/kfreebsd
 		;;
 
+	GNU*)
+		echo "Configuring for GNU/Hurd"
+		conf/gnu
+		;;
+
 	FreeBSD*)
 		echo "Configuring for freebsd"
 		conf/freebsd

Reply to: