diff options
-rw-r--r-- | dev-lang/janet/janet-1.17.2.ebuild | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/dev-lang/janet/janet-1.17.2.ebuild b/dev-lang/janet/janet-1.17.2.ebuild index c06aad8f7409..540be0ac1f9c 100644 --- a/dev-lang/janet/janet-1.17.2.ebuild +++ b/dev-lang/janet/janet-1.17.2.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic +inherit flag-o-matic toolchain-funcs DESCRIPTION="A dynamic Lisp dialect and bytecode vm" HOMEPAGE="https://janet-lang.org https://github.com/janet-lang/janet/" @@ -12,13 +12,13 @@ SRC_URI="https://github.com/janet-lang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.g LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="static-libs test" - -RESTRICT="!test? ( test )" +IUSE="static-libs" MY_RELEASE="${PV::-2}" src_configure() { + tc-export CC + append-ldflags -Wl,-soname,libjanet.so.1.${MY_RELEASE} append-cflags -fPIC } @@ -28,38 +28,46 @@ src_compile() { # current release - it defines a constant which is then shown # when starting janet local janet_build='\"'${PV}'\"' - emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" JANET_BUILD="${janet_build}" - emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" build/janet.pc JANET_BUILD="${janet_build}" - emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" docs JANET_BUILD="${janet_build}" + + local target + for target in '' build/janet.pc docs ; do + einfo "Building: ${target:-main}" + emake \ + LIBDIR="/usr/$(get_libdir)" \ + PREFIX="/usr" \ + JANET_BUILD="${janet_build}" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + ${target} + done } src_install() { - dobin "build/janet" - insinto "usr/include/janet" - doheader "src/include/janet.h" - doheader "src/conf/janetconf.h" + dobin build/janet + + insinto /usr/include/janet + doheader src/include/janet.h + doheader src/conf/janetconf.h - dolib.so "build/libjanet.so" + dolib.so build/libjanet.so dosym libjanet.so /usr/$(get_libdir)/libjanet.so.${MY_RELEASE} dosym libjanet.so.${MY_RELEASE} /usr/$(get_libdir)/libjanet.so.${PV} if use static-libs; then - dolib.a "build/libjanet.a" + dolib.a build/libjanet.a fi - doman "janet.1" + + doman janet.1 insinto /usr/$(get_libdir)/pkgconfig/ - doins "build/janet.pc" - dodoc -r examples - dodoc "build/doc.html" -} + doins build/janet.pc -src_test(){ - emake test + dodoc -r examples + dodoc build/doc.html } pkg_postinst() { - elog "Note: jpm has been extracted to it's own repository upstream." + elog "Note: jpm has been extracted to its own repository upstream." elog "Follow the upstream instructions on how to install it." elog "Enable use flag \"static-libs\" for building stand-alone executables with jpm" } |