You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
# Copyright 1999-2021 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
inherit toolchain-funcs
|
|
|
|
DESCRIPTION="Embeddable Javascript engine"
|
|
HOMEPAGE="https://duktape.org"
|
|
SRC_URI="https://duktape.org/${P}.tar.xz"
|
|
|
|
LICENSE="MIT"
|
|
# Upstream don't maintain binary compatibility
|
|
# https://github.com/svaarala/duktape/issues/1524
|
|
SLOT="0/${PV}"
|
|
KEYWORDS="amd64 arm arm64 ppc ppc64 x86"
|
|
|
|
PATCHES=(
|
|
"${FILESDIR}/${PN}-2.6.0-respect-tc-env.patch"
|
|
)
|
|
|
|
src_prepare() {
|
|
default
|
|
|
|
# Set install path
|
|
sed -i "s#INSTALL_PREFIX = /usr/local#INSTALL_PREFIX = ${ED}/usr#" \
|
|
Makefile.sharedlibrary || die "failed to set install path"
|
|
|
|
# Edit pkgconfig
|
|
sed "s#VERSION#${PV}#" "${FILESDIR}/${PN}.pc" > "${S}/${PN}.pc" || die
|
|
sed -i "s#LIBDIR#$(get_libdir)#" "${S}/${PN}.pc" || die
|
|
|
|
# Set lib folder
|
|
sed -i "s#(INSTALL_PREFIX)/lib#(INSTALL_PREFIX)/$(get_libdir)#" \
|
|
Makefile.sharedlibrary || die
|
|
|
|
mv Makefile.sharedlibrary Makefile || die "failed to rename makefile"
|
|
}
|
|
|
|
src_compile() {
|
|
emake CC="$(tc-getCC)"
|
|
}
|
|
|
|
src_install() {
|
|
dodir /usr/$(get_libdir)
|
|
dodir /usr/include
|
|
emake install
|
|
|
|
insinto /usr/$(get_libdir)/pkgconfig/
|
|
doins "${S}/${PN}.pc"
|
|
}
|