tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/devel/hs-QuickCheck



From: Thomas Klausner <wiz%NetBSD.org@localhost>
Subject: Re: CVS commit: pkgsrc/devel/hs-QuickCheck
Date: Mon, 16 Feb 2015 14:47:04 +0100

> 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

Yes, I think that will do the trick. I'll give it a little more
thought after sending all of the remaining local patches in lang/ghc7
to the upstream.

Thanks,
_______________________________________________________
 - PHO -                         http://cielonegro.org/
OpenPGP public key: 1024D/1A86EF72
Fpr: 5F3E 5B5F 535C CE27 8254  4D1A 14E7 9CA7 1A86 EF72

Attachment: pgp2AADwjKwls.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index