# xqproxy



## SirDice (Aug 18, 2012)

Ok, I normally get this. Most ports just require to run ./configure but this one requires USE_AUTOTOOLS and I can't get it to work 

I found net/remmina but a few plugins require xqproxy to be able to tunnel over ssh(1). Unfortunately xqproxy isn't in the ports :\

So, I'd thought I'd whip up a port for it but it appears harder than I initially thought. I keep bumping into the same brick wall.

Basic Makefile: http://pastebin.com/HAa7daRU

There's an autogen.sh file that runs *autoconf -v --install*. All this does, is run, in order:

```
#aclocal
#autoconf
#autoheader
#automake --add-missing --copy --no-force
```

If I run this by hand it works and I can run ./configure: http://pastebin.com/x2kRGABt

But if I try to build the port I keep getting:

```
root@j-build-amd64:/usr/ports/x11/xqproxy#make clean configure
===>  Cleaning for xqproxy-0.1.1
===>  Extracting for xqproxy-0.1.1
=> SHA256 Checksum OK for xqproxy-0.1.1.tar.gz.
===>  Patching for xqproxy-0.1.1
===>   xqproxy-0.1.1 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===>   xqproxy-0.1.1 depends on file: /usr/local/libdata/pkgconfig/xdmcp.pc - found
===>   xqproxy-0.1.1 depends on file: /usr/local/bin/automake-1.12 - found
===>   xqproxy-0.1.1 depends on file: /usr/local/bin/autoconf-2.69 - found
===>  Configuring for xqproxy-0.1.1
configure.ac:10: error: must install xorg-macros 1.2 or later before running autoconf/autogen
configure.ac:10: the top level
autom4te-2.69: /usr/local/bin/gm4 failed with exit status: 1
aclocal-1.12: error: /usr/local/bin/autom4te-2.69 failed with exit status: 1
*** Error code 1

Stop in /usr/ports/x11/xqproxy.
root@j-build-amd64:/usr/ports/x11/xqproxy#
```

devel/xorg-macros is installed, as is pretty much everything else needed to build any kind of X application. It's my build jail and I've already build a huge number of ports in it.

I'm probably overlooking something :stud


----------



## SirDice (Aug 23, 2012)

Leave it for a few days and you suddenly see the light :e


```
# New ports collection makefile for:    xqproxy
# Date created:        18 august 2012
# Whom:                SirDice
#
# $FreeBSD$
#

PORTNAME=       xqproxy
PORTVERSION=    0.1.1
CATEGORIES=     x11
MASTER_SITES=   http://cgit.freedesktop.org/${PORTNAME}/snapshot/

MAINTAINER=     ports@freebsd.org
COMMENT=        XDMCP Query Proxy

#MAN1=          xqproxy.1
#MANCOMPRESSED= yes

BUILD_DEPENDS+= ${LOCALBASE}/share/aclocal/xorg-macros.m4:${PORTSDIR}/devel/xorg-macros

XORG_CAT=       app
USE_XORG=       x11
USE_AUTOTOOLS=  aclocal autoheader autoconf automake
AUTOMAKE_ARGS=  --add-missing --copy --no-force
ACLOCAL_ARGS=   -I${LOCALBASE}/share/aclocal

HAS_CONFIGURE=  yes
USE_GMAKE=      yes

.include <bsd.port.mk>
```

It configures but now I run into the next problem.


```
root@j-build-amd64:/usr/ports/x11/xqproxy# make build
===>  Building for xqproxy-0.1.1
gmake  all-am
gmake[1]: Entering directory `/tmp/build/usr/ports/x11/xqproxy/work/xqproxy-0.1.1'
cc -DHAVE_CONFIG_H -I.    -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -Wall -MT xdmcpclient.o -MD -MP -MF .deps/xdmcpclient.Tpo -c -o xdmcpclient.o xdmcpclient.c
xdmcpclient.c: In function 'XdmcpClientFree':
xdmcpclient.c:267: warning: implicit declaration of function 'Xfree'
mv -f .deps/xdmcpclient.Tpo .deps/xdmcpclient.Po
cc -DHAVE_CONFIG_H -I.    -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -Wall -MT xqproxy.o -MD -MP -MF .deps/xqproxy.Tpo -c -o xqproxy.o xqproxy.c
mv -f .deps/xqproxy.Tpo .deps/xqproxy.Po
cc -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -Wall   -o xqproxy xdmcpclient.o xqproxy.o -L/usr/local/lib -lXdmcp  
xdmcpclient.o: In function `XdmcpClientFree':
xdmcpclient.c:(.text+0x556): undefined reference to `Xfree'
gmake[1]: *** [xqproxy] Error 1
gmake[1]: Leaving directory `/tmp/build/usr/ports/x11/xqproxy/work/xqproxy-0.1.1'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/x11/xqproxy.
```

Haven't figured out the missing Xfree() function yet. I'm probably forgetting to add a library or something.


----------

