Subject: Re: pkgsrc and OpenBSD
To: Lasse Kliemann <lasse-list-tech-pkg-netbsd-2004@plastictree.net>
From: Hiramatsu Yoshifumi <hiramatu@boreas.dti.ne.jp>
List: tech-pkg
Date: 02/11/2005 09:31:50
Hi,

At Mon, 7 Feb 2005 14:16:43 +0100,
Lasse Kliemann <lasse-list-tech-pkg-netbsd-2004@plastictree.net> wrote:
> > zip dont't compile (thunderbird and firefox-gtk2, for example, depend on 
> > zip) -> 
> > 
> > bmake: don't know how to make generic_gcc. Stop 
> > `unix/Makefile' is up to date. 
> > 
> 
> This is known, see pkg/28945. Try my workaround:
> 
> add -f unix/Makefile to MAKE_FLAGS in archivers/zip/Makefile

It seems that the implementation of getopt function is differed between
NetBSD and OpenBSD, and the difference caused this problem.

What about this workaround? This patch forces bmake to use its own getopt
instead of system getopt on OpenBSD.

--- bootstrap.orig/bmake/Makefile.in    Fri Feb 11 09:09:46 2005
+++ bootstrap/bmake/Makefile.in Fri Feb 11 09:09:54 2005
@@ -42,6 +42,11 @@
 SUBDIR=        PSD.doc
 .endif
 
+.if (${OS} == "OpenBSD")
+CFLAGS+= -DBROKEN_GETOPT
+SRCS+= getopt.c
+.endif
+
 .if (${OS} != "NetBSD" && ${OS} != "FreeBSD" && ${OS} != "OpenBSD")
 # XXX not sure if we still want this given that configure
 # lets us force or not the definition of MACHINE.

-- 
// Hiramatsu Yoshifumi
// hiramatu@boreas.dti.ne.jp