Skip to content

Commit

Permalink
kchmviewer: fix port for legacy systems
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Jul 16, 2024
1 parent b6f1c42 commit 42d52fb
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions devel/kchmviewer/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

PortSystem 1.0

# kchmviewer's KDE variant still requires KDE4 and will thus not be shipped for now.
# The pure Qt variant is obtained by using QMake instead of CMake.
PortGroup qmake5 1.0

name kchmviewer
version 7.7
revision 1
Expand All @@ -26,19 +22,30 @@ distname ${name}-${version}
master_sites sourceforge:project/${name}/${name}/${version}

checksums rmd160 3b072a3225c5a4c796a9406232c3f696285d9aa4 \
sha256 27cbac45c786b1718550a87e6f86010e161302b426c6396ff2a3091b913b17dd
sha256 27cbac45c786b1718550a87e6f86010e161302b426c6396ff2a3091b913b17dd \
size 345952

# kchmviewer's KDE variant still requires KDE4 and will thus not be shipped for now.
# The pure Qt variant is obtained by using QMake instead of CMake.
if {${os.platform} ne "darwin" || ${os.major} > 11} {
PortGroup qmake5 1.0

# kchmviewer is transitioning to QtWebEngine, but that adaptation is not yet functional.
# (and WebKit is a much more appropriate choice anyway.)
qt5.depends_component \
qtwebkit
} else {
# Fallback for older systems without Qt5:
PortGroup qmake 1.0

}

depends_build-append \
port:dos2unix

depends_lib-append port:libzip \
port:chmlib

# kchmviewer is transitioning to QtWebEngine, but that adaptation is not yet functional.
# (and WebKit is a much more appropriate choice anyway.)
qt5.depends_component \
qtwebkit

post-extract {
# force consistent line-endings
system -W ${worksrcpath} "find . \\\( -name \"*.cpp\" -o -name \"*.h\" -o -name \"*.pro\" \\\) -exec dos2unix '{}' \";\""
Expand All @@ -62,6 +69,9 @@ post-patch {
${worksrcpath}/src/src.pro
}

# zip.h: error: wrong number of arguments specified for ‘deprecated’ attribute
compiler.blacklist-append *gcc-4.0 *gcc-4.2

configure.cppflags-append -I${prefix}/lib/libzip/include
configure.pre_args-append ${worksrcpath}/${name}.pro
configure.args-append -recursive
Expand Down

0 comments on commit 42d52fb

Please sign in to comment.