libexecinfo-1.1.ebuild 840 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit toolchain-funcs
  5. DESCRIPTION="BSD licensed clone of the GNU libc backtrace facility"
  6. HOMEPAGE="http://www.freshports.org/devel/libexecinfo"
  7. SRC_URI="http://distcache.freebsd.org/local-distfiles/itetcu/libexecinfo-${PV}.tar.bz2"
  8. LICENSE="BSD-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ~x86"
  11. IUSE="elibc_musl static"
  12. src_prepare() {
  13. # patches from voidlinux
  14. eapply -p0 "${FILESDIR}"/*.patch
  15. eapply_user
  16. sed -i "${PN}.pc" -e "/Version:/s@version@${PV}@" || die
  17. }
  18. src_compile() {
  19. emake CC="$(tc-getCC)" AR="$(tc-getAR)" dynamic $(usev static)
  20. }
  21. src_install() {
  22. insinto "/usr/$(get_libdir)/pkgconfig"
  23. doins "${PN}.pc"
  24. doheader *.h
  25. dolib.so "${PN}.so.1"
  26. dosym "${_}" "/usr/$(get_libdir)/${PN}.so"
  27. use static && dolib.a *.a
  28. }