# Copyright 2020 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2

SUMMARY="Ultimate Packer for eXecutables (free version using UCL compression and not NRV)"
HOMEPAGE="http://upx.github.io/"
DOWNLOADS="https://github.com/upx/upx/releases/download/v${PV}/${PNV}-src.tar.xz"

LICENCES="GPL-2 UPX-exception"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS=""

DEPENDENCIES="
    build:
        dev-lang/perl
    build+run:
        dev-libs/ucl
        sys-libs/zlib
"

BUGS_TO="hasufell@posteo.de"

WORK=${WORKBASE}/${PNV}-src

src_compile() {
    emake CXXFLAGS_WERROR="" all
}

src_install() {
    newbin src/upx.out upx
    dodoc BUGS NEWS PROJECTS README* THANKS doc/*.txt doc/upx.html
    doman doc/upx.1
}