From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 12425158086 for ; Wed, 20 Oct 2021 03:02:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57BE8E0843; Wed, 20 Oct 2021 03:02:48 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3B6A2E0843 for ; Wed, 20 Oct 2021 03:02:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BE7D8343976 for ; Wed, 20 Oct 2021 03:02:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3C8D2169 for ; Wed, 20 Oct 2021 03:02:44 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1634698955.62d163a741136ab6a1f7ca728769e8e0755d8d7e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/janet/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/janet/janet-1.17.2.ebuild X-VCS-Directories: dev-lang/janet/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 62d163a741136ab6a1f7ca728769e8e0755d8d7e X-VCS-Branch: master Date: Wed, 20 Oct 2021 03:02:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e1c89d0e-335e-480c-81d2-f785c7083fdc X-Archives-Hash: fc68495fa617e20d153a384d82cb2301 commit: 62d163a741136ab6a1f7ca728769e8e0755d8d7e Author: Sam James gentoo org> AuthorDate: Wed Oct 20 02:57:03 2021 +0000 Commit: Sam James gentoo org> CommitDate: Wed Oct 20 03:02:35 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62d163a7 dev-lang/janet: ebuild tidying - Drop unnecessary USE=test and src_test definition (default implementation checks for a 'check' and 'test' target in Makefiles already) - Respect CC, CFLAGS, LDFLAGS - Use a loop to avoid repeating ourselves with the 'emake' arguments. - Drop some excessive quoting. See: https://github.com/gentoo/gentoo/pull/22477 Signed-off-by: Sam James gentoo.org> dev-lang/janet/janet-1.17.2.ebuild | 50 ++++++++++++++++++++++---------------- 1 file 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 c06aad8f740..540be0ac1f9 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" }