polish/qnapi: switch from p7zip to 7-zip

Migrate to 7-zip [1] and while here:
- Respect LOCALBASE
- Don't move around man pages

PR:	260866
This commit is contained in:
Max Brazhnikov 2022-01-13 00:24:02 +03:00
parent 88cbdd9c25
commit dba356ff75
3 changed files with 28 additions and 6 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= qnapi
PORTVERSION= 0.2.3
PORTREVISION= 8
PORTREVISION= 9
CATEGORIES= polish multimedia
MAINTAINER= ports@FreeBSD.org
@ -15,7 +15,7 @@ BUILD_DEPENDS= qt-maybe>0:devel/qt-maybe \
libmaia>0:net/libmaia
LIB_DEPENDS= libmediainfo.so:multimedia/libmediainfo \
libzen.so:multimedia/libzen
RUN_DEPENDS= 7z:archivers/p7zip
RUN_DEPENDS= 7zz:archivers/7-zip
USE_GITHUB= yes
@ -26,8 +26,10 @@ USE_QT= buildtools_build core gui network widgets xml
CXXFLAGS+= -I${LOCALBASE}/include/maia
post-patch:
@${REINPLACE_CMD} 's|/usr|${PREFIX}|; s|share/man|man|' \
${REINPLACE_CMD} 's|/usr|${PREFIX}|' \
${WRKSRC}/qnapi.pro
${REINPLACE_CMD} 's,/usr/local,${LOCALBASE},' \
${WRKSRC}/libqnapi/src/config/configreader.cpp
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qnapi

View File

@ -0,0 +1,20 @@
--- libqnapi/src/config/configreader.cpp.orig 2017-05-19 16:50:58 UTC
+++ libqnapi/src/config/configreader.cpp
@@ -175,7 +175,7 @@ const GeneralConfig ConfigReader::resolveP7zipPath(
sysPaths << appExecutableDir;
- QStringList p7zipBinaries = {"7z", "7za"};
+ QStringList p7zipBinaries = {"7z", "7zz"};
foreach (const QString sysPath, sysPaths) {
foreach (const QString p7zipBinary, p7zipBinaries) {
@@ -192,7 +192,7 @@ const GeneralConfig ConfigReader::resolveP7zipPath(
}
if (p7zipPath.isEmpty()) {
- p7zipPath = "7z";
+ p7zipPath = "7zz";
}
#endif

View File

@ -1,7 +1,4 @@
bin/qnapi
man/it/man1/qnapi.1.gz
man/man1/qnapi.1.gz
man/pl/man1/qnapi.1.gz
share/applications/qnapi-download.desktop
share/applications/qnapi-scan.desktop
share/applications/qnapi.desktop
@ -11,3 +8,6 @@ share/icons/hicolor/16x16/apps/qnapi.png
share/icons/hicolor/32x32/apps/qnapi.png
share/icons/hicolor/48x48/apps/qnapi.png
share/icons/hicolor/512x512/apps/qnapi.png
share/man/it/man1/qnapi.1.gz
share/man/man1/qnapi.1.gz
share/man/pl/man1/qnapi.1.gz