duperemove-0.09.2.ebuild 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Btrfs deduplication utility"
  6. HOMEPAGE="https://github.com/markfasheh/duperemove"
  7. SRC_URI="https://github.com/markfasheh/duperemove/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64"
  11. IUSE=""
  12. RDEPEND="dev-libs/glib:2=
  13. dev-libs/libgcrypt:0="
  14. DEPEND="${RDEPEND}"
  15. src_prepare() {
  16. # https://github.com/markfasheh/duperemove/issues/53#issuecomment-89796552
  17. sed -i -e '/glib2_mutex_unlock/s:mutex_lock:mutex_unlock:' duperemove.c || die
  18. }
  19. src_compile() {
  20. # CC & CFLAGS are set via = so need to override them
  21. # LIBRARY_FLAGS are set via += so need to pass them via env
  22. export LIBRARY_FLAGS="${LDFLAGS}"
  23. emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Wall"
  24. }
  25. src_install() {
  26. emake DESTDIR="${D}" PREFIX="/usr" install
  27. }