Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2013 06:23:26 -0700
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Cy Schubert <Cy.Schubert@komquats.com>
Cc:        Matthias Apitz <guru@unixarea.de>, freebsd-ports@freebsd.org, cy@FreeBSD.org
Subject:   Re: net/vnc r327755 does not build in /head
Message-ID:  <201310301323.r9UDNQcS055433@slippy.cwsent.com>
In-Reply-To: Message from Cy Schubert <Cy.Schubert@komquats.com> of "Tue, 29 Oct 2013 15:30:22 -0700."

next in thread | previous in thread | raw e-mail | index | archive | help
Cy Schubert writes:
> In message <20131029212647.GA1211=40tiny-r255948>, Matthias Apitz writes:=
> 
> > El d=EDa Tuesday, October 29, 2013 a las 07:52:14AM -0700, Cy Schubert =
> escribi=F3:
> >=20
> > > In message <20131029084836.GA19333=40sh4-5.1blu.de>, Matthias Apitz w=
> rites:
> > > >=20
> > > > Hello,
> > > >=20
> > > > The vnc client only build in /head (anyway if with clang or gcc46) =
> if
> > > > one adds an=20
> > > >=20
> > > > =23include <stdlib.h> to the following three files:
> > > >=20
> > > > ./work/vnc-4_1_3-unixsrc/common/network/TcpSocket.cxx
> > > > ./work/vnc-4_1_3-unixsrc/unix/tx/TXImage.cxx
> > > > ./work/vnc-4_1_3-unixsrc/unix/x0vncserver/Image.cxx
> > > >=20
> > > > The server part stops building in:
> > > >=20
> > > > ...
> > > > cc -c  -O -I../../include -I../../imports/x11/include/X11 =60./ccim=
> ake=60 ima
> > ke.c
> > > > cc -o imake  -O -I../../include -I../../imports/x11/include/X11 ima=
> ke.o
> > > > rm -f ./config/makedepend/Makefile.proto
> > > > ./config/imake/imake -I./config/cf  -s ./config/makedepend/Makefile=
> .proto
> >  -f=20
> > > > ./config/makedepend/Imakefile -DTOPDIR=3D../.. -DCURDIR=3D./config/=
> makedepend
> > > > objformat: not found
> > > > In file included from Imakefile.c:16:
> > > > In file included from ./config/cf/Imake.tmpl:104:
> > > > ./config/cf/FreeBSD.cf:477:35: error: '=23' is not followed by a ma=
> cro para
> > mete
> > > > r
> > >=20
> > > I haven't looked at it completely but it appears vnc needs a few patc=
> hes to
> > =20
> > > add includes for stdlib.h. It's on my plate of things to do.
> >=20
> > The missing includes for stdlib.h is an easy one, but the imake problem=
>  is
> > more complex; see also our exchange in June:
> >=20
> >   Date: Fri, 7 Jun 2013 10:57:30 +0200
> >   To: Niclas Zeising <zeising=40freebsd.org>, freebsd-ports=40freebsd.o=
> rg, cy=40fre
> > ebsd.org
> >   Subject: Re: ports && 10-CURRENT
> >   Message-ID: <20130607085730.GA8414=40sh4-5.1blu.de>
> >   References: <20130525185649.GA932=40tiny.Sisis.de> <51A11350.8050700=
> =40freebsd.
> > org> <20130526155022.GA2665=40sh4-5.1blu.de>
> 
> I'm aware of that one too. In time it will be fixed. Patches are always=20
> welcome though. As a user of vnc I too am impacted by this but one thing =
> at=20
> a time.

Try the following. I haven't tested it under a 9.X system yet. I'll try to 
test it under 9.X later today and if it passes this will be committed.

Index: Makefile
===================================================================
--- Makefile	(revision 330913)
+++ Makefile	(working copy)
@@ -54,11 +54,16 @@
 		X430src-2.tgz:x \
 		X430src-3.tgz:x
 
+.if ${OSVERSION} > 1000000
+USE_GCC=	4.6+
+MAKE_ENV=	IMAKECPP="${CPP}"
+MAKE_ARGS=	AR='ar rc'
+.endif
+
 RUN_DEPENDS+=	xauth:${PORTSDIR}/x11/xauth \
 		${PREFIX}/lib/X11/fonts/misc/6x13-ISO8859-1.pcf.gz:${PORTSDIR}/x11-fonts/
xorg-fonts-miscbitmaps \
 		${LOCALBASE}/lib/X11/fonts/misc/fonts.alias:${PORTSDIR}/x11-fonts/font-al
ias
 
-
 EXTRA_PATCHES+=	${WRKSRC}/xc.patch \
 		${PATCHDIR}/vnc.def-patch \
 		${PATCHDIR}/FreeBSD.cf-patch \
@@ -93,8 +98,12 @@
 .if ! ${PORT_OPTIONS:MSERVER}
 	@${ECHO_MSG} "Skipping build of VNC server."
 .else
+.if ${OSVERSION} > 1000000
+	cd ${WRKSRC}/xc && ${MAKE_ENV} make CC=${CC} CXX=${CXX} ${MAKE_ARGS} World
+.else
 	cd ${WRKSRC}/xc && make CC=${CC} CXX=${CXX} World
 .endif
+.endif
 
 pre-install:
 	@${CP} ${PKGDIR}/pkg-plist ${PLIST}
Index: files/patch-common-network-TcpSocket.cxx
===================================================================
--- files/patch-common-network-TcpSocket.cxx	(revision 0)
+++ files/patch-common-network-TcpSocket.cxx	(working copy)
@@ -0,0 +1,10 @@
+--- ../common/network/TcpSocket.cxx.orig	2008-10-16 08:16:20.000000000 
-0700
++++ ../common/network/TcpSocket.cxx	2013-10-29 09:29:55.935208477 -0700
+@@ -35,6 +35,7 @@
+ #include <string.h>
+ #include <signal.h>
+ #include <fcntl.h>
++#include <stdlib.h>
+ #endif
+ 
+ #include <network/TcpSocket.h>
Index: files/patch-unix-tx-TXImage.cxx
===================================================================
--- files/patch-unix-tx-TXImage.cxx	(revision 0)
+++ files/patch-unix-tx-TXImage.cxx	(working copy)
@@ -0,0 +1,10 @@
+--- tx/TXImage.cxx.orig	2008-10-16 08:16:21.000000000 -0700
++++ tx/TXImage.cxx	2013-10-29 09:32:04.015562191 -0700
+@@ -21,6 +21,7 @@
+ 
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <strings.h>
+ #include <sys/types.h>
+ #include <sys/ipc.h>
Index: files/patch-unix-x0vncserver-Image.cxx
===================================================================
--- files/patch-unix-x0vncserver-Image.cxx	(revision 0)
+++ files/patch-unix-x0vncserver-Image.cxx	(working copy)
@@ -0,0 +1,10 @@
+--- x0vncserver/Image.cxx.orig	2008-10-16 08:16:21.000000000 -0700
++++ x0vncserver/Image.cxx	2013-10-29 09:34:58.346041892 -0700
+@@ -21,6 +21,7 @@
+ 
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/ipc.h>
+ #include <sys/shm.h>



-- 
Cheers,
Cy Schubert <Cy.Schubert@komquats.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310301323.r9UDNQcS055433>