freebsd-ports/net/x2goclient/Makefile
Muhammad Moinur Rahman 6e1233be22 Mk/**ldap.mk: Convert USE_LDAP to USES=ldap
Convert the USE_LDAP=yes to USES=ldap and adds the following features:

- Adds the argument USES=ldap:server to add openldap2{4|5|6}-server as
  RUN_DEPENDS
- Adds the argument USES=ldap<version> and replaces WANT_OPENLDAP_VER
- Adds OPENLDAP versions in bsd.default-versions.mk
- Adds USE_OPENLDAP/WANT_OPENLDAP_VER in Mk/bsd.sanity.mk
- Changes consumers to use the features

Reviewed by:	delphij
Approved by:	portmgr
Differential Revision: https://reviews.freebsd.org/D38233
2023-02-08 04:53:56 -06:00

70 lines
2.1 KiB
Makefile

PORTNAME= x2goclient
PORTVERSION= 4.1.2.2
PORTREVISION= 3
CATEGORIES= net
MASTER_SITES= http://code.x2go.org/releases/source/x2goclient/
MAINTAINER= ports@FreeBSD.org
COMMENT= Qt client for the X2Go system
WWW= https://www.x2go.org/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
# Avoid clash with libssh from base
BUILD_DEPENDS= ${LOCALBASE}/lib/libssh.so:security/libssh
LIB_DEPENDS= libcups.so:print/cups \
libssh.so:security/libssh
RUN_DEPENDS= nxproxy:net/nxproxy \
x2goclient-cli:net/x2goclient-cli
USES= compiler:c++11-lang gl pkgconfig qmake qt:5 xorg
USE_GL= gl
USE_XORG= x11 xpm
USE_QT= core gui network svg widgets x11extras \
buildtools:build linguisttools:build qmake:build
QMAKE_ARGS= QMAKE_LRELEASE="${LRELEASE}"
OPTIONS_DEFINE= DOCS LDAP
OPTIONS_DEFAULT= LDAP
LDAP_USES= ldap
LDAP_CFLAGS= -DUSELDAP
LDAP_QMAKE_ON= LIBS+="-lX11 -lXpm -lcups -lldap"
LDAP_QMAKE_OFF= LIBS+="-lX11 -lXpm -lcups"
post-patch:
@${FIND} ${WRKSRC}/src -name "*.cpp" -or -name "*.h" | ${XARGS} \
${REINPLACE_CMD} -e \
's|Q_OS_LINUX|Q_OS_UNIX| ; \
/<linux\/fs.h>/s|^|//| ; \
/#define USELDAP/s|^|//| ; \
s|/usr/local/bin|${LOCALBASE}/bin|'
pre-build:
@(cd ${WRKSRC} && ${DO_MAKE_BUILD} compiler_TSQM_make_all)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/x2goclient ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/man1/x2goclient.1 \
${STAGEDIR}${MANPREFIX}/man/man1
${INSTALL_DATA} ${WRKSRC}/desktop/x2goclient.desktop \
${STAGEDIR}${DESKTOPDIR}
.for i in 16x16 32x32 48x48 64x64 128x128
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}/apps
${INSTALL_DATA} ${WRKSRC}/res/img/icons/${i}/x2goclient.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}/apps
.endfor
@${MKDIR} ${STAGEDIR}${DATADIR}/icons
${INSTALL_DATA} ${WRKSRC}/res/img/icons/x2goclient.xpm \
${STAGEDIR}${DATADIR}/icons
.for i in x2goclient.png x2gosession.png
${INSTALL_DATA} ${WRKSRC}/res/img/icons/128x128/${i} \
${STAGEDIR}${DATADIR}/icons
.endfor
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/HOWTO.GPGCARD ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>