Files
guru/dev-libs/libnodave/libnodave-0.8.5.1-r1.ebuild
Alessandro Barbieri bc70713eb6 dev-libs/libnodave: install test executables
Closes: https://bugs.gentoo.org/783993
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
2021-04-19 18:07:27 +02:00

78 lines
1.4 KiB
Bash

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic perl-module toolchain-funcs
DESCRIPTION="Connect to and exchange data with Siemens PLCs"
HOMEPAGE="https://sourceforge.net/projects/libnodave"
SRC_URI="mirror://sourceforge/libnodave/libnodave-${PV}.tar.gz"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc perl"
RESTRICT="test" #no tests
DEPEND=""
RDEPEND="
perl? ( dev-lang/perl:= )
"
BDEPEND=""
PATCHES=(
"${FILESDIR}/makefile-${PV}.patch"
"${FILESDIR}/perl-makefile.patch"
)
DOCS=( ChangeLog readme faq.txt FAQ.de.txt )
src_configure() {
if use perl; then
cd "${S}/PERL" || die
perl-module_src_configure
fi
return
}
src_compile() {
append-cflags "-L${S} -fPIC"
emake clean
emake CC="$(tc-getCC)" all
ln -s libnodave.so.0 libnodave.so || die
if use perl; then
cd "${S}/PERL" || die
perl-module_src_compile
fi
}
src_install() {
local programs=(
testIBH
testISO_TCP
testMPI
testPPI
testPPIload
testMPIload
testISO_TCPload
testMPI_IBHload
testPPI_IBHload
testPPI_IBH
testNLpro
testAS511
isotest4
ibhsim5
)
exeinto "/usr/libexec"
doexe "${programs[@]}"
dolib.so libnodave.so.0 libnodave.so
doheader nodave.h
use doc && HTML_DOCS=( doc/*.html )
einstalldocs
if use perl; then
cd "${S}/PERL" || die
perl-module_src_install
fi
}