tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc/devel/hs-QuickCheck
On Mon, Feb 16, 2015 at 09:54:22PM +0900, PHO wrote:
> The current "configure" phase for Haskell packages uses the global
> package DB (e.g. /usr/pkg/lib/ghc-7.6.3/package.conf.d) to resolve
> Haskell library dependencies, which is problematic because a pkgsrc
> package with a missing dependency declaration can be built without
> failure (just like my initially imported QuickCheck) when all of these
> three conditions are met:
>
> * The package does not have an executable, only a library.
>
> * HASKELL_ENABLE_SHARED_LIBRARY is set to "no", i.e. only a static
> library is built and installed.
>
> * Dependencies that are missing from the Makefile have actually been
> installed into the system.
>
> The solution is to create a temporary package DB and fill it only with
> Haskell packages that are explicitly declared as dependency by pkgsrc
> Makefile, somehow in the "buildlink" phase, and then use it in the
> "configure" phase by running "./Setup configure
> --package-db=/path/to/temporary-db".
>
> And the problem arises here. How do we generate the temporary DB? It
> could be easily done if *all* of the Haskell packages' buildlink3.mk
> had a boilerplate target hooked to "do-buildlink" which registers the
> package to the temporary DB. But having such a boilerplate is
> something we'd like to avoid...
It sounds like the haskell buildlink3.mk files should have a variable like
HASKELL_PACKAGE+= hs-digest
containing enough information for code (to be written) in mk/ that would
evaluate it and generate the temporary-db.
Perhaps the variable could be filled in automatically in some way, or
createbuildlink3 could at least be taught to automatically write it
out when creating buildlink3.mk files.
Could that work?
Thomas
Home |
Main Index |
Thread Index |
Old Index