Re: pmake: diff for NMU version 1.111-1.1
Guillem Jover dixit:
>> Hm. I need the one of the system the produced binary will
>> eventually run on. (All this build/host/target is rather
>> confusing and badly documented.) Which one is that?
>
>That's *_HOST_*. And it seems to me to be properly documented in
>dpkg-architecture(1), and in '4.9 of the debian policy. They also
>have the same meaning as the GNU target names.
I may have confused it with emulation terminology then, where
host is the other one. My apologies. Please find below a fixed
diff.
diff -u pmake-1.111/mk/sys.mk pmake-1.111/mk/sys.mk
--- pmake-1.111/mk/sys.mk
+++ pmake-1.111/mk/sys.mk
@@ -1,7 +1,7 @@
# $NetBSD: sys.mk,v 1.54 1999/03/10 14:06:14 mycroft Exp $
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-unix?= We run NetBSD.
+unix?= We run Debian GNU.
.SUFFIXES: .out .a .ln .o .s .S .c .cc .C .F .f .r .y .l .cl .p .h .sh .m4
diff -u pmake-1.111/main.c pmake-1.111/main.c
--- pmake-1.111/main.c
+++ pmake-1.111/main.c
@@ -636,6 +636,17 @@
char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */
struct timeval rightnow; /* to initialize random seed */
+#ifdef MAXPATHLEN_UNDEFINED
+ if (sysconf(_PC_PATH_MAX) > MAXPATHLEN) {
+ fprintf(stderr, "This operating system runs with "
+ "sysconf(_PC_PATH_MAX) > MAXPATHLEN\n(%ld > %ld). "
+ "Please change the guesstimated value at the bottom\n"
+ "of 'make.h' and recompile, or reduce the actual "
+ "value.\n", sysconf(_PC_PATH_MAX), (long)MAXPATHLEN);
+ return (255);
+ }
+#endif
+
/*
* Set the seed to produce a different random sequences
* on each program execution.
diff -u pmake-1.111/debian/changelog pmake-1.111/debian/changelog
--- pmake-1.111/debian/changelog
+++ pmake-1.111/debian/changelog
@@ -1,3 +1,20 @@
+pmake (1.111-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Port to hurd-i386 (Closes: #547459)
+ - make.h: define MAXPATHLEN if not defined (XXX kludge)
+ - main.c: check sysconf(_PC_PATH_MAX) and bail out if larger than
+ the defined kludge value; inform the user appropriately
+ I’m doing it this way because this codebase is ancient, and to
+ really fix this issue is not worth the effort. No activity in
+ more than four years speaks for itself.
+ * mk/sys.mk: We do not run NetBSD® but Debian. (Closes: #493839)
+ * debian/rules: Replace 「dpkg --print-gnu-build-architecture」 with
+ 「dpkg-architecture -qDEB_HOST_ARCH_CPU」 to unbreak build.
+ * debian/rules: Use -Wno-unused to clean up build messages.
+
+ -- Thorsten Glaser <tg@mirbsd.de> Sun, 25 Oct 2009 09:37:20 +0000
+
pmake (1.111-1) unstable; urgency=low
* New upstream snapshot.
diff -u pmake-1.111/debian/rules pmake-1.111/debian/rules
--- pmake-1.111/debian/rules
+++ pmake-1.111/debian/rules
@@ -2,12 +2,12 @@
#export DH_VERBOSE=1
-ARCH=$(shell dpkg --print-gnu-build-architecture)
+ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
CFLAGS="-O2 -g -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= \
-I. -DMACHINE=\\\"debian\\\" -DMACHINE_ARCH=\\\"${ARCH}\\\" \
-DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME \
-DHAVE_VSNPRINTF \
- -D_GNU_SOURCE"
+ -D_GNU_SOURCE -Wno-unused"
build: build-stamp
build-stamp:
only in patch2:
unchanged:
--- pmake-1.111.orig/make.h
+++ pmake-1.111/make.h
@@ -476,4 +476,10 @@
#define MAX(a, b) ((a > b) ? a : b)
#endif
+/* maybe Debian GNU/HURD */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096 /* some sensible value */
+#define MAXPATHLEN_UNDEFINED /* triggers check in main.c */
+#endif
+
#endif /* _MAKE_H_ */
Thanks,
//mirabilos
--
16:47⎜«mika:#grml» .oO(mira ist einfach gut....) 23:22⎜«mikap:#grml»
mirabilos: und dein bootloader ist geil :) 23:29⎜«mikap:#grml» und ich
finds saugeil dass ich ein bsd zum booten mit grml hab, das muss ich dann
gleich mal auf usb-stick installieren -- Michael Prokop über MirOS bsd4grml
Reply to: