forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
duktape-2.1.1.ebuild
43 lines (32 loc) · 981 Bytes
/
duktape-2.1.1.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="Embeddable Javascript engine"
HOMEPAGE="http://duktape.org"
SRC_URI="http://duktape.org/${P}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
src_prepare() {
eapply_user
# Set install path
sed -i "s#INSTALL_PREFIX=/usr/local#INSTALL_PREFIX=${D::-1}/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_install() {
dodir /usr/$(get_libdir)
dodir /usr/include
emake install
insinto /usr/$(get_libdir)/pkgconfig/
doins "${S}/${PN}.pc"
}