# -*- 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 eec0fa16ba09d49ed39eeba7443d5a6da57f508b \
sha256 582dd038fd4632f32493928cae5b37dbb436752813da08a1ee5df2ab1ee7e7b4 \
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