On 2009/11/09 21:19, Per Gunnarsson wrote: > Hello! > > I failed to notice that xboard 4.2.7 was > available as a pckage, and tried to compile > the latest version. After failing I contacted > Arun Persaud, who together with Tim Mann > gave me advice on how to make it compile > on this version of OpenBSD. It wouldn't configure > at first, but Aron told me to soft link > /usr/X11R6/include/X11 to /usr/include and then > it configured. He has a cleaner solution to that > which he will add to the configure script if I got things right. > > Then it wouldn't compile, but after Tim Mann told me > to add #include <stdint.h> to xoptions.c and after that > things seem to work fine, I have won one game on FICS with > it and lost one Catalan as white too.
here's a diff for the port. it's pretty common that the X11 includes aren't handled by configure scripts, it can usually be set in CPPFLAGS. Index: Makefile =================================================================== RCS file: /cvs/ports/games/xboard/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- Makefile 10 Aug 2009 06:31:43 -0000 1.24 +++ Makefile 9 Nov 2009 21:55:01 -0000 @@ -2,23 +2,26 @@ COMMENT= X11 frontend for GNU Chess and the Internet Chess Server -DISTNAME= xboard-4.2.7 -PKGNAME= ${DISTNAME}p1 +DISTNAME= xboard-4.4.1 CATEGORIES= games x11 MASTER_SITES= ${MASTER_SITE_GNU:=xboard/} HOMEPAGE= http://www.tim-mann.org/xboard.html -# GPL +# GPLv3+ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= ICE SM X11 Xaw Xext Xmu Xpm Xt c m pthread-stubs xcb +WANTLIB= ICE SM X11 Xaw Xmu Xpm Xt c m USE_X11= Yes CONFIGURE_STYLE= gnu -ALL_TARGET= default +CPPFLAGS+= -I${X11BASE}/include +CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" + +post-install: + ${INSTALL_DATA} ${WRKBUILD}/cmail ${PREFIX}/bin .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/games/xboard/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo 5 Apr 2007 15:38:12 -0000 1.5 +++ distinfo 9 Nov 2009 21:55:01 -0000 @@ -1,5 +1,5 @@ -MD5 (xboard-4.2.7.tar.gz) = twrY/3Vpl1MCxftALV7qMg== -RMD160 (xboard-4.2.7.tar.gz) = vQWkcxmjX3AkoXQ76mIuJgUvTSg= -SHA1 (xboard-4.2.7.tar.gz) = rWvAslKQB510TpPqjD3880kYAYA= -SHA256 (xboard-4.2.7.tar.gz) = WyHxLj6Zvgxpo/pfPUy3ne8ktqIZXtlO/BtqtBX7jTs= -SIZE (xboard-4.2.7.tar.gz) = 1318110 +MD5 (xboard-4.4.1.tar.gz) = RiOoP91D9BC/zIog4usUdA== +RMD160 (xboard-4.4.1.tar.gz) = k2dmfijhpIWhG5tBi1inzjKhcD8= +SHA1 (xboard-4.4.1.tar.gz) = tCfgsYDVlhb2QvfRAm1bzcJnZAw= +SHA256 (xboard-4.4.1.tar.gz) = dBhPp9XqTOlj9xCOASVubre7Imn/b3gFmf2q8tkTlQ4= +SIZE (xboard-4.4.1.tar.gz) = 1238119 Index: patches/patch-Makefile_in =================================================================== RCS file: patches/patch-Makefile_in diff -N patches/patch-Makefile_in --- patches/patch-Makefile_in 6 Dec 2007 16:07:18 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,48 +0,0 @@ -$OpenBSD: patch-Makefile_in,v 1.4 2007/12/06 16:07:18 ajacoutot Exp $ ---- Makefile.in.orig Fri Nov 28 22:12:57 2003 -+++ Makefile.in Thu Dec 6 16:58:57 2007 -@@ -21,7 +21,7 @@ man6ext = .6 - # Yuck; the autoconf generated configure script sets an infodir variable - # and provides a command-line flag to change it, but the default is - # /usr/info instead of /usr/share/info. --infodir = $(prefix)/share/info -+infodir = $(prefix)/info - - CC = @CC@ - CFLAGS = @CFLAGS@ @CPPFLAGS@ -DINFODIR=\"$(infodir)\" -@@ -60,18 +60,16 @@ XBOARDOBJ = parser.o xboard.o backend.o moves.o childi - - default: xboard zic2xpm - --all: default pseudosource info FAQ html dvi ps -+all: default pseudosource info FAQ - - install: installdirs default -- $(INSTALL_PROGRAM) -s xboard $(bindir)/xboard -- $(INSTALL_PROGRAM) -s zic2xpm $(bindir)/zic2xpm -- $(INSTALL_PROGRAM) cmail $(bindir)/cmail -- $(INSTALL_PROGRAM) $(srcdir)/pxboard $(bindir)/pxboard -- $(INSTALL_DATA) $(srcdir)/xboard.man $(man6dir)/xboard$(man6ext) -- $(INSTALL_DATA) $(srcdir)/zic2xpm.man $(man6dir)/zic2xpm$(man6ext) -- $(INSTALL_DATA) xboard.info $(infodir)/xboard.info -- -PATH=$$PATH:/sbin:/usr/sbin install-info \ -- $(infodir)/xboard.info $(infodir)/dir -+ $(INSTALL_PROGRAM) -s xboard $(DESTDIR)$(bindir)/xboard -+ $(INSTALL_PROGRAM) -s zic2xpm $(DESTDIR)$(bindir)/zic2xpm -+ $(INSTALL_PROGRAM) cmail $(DESTDIR)$(bindir)/cmail -+ $(INSTALL_PROGRAM) $(srcdir)/pxboard $(DESTDIR)$(bindir)/pxboard -+ $(INSTALL_DATA) $(srcdir)/xboard.man $(DESTDIR)$(man6dir)/xboard$(man6ext) -+ $(INSTALL_DATA) $(srcdir)/zic2xpm.man $(DESTDIR)$(man6dir)/zic2xpm$(man6ext) -+ $(INSTALL_DATA) xboard.info $(DESTDIR)$(infodir)/xboard.info - - installdirs: mkinstalldirs - $(srcdir)/mkinstalldirs $(bindir) $(mandir) $(man6dir) $(infodir) -@@ -88,7 +86,7 @@ uninstall: - clean: - rm -f xboard zic2xpm *.o xboard.txt zic2xpm.txt $(LEX_OUTPUT_ROOT).c - rm -f xboard*.html xboard.aux* xboard.cp* xboard.dvi xboard.fn* -- rm -f xboard.ky* xboard.log xboard.pg* xboard.toc xboard.tp* -+ rm -f xboard.kY* xboard.log xboard.pg* xboard.toc xboard.tp* - rm -f xboard.vr* xboard.ps - - distclean: clean tidy Index: patches/patch-xoptions_c =================================================================== RCS file: patches/patch-xoptions_c diff -N patches/patch-xoptions_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-xoptions_c 9 Nov 2009 21:55:01 -0000 @@ -0,0 +1,11 @@ +$OpenBSD$ +--- xoptions.c.orig Mon Nov 9 21:45:48 2009 ++++ xoptions.c Mon Nov 9 21:45:50 2009 +@@ -31,6 +31,7 @@ + #include <sys/types.h> + + #if STDC_HEADERS ++# include <stdint.h> + # include <stdlib.h> + # include <string.h> + #else /* not STDC_HEADERS */ Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/games/xboard/pkg/PLIST,v retrieving revision 1.7 diff -u -p -r1.7 PLIST --- pkg/PLIST 18 Sep 2004 12:43:28 -0000 1.7 +++ pkg/PLIST 9 Nov 2009 21:55:01 -0000 @@ -1,9 +1,6 @@ @comment $OpenBSD: PLIST,v 1.7 2004/09/18 12:43:28 espie Exp $ @conflict cmail-* bin/cmail -bin/pxboard -bin/xboard -bin/zic2xpm +...@bin bin/xboard @info info/xboard.info @man man/man6/xboard.6 -...@man man/man6/zic2xpm.6