Files
guru/dev-libs/libnodave/libnodave-0.8.5.1.ebuild
Alessandro Barbieri c8bb1d1e51 dev-libs/libnodave: new package
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
2020-12-24 09:39:28 +01:00

62 lines
1.2 KiB
Bash

# Copyright 1999-2020 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"
DEPEND=""
RDEPEND="
perl? ( dev-lang/perl:= )
"
BDEPEND=""
PATCHES=( "${FILESDIR}/makefile-${PV}.patch" )
DOCS=( ChangeLog readme faq.txt FAQ.de.txt )
src_prepare() {
sed -e "s|-I.|-I. -I..|g" -i PERL/Makefile.PL || die
default
}
src_configure() {
if use perl; then
cd "${S}/PERL" || die
perl-module_src_configure
fi
return
}
src_compile() {
append-cflags "-L${S}"
emake clean
emake CC="$(tc-getCC)"
ln -s libnodave.so.0 libnodave.so || die
# emake CC="$(tc-getCC)" dynamic
if use perl; then
cd "${S}/PERL" || die
perl-module_src_compile
fi
}
src_install() {
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
}