# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           cmake 1.0
PortGroup           boost 1.0

name                innoextract
version             1.9
revision            2
categories          archivers compression sysutils
maintainers         {samodelkin.net:fjoe @mkhon} openmaintainer
license             zlib

description         A tool to unpack installers created by Inno Setup

long_description    Inno Setup is a tool to create installers for Microsoft \
                    Windows applications. innoextract allows to extract such \
                    installers under non-windows systems without running the \
                    actual installer using Wine.

homepage            http://constexpr.org/innoextract/
master_sites        ${homepage}files/

checksums           rmd160  a01f4c4b480924211e9bba1f6dec213ee51663ad \
                    sha256  6344a69fc1ed847d4ed3e272e0da5998948c6b828cb7af39c6321aba6cf88126 \
                    size    206931

# C++11 compatible compiler is required to build with the new versions of Boost
# this also fixes the build on macOS <10.8
compiler.cxx_standard \
                    2011

cmake.out_of_source yes
boost.version       1.81
depends_lib         port:xz

use_parallel_build  yes

# ld: in CMakeFiles/innoextract.dir/src/cli/extract.cpp.o, unknown scope for symbol
# __ZTVNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE in
# bitcode file CMakeFiles/innoextract.dir/src/cli/extract.cpp.o for architecture x86_64
if {${os.platform} eq "darwin" && ${os.major} <= 10} {
    configure.args-append -DUSE_LTO=OFF
}
