comms/klog: Fix pkg-plist

DESKTOP_ENTRIES automatically adds a pkg-plist entry, so the extra
entry added to PLIST_FILES in b0e679ed7d creates a stage-qa error.

This port does not consider the DESKTOP_LAUNCH_ID environment variable,
so the final DESKTOP_ENTRIES sub-variable should be set to "false"
(unquoted).

Switch PLIST_FILES to a regular pkg-plist file, since there are 17
entries which is 11 over the 'handful' of 6 entries convention
recommended in the PHB and tested for by portlint(1).

Remove superfluous and commented-out PORTREVISON. We have scripts to
bump PORTREVSION correctly and don't need this sort of placeholder.

USE_QT=tools should be a build-only dep and USE_QT=sqldriver-sqlite
should be a run-only dep. Qt 6.x requires at least C++17 and links to
OpenGL, not GL. [1]

With hat:	kde@ [1]
This commit is contained in:
Jason E. Hale
2025-12-18 16:38:59 -05:00
parent 3cced352fc
commit ca10a1fb55
2 changed files with 28 additions and 29 deletions
+11 -29
View File
@@ -1,7 +1,6 @@
PORTNAME= klog
PORTVERSION= 2.4.2
PORTREVISION= 1
#PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= comms hamradio
MAINTAINER= hamradio@FreeBSD.org
@@ -12,44 +11,27 @@ LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libhamlib.so:comms/hamlib
USES= compiler:c++11-lang gl qmake qt:6 xorg
USES= compiler:c++17-lang gl qmake qt:6 xorg
USE_GITHUB= yes
USE_GL= gl
USE_QT= base declarative charts location positioning serialport sqldriver-sqlite tools
USE_GL= opengl
USE_QT= base declarative charts location positioning serialport \
sqldriver-sqlite:run tools:build
GH_ACCOUNT= ea4k
GH_PROJECT= klog
DESKTOP_ENTRIES= "KLog" "Simple Amateur Radio Logging Program" \
# https://github.com/ea4k/klog/issues/419
DESKTOP_ENTRIES="KLog" "Simple Amateur Radio Logging Program" \
"" "klog" "Network;HamRadio;" \
true
PLIST_FILES= bin/klog \
${DATADIR}/translations/klog_ca.qm \
${DATADIR}/translations/klog_cs.qm \
${DATADIR}/translations/klog_da.qm \
${DATADIR}/translations/klog_de.qm \
${DATADIR}/translations/klog_es.qm \
${DATADIR}/translations/klog_fi.qm \
${DATADIR}/translations/klog_fr.qm \
${DATADIR}/translations/klog_hr.qm \
${DATADIR}/translations/klog_it.qm \
${DATADIR}/translations/klog_lv.qm \
${DATADIR}/translations/klog_ja.qm \
${DATADIR}/translations/klog_nl.qm \
${DATADIR}/translations/klog_pl.qm \
${DATADIR}/translations/klog_ru.qm \
${DATADIR}/translations/klog_uk.qm \
share/applications/klog.desktop \
share/man/man1/klog.1.gz
false
post-patch:
@${REINPLACE_CMD} \
's|"\/usr\/share\/klog\/translations\/klog_"|"${DATADIR}/translations/klog_"|' \
${WRKSRC}/src/main.cpp
's|"\/usr\/share\/klog\/translations\/klog_"|"${DATADIR}/translations/klog_"|' \
${WRKSRC}/src/main.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/build/target/klog ${STAGEDIR}${PREFIX}/bin
${MKDIR} ${STAGEDIR}${DATADIR}/translations
@${MKDIR} ${STAGEDIR}${DATADIR}/translations
${INSTALL_DATA} ${WRKSRC}/src/build/target/translations/klog_*.qm \
${STAGEDIR}${DATADIR}/translations
${INSTALL_MAN} ${WRKSRC}/src/klog.1 ${STAGEDIR}${PREFIX}/share/man/man1
+17
View File
@@ -0,0 +1,17 @@
bin/klog
%%DATADIR%%/translations/klog_ca.qm
%%DATADIR%%/translations/klog_cs.qm
%%DATADIR%%/translations/klog_da.qm
%%DATADIR%%/translations/klog_de.qm
%%DATADIR%%/translations/klog_es.qm
%%DATADIR%%/translations/klog_fi.qm
%%DATADIR%%/translations/klog_fr.qm
%%DATADIR%%/translations/klog_hr.qm
%%DATADIR%%/translations/klog_it.qm
%%DATADIR%%/translations/klog_ja.qm
%%DATADIR%%/translations/klog_lv.qm
%%DATADIR%%/translations/klog_nl.qm
%%DATADIR%%/translations/klog_pl.qm
%%DATADIR%%/translations/klog_ru.qm
%%DATADIR%%/translations/klog_uk.qm
share/man/man1/klog.1.gz