# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # ebuild generated by hackport 0.9.1.0.9999 CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" inherit haskell-cabal DESCRIPTION="Generically derive traversals, lenses and prisms" HOMEPAGE="https://github.com/kcsongor/generic-lens" LICENSE="BSD" SLOT="0/${PV}" KEYWORDS="~amd64" PATCHES=( "${FILESDIR}/${PN}-2.3.0.0-cabal-doctest.patch" ) RDEPEND="~dev-haskell/generic-lens-core-2.3.0.0:=[profile?] dev-haskell/profunctors:=[profile?] >=dev-lang/ghc-9.0.2:= " DEPEND="${RDEPEND} >=dev-haskell/cabal-3.4.1.0 test? ( dev-haskell/doctest >=dev-haskell/cabal-doctest-1.0.0 dev-haskell/hunit >=dev-haskell/inspection-testing-0.2 dev-haskell/lens ) " # Workaround for GHC panics when installing over a previous version of the same # package. See: src_configure() { if use test; then export GHC_BOOTSTRAP_PACKAGES=( cabal-doctest ) fi local local_pkgdb="${S}/package.conf.d" local ghc_pkg=( "/usr/bin/ghc-pkg" "--global-package-db=${local_pkgdb}" ) cp -a "$(ghc-libdir)"/{package.conf.d,settings} "${S}" || die # Work around base attempting relative access for dynamic libraries ln -s "$(ghc-libdir)" "${WORKDIR}" || die "${ghc_pkg[@]}" unregister "${PN}" &>/dev/null "${ghc_pkg[@]}" recache || die local config_opts=( "--package-db=clear" "--package-db=${local_pkgdb}" ) haskell-cabal_src_configure "${config_opts[@]}" }