Skip to content

Commit

Permalink
comms/qico: Fix build with llvm16
Browse files Browse the repository at this point in the history
- Utilize OPTIONSNG where applicable
- Pet portclippy

Approved by:	portmgr (blanket)
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
5u623l20 committed Aug 5, 2023
1 parent 45c9ee7 commit 07902a1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
50 changes: 24 additions & 26 deletions comms/qico/Makefile
Expand Up @@ -9,52 +9,50 @@ LICENSE= BSD4CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

USES= autoreconf
GNU_CONFIGURE= yes
USE_GITHUB= yes
GH_ACCOUNT= kosfango
GH_TAGNAME= 15673bf

GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-config=${CONFDIR}/qico.conf \
--with-default-speed=115200
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}

CONFLICTS_INSTALL= qcc # bin/qcc

PLIST_SUB= QBASEDIR=${QBASEDIR} QLOGDIR=${QLOGDIR}

CONFDIR?= ${PREFIX}/etc/fido/qico
QBASEDIR?= /var/spool/fido/qico
QLOGDIR?= /var/log/fido/qico
PLIST_SUB= QBASEDIR=${QBASEDIR} QLOGDIR=${QLOGDIR}

.if defined(WITH_OPENLOCK)
CONFIGURE_ARGS+= --with-lock-style=open
.endif
CONFIGURE_ARGS+= --with-config=${CONFDIR}/qico.conf \
--with-default-speed=115200
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}

CONFLICTS_INSTALL= qcc # bin/qcc

DOCS= Changes FAQ README
EXAMPLES= koi8r_866.cp onchat qhistory qico.xpm qlinks sfreq \
stat.run synctime test.pl tossing

MANS= qcc.8 qctl.8 qico.8

OPTIONS_DEFINE= QCC PERL HYDRA
QCC_DESC= Build Qico control center (qcc)
PERL_DESC= Enable Perl-hooks support
HYDRA_DESC= Enable Hydra 4K/8K/16K protocol extensions
OPTIONS_DEFAULT= PERL QCC
OPTIONS_SUB= yes

.include <bsd.port.options.mk>
HYDRA_DESC= Enable Hydra 4K/8K/16K protocol extensions
PERL_DESC= Enable Perl-hooks support
QCC_DESC= Build Qico control center (qcc)

.if !${PORT_OPTIONS:MQCC}
CONFIGURE_ARGS+=--disable-qcc
PLIST_SUB+= QCC="@comment "
.else
PLIST_SUB+= QCC=""
.endif
HYDRA_CONFIGURE_ON=--enable-hydra8k
PERL_CONFIGURE_ON=--enable-perl
PERL_USES= perl5
QCC_CONFIGURE_OFF=--disable-qcc

.if ${PORT_OPTIONS:MPERL}
CONFIGURE_ARGS+=--enable-perl
USES+= perl5
.endif
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MHYDRA}
CONFIGURE_ARGS+=--enable-hydra8k
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
CFLAGS+= -Wno-error=incompatible-function-pointer-types
.endif

do-install:
Expand All @@ -65,9 +63,6 @@ do-install:
${MKDIR} ${STAGEDIR}${CONFDIR}
${INSTALL_PROGRAM} ${WRKSRC}/src/qico ${STAGEDIR}${PREFIX}/sbin/
${INSTALL_PROGRAM} ${WRKSRC}/src/qctl ${STAGEDIR}${PREFIX}/bin/
.if ${PORT_OPTIONS:MQCC}
${INSTALL_PROGRAM} ${WRKSRC}/src/qcc ${STAGEDIR}${PREFIX}/bin/
.endif
${INSTALL_DATA} ${WRKSRC}/qico.conf.sample ${STAGEDIR}${CONFDIR}/qico.conf.sample
${INSTALL_DATA} ${WRKSRC}/qico.substs.sample ${STAGEDIR}${CONFDIR}/qico.substs.sample
${INSTALL_DATA} ${WRKSRC}/qico.passwd.sample ${STAGEDIR}${CONFDIR}/qico.passwd.sample
Expand All @@ -83,4 +78,7 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/man/${i} ${STAGEDIR}${PREFIX}/man/man8/${i}
.endfor

do-install-QCC-on:
${INSTALL_PROGRAM} ${WRKSRC}/src/qcc ${STAGEDIR}${PREFIX}/bin/

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions comms/qico/pkg-plist
Expand Up @@ -29,3 +29,6 @@ bin/qctl
man/man8/qctl.8.gz
man/man8/qico.8.gz
sbin/qico
@dir /var/log/fido
@dir %%QBASEDIR%%
@dir /var/spool/fido

0 comments on commit 07902a1

Please sign in to comment.