summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lang/duktape/duktape-2.1.0.ebuild21
-rw-r--r--dev-lang/duktape/files/duktape.pc2
2 files changed, 16 insertions, 7 deletions
diff --git a/dev-lang/duktape/duktape-2.1.0.ebuild b/dev-lang/duktape/duktape-2.1.0.ebuild
index 3ec8d5a73f3c..976fa042698a 100644
--- a/dev-lang/duktape/duktape-2.1.0.ebuild
+++ b/dev-lang/duktape/duktape-2.1.0.ebuild
@@ -18,17 +18,26 @@ 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 sed makefile"
+ Makefile.sharedlibrary || die "failed to set install path"
- cp "${FILESDIR}/${PN}.pc" "${WORKDIR}" || die
- sed -i "s#VERSION#${PV}#" "${WORKDIR}/${PN}.pc" || die
+ # Edit pkgconfig
+ sed "s#VERSION#${PV}#" "${FILESDIR}/${PN}.pc" > "${S}/${PN}.pc" || die
+ sed -i "s#LIBDIR#$(get_libdir)#" "${S}/${PN}.pc" || die
- mv Makefile.sharedlibrary Makefile || die "faile to mv makefile"
+ # 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/lib"
- dodir "/usr/include"
+ dodir /usr/$(get_libdir)
+ dodir /usr/include
emake install
+
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "${S}/${PN}.pc"
}
diff --git a/dev-lang/duktape/files/duktape.pc b/dev-lang/duktape/files/duktape.pc
index 3aa14bf929a1..56eff91ada9e 100644
--- a/dev-lang/duktape/files/duktape.pc
+++ b/dev-lang/duktape/files/duktape.pc
@@ -1,6 +1,6 @@
prefix=/usr
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
+libdir=${exec_prefix}/LIBDIR
includedir=${prefix}/include
Name: duktape