# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
license Restrictive/Distributable
description Extract, view & test RAR archives
long_description The unRAR utility is a minor part of the RAR archiver \
and contains RAR uncompression algorithm. unRAR \
requires very small volume of memory to operate.
homepage https://www.rarlab.com/
master_sites ${homepage}rar/
distname ${my_name}-${version}
checksums rmd160 b439021e5f3538a80d9c2351e6a8cff7231a95ca \
sha256 e1c2fddaa87a88b1535bfc10ca484f3c5af4e5a55fbb933f8819e26203bbe2ee \
patchfiles patch-makefile.unix.diff
if {[tbool configure.ccache]} {
configure.cxx "ccache ${configure.cxx}"
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
CXX="[join ${configure.cxx}]"
# The makefile misuses the DESTDIR variable as if it were PREFIX. We need it at
# build time so the library gets the correct install_name.
build.args-append DESTDIR=${prefix}
build.args-append CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx] ${cxx_stdlibflags}" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld] ${cxx_stdlibflags}"
set docdir ${prefix}/share/doc/${subport}
xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} license.txt readme.txt ${destroot}${docdir}
patchfiles-append patch-dylib.diff