Re: Fix: cabal-debian 4.33-4 cannot detect GHC built-in packages correctly

2017-01-23 Thread David Fox
Yes, I would like to fix these issues for stretch.  I'm not quite sure what
this output means, though.  Could you explain what you expected to see and
what you are actually seeing, and how I can reproduce the error?

On Sun, Jan 22, 2017 at 10:35 PM, Kei Hibino  wrote:

> Hi,
>
> I tried cabal-debian-4.35.6 in my Debian sid environment with simply
> builded by cabal.
> And I did not find my issue in its result like following:
>
> -
>
> time-locale-compat-0.1.1.3 %
> ../cabal-debian-4.35.6/dist/build/cabal-debian/cabal-debian
> time-locale-compat-0.1.1.3 % head -14 debian/control
> Source: haskell-time-locale-compat
> Maintainer: Debian Haskell Group
> 
> Priority: extra
> Section: haskell
> Build-Depends: debhelper (>= 10),
>  haskell-devscripts-minimal | haskell-devscripts (>= 0.8),
>  cdbs,
>  ghc,
>  ghc-prof,
>  libghc-old-locale-dev,
>  libghc-old-locale-prof,
> Build-Depends-Indep: ghc-doc,
>  libghc-old-locale-doc,
> Standards-Version: 3.9.6
> -
>
> Anyway, I think it is important that fixed cabal-debian package is
> uploaded for Debian stretch.
>
> Thanks.
>
> On Wed, Jan 18, 2017 at 4:31 AM, David Fox  wrote:
> >
> >
> > On Wed, Jan 11, 2017 at 6:20 PM, Kei Hibino 
> wrote:
> >>
> >> Hi,
> >>
> >> I reported and fixed the problem of cabal-debian around detecting GHC
> >> built-ins.
> >>
> >> cabal-debian searches `package.conf.d' from output of `dpkg -L ghc',
> >> for example under `/var/lib/ghc/package.conf.d/',
> >> and matches filenames like `base-4.9.0.0.conf'.
> >> Under ghc-7.10, checksum suffix exists like
> >> `base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d.conf',
> >> but under ghc-8 it does not.
> >>
> >> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850920
> >>
> >>
> >> https://lists.alioth.debian.org/pipermail/pkg-haskell-
> commits/2017-January/043666.html
> >>
> >> https://lists.alioth.debian.org/pipermail/pkg-haskell-
> commits/2017-January/043667.html
> >>
> >> Please review this fix, and upload.
> >>
> >> Regards
> >>
> >
> > Fortunately or unfortunately, I made extensive changes to this code in
> > November:
> >
> > https://github.com/ddssff/cabal-debian/commit/
> 480f4f099657a20eb46a45c0ca5f492038773e5b
> >
> > Could you test the latest version of cabal-debian and see if it resolves
> > your issue?  Thanks!
>


Re: Fix: cabal-debian 4.33-4 cannot detect GHC built-in packages correctly

2017-01-17 Thread David Fox
On Wed, Jan 11, 2017 at 6:20 PM, Kei Hibino  wrote:

> Hi,
>
> I reported and fixed the problem of cabal-debian around detecting GHC
> built-ins.
>
> cabal-debian searches `package.conf.d' from output of `dpkg -L ghc',
> for example under `/var/lib/ghc/package.conf.d/',
> and matches filenames like `base-4.9.0.0.conf'.
> Under ghc-7.10, checksum suffix exists like
> `base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d.conf',
> but under ghc-8 it does not.
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850920
>
> https://lists.alioth.debian.org/pipermail/pkg-haskell-
> commits/2017-January/043666.html
> https://lists.alioth.debian.org/pipermail/pkg-haskell-
> commits/2017-January/043667.html
>
> Please review this fix, and upload.
>
> Regards
>
>
Fortunately or unfortunately, I made extensive changes to this code in
November:

https://github.com/ddssff/cabal-debian/commit/480f4f099657a20eb46a45c0ca5f492038773e5b

Could you test the latest version of cabal-debian and see if it resolves
your issue?  Thanks!


Patch to increase safety of arch and os computation in haskell-devscript

2016-11-22 Thread David Fox
Never quite sure how to submit patches to haskell-devscripts.  This
prevents ghc from looking at .ghci when printing arch and os.  This change
was provoked by a .ghci that tried to load source files from the package
being configured.
From 6b5eb542a018f966db070fc1ab802f2c94746b51 Mon Sep 17 00:00:00 2001
From: David Fox 
Date: Tue, 22 Nov 2016 09:28:47 -0800
Subject: =?UTF-8?q?Prevent=20ghc=20from=20looking=20at=20.ghci=20when=20pr?=
 =?UTF-8?q?inting=20arch=20and=20os.=20=20This=0Achange=20was=20provoked?=
 =?UTF-8?q?=20by=20a=20.ghci=20that=20tried=20to=20load=20source=20files?=
 =?UTF-8?q?=20from=0Athe=20package=20being=20configured.?=

---
 Dh_Haskell.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 9f07aff..8203f60 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -6,11 +6,11 @@ run () {
 }
 
 cpu(){
-  ghc -e 'putStr System.Info.arch'
+  ghc -ignore-dot-ghci -e 'putStr System.Info.arch'
 }
 
 os(){
-  ghc -e 'putStr System.Info.os'
+  ghc -ignore-dot-ghci -e 'putStr System.Info.os'
 }
 
 ghcjs_version(){
-- 
1.9.1



Re: packaging with stack

2016-10-19 Thread David Fox
On Tue, Oct 18, 2016 at 11:02 PM, Damien Couroussé <
damien.courou...@gmail.com> wrote:

For the deployment of binaries, deb packages seems a good option to me.
> So I was wondering if it could be possible to take advantage of the
> dependencies installed by stack to build debian packages.


​You could try using the cabal-debian program to convert cabal packages to
debs.​


Anyone want to debianize ghcjs?

2015-09-28 Thread David Fox
I have tried, but the result was very disappointing, and with the latest
release it stopped working altogether.


Re: Syntax of parseable copyright files with multiple licenses

2015-09-10 Thread David Fox
On Thu, Sep 10, 2015 at 9:57 AM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

> (This mail is mostly meant for Alexandre)
>
> As there was some confusion about the syntax of machine readable
> copyright files. The syntax of these files is explained here [1].
>
> If the explanation there isn't accessible enough, feel free (an please
> REALLY DO feel free), to ask and I will try to come up with a more
> accessible explanation.
>
> [1]: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
> (HAHA! I didn't forget to put the link in the email this time!)
>
> Regards
> Sven
>

​The code here is intended to parse debian/copyright files:

​

https://github.com/ddssff/cabal-debian/blob/master/src/Debian/Debianize/CopyrightDescription.hs

​Actually, this should probably move to
https://github.com/ddssff/debian-haskell.


Re: cabal-debian-4.31

2015-08-21 Thread David Fox
On Fri, Aug 21, 2015 at 12:20 AM, Joachim Breitner 
wrote:

>
> Also, the diff is not very readable :-)
>
> Heh - I just grab the string and putStr it!


Re: cabal-debian-4.31

2015-08-20 Thread David Fox
I've just uploaded 4.31.2 which fixes the test suite.  There were files
missing from the cabal package and the test data needed updating, along
with one or two other tweaks.

On Wed, Aug 19, 2015 at 1:22 PM, Joachim Breitner 
wrote:

> Hi,
>
> Am Mittwoch, den 19.08.2015, 13:20 -0700 schrieb David Fox:
> > I've uploaded cabal-debian-4.31 to hackage with the Joachim's recent
> > changes.
>
> great, thanks!
>
> Doing an upload to unstable right now.
>
> Greetings,
> Joachim
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>


cabal-debian-4.31

2015-08-19 Thread David Fox
I've uploaded cabal-debian-4.31 to hackage with the Joachim's recent
changes.


Re: cabal-debian --official --upgrade

2015-08-18 Thread David Fox
I will make a hackage release soon.

On Tue, Aug 18, 2015 at 2:55 PM, Joachim Breitner 
wrote:

> Hi,
>
> Am Dienstag, den 18.08.2015, 22:11 +0200 schrieb Alexandre Delanoë:
> > is it the right command ?
> > it does not seem to do anything.
> >
> you need to install cabal-debian from git, i.e.
> $ git clone https://github.com/ddssff/cabal-debian
> $ cd cabal-debian/
> $ cabal install
> and then make sure that ~/.cabal/bin is in your PATH.
>
> Greetings,
> Joachim
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>


Re: Pending removals: Some happstack, iteratee, mueval, leksah

2015-07-03 Thread David Fox
​The thread originated at ​debian-haskell@lists.debian.org

On Fri, Jul 3, 2015 at 8:38 AM, Adam Bergmark  wrote:

> Where did this e-mail originate from?
>
> Anyway, mueval is not obsolete afaik, gwern has recently been active in
> merging pull requests. There was talk about a package takeover[1] before
> that but that may no longer be necessary.
>
> - Adam
>
> [1] https://github.com/haskell-infra/hackage-trustees/issues/42
>
> On Thu, Jul 2, 2015 at 11:11 PM, Joachim Breitner 
> wrote:
>
>> Hi,
>>
>>
>> Am Donnerstag, den 02.07.2015, 10:22 -0700 schrieb David Fox:
>> > On Thu, Jul 2, 2015 at 12:30 AM, Joachim Breitner > > > wrote:
>> > > Hi,
>> > >
>> > > currently, our package plan lists these packages as obsolete:
>> > >
>> > > happstack 7.0.2 obsolete # needs old happstack-server
>> > Yes, happstack is no longer a package, all the happstack packages
>> > have suffixes now.
>> >
>> > >  happstack-heist 7.2.4 obsolete # needs old blaze-builder
>> > >
>> > Happstack-heist is no longer supported.
>>
>> that explains a lot. Shouldn’t these packages then be marked as
>> obsolete on Hackage? Would have saved me from a lot of wondering and
>> worrying, at least.
>>
>> Greetings,
>> Joachim
>>
>> --
>> Joachim "nomeata" Breitner
>> Debian Developer
>>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "HAppS" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to happs+unsubscr...@googlegroups.com.
>> To post to this group, send email to ha...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/happs.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>


Re: Focusing our efforts: Key packages

2015-06-21 Thread David Fox
s/stacked/stackage/

On Sun, Jun 21, 2015 at 11:25 AM, David Fox  wrote:

> At least one of these packages is in stacked, specifically acid-state.
>
> On Sat, Jun 20, 2015 at 5:04 AM, Joachim Breitner 
> wrote:
>
>> Hi,
>>
>> I think it would improve the quality of Haskell in Debian if we are
>> more focused on packages that are relevant, and regularly clear out
>> cruft. With cruft, I mean packages that were once dependencies of
>> something we want to have in Debian, and are no longer, and also
>> packages that someone used to be interested in and is no longer.
>>
>> So I propose to introduce “key packages”: These are those packages that
>> should be in Debian on their own right – things like pandoc, xmonad,
>> cabal-debian, etc. Packages become key packages if someone marks them
>> as such in the package plan.
>>
>> Then, the following packages should be in Debian:
>>  * Key packages,
>>  * their dependencies,
>>  * and all packages that were previously in Debian and are also part of
>>stackage (as I expect that these incur very little extra overhead).
>>
>> This implies that we should remove all packages that are neither in
>> Stackage nor that are (used by) key packages.
>>
>> I added support for such reasoning to the package plan, and marked a
>> few packages as key packages. This would currently imply that we can
>> remove these packages:
>>
>>   * ALUT
>>   * AMI
>>   * EdisonAPI
>>   * EdisonCore
>>   * GLFW
>>   * HCard
>>   * HDBC
>>   * HDBC-odbc
>>   * HDBC-postgresql
>>   * HDBC-sqlite3
>>   * HFuse
>>   * HGL
>>   * HJScript
>>   * HJavaScript
>>   * HSH
>>   * HaskellForMaths
>>   * HsSyck
>>   * LDAP
>>   * LibZip
>>   * OSM
>>   * OpenAL
>>   * Ranged-sets
>>   * SDL
>>   * SDL-gfx
>>   * SDL-image
>>   * SDL-mixer
>>   * SDL-ttf
>>   * SMTPClient
>>   * Shellac
>>   * SimpleEA
>>   * Tensor
>>   * acid-state
>>   * algebra
>>   * augeas
>>   * bencode
>>   * binary-shared
>>   * bindings-gpgme
>>   * bindings-libzip
>>   * bindings-nettle
>>   * bindings-sane
>>   * bitarray
>>   * boomerang
>>   * bytestring-nums
>>   * bytestring-show
>>   * carettah
>>   * categories
>>   * cautious-file
>>   * cgi
>>   * chell-hunit
>>   * citeproc-hs
>>   * clocked
>>   * cmark
>>   * config-value
>>   * crypto-conduit
>>   * crypto-pubkey-openssh
>>   * cryptonite
>>   * data-accessor-template
>>   * data-lens
>>   * data-lens-template
>>   * data-pprint
>>   * datetime
>>   * diagrams-gtk
>>   * download-curl
>>   * dpkg
>>   * ed25519
>>   * event-list
>>   * explicit-exception
>>   * failure
>>   * ftphs
>>   * gconf
>>   * github
>>   * graceful
>>   * gtksourceview2
>>   * gtksourceview3
>>   * haddock
>>   * happstack
>>   * happstack-authenticate
>>   * happstack-heist
>>   * happstack-hsp
>>   * harp
>>   * hashed-storage
>>   * haskell-qrencode
>>   * haskelldb
>>   * haskelldb-hdbc
>>   * haskelldb-hdbc-odbc
>>   * haskelldb-hdbc-postgresql
>>   * haskelldb-hdbc-sqlite3
>>   * haskore
>>   * hbro
>>   * hbro-contrib
>>   * hcwiid
>>   * hedis
>>   * hothasktags
>>   * hscurses
>>   * hsmagick
>>   * hsp
>>   * hsql
>>   * hsql-mysql
>>   * hsql-odbc
>>   * hsql-postgresql
>>   * hsql-sqlite3
>>   * hsqml
>>   * hsx-jmacro
>>   * hsx2hs
>>   * hxt-cache
>>   * hxt-xpath
>>   * hxt-xslt
>>   * iCalendar
>>   * intern
>>   * io-streams
>>   * iteratee
>>   * knob
>>   * language-python
>>   * largeword
>>   * leksah
>>   * leksah-server
>>   * libsystemd-journal
>>   * ltk
>>   * maccatcher
>>   * magic
>>   * markov-chain
>>   * mersenne-random
>>   * midi
>>   * mime
>>   * monoid-transfo

Re: Focusing our efforts: Key packages

2015-06-21 Thread David Fox
At least one of these packages is in stacked, specifically acid-state.

On Sat, Jun 20, 2015 at 5:04 AM, Joachim Breitner 
wrote:

> Hi,
>
> I think it would improve the quality of Haskell in Debian if we are
> more focused on packages that are relevant, and regularly clear out
> cruft. With cruft, I mean packages that were once dependencies of
> something we want to have in Debian, and are no longer, and also
> packages that someone used to be interested in and is no longer.
>
> So I propose to introduce “key packages”: These are those packages that
> should be in Debian on their own right – things like pandoc, xmonad,
> cabal-debian, etc. Packages become key packages if someone marks them
> as such in the package plan.
>
> Then, the following packages should be in Debian:
>  * Key packages,
>  * their dependencies,
>  * and all packages that were previously in Debian and are also part of
>stackage (as I expect that these incur very little extra overhead).
>
> This implies that we should remove all packages that are neither in
> Stackage nor that are (used by) key packages.
>
> I added support for such reasoning to the package plan, and marked a
> few packages as key packages. This would currently imply that we can
> remove these packages:
>
>   * ALUT
>   * AMI
>   * EdisonAPI
>   * EdisonCore
>   * GLFW
>   * HCard
>   * HDBC
>   * HDBC-odbc
>   * HDBC-postgresql
>   * HDBC-sqlite3
>   * HFuse
>   * HGL
>   * HJScript
>   * HJavaScript
>   * HSH
>   * HaskellForMaths
>   * HsSyck
>   * LDAP
>   * LibZip
>   * OSM
>   * OpenAL
>   * Ranged-sets
>   * SDL
>   * SDL-gfx
>   * SDL-image
>   * SDL-mixer
>   * SDL-ttf
>   * SMTPClient
>   * Shellac
>   * SimpleEA
>   * Tensor
>   * acid-state
>   * algebra
>   * augeas
>   * bencode
>   * binary-shared
>   * bindings-gpgme
>   * bindings-libzip
>   * bindings-nettle
>   * bindings-sane
>   * bitarray
>   * boomerang
>   * bytestring-nums
>   * bytestring-show
>   * carettah
>   * categories
>   * cautious-file
>   * cgi
>   * chell-hunit
>   * citeproc-hs
>   * clocked
>   * cmark
>   * config-value
>   * crypto-conduit
>   * crypto-pubkey-openssh
>   * cryptonite
>   * data-accessor-template
>   * data-lens
>   * data-lens-template
>   * data-pprint
>   * datetime
>   * diagrams-gtk
>   * download-curl
>   * dpkg
>   * ed25519
>   * event-list
>   * explicit-exception
>   * failure
>   * ftphs
>   * gconf
>   * github
>   * graceful
>   * gtksourceview2
>   * gtksourceview3
>   * haddock
>   * happstack
>   * happstack-authenticate
>   * happstack-heist
>   * happstack-hsp
>   * harp
>   * hashed-storage
>   * haskell-qrencode
>   * haskelldb
>   * haskelldb-hdbc
>   * haskelldb-hdbc-odbc
>   * haskelldb-hdbc-postgresql
>   * haskelldb-hdbc-sqlite3
>   * haskore
>   * hbro
>   * hbro-contrib
>   * hcwiid
>   * hedis
>   * hothasktags
>   * hscurses
>   * hsmagick
>   * hsp
>   * hsql
>   * hsql-mysql
>   * hsql-odbc
>   * hsql-postgresql
>   * hsql-sqlite3
>   * hsqml
>   * hsx-jmacro
>   * hsx2hs
>   * hxt-cache
>   * hxt-xpath
>   * hxt-xslt
>   * iCalendar
>   * intern
>   * io-streams
>   * iteratee
>   * knob
>   * language-python
>   * largeword
>   * leksah
>   * leksah-server
>   * libsystemd-journal
>   * ltk
>   * maccatcher
>   * magic
>   * markov-chain
>   * mersenne-random
>   * midi
>   * mime
>   * monoid-transformer
>   * murmur-hash
>   * ncurses
>   * netwire
>   * non-negative
>   * nonce
>   * numeric-quest
>   * ofx
>   * openpgp
>   * pipes-zlib
>   * ranges
>   * reactive-banana
>   * readline
>   * reform
>   * reform-blaze
>   * reform-hamlet
>   * reform-happstack
>   * reform-hsp
>   * regex-pcre
>   * regex-tdfa-text
>   * regex-tdfa-utf8
>   * rosezipper
>   * sandi
>   * sfml-audio
>   * simpleirc
>   * snap-loader-dynamic
>   * snap-loader-static
>   * snaplet-acid-state
>   * strptime
>   * svgcairo
>   * swish
>   * syb-with-class-instances-text
>   * tasty-hspec
>   * template
>   * test-framework-th-prime
>   * torrent
>   * universe-base
>   * unix-bytestring
>   * utility-ht
>   * vado
>   * vcsgui
>   * vcswrapper
>   * vte
>   * wai-handler-fastcgi
>   * web-plugins
>   * web-routes
>   * web-routes-boomerang
>   * web-routes-happstack
>   * web-routes-hsp
>   * web-routes-th
>   * webkit
>   * x509-util
>   * xcb-types

Re: FYI, extra-depends possibly broken

2015-06-09 Thread David Fox
On Sun, May 31, 2015 at 2:35 PM, Iustin Pop  wrote:

> Hi all,
>
> Unless I'm mistaken, the extra-depends mechanism seems broken at the
> moment, due to a bug introduced in the migration from makefiles rules to
> Dh_Haskell.sh:
>

I am somewhat responsible for the Dh_Haskell.sh changes, I will take a look.


Re: ghc-7.10.1-5 provides haddock-interface-25 instead of haddock-interface-27

2015-06-08 Thread David Fox
We should move to 7.10.2:
https://ghc.haskell.org/trac/ghc/ticket/10500#comment:3

On Sun, Jun 7, 2015 at 4:47 AM, Joachim Breitner  wrote:

> Hi,
>
> Am Samstag, den 06.06.2015, 18:03 -0700 schrieb David Fox:
> > However, I was able to get the correct value by applying this patch:
>
> Thanks! Applied.
>
>
> Greetings,
> Joachim
> >
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>


ghc-7.10.1-5 provides haddock-interface-25 instead of haddock-interface-27

2015-06-06 Thread David Fox
When I first built ghc-7.10.1-5 it created this script
in debian/tmp/usr/bin/haddock-ghc-7.10.1:


#!/bin/bash


exedir="/usr/lib/ghc/bin"
exeprog="haddock"
executablename="$exedir/$exeprog"
datadir="/usr/share"
bindir="/usr/bin"
topdir="/usr/lib/ghc"
#!/bin/sh


exec "$executablename" -B"$topdir" -l"$topdir" ${1+"$@"}


Unfortunately, executablename=/usr/lib/ghc/bin/haddock still contained the
old haddock executable from ghc-7.8 which printed 25, so the value ghc
ended up providing was haddock-interface-25.

However, I was able to get the correct value by applying this patch:

--- old/debian/rules2015-05-13 02:17:55.0 -0700


+++ new/debian/rules2015-06-06 15:54:17.416008283 -0700


@@ -166,8 +166,8 @@
echo 'ghci=ghc-ghci' >> debian/ghc.substvars ; fi





# Add haddock substvars


-   echo
"haddock:Depends=haddock-interface-$$(debian/tmp/usr/bin/haddock
--interface-version)" >> debian/ghc-doc.substvars
-   echo
"haddock:Provides=haddock-interface-$$(debian/tmp/usr/bin/haddock
--interface-version)" >> debian/ghc.substvars
+   echo
"haddock:Depends=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock
--interface-version)" >> debian/ghc-doc.substvars
+   echo
"haddock:Provides=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock
--interface-version)" >> debian/ghc.substvars



 ifeq (YES,$(BUILD_HADDOCK_DOCS))
mkdir -p debian/tmp/usr/lib/ghc-doc


Re: Updating Leksah (or packaging GHCJS)

2015-05-28 Thread David Fox
On Thu, May 28, 2015 at 3:23 PM, Joachim Breitner 
wrote:

> Hi David,
>
>
> Am Mittwoch, den 27.05.2015, 15:39 -0700 schrieb David Fox:
> > On Wed, May 27, 2015 at 1:04 PM, Joachim Breitner 
> > wrote:
> >
> > Also, it opens a new can of worm: Do we have to provide
> > libghcjs-foo
> > packages for all our Haskell libraries? For none? For a few?
> >
> > ​We build more and more libghcjs-* packages.  I did the
> > haskell-devscripts patches to support this.​
>
> that’s great! My worry is not so much whether it is possible to package
> libraries for GHCJS (it is, thanks to your work), but more the
> complications it causes for packaging Haskell. For example, what if we
> upgrade library foo to a new version, and that fails to work with GHCJS.
> Do we promise to patch it then? Do we simply drop the libghcjs packages
> (and all its reverse dependencies) again? How much will it make Haskell
> migrations even harder?


Yes, I see what you mean.  My only thought on the subject would be to
recommend separate source packages for the ghcjs libraries, with names
different from the ghc packages, so that upgrades of the haskell libraries
don't force upgrades of the ghcjs libraries.  Also, I don't think
haskell-devscripts
can manage a single source package building ghc and ghcjs binary packages.
The downside to this is when you are trying to have the two communicate, but
I think this is a minor issue.  And its pretty amazing how many things
"just work"
under ghcjs.

Anyway, ghcjs library debs probably not a high priority, just trying not to
create
additional obstacles when the time comes.


Re: No interpreter

2015-05-28 Thread David Fox
On Thu, May 28, 2015 at 9:25 AM, Dmitry Bogatov  wrote:

In gitit's debian/rules present following check:
>
> ifeq (0,$(shell ghc --info | grep 'Have interpreter.*NO' >/dev/null 2>&1;
> echo $$?))
>
> When ghc have no interpreter?


GHCJS doesn't have an interpreter (yet.)  That is, the interpreter doesn't
build, or can't run or something.  I seem to remember there was another
architecture that couldn't build ghci.


Re: Updating Leksah (or packaging GHCJS)

2015-05-27 Thread David Fox
On Wed, May 27, 2015 at 1:04 PM, Joachim Breitner 
wrote:

>
> Also, it opens a new can of worm: Do we have to provide libghcjs-foo
> packages for all our Haskell libraries? For none? For a few?
>

​We build more and more libghcjs-* packages.  I did the haskell-devscripts
patches to support this.​


Re: Updating Leksah (or packaging GHCJS)

2015-05-26 Thread David Fox
Rereading your message, I didn't cover everything.  I'm almost positive my
ghcjs debianization doesn't require ghcjs, but the link you have is old - I
now keep the code in a group of patches starting with "ghcjs-" in
https://github.com/seereason/autobuilder-seereason/tree/master/patches
(yes, a strange place to keep them.)  The tarballs in the links above show
what results when these packages are applied.

I think what you noticed is that you have to build ghcjs-tools before you
can build ghcjs.  Yes, now I'm sure of it.

On Mon, May 25, 2015 at 8:59 PM, David Fox  wrote:

> Yes, you will need ghcjs
> ​ compiler​
> packages to build ghcjs libraries.  I split it into two packages,
> ghcjs
> ​-tools​
> and ghcjs, but the debianization is probably not acceptable
> ​ - it puts stuff into root
> during the build​
> .  If you want to
> ​
> look at it, you will find it here:
>
> ​​
> http://deb.seereason.com/ubuntu/pool/main/g/ghcjs-tools/
> ​​
> http://deb.seereason.com/ubuntu/pool/main/g/ghcjs
>
> I also made some
> ​fairly serious ​
> changes to haskell-devscripts to make ghcjs libraries build.
>
> ​​
> https://github.com/seereason/haskell-devscripts
>
> ​I've submitted these changes to Joachim (and this list.)​
>
>
>
> On Mon, May 25, 2015 at 5:33 PM, Masayuki Hatta  wrote:
>
>> Hi,
>>
>> So now I'm tackling with Leksah, which is a monster as Joachim justly
>> said.
>>
>> I've already prepared most of needed Hackage debs missing in Debian
>> sid, but seems the recent Leksah (I've been using 0.44.4.0, and
>> 0.15.0.1 was out yesterday) depends on ghcjs-dom, which in turn
>> depends on ghcjs-base.  Once upon a time it was possible to build
>> Leksah without ghcjs-* since a build flag can effectively kill those
>> dependency, but seems the trick doesn't work anymore.  Thus I tried to
>> package ghcjs-base, but I couldn't figure out how it can be built
>> alone without the entire GHCJS.
>>
>> So now I became "interested" in GHCJS, tried to build ghcjs based on
>> ghcjs-debian (https://github.com/ddssff/ghcjs-debian), but seems it
>> requires ghcjs *before* building it ;-<  So I'm in dead stuck.  Any
>> help?  I think it's really nice to have Leksah and GHCJS in Debian as
>> packages, not via cabal.
>>
>> Best regards,
>> MH
>>
>> --
>> Masayuki Hatta
>> Assistant Professor, Faculty of Economics and Management, Surugadai
>> University, Japan
>>
>> http://about.me/mhatta
>>
>> mha...@gnu.org  / mha...@debian.org / mha...@opensource.jp /
>> hatta.masay...@surugadai.ac.jp
>>
>>
>> --
>> To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
>> with a subject of "unsubscribe". Trouble? Contact
>> listmas...@lists.debian.org
>> Archive:
>> https://lists.debian.org/caeczvpcu6is9t1-jzttpokakwjqbaeyi+tp5jxnua2ugz6d...@mail.gmail.com
>>
>>
>


Re: Updating Leksah (or packaging GHCJS)

2015-05-25 Thread David Fox
Yes, you will need ghcjs
​ compiler​
packages to build ghcjs libraries.  I split it into two packages,
ghcjs
​-tools​
and ghcjs, but the debianization is probably not acceptable
​ - it puts stuff into root
during the build​
.  If you want to
​
look at it, you will find it here:

​​
http://deb.seereason.com/ubuntu/pool/main/g/ghcjs-tools/
​​
http://deb.seereason.com/ubuntu/pool/main/g/ghcjs

I also made some
​fairly serious ​
changes to haskell-devscripts to make ghcjs libraries build.

​​
https://github.com/seereason/haskell-devscripts

​I've submitted these changes to Joachim (and this list.)​



On Mon, May 25, 2015 at 5:33 PM, Masayuki Hatta  wrote:

> Hi,
>
> So now I'm tackling with Leksah, which is a monster as Joachim justly said.
>
> I've already prepared most of needed Hackage debs missing in Debian
> sid, but seems the recent Leksah (I've been using 0.44.4.0, and
> 0.15.0.1 was out yesterday) depends on ghcjs-dom, which in turn
> depends on ghcjs-base.  Once upon a time it was possible to build
> Leksah without ghcjs-* since a build flag can effectively kill those
> dependency, but seems the trick doesn't work anymore.  Thus I tried to
> package ghcjs-base, but I couldn't figure out how it can be built
> alone without the entire GHCJS.
>
> So now I became "interested" in GHCJS, tried to build ghcjs based on
> ghcjs-debian (https://github.com/ddssff/ghcjs-debian), but seems it
> requires ghcjs *before* building it ;-<  So I'm in dead stuck.  Any
> help?  I think it's really nice to have Leksah and GHCJS in Debian as
> packages, not via cabal.
>
> Best regards,
> MH
>
> --
> Masayuki Hatta
> Assistant Professor, Faculty of Economics and Management, Surugadai
> University, Japan
>
> http://about.me/mhatta
>
> mha...@gnu.org  / mha...@debian.org / mha...@opensource.jp /
> hatta.masay...@surugadai.ac.jp
>
>
> --
> To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
> Archive:
> https://lists.debian.org/caeczvpcu6is9t1-jzttpokakwjqbaeyi+tp5jxnua2ugz6d...@mail.gmail.com
>
>


Re: Packages to drop?

2015-05-08 Thread David Fox
On Thu, May 7, 2015 at 11:14 PM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

>
> > Am 08.05.2015 um 05:38 schrieb David Fox :
> > > David, are you still planning on doing this, or should I jump in?
> >
> > On closer examination, it looks like hsx really is obsolete.  There are
> libraries with hsx in their name, but they no longer care about hsx itself.
>
> Indeed. I just checked my dependence chain and discovered, that it
> only contains hsp and hsx2hs. Are you still gonna take care of hsx2hs?
> I also discovered that I need happstack-hsp, which is on the list to
> remove,
> so I will have to look at that, if no one else does.
>
> hsx2hs is up to date on hackage (version 0.13.3.2) - I'm not sure what
else there is for me to do as I am not an official debian developer.
Happstack-hsp is also up to date on hackage (version 7.3.4) as far as I can
tell.  If you know what to do, you should definitely do it.


Re: Packages to drop?

2015-05-07 Thread David Fox
On Thu, May 7, 2015 at 8:15 AM, Joachim Breitner  wrote:

> Hi,
>
>
> Am Donnerstag, den 07.05.2015, 17:14 +0200 schrieb Sven Bartscher:
> > > Am 07.05.2015 um 09:39 schrieb Joachim Breitner :
> > >
> > > just making sure that we don’t have the situation where everyone thinks
> > > the other one is doing it: Is any of you going to fix hsx, or shall we
> > > drop it?
> >
> > Since David said he would do it, I didn’t bother with it anymore, but if
> it turns
> > out he won’t do it anymore, I will do it in the near future.
> > David, are you still planning on doing this, or should I jump in?
>
> thanks, but he won’t reply if you send this just to me :-]
>
> On closer examination, it looks like hsx really is obsolete.  There are
libraries with hsx in their name, but they no longer care about hsx itself.


Re: haskell-devscripts now in git

2015-04-29 Thread David Fox
On Wed, Apr 29, 2015 at 2:28 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Mittwoch, den 29.04.2015, 11:20 +0200 schrieb Jonas Smedegaard:
> > Quoting Joachim Breitner (2015-04-29 11:13:57)
> > > I used /git/pkg-haskell/setup-repository. I hope that file was not
> > > completely bit-rotted.
> >
> > On the contrary: I created that script *yesterday*. :-)
> >
> > (I mentioned it in a mail yesterday, but on the flooded list :-P )
>
> oh, great. thanks! Should have looked at the date.
>
> (Although the size of the script supports my rant that setting up git
> repos the right way is too complicated. Maybe Debian should move to
> GitHub. *ducksandruns*).
>
>
To be honest, for me, github and its workflow is the only thing that makes
git better than darcs.


Re: haskell-devscripts quoting error

2015-04-28 Thread David Fox
On Tue, Apr 28, 2015 at 6:31 AM, Joachim Breitner 
wrote:
>
>
> We could just use that repo, and clone it on alioth. Did you import the
> whole history of haskell-devscripts? Using what tool?


Yes, by all means.  I used darcs convert export   | (cd
../git-haskell-devscripts && git fast-import) to create it, the darcs
convert export option appears in recent versions of darcs.


Re: haskell-devscripts quoting error

2015-04-28 Thread David Fox
On Tue, Apr 28, 2015 at 1:49 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Montag, den 27.04.2015, 17:16 -0700 schrieb David Fox:
> > On Mon, Apr 27, 2015 at 4:30 PM, David Fox  wrote:
> > It is fixable.
>
> thanks for your patch. I wasn’t fully convinced (I believe it would
> break if DEB_SETUP_GHC_CONFIGURE_ARGS contains multiple arguments to be
> passed to ./configure), so I came up with a different solution.
>

I'm pretty sure mine works.  It works for haskell-cmdarcs with

DEB_SETUP_GHC_CONFIGURE_ARGS := $(shell test -e /usr/lib/ghc/bin/ghci
|| echo --flags=\"-quotation -testprog\")



>
> If I ask if it would help you a lot if we move haskell-devscripts to a
> git repository, I guess you would be very supportive of that idea? :-)
>


By the way, I have this one: https://github.com/seereason/haskell-devscripts


Re: haskell-devscripts quoting error

2015-04-27 Thread David Fox
On Mon, Apr 27, 2015 at 4:30 PM, David Fox  wrote:

> It is fixable.
>
> Maybe :-(


Re: haskell-devscripts quoting error

2015-04-27 Thread David Fox
It is fixable.


Re: haskell-devscripts quoting error

2015-04-27 Thread David Fox
On Mon, Apr 27, 2015 at 3:06 PM, Joachim Breitner 
wrote:

> Hi,
>
> but that is just a ugly work-around. The user of hlibrary should not have
> to guess throug how many layers of quoting this variable has to go.
>
> Yes, I'm hoping to find answer number two.  Its looking a little ugly
though.


Re: haskell-devscripts quoting error

2015-04-27 Thread David Fox
On Mon, Apr 27, 2015 at 2:54 PM, David Fox  wrote:

>
>
> On Mon, Apr 27, 2015 at 2:49 PM, Joachim Breitner 
> wrote:
>
>> Hi,
>>
>> Am Montag, den 27.04.2015, 14:28 -0700 schrieb David Fox:
>>
>> > Sorry about that!  I will check it out.
>>
>> Thanks. I could not find an easy way to fix it, but maybe StackOverflow
>> knows more:
>>
>> http://stackoverflow.com/questions/29906576/safely-pass-make-variable-to-shell-commands
>
>
> First answer - this works:
>
> DEB_SETUP_GHC_CONFIGURE_ARGS := $(shell test -e /usr/lib/ghc/bin/ghci ||
> echo --flags=\\\"-quotation -testprog\\\")
>
> But you also have to change 'DEB_SETUP_GHC_CONFIGURE_ARGS=$7' to
'DEB_SETUP_GHC_CONFIGURE_ARGS="$7"' in Dh_Haskell.sh


Re: haskell-devscripts quoting error

2015-04-27 Thread David Fox
On Mon, Apr 27, 2015 at 2:49 PM, Joachim Breitner 
wrote:

> Hi,
>
> Am Montag, den 27.04.2015, 14:28 -0700 schrieb David Fox:
>
> > Sorry about that!  I will check it out.
>
> Thanks. I could not find an easy way to fix it, but maybe StackOverflow
> knows more:
>
> http://stackoverflow.com/questions/29906576/safely-pass-make-variable-to-shell-commands


First answer - this works:

DEB_SETUP_GHC_CONFIGURE_ARGS := $(shell test -e /usr/lib/ghc/bin/ghci ||
echo --flags=\\\"-quotation -testprog\\\")


Re: Packages to drop?

2015-04-27 Thread David Fox
On Mon, Apr 27, 2015 at 8:16 AM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

>
> > Am 27.04.2015 um 15:49 schrieb Joachim Breitner :
>
> > hex? Do you mean hsx?
>
> Yes, I actually meant hsx. It turned out my current mail client is very
> aggressive when it comes to auto correction.
>
> > David takes care of that (also in private mail).
>
> Both of them? (hsx2hs and hsx)
>
> >


I have hackage upload permission for hsx2hs, but not for hsx.  Though I do
use hsx.


Re: When to upload to unstable?

2015-04-26 Thread David Fox
On Sun, Apr 26, 2015 at 10:29 AM, Clint Adams  wrote:

> On Sun, Apr 26, 2015 at 07:24:08PM +0200, Joachim Breitner wrote:
> > So maybe we simply do it as soon as possible?
>
> That's my preference.
>
> Mine as well.


I just pushed an enormous patch to cabal-debian - please pull

2015-04-17 Thread David Fox
I just pushed a patch to cabal-debian that changes all the old data-lens
code to lens, so it touches about 1000 lines.  If you are editing
cabal-debian you should pull these patches so you can resolve any conflicts
with the least pain.


Re: [PATCH 00/11] Series of patches to support ghcjs packages

2015-03-31 Thread David Fox
On Tue, Mar 31, 2015 at 10:21 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Samstag, den 28.03.2015, 15:13 -0700 schrieb David Fox:
> > Right, the ones in https://github.com/seereason/haskell-devscripts are
> > good.
>
> all applied (but not yet tested).
>
>
> I wonder how feasible it would be to provide, say, all of Stackage LTS
> as Debian packages built for stable, testing and unstable in an
> automated fashion somewhere – with cabal-debian and your work on
> haskell-devscripts, why not?
>

Totally doable -  We build about 700 packages at
http://deb.seereason.com/ubuntu, built using cabal-debian and
haskell-devscripts, using our own old, rickety autobuilder tool.  The one
thing I like about our tool is the way you describe each build target - you
can specify that the origin is hackage, or a darcs repo, or git repo, some
other rcs, or a tarball, and then you can apply patches as necessary, and
supply extra arguments to cabal-debian.

Even though Stackage is a curated collection, I think you might end up
needing a similar description language for tweaks related to the different
underlying distributions, and somehow hook that up to Debian's autobuilder
system.  It may also be a good idea to add some support to cabal-debian so
it can create or add to the debian/patch series in the standard fashion.


Re: [PATCH 00/11] Series of patches to support ghcjs packages

2015-03-28 Thread David Fox
Right, the ones in https://github.com/seereason/haskell-devscripts are good.

On Sat, Mar 28, 2015 at 12:16 PM, Joachim Breitner 
wrote:

> Hi,
>
> yes, simply point us to the git repo :-)
>
> Greetings, Joachim
>
> Am 28. März 2015 18:29:54 MEZ, schrieb David Fox :
> >Oh for Petes sake!  My "corrected" set of patches is correct, but also
> >creates ".orig" files that should have been ignored.  Is there some way
> >I
> >can provide these patches without spamming everyone on the list with
> >yet
> >another series of eleven emails?
> >
> >On Sat, Mar 28, 2015 at 9:49 AM, David Fox  wrote:
> >
> >> Yes, we have used them for over a year on hundreds of unmodified
> >packages
> >> from from the Debian repositories and  even more debs produced by
> >> cabal-debian.
> >>
> >>
> >> On Sat, Mar 28, 2015 at 9:43 AM, Joachim Breitner
> >
> >> wrote:
> >>
> >>> Hi David,
> >>>
> >>> great, thanks for your work. I haven’t looked in detail yet (busy
> >>> weekend with a large party to throw), but I will come to that –
> >unless
> >>> someone else beats me to it, which would be fine too!
> >>>
> >>> Do I understand correctly that these patches require no changes to
> >>> debian/rules or debian/control and behave the same way for our
> >existing
> >>> packages?
> >>>
> >>> Greetings,
> >>> Joachim
> >>>
> >>>
> >>> Am Freitag, den 27.03.2015, 09:14 -0700 schrieb David Fox:
> >>> > These changes are available
> >>> > at https://github.com/seereason/haskell-devscripts.
> >>> >
> >>> > On Fri, Mar 27, 2015 at 8:41 AM, David Fox 
> >wrote:
> >>> > These eleven patches start with some bug fixes, followed
> >by
> >>> > some
> >>> > fairly major changes to parameterize the haskell compiler
> >>> > name,
> >>> > finally adding support for ghcjs specifically.  A lot of
> >the
> >>> > changes
> >>> > are due to translating make rules to bash code, moving
> >them
> >>> > from
> >>> > hlibrary.mk to Dh_Haskell.sh, leaving function calls in
> >>> > hlibrary.mk.
> >>> > Then additional rules are added to hlibrary.mk for the
> >ghcjs
> >>> > packages,
> >>> > with modified function parameters.  Finally, some disabled
> >>> > debugging
> >>> > code is added to give a nice trace of the execution, but
> >this
> >>> > patch is
> >>> > optional.
> >>> >
> >>> > I've successfully built about 100 ghc packages and 50
> >ghcjs
> >>> > packages
> >>> > with these changes.
> >>> >
> >>> > David Fox (11):
> >>> >   Allow building of documentation when when package has no
> >>> > Haskell
> >>> > modules
> >>> >   Fix a bash error - single quote prevents expansion of
> >shell
> >>> > variables
> >>> >   Remove support for obsolete doc package prefix
> >'haskell-'
> >>> >   Pass --with-haddock and --with-ghc to haddock,
> >--package-db
> >>> > to cabal
> >>> > configure
> >>> >   Reword some error messages and indicate where they
> >originate
> >>> >   Add functions to Dh_Haskell.hs
> >>> >   Turn the Make rules into shell functions
> >>> >   Parameterize the compiler name
> >>> >   Add support for building ghcjs packages
> >>> >   Add a compiler parameter to the dh_haskell_blurbs script
> >>> >   Debugging code (disabled)
> >>> >
> >>> >  Dh_Haskell.sh| 343
> >>> > ---
> >>> >  dh_haskell_blurbs|  24 +++-
> >>> >  dh_haskell_depends   |  30 +++--
> >>> >  dh_haskell_extra_depends |   8 +-
> >>> >  dh_haskell_provides  |  26 ++--
> >>> >  dh_haskell_shlibdeps |  15 ++-
> >>> >  hlibrary.mk  | 121 +++--
> >>> >  7 files changed, 438 insertions(+), 129 deletions(-)
> >>> >
> >>> > --
> >>> > 1.9.1
> >>> >
> >>> >
> >>> > --
> >>> > To UNSUBSCRIBE, email to
> >>> > debian-haskell-requ...@lists.debian.org
> >>> > with a subject of "unsubscribe". Trouble? Contact
> >>> > listmas...@lists.debian.org
> >>> > Archive:
> >>> >
> >https://lists.debian.org/CAM8C2CDb8q9fRAq-RAOMkrvooVHuehQLOA
> >>> > +2yauovnh4_7-...@mail.gmail.com
> >>> >
> >>> >
> >>> >
> >>>
> >>> --
> >>> Joachim "nomeata" Breitner
> >>> Debian Developer
> >>>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
> >>>   JID: nome...@joachim-breitner.de |
> >http://people.debian.org/~nomeata
> >>>
> >>
> >>
>
>


Re: [PATCH 00/11] Series of patches to support ghcjs packages

2015-03-28 Thread David Fox
Oh for Petes sake!  My "corrected" set of patches is correct, but also
creates ".orig" files that should have been ignored.  Is there some way I
can provide these patches without spamming everyone on the list with yet
another series of eleven emails?

On Sat, Mar 28, 2015 at 9:49 AM, David Fox  wrote:

> Yes, we have used them for over a year on hundreds of unmodified packages
> from from the Debian repositories and  even more debs produced by
> cabal-debian.
>
>
> On Sat, Mar 28, 2015 at 9:43 AM, Joachim Breitner 
> wrote:
>
>> Hi David,
>>
>> great, thanks for your work. I haven’t looked in detail yet (busy
>> weekend with a large party to throw), but I will come to that – unless
>> someone else beats me to it, which would be fine too!
>>
>> Do I understand correctly that these patches require no changes to
>> debian/rules or debian/control and behave the same way for our existing
>> packages?
>>
>> Greetings,
>> Joachim
>>
>>
>> Am Freitag, den 27.03.2015, 09:14 -0700 schrieb David Fox:
>> > These changes are available
>> > at https://github.com/seereason/haskell-devscripts.
>> >
>> > On Fri, Mar 27, 2015 at 8:41 AM, David Fox  wrote:
>> > These eleven patches start with some bug fixes, followed by
>> > some
>> > fairly major changes to parameterize the haskell compiler
>> > name,
>> > finally adding support for ghcjs specifically.  A lot of the
>> > changes
>> > are due to translating make rules to bash code, moving them
>> > from
>> > hlibrary.mk to Dh_Haskell.sh, leaving function calls in
>> > hlibrary.mk.
>> > Then additional rules are added to hlibrary.mk for the ghcjs
>> > packages,
>> > with modified function parameters.  Finally, some disabled
>> >     debugging
>> > code is added to give a nice trace of the execution, but this
>> > patch is
>> > optional.
>> >
>> > I've successfully built about 100 ghc packages and 50 ghcjs
>> > packages
>> > with these changes.
>> >
>> > David Fox (11):
>> >   Allow building of documentation when when package has no
>> > Haskell
>> > modules
>> >   Fix a bash error - single quote prevents expansion of shell
>> > variables
>> >   Remove support for obsolete doc package prefix 'haskell-'
>> >   Pass --with-haddock and --with-ghc to haddock, --package-db
>> > to cabal
>> > configure
>> >   Reword some error messages and indicate where they originate
>> >   Add functions to Dh_Haskell.hs
>> >   Turn the Make rules into shell functions
>> >   Parameterize the compiler name
>> >   Add support for building ghcjs packages
>> >   Add a compiler parameter to the dh_haskell_blurbs script
>> >   Debugging code (disabled)
>> >
>> >  Dh_Haskell.sh| 343
>> > ---
>> >  dh_haskell_blurbs|  24 +++-
>> >  dh_haskell_depends   |  30 +++--
>> >  dh_haskell_extra_depends |   8 +-
>> >  dh_haskell_provides  |  26 ++--
>> >  dh_haskell_shlibdeps |  15 ++-
>> >  hlibrary.mk  | 121 +++--
>> >  7 files changed, 438 insertions(+), 129 deletions(-)
>> >
>> > --
>> > 1.9.1
>> >
>> >
>> > --
>> > To UNSUBSCRIBE, email to
>> > debian-haskell-requ...@lists.debian.org
>> > with a subject of "unsubscribe". Trouble? Contact
>> > listmas...@lists.debian.org
>> > Archive:
>> > https://lists.debian.org/CAM8C2CDb8q9fRAq-RAOMkrvooVHuehQLOA
>> > +2yauovnh4_7-...@mail.gmail.com
>> >
>> >
>> >
>>
>> --
>> Joachim "nomeata" Breitner
>> Debian Developer
>>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>>
>
>


Re: [PATCH 00/11] Series of patches to support ghcjs packages

2015-03-28 Thread David Fox
Yes, we have used them for over a year on hundreds of unmodified packages
from from the Debian repositories and  even more debs produced by
cabal-debian.

On Sat, Mar 28, 2015 at 9:43 AM, Joachim Breitner 
wrote:

> Hi David,
>
> great, thanks for your work. I haven’t looked in detail yet (busy
> weekend with a large party to throw), but I will come to that – unless
> someone else beats me to it, which would be fine too!
>
> Do I understand correctly that these patches require no changes to
> debian/rules or debian/control and behave the same way for our existing
> packages?
>
> Greetings,
> Joachim
>
>
> Am Freitag, den 27.03.2015, 09:14 -0700 schrieb David Fox:
> > These changes are available
> > at https://github.com/seereason/haskell-devscripts.
> >
> > On Fri, Mar 27, 2015 at 8:41 AM, David Fox  wrote:
> > These eleven patches start with some bug fixes, followed by
> > some
> > fairly major changes to parameterize the haskell compiler
> > name,
> > finally adding support for ghcjs specifically.  A lot of the
> > changes
> > are due to translating make rules to bash code, moving them
> > from
> > hlibrary.mk to Dh_Haskell.sh, leaving function calls in
> > hlibrary.mk.
> > Then additional rules are added to hlibrary.mk for the ghcjs
> > packages,
> > with modified function parameters.  Finally, some disabled
> > debugging
> > code is added to give a nice trace of the execution, but this
> > patch is
> >     optional.
> >
> > I've successfully built about 100 ghc packages and 50 ghcjs
> > packages
> > with these changes.
> >
> > David Fox (11):
> >   Allow building of documentation when when package has no
> > Haskell
> > modules
> >   Fix a bash error - single quote prevents expansion of shell
> > variables
> >   Remove support for obsolete doc package prefix 'haskell-'
> >   Pass --with-haddock and --with-ghc to haddock, --package-db
> > to cabal
> > configure
> >   Reword some error messages and indicate where they originate
> >   Add functions to Dh_Haskell.hs
> >   Turn the Make rules into shell functions
> >   Parameterize the compiler name
> >   Add support for building ghcjs packages
> >   Add a compiler parameter to the dh_haskell_blurbs script
> >   Debugging code (disabled)
> >
> >  Dh_Haskell.sh| 343
> > ---
> >  dh_haskell_blurbs|  24 +++-
> >  dh_haskell_depends   |  30 +++--
> >  dh_haskell_extra_depends |   8 +-
> >  dh_haskell_provides  |  26 ++--
> >  dh_haskell_shlibdeps |  15 ++-
> >  hlibrary.mk  | 121 +++--
> >  7 files changed, 438 insertions(+), 129 deletions(-)
> >
> > --
> > 1.9.1
> >
> >
> > --
> > To UNSUBSCRIBE, email to
> > debian-haskell-requ...@lists.debian.org
> > with a subject of "unsubscribe". Trouble? Contact
> > listmas...@lists.debian.org
> > Archive:
> > https://lists.debian.org/CAM8C2CDb8q9fRAq-RAOMkrvooVHuehQLOA
> > +2yauovnh4_7-...@mail.gmail.com
> >
> >
> >
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>


[PATCH 08/11] Parameterize the compiler name (fixed linebreaks)

2015-03-28 Thread David Fox
---
 Dh_Haskell.sh| 182 +++
 Dh_Haskell.sh.orig   | 137 +++
 dh_haskell_blurbs|  18 +++--
 dh_haskell_depends   |  25 ---
 dh_haskell_extra_depends |   5 +-
 dh_haskell_provides  |  21 +++---
 dh_haskell_shlibdeps |  10 +--
 hlibrary.mk  |  30 
 8 files changed, 322 insertions(+), 106 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 4e56b64..1e1fce6 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -68,6 +68,24 @@ hc_haddock(){
 esac
 }
 
+hc_docdir(){
+hc=$1
+pkgid=$2
+echo "usr/lib/${hc}-doc/haddock/${pkgid}/"
+}
+
+hc_htmldir(){
+hc=$1
+CABAL_PACKAGE=$2
+echo "usr/share/doc/lib${hc}-${CABAL_PACKAGE}-doc/html/"
+}
+
+hc_hoogle(){
+local hc
+hc=$1
+echo "/usr/lib/${hc}-doc/hoogle/"
+}
+
 strip_hash(){
echo "$1" | sed 's/-$//'
 }
@@ -91,7 +109,10 @@ dependency(){
 }
 
 ghc_pkg_field(){
-ghc-pkg --global field $@ | head -n1
+hc=$1
+pkg=$2
+field=$3
+${hc}-pkg --global field ${pkg} ${field} | head -n1
 }
 
 providing_package_for_ghc(){
@@ -100,9 +121,11 @@ providing_package_for_ghc(){
 local dir
 local dirs
 local lib
-dep=`strip_hash $1`
-dirs=`ghc_pkg_field $dep library-dirs | grep -i ^library-dirs | cut -d':' 
-f 2`
-lib=`ghc_pkg_field $dep hs-libraries | grep -i ^hs-libraries |  sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
+local hc
+hc=$1
+dep=`strip_hash $2`
+dirs=`ghc_pkg_field $hc $dep library-dirs | grep -i ^library-dirs | cut 
-d':' -f 2`
+lib=`ghc_pkg_field $hc $dep hs-libraries | grep -i ^hs-libraries |  sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
 for dir in $dirs ; do
if [ -e "${dir}/lib${lib}.a" ] ; then
package=`dpkg-query -S ${dir}/lib${lib}.a | cut -d':' -f 1` || exit 
$?
@@ -118,9 +141,11 @@ providing_package_for_ghc_prof(){
 local dir
 local dirs
 local lib
-dep=`strip_hash $1`
-dirs=`ghc_pkg_field $dep library-dirs | grep -i ^library-dirs | cut -d':' 
-f 2`
-lib=`ghc_pkg_field $dep hs-libraries | grep -i ^hs-libraries | sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
+local hc
+hc=$1
+dep=`strip_hash $2`
+dirs=`ghc_pkg_field $hc $dep library-dirs | grep -i ^library-dirs | cut 
-d':' -f 2`
+lib=`ghc_pkg_field $hc $dep hs-libraries | grep -i ^hs-libraries | sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
 for dir in $dirs ; do
if [ -e "${dir}/lib${lib}_p.a" ] ; then
package=`dpkg-query -S ${dir}/lib${lib}_p.a | cut -d':' -f 1` || 
exit $?
@@ -166,12 +191,14 @@ cabal_depends(){
 }
 
 hashed_dependency(){
+local hc
 local type
 local pkgid
 local virpkg
-type=$1
-pkgid=$2
-virtual_pkg=`package_id_to_virtual_package $type $pkgid`
+hc=$1
+type=$2
+pkgid=$3
+virtual_pkg=`package_id_to_virtual_package "${hc}" "$type" $pkgid`
 # As a transition measure, check if dpkg knows about this virtual package
 if dpkg-query -W $virtual_pkg >/dev/null 2>/dev/null;
 then
@@ -183,11 +210,14 @@ depends_for_ghc(){
 local dep
 local packages
 local pkgid
+local hc
+hc=$1
+shift
 for pkgid in `cabal_depends $@` ; do
-   dep=`hashed_dependency dev $pkgid`
+   dep=`hashed_dependency ${hc} dev $pkgid`
if [ -z "$dep" ]
then
- pkg=`providing_package_for_ghc $pkgid`
+ pkg=`providing_package_for_ghc $hc $pkgid`
   if [ -n "$pkg" ]
   then
  dep=`dependency $pkg`
@@ -207,11 +237,14 @@ depends_for_ghc_prof(){
 local dep
 local packages
 local pkgid
+local hc
+hc=$1
+shift
 for pkgid in `cabal_depends $@` ; do
-   dep=`hashed_dependency prof $pkgid`
+   dep=`hashed_dependency ${hc} prof $pkgid`
if [ -z "$dep" ]
then
- pkg=`providing_package_for_ghc_prof $pkgid`
+ pkg=`providing_package_for_ghc_prof $hc $pkgid`
   if [ -n "$pkg" ]
   then
  dep=`dependency $pkg`
@@ -228,29 +261,39 @@ depends_for_ghc_prof(){
 }
 
 provides_for_ghc(){
+local hc
 local dep
 local packages
+hc=$1
+shift
 for package_id in `cabal_package_ids $@` ; do
-   packages="$packages, `package_id_to_virtual_package dev $package_id`"
+   packages="$packages, `package_id_to_virtual_package "${hc}" dev 
$package_id`"
 done
 echo $packages | sed -e 's/^,[ ]*//'
 }
 
 provides_for_ghc_prof(){
+local hc
 local dep
 local packages
+hc=$1
+shift
 for package_id in `cabal_package_ids $@` ; do
-   packages="$packages, `package_id_to_virtual_package prof $package_id`"
+   packages="$packages, `package_id_to_virtual_package "${hc}" prof 
$package_id`"
 done
 echo $packages | sed -e 's/^,[ ]*//'
 }
 
 package_id_to_virtual_package(){
+   local hc
local type
-  

[PATCH 09/11] Add support for building ghcjs packages (fixed linebreaks)

2015-03-28 Thread David Fox
---
 Dh_Haskell.sh  |  22 +--
 Dh_Haskell.sh.orig | 182 +++--
 hlibrary.mk|  21 +++
 3 files changed, 160 insertions(+), 65 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 1e1fce6..7cc690a 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -6,6 +6,14 @@ os(){
   ghc -e 'putStr System.Info.os'
 }
 
+ghcjs_version(){
+  ghcjs --numeric-ghcjs-version
+}
+
+ghcjs_ghc_version(){
+  ghcjs --numeric-ghc-version
+}
+
 package_prefix(){
 echo $1 | sed -n -e 's|^\([^-]*\)-.*-[^-]*$|\1|p'
 }
@@ -35,6 +43,7 @@ packages_hc(){
 hc_libdir(){
 case $1 in
   ghc) echo "usr/lib/haskell-packages/ghc/lib";;
+  ghcjs) echo "usr/lib/ghcjs/.cabal/lib";;
   *) echo "Don't know package_libdir for $1" >&2; exit 1;;
 esac
 }
@@ -46,6 +55,7 @@ package_libdir(){
 hc_pkgdir(){
 case $1 in
ghc) echo "var/lib/ghc/package.conf.d";;
+ghcjs) echo 
"usr/lib/ghcjs/.ghcjs/`cpu`-`os`-`ghcjs_version`-`ghcjs_ghc_version`/ghcjs/package.conf.d";;
 *) echo "Don't know pkgdir for $1" >&2; exit 1;;
 esac
 }
@@ -57,6 +67,7 @@ package_pkgdir(){
 hc_prefix(){
 case $1 in
   ghc) echo "usr";;
+  ghcjs) echo "usr/lib/ghcjs";;
   *) echo "Don't know prefix for compiler $1" >&2; exit 1;;
 esac
 }
@@ -64,6 +75,7 @@ hc_prefix(){
 hc_haddock(){
 case $1 in
ghc) echo "haddock";;
+   ghcjs) echo "haddock-ghcjs";;
*) echo "Don't know pkgdir for $1" >&2; exit 1;;
 esac
 }
@@ -333,11 +345,11 @@ clean_recipe(){
 MAKEFILE=$3
 DEB_LINTIAN_OVERRIDES_FILE=$4
 [ ! -x "${DEB_SETUP_BIN_NAME}" ] || ${DEB_SETUP_BIN_NAME} clean
-rm -rf dist dist-ghc dist-hugs ${DEB_SETUP_BIN_NAME} Setup.hi Setup.ho 
Setup.o .*config*
-rm -f configure-ghc-stamp build-ghc-stamp build-hugs-stamp 
build-haddock-stamp
-rm -rf debian/tmp-inst-ghc
-rm -f debian/extra-depends-ghc
-rm -f debian/libghc-${CABAL_PACKAGE}-doc.links
+rm -rf dist dist-ghc dist-ghcjs dist-hugs ${DEB_SETUP_BIN_NAME} Setup.hi 
Setup.ho Setup.o .*config*
+rm -f configure-ghc-stamp configure-ghcjs-stamp build-ghc-stamp 
build-ghcjs-stamp build-hugs-stamp build-haddock-stamp
+rm -rf debian/tmp-inst-ghc debian/tmp-inst-ghcjs
+rm -f debian/extra-depends-ghc debian/extra-depends-ghcjs
+rm -f debian/libghc-${CABAL_PACKAGE}-doc.links 
debian/libghcjs-${CABAL_PACKAGE}-doc.links
 if [ -f ${DEB_LINTIAN_OVERRIDES_FILE} ] ; then 
\
   sed -i '/binary-or-shlib-defines-rpath/ d' ${DEB_LINTIAN_OVERRIDES_FILE} 
;   \
   find ${DEB_LINTIAN_OVERRIDES_FILE} -empty -delete;   
\
diff --git a/Dh_Haskell.sh.orig b/Dh_Haskell.sh.orig
index 4e56b64..1e1fce6 100644
--- a/Dh_Haskell.sh.orig
+++ b/Dh_Haskell.sh.orig
@@ -68,6 +68,24 @@ hc_haddock(){
 esac
 }
 
+hc_docdir(){
+hc=$1
+pkgid=$2
+echo "usr/lib/${hc}-doc/haddock/${pkgid}/"
+}
+
+hc_htmldir(){
+hc=$1
+CABAL_PACKAGE=$2
+echo "usr/share/doc/lib${hc}-${CABAL_PACKAGE}-doc/html/"
+}
+
+hc_hoogle(){
+local hc
+hc=$1
+echo "/usr/lib/${hc}-doc/hoogle/"
+}
+
 strip_hash(){
echo "$1" | sed 's/-$//'
 }
@@ -91,7 +109,10 @@ dependency(){
 }
 
 ghc_pkg_field(){
-ghc-pkg --global field $@ | head -n1
+hc=$1
+pkg=$2
+field=$3
+${hc}-pkg --global field ${pkg} ${field} | head -n1
 }
 
 providing_package_for_ghc(){
@@ -100,9 +121,11 @@ providing_package_for_ghc(){
 local dir
 local dirs
 local lib
-dep=`strip_hash $1`
-dirs=`ghc_pkg_field $dep library-dirs | grep -i ^library-dirs | cut -d':' 
-f 2`
-lib=`ghc_pkg_field $dep hs-libraries | grep -i ^hs-libraries |  sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
+local hc
+hc=$1
+dep=`strip_hash $2`
+dirs=`ghc_pkg_field $hc $dep library-dirs | grep -i ^library-dirs | cut 
-d':' -f 2`
+lib=`ghc_pkg_field $hc $dep hs-libraries | grep -i ^hs-libraries |  sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
 for dir in $dirs ; do
if [ -e "${dir}/lib${lib}.a" ] ; then
package=`dpkg-query -S ${dir}/lib${lib}.a | cut -d':' -f 1` || exit 
$?
@@ -118,9 +141,11 @@ providing_package_for_ghc_prof(){
 local dir
 local dirs
 local lib
-dep=`strip_hash $1`
-dirs=`ghc_pkg_field $dep library-dirs | grep -i ^library-dirs | cut -d':' 
-f 2`
-lib=`ghc_pkg_field $dep hs-libraries | grep -i ^hs-libraries | sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
+local hc
+hc=$1
+dep=`strip_hash $2`
+dirs=`ghc_pkg_field $hc $dep library-dirs | grep -i ^library-dirs | cut 
-d':' -f 2`
+lib=`ghc_pkg_field $hc $dep hs-libraries | grep -i ^hs-libraries | sed -e 
's|hs-libraries: *\([^ ]*\).*|\1|' `
 for dir in $dirs ; do
if [ -e "${dir}/lib${lib}_p.a" ] ; then
package=`dpkg-query -S ${dir}/lib${lib}_p.a | cut -d':' -f 1` || 
exit $?
@@ -166,12 +191,14 @@ cabal_depends(){
 }

[PATCH 10/11] Add a compiler parameter to the dh_haskell_blurbs script (fixed linebreaks)

2015-03-28 Thread David Fox
---
 dh_haskell_blurbs | 5 -
 hlibrary.mk   | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dh_haskell_blurbs b/dh_haskell_blurbs
index 6d6d3a2..be191bb 100644
--- a/dh_haskell_blurbs
+++ b/dh_haskell_blurbs
@@ -6,10 +6,13 @@
 
 set -e 
 
+DEB_DEFAULT_COMPILER=$1
+shift
+
 . /usr/share/haskell-devscripts/Dh_Haskell.sh
 
 packages=`dh_listpackages`
-hc=`packages_hc ${packages}`
+hc=`packages_hc ${DEB_DEFAULT_COMPILER} ${packages}`
 
 for pkg in `dh_listpackages $args`; do
 sfile=debian/$pkg.substvars
diff --git a/hlibrary.mk b/hlibrary.mk
index 2d04d52..30dfbe4 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -188,7 +188,7 @@ install/libhugs-$(CABAL_PACKAGE):: $(DEB_SETUP_BIN_NAME) 
dist-hugs debian/extra-
 
 # Run dh_haskell_blurbs on all packags, useful e.g. for binary packages
 $(patsubst %,install/%,$(DEB_PACKAGES)) :: install/%:
-   dh_haskell_blurbs -p$(cdbs_curpkg)
+   dh_haskell_blurbs "$(DEB_DEFAULT_COMPILER)" -p$(cdbs_curpkg)
 
 
 # Support for installing executables
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1427549328-27951-10-git-send-email-...@seereason.com



[PATCH 06/11] Add functions to Dh_Haskell.hs (fixed linebreaks)

2015-03-28 Thread David Fox
---
 Dh_Haskell.sh | 70 +++
 1 file changed, 70 insertions(+)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index c5b15b2..f0a2002 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -1,3 +1,73 @@
+cpu(){
+  ghc -e 'putStr System.Info.arch'
+}
+
+os(){
+  ghc -e 'putStr System.Info.os'
+}
+
+package_prefix(){
+echo $1 | sed -n -e 's|^\([^-]*\)-.*-[^-]*$|\1|p'
+}
+
+package_hc(){
+echo $1 | sed -n -e 's|^lib\([^-]*\)-.*-[^-]*$|\1|p'
+}
+
+package_ext(){
+case $1 in
+   # I'm told the ghc build uses these scripts, hence these special cases
+   ghc) echo "dev";;
+   ghc-prof) echo "prof";;
+   *) echo $1 | sed -n -e 's|^[^-]*-.*-\([^-]*\)$|\1|p';;
+esac
+}
+
+packages_hc(){
+DEB_DEFAULT_COMPILER=$1
+DEB_PACKAGES=$2
+hcs=`{ for i in ${DEB_PACKAGES}; do package_hc $i; done; } | sort -u`
+if [ `echo ${hcs} | wc -w` = 0 ]; then hcs=${DEB_DEFAULT_COMPILER}; fi
+if [ `echo ${hcs} | wc -w` != 1 ]; then echo "Multiple compilers not 
supported: ${hc}"; exit 1; fi
+echo ${hcs}
+}
+
+hc_libdir(){
+case $1 in
+  ghc) echo "usr/lib/haskell-packages/ghc/lib";;
+  *) echo "Don't know package_libdir for $1" >&2; exit 1;;
+esac
+}
+
+package_libdir(){
+hc_libdir `package_hc $1`
+}
+
+hc_pkgdir(){
+case $1 in
+   ghc) echo "var/lib/ghc/package.conf.d";;
+*) echo "Don't know pkgdir for $1" >&2; exit 1;;
+esac
+}
+
+package_pkgdir(){
+hc_pkgdir `package_hc $1`
+}
+
+hc_prefix(){
+case $1 in
+  ghc) echo "usr";;
+  *) echo "Don't know prefix for compiler $1" >&2; exit 1;;
+esac
+}
+
+hc_haddock(){
+case $1 in
+   ghc) echo "haddock";;
+   *) echo "Don't know pkgdir for $1" >&2; exit 1;;
+esac
+}
+
 strip_hash(){
echo "$1" | sed 's/-$//'
 }
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1427549328-27951-6-git-send-email-...@seereason.com



[PATCH 03/11] Remove support for obsolete doc package prefix 'haskell-' (fixed linebreaks)

2015-03-28 Thread David Fox
---
 dh_haskell_depends | 2 +-
 hlibrary.mk| 4 ++--
 hlibrary.mk.orig   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dh_haskell_depends b/dh_haskell_depends
index b71cec4..4917092 100644
--- a/dh_haskell_depends
+++ b/dh_haskell_depends
@@ -118,7 +118,7 @@ for pkg in `dh_listpackages $args`; do
 echo "haskell:Recommends=" >> $sfile.tmp
 echo "haskell:Suggests=" >> $sfile.tmp
;;
-libghc-*-doc|haskell-*-doc)
+libghc-*-doc)
grep -v \
 -e ^haskell:Depends \
 -e ^haskell:Recommends \
diff --git a/hlibrary.mk b/hlibrary.mk
index 5408863..20e831a 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -149,7 +149,7 @@ build-haddock-stamp:
  echo "Haddock failed (no modules?), creating empty documentation 
package."
touch build-haddock-stamp
 
-build/haskell-$(CABAL_PACKAGE)-doc build/libghc-$(CABAL_PACKAGE)-doc:: 
configure-ghc-stamp build-haddock-stamp
+build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp
 
 dist-hugs: $(DEB_SETUP_BIN_NAME)
$(DEB_SETUP_BIN_NAME) configure --hugs --prefix=/usr -v2 
--builddir=dist-hugs $(DEB_SETUP_HUGS_CONFIGURE_ARGS)
@@ -193,7 +193,7 @@ install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc 
install/libghc-$(CABA
dh_haskell_provides -p$(notdir $@)
dh_haskell_depends -p$(notdir $@)
 
-install/haskell-$(CABAL_PACKAGE)-doc install/libghc-$(CABAL_PACKAGE)-doc:: 
debian/tmp-inst-ghc build-haddock-stamp debian/extra-depends
+install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc build-haddock-stamp 
debian/extra-depends
mkdir -p debian/$(notdir $@)/$(DEB_HADDOCK_HTML_DIR)
cd debian/tmp-inst-ghc/ ; find ./$(DEB_HADDOCK_HTML_DIR)/ \
! -name "*.haddock" -exec install -Dm 644 '{}' \
diff --git a/hlibrary.mk.orig b/hlibrary.mk.orig
index fb91ca5..5408863 100644
--- a/hlibrary.mk.orig
+++ b/hlibrary.mk.orig
@@ -175,7 +175,7 @@ install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc 
debian/extra-depends
$(if $(HASKELL_HIDE_PACKAGES),sed -i 's/^exposed: 
True$$/exposed: False/' $$pkg_config;) \
install -Dm 644 $$pkg_config debian/$(notdir 
$@)/var/lib/ghc/package.conf.d/$$pkg_config; \
rm -f $$pkg_config
-   if [ 'z$(DEB_GHC_EXTRA_PACKAGES)' != 'z' ] ; then \
+   if [ "z$(DEB_GHC_EXTRA_PACKAGES)" != "z" ] ; then \
mkdir -p debian/$(notdir 
$@)/usr/lib/haskell-packages/extra-packages; \
echo '$(DEB_GHC_EXTRA_PACKAGES)' > debian/$(notdir 
$@)/usr/lib/haskell-packages/extra-packages/$(CABAL_PACKAGE)-$(CABAL_VERSION) ; 
\
fi
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1427549328-27951-3-git-send-email-...@seereason.com



[PATCH 07/11] Turn the Make rules into shell functions (fixed linebreaks)

2015-03-28 Thread David Fox
---
 Dh_Haskell.sh  | 137 +++
 Dh_Haskell.sh.orig | 322 +
 hlibrary.mk|  79 +++--
 hlibrary.mk.orig   |   2 +-
 4 files changed, 475 insertions(+), 65 deletions(-)
 create mode 100644 Dh_Haskell.sh.orig

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index f0a2002..4e56b64 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -283,6 +283,143 @@ find_config_for_ghc(){
 done
 }
 
+clean_recipe(){
+DEB_SETUP_BIN_NAME=$1
+CABAL_PACKAGE=$2
+MAKEFILE=$3
+DEB_LINTIAN_OVERRIDES_FILE=$4
+[ ! -x "${DEB_SETUP_BIN_NAME}" ] || ${DEB_SETUP_BIN_NAME} clean
+rm -rf dist dist-ghc dist-hugs ${DEB_SETUP_BIN_NAME} Setup.hi Setup.ho 
Setup.o .*config*
+rm -f configure-ghc-stamp build-ghc-stamp build-hugs-stamp 
build-haddock-stamp
+rm -rf debian/tmp-inst-ghc
+rm -f debian/extra-depends
+rm -f debian/libghc-${CABAL_PACKAGE}-doc.links
+if [ -f ${DEB_LINTIAN_OVERRIDES_FILE} ] ; then 
\
+  sed -i '/binary-or-shlib-defines-rpath/ d' ${DEB_LINTIAN_OVERRIDES_FILE} 
;   \
+  find ${DEB_LINTIAN_OVERRIDES_FILE} -empty -delete;   
\
+fi
+
+rm -f ${MAKEFILE}
+rm -rf debian/dh_haskell_shlibdeps
+}
+
+make_setup_recipe(){
+DEB_SETUP_BIN_NAME=$1
+for setup in Setup.lhs Setup.hs; do if test -e $setup; then ghc --make 
$setup -o ${DEB_SETUP_BIN_NAME}; exit 0; fi; done
+}
+
+configure_recipe(){
+DEB_SETUP_BIN_NAME=$1
+CABAL_PACKAGE=$2
+DEB_HADDOCK_DIR=$3
+DEB_HADDOCK_HTML_DIR=$4
+ENABLE_PROFILING=$5
+NO_GHCI_FLAG=$6
+DEB_SETUP_GHC6_CONFIGURE_ARGS=$7
+DEB_SETUP_GHC_CONFIGURE_ARGS=$8
+OPTIMIZATION=$9
+TESTS=$10
+COMPILERS=$11
+
+local GHC_OPTIONS
+for i in `dpkg-buildflags --get LDFLAGS`; do GHC_OPTIONS="$GHC_OPTIONS 
-optl$i"; done
+
+${DEB_SETUP_BIN_NAME} configure ${COMPILERS} -v2 
--package-db=/var/lib/ghc/package.conf.d \
+--prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib \
+   --builddir=dist-ghc \
+   --ghc-options="${GHC_OPTIONS}" \
+   --haddockdir=${DEB_HADDOCK_DIR} --datasubdir=${CABAL_PACKAGE}\
+   --htmldir=${DEB_HADDOCK_HTML_DIR} ${ENABLE_PROFILING} ${NO_GHCI_FLAG} \
+   ${DEB_SETUP_GHC6_CONFIGURE_ARGS} ${DEB_SETUP_GHC_CONFIGURE_ARGS} 
${OPTIMIZATION} ${TESTS}
+}
+
+build_recipe(){
+DEB_SETUP_BIN_NAME=$1
+COMPILER=$2
+${DEB_SETUP_BIN_NAME} build --builddir=dist-${COMPILER}
+}
+
+check_recipe(){
+DEB_SETUP_BIN_NAME=$1
+DEB_DEFAULT_COMPILER=$2
+DEB_PACKAGES=$3
+hc=`packages_hc "${DEB_DEFAULT_COMPILER}" "${DEB_PACKAGES}"`
+${DEB_SETUP_BIN_NAME} test --builddir=dist-${hc} --show-details=always
+}
+
+haddock_recipe(){
+DEB_SETUP_BIN_NAME=$1
+DEB_HADDOCK_OPTS=$2
+COMPILER=$3
+[ ! -x /usr/bin/haddock ] || ${DEB_SETUP_BIN_NAME} haddock 
--builddir=dist-${COMPILER} --with-haddock=/usr/bin/haddock 
--with-ghc=${COMPILER} ${DEB_HADDOCK_OPTS} || \
+ echo "Haddock failed (no modules?), creating empty documentation 
package."
+}
+
+extra_depends_recipe(){
+DEB_SETUP_BIN_NAME=$1
+pkg_config=`${DEB_SETUP_BIN_NAME} register --builddir=dist-ghc 
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`
+dh_haskell_extra_depends $pkg_config
+rm $pkg_config
+}
+
+install_dev_recipe(){
+DEB_SETUP_BIN_NAME=$1
+CABAL_PACKAGE=$2
+CABAL_VERSION=$3
+HASKELL_HIDE_PACKAGES=$4
+DEB_GHC_EXTRA_PACKAGES=$5
+DEB_LINTIAN_OVERRIDES_FILE=$6
+PKG=$7
+( cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; 
find usr/lib/haskell-packages/ghc/lib/ \
+   \( ! -name "*_p.a" ! -name "*.p_hi" ! -type d \) \
+   -exec install -Dm 644 '{}' ../${PKG}/'{}' ';' )
+pkg_config=`${DEB_SETUP_BIN_NAME} register --builddir=dist-ghc 
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`
+if [ "${HASKELL_HIDE_PACKAGES}" ]; then sed -i 's/^exposed: True$/exposed: 
False/' $pkg_config; fi
+install -Dm 644 $pkg_config 
debian/${PKG}/var/lib/ghc/package.conf.d/$pkg_config
+rm -f $pkg_config
+if [ "z${DEB_GHC_EXTRA_PACKAGES}" != "z" ] ; then
+   mkdir -p debian/$(notdir $@)/usr/lib/haskell-packages/extra-packages; \
+   echo '${DEB_GHC_EXTRA_PACKAGES}' > 
debian/${PKG}/usr/lib/haskell-packages/extra-packages/${CABAL_PACKAGE}-${CABAL_VERSION}
+fi
+
+grep -s binary-or-shlib-defines-rpath ${DEB_LINTIAN_OVERRIDES_FILE} \
+   || echo binary-or-shlib-defines-rpath >> ${DEB_LINTIAN_OVERRIDES_FILE}
+dh_haskell_provides -p${PKG}
+dh_haskell_depends -p${PKG}
+dh_haskell_shlibdeps -p${PKG}
+}
+
+install_prof_recipe(){
+PKG=$1
+( cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; 
find usr/lib/haskell-packages/ghc/lib/ \
+! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
+-exec install -Dm 644 '{}' ../${PKG}/'{}' ';' )
+dh_haskell_provides -p${PKG}
+dh_haskell_depends -p${PKG}
+}
+

[PATCH 11/11] Debugging code (disabled) (fixed linebreaks)

2015-03-28 Thread David Fox
---
 Dh_Haskell.sh| 20 
 Dh_Haskell.sh.orig   | 22 +-
 dh_haskell_blurbs|  3 +++
 dh_haskell_depends   |  3 +++
 dh_haskell_extra_depends |  3 +++
 dh_haskell_provides  |  3 +++
 dh_haskell_shlibdeps |  3 +++
 7 files changed, 52 insertions(+), 5 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 7cc690a..6b783b0 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -340,6 +340,7 @@ find_config_for_ghc(){
 }
 
 clean_recipe(){
+# local PS5=$PS4; PS4=" + clean_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 CABAL_PACKAGE=$2
 MAKEFILE=$3
@@ -357,14 +358,18 @@ clean_recipe(){
 
 rm -f ${MAKEFILE}
 rm -rf debian/dh_haskell_shlibdeps
+# PS4=$PS5
 }
 
 make_setup_recipe(){
+# local PS5=$PS4; PS4=" + make_setup_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 for setup in Setup.lhs Setup.hs; do if test -e $setup; then ghc --make 
$setup -o ${DEB_SETUP_BIN_NAME}; exit 0; fi; done
+# PS4=$PS5
 }
 
 configure_recipe(){
+# local PS5=$PS4; PS4=" + configure_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 CABAL_PACKAGE=$2
 CABAL_VERSION=$3
@@ -390,25 +395,31 @@ configure_recipe(){
--haddockdir=/`hc_docdir ${hc} ${CABAL_PACKAGE}-${CABAL_VERSION}` 
--datasubdir=${CABAL_PACKAGE}\
--htmldir=/`hc_htmldir ${hc} ${CABAL_PACKAGE}` ${ENABLE_PROFILING} 
${NO_GHCI_FLAG} \
${DEB_SETUP_GHC6_CONFIGURE_ARGS} ${DEB_SETUP_GHC_CONFIGURE_ARGS} 
${OPTIMIZATION} ${TESTS}
+# PS4=$PS5
 }
 
 build_recipe(){
+# local PS5=$PS4; PS4=" + build_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 DEB_DEFAULT_COMPILER=$2
 DEB_PACKAGES=$3
 hc=`packages_hc "${DEB_DEFAULT_COMPILER}" "${DEB_PACKAGES}"`
 ${DEB_SETUP_BIN_NAME} build --builddir=dist-${hc}
+# PS4=$PS5
 }
 
 check_recipe(){
+# local PS5=$PS4; PS4=" + check_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 DEB_DEFAULT_COMPILER=$2
 DEB_PACKAGES=$3
 hc=`packages_hc "${DEB_DEFAULT_COMPILER}" "${DEB_PACKAGES}"`
 ${DEB_SETUP_BIN_NAME} test --builddir=dist-${hc} --show-details=always
+# PS4=$PS5
 }
 
 haddock_recipe(){
+# local PS5=$PS4; PS4=" + haddock_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 DEB_HADDOCK_OPTS=$2
 DEB_DEFAULT_COMPILER=$3
@@ -417,17 +428,21 @@ haddock_recipe(){
 haddock=`hc_haddock ${hc}`
 [ ! -x /usr/bin/${haddock} ] || ${DEB_SETUP_BIN_NAME} haddock 
--builddir=dist-${hc} --with-haddock=/usr/bin/${haddock} --with-ghc=${hc} 
${DEB_HADDOCK_OPTS} || \
  echo "Haddock failed (no modules?), creating empty documentation 
package."
+# PS4=$PS5
 }
 
 extra_depends_recipe(){
+# local PS5=$PS4; PS4=" + extra_depends_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 hc=$2
 pkg_config=`${DEB_SETUP_BIN_NAME} register --builddir=dist-${hc} 
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`
 dh_haskell_extra_depends ${hc} $pkg_config
 rm $pkg_config
+# PS4=$PS5
 }
 
 install_dev_recipe(){
+# local PS5=$PS4; PS4=" + install_dev_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 CABAL_PACKAGE=$2
 CABAL_VERSION=$3
@@ -457,9 +472,11 @@ install_dev_recipe(){
 dh_haskell_provides -p${PKG}
 dh_haskell_depends -p${PKG}
 dh_haskell_shlibdeps -p${PKG}
+# PS4=$PS5
 }
 
 install_prof_recipe(){
+# local PS5=$PS4; PS4=" + install_prof_recipe> "; set -x
 PKG=$1
 libdir=`package_libdir ${PKG}`
 ( cd debian/tmp-inst-`package_hc ${PKG}` ; mkdir -p ${libdir} ; find 
${libdir}/ \
@@ -467,9 +484,11 @@ install_prof_recipe(){
 -exec install -Dm 644 '{}' ../${PKG}/'{}' ';' )
 dh_haskell_provides -p${PKG}
 dh_haskell_depends -p${PKG}
+# PS4=$PS5
 }
 
 install_doc_recipe(){
+# local PS5=$PS4; PS4=" + install_doc_recipe> "; set -x
 CABAL_PACKAGE=$1
 CABAL_VERSION=$2
 DEB_ENABLE_HOOGLE=$3
@@ -493,6 +512,7 @@ install_doc_recipe(){
 sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, 
debian/lib${hc}-${CABAL_PACKAGE}-doc.links
 fi
 dh_haskell_depends -p${PKG}
+# PS4=$PS5
 }
 
 if ! [ `which grep-dctrl` > /dev/null ] ; then
diff --git a/Dh_Haskell.sh.orig b/Dh_Haskell.sh.orig
index 1e1fce6..7cc690a 100644
--- a/Dh_Haskell.sh.orig
+++ b/Dh_Haskell.sh.orig
@@ -6,6 +6,14 @@ os(){
   ghc -e 'putStr System.Info.os'
 }
 
+ghcjs_version(){
+  ghcjs --numeric-ghcjs-version
+}
+
+ghcjs_ghc_version(){
+  ghcjs --numeric-ghc-version
+}
+
 package_prefix(){
 echo $1 | sed -n -e 's|^\([^-]*\)-.*-[^-]*$|\1|p'
 }
@@ -35,6 +43,7 @@ packages_hc(){
 hc_libdir(){
 case $1 in
   ghc) echo "usr/lib/haskell-packages/ghc/lib";;
+  ghcjs) echo "usr/lib/ghcjs/.cabal/lib";;
   *) echo "Don't know package_libdir for $1" >&2; exit 1;;
 esac
 }
@@ -46,6 +55,7 @@ package_libdir(){
 hc_pkgdir(){
 case $1 in
ghc) echo "var/lib/ghc/package.conf.d";;
+ghcjs) echo 
"usr/lib/ghcjs/.ghcjs/`cpu`-`os`-`ghcjs_version`-`ghcjs_ghc_version`/ghcjs/package.conf.d";;
 *) echo "Don't kn

[PATCH 05/11] Reword some error messages and indicate where they originate (fixed linebreaks)

2015-03-28 Thread David Fox
---
 dh_haskell_depends   | 2 +-
 dh_haskell_provides  | 2 +-
 dh_haskell_shlibdeps | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dh_haskell_depends b/dh_haskell_depends
index 4917092..f23271b 100644
--- a/dh_haskell_depends
+++ b/dh_haskell_depends
@@ -68,7 +68,7 @@ for pkg in `dh_listpackages $args`; do
cfiles="$files"
fi
if [ -z "$cfiles" ] ; then
- echo "No installed package description files can not be found" >&2
+ echo "dh_haskell_depends - no installed package description files 
found" >&2
  exit 1
fi
case "$pkg" in
diff --git a/dh_haskell_provides b/dh_haskell_provides
index fca4894..cf4923c 100644
--- a/dh_haskell_provides
+++ b/dh_haskell_provides
@@ -74,7 +74,7 @@ for pkg in `dh_listpackages $args`; do
cfiles="$files"
fi
if [ -z "$cfiles" ] ; then
- echo "No installed package description files can not be found" >&2
+ echo "dh_haskell_provides - no installed package description 
files found" >&2
  exit 1
fi
case "$pkg" in
diff --git a/dh_haskell_shlibdeps b/dh_haskell_shlibdeps
index 0247e4e..45a1a05 100644
--- a/dh_haskell_shlibdeps
+++ b/dh_haskell_shlibdeps
@@ -42,7 +42,7 @@ done
 
 if [ -z "$files" ]
 then
-   echo "No installed package description files can not be found" >&2
+   echo "dh_haskell_shlibdeps - no installed package description files 
found" >&2
exit 1
 fi
 
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1427549328-27951-5-git-send-email-...@seereason.com



[PATCH 04/11] Pass --with-haddock and --with-ghc to haddock, --package-db to cabal configure (fixed linebreaks)

2015-03-28 Thread David Fox
---
 hlibrary.mk  | 4 ++--
 hlibrary.mk.orig | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hlibrary.mk b/hlibrary.mk
index 20e831a..1e16de9 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -113,7 +113,7 @@ $(DEB_SETUP_BIN_NAME):
for setup in Setup.lhs Setup.hs; do if test -e $$setup; then ghc --make 
$$setup -o $(DEB_SETUP_BIN_NAME); exit 0; fi; done
 
 configure-ghc-stamp: $(DEB_SETUP_BIN_NAME)
-   $(DEB_SETUP_BIN_NAME) configure --ghc -v2 \
+   $(DEB_SETUP_BIN_NAME) configure --ghc -v2 
--package-db=/var/lib/ghc/package.conf.d \
--prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib \
--builddir=dist-ghc \
--ghc-options="-optl$$(dpkg-buildflags --get LDFLAGS)" \
@@ -145,7 +145,7 @@ endif
 build/libghc-$(CABAL_PACKAGE)-prof build/libghc-$(CABAL_PACKAGE)-dev:: 
build-ghc-stamp check-ghc-stamp
 
 build-haddock-stamp:
-   [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock 
--builddir=dist-ghc $(DEB_HADDOCK_OPTS) || \
+   [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock 
--builddir=dist-ghc --with-haddock=/usr/bin/haddock --with-ghc=ghc 
$(DEB_HADDOCK_OPTS) || \
  echo "Haddock failed (no modules?), creating empty documentation 
package."
touch build-haddock-stamp
 
diff --git a/hlibrary.mk.orig b/hlibrary.mk.orig
index 5408863..237efd1 100644
--- a/hlibrary.mk.orig
+++ b/hlibrary.mk.orig
@@ -113,7 +113,7 @@ $(DEB_SETUP_BIN_NAME):
for setup in Setup.lhs Setup.hs; do if test -e $$setup; then ghc --make 
$$setup -o $(DEB_SETUP_BIN_NAME); exit 0; fi; done
 
 configure-ghc-stamp: $(DEB_SETUP_BIN_NAME)
-   $(DEB_SETUP_BIN_NAME) configure --ghc -v2 \
+   $(DEB_SETUP_BIN_NAME) configure --ghc -v2 
--package-db=/var/lib/ghc/package.conf.d \
--prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib \
--builddir=dist-ghc \
--ghc-options="-optl$$(dpkg-buildflags --get LDFLAGS)" \
@@ -149,7 +149,7 @@ build-haddock-stamp:
  echo "Haddock failed (no modules?), creating empty documentation 
package."
touch build-haddock-stamp
 
-build/haskell-$(CABAL_PACKAGE)-doc build/libghc-$(CABAL_PACKAGE)-doc:: 
configure-ghc-stamp build-haddock-stamp
+build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp
 
 dist-hugs: $(DEB_SETUP_BIN_NAME)
$(DEB_SETUP_BIN_NAME) configure --hugs --prefix=/usr -v2 
--builddir=dist-hugs $(DEB_SETUP_HUGS_CONFIGURE_ARGS)
@@ -193,7 +193,7 @@ install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc 
install/libghc-$(CABA
dh_haskell_provides -p$(notdir $@)
dh_haskell_depends -p$(notdir $@)
 
-install/haskell-$(CABAL_PACKAGE)-doc install/libghc-$(CABAL_PACKAGE)-doc:: 
debian/tmp-inst-ghc build-haddock-stamp debian/extra-depends
+install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc build-haddock-stamp 
debian/extra-depends
mkdir -p debian/$(notdir $@)/$(DEB_HADDOCK_HTML_DIR)
cd debian/tmp-inst-ghc/ ; find ./$(DEB_HADDOCK_HTML_DIR)/ \
! -name "*.haddock" -exec install -Dm 644 '{}' \
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1427549328-27951-4-git-send-email-...@seereason.com



[PATCH 01/11] Allow building of documentation when when package has no Haskell modules (fixed linebreaks)

2015-03-28 Thread David Fox
---
 hlibrary.mk  |   7 +-
 hlibrary.mk.orig | 229 +++
 2 files changed, 233 insertions(+), 3 deletions(-)
 create mode 100644 hlibrary.mk.orig

diff --git a/hlibrary.mk b/hlibrary.mk
index b7f046b..fb91ca5 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -145,7 +145,8 @@ endif
 build/libghc-$(CABAL_PACKAGE)-prof build/libghc-$(CABAL_PACKAGE)-dev:: 
build-ghc-stamp check-ghc-stamp
 
 build-haddock-stamp:
-   [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock 
--builddir=dist-ghc $(DEB_HADDOCK_OPTS)
+   [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock 
--builddir=dist-ghc $(DEB_HADDOCK_OPTS) || \
+ echo "Haddock failed (no modules?), creating empty documentation 
package."
touch build-haddock-stamp
 
 build/haskell-$(CABAL_PACKAGE)-doc build/libghc-$(CABAL_PACKAGE)-doc:: 
configure-ghc-stamp build-haddock-stamp
@@ -167,7 +168,7 @@ debian/extra-depends: debian/tmp-inst-ghc
 DEB_LINTIAN_OVERRIDES_FILE = 
debian/libghc-$(CABAL_PACKAGE)-dev.lintian-overrides
 
 install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/extra-depends
-   cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+   cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; 
find usr/lib/haskell-packages/ghc/lib/ \
\( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc 
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`; \
@@ -186,7 +187,7 @@ install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc 
debian/extra-depends
dh_haskell_shlibdeps -p$(notdir $@)
 
 install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc 
install/libghc-$(CABAL_PACKAGE)-dev debian/extra-depends
-   cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+   cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; 
find usr/lib/haskell-packages/ghc/lib/ \
! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
dh_haskell_provides -p$(notdir $@)
diff --git a/hlibrary.mk.orig b/hlibrary.mk.orig
new file mode 100644
index 000..b7f046b
--- /dev/null
+++ b/hlibrary.mk.orig
@@ -0,0 +1,229 @@
+# -*- mode: makefile -*-
+# Copyright 2008 Kari Pahula 
+# Description: A class for Haskell library packages
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+export GREP_OPTIONS :=
+
+# Set a dummy HOME variable upon build. Some build daemons do not set HOME, but
+# cabal expects it to be available.
+export HOME = /homedoesnotexistatbuildtime
+
+
+DEB_CABAL_PACKAGE ?= $(shell cat *.cabal |\
+ perl -ne \
+ 'if (/^name\s*:\s*(.*?)\s*$$/i) {$$_ = $$1; tr/A-Z/a-z/; print; exit 0;}')
+CABAL_PACKAGE=$(DEB_CABAL_PACKAGE)
+CABAL_VERSION=$(shell cat *.cabal | egrep -i '^\s*version:' | head -n1 | sed 
-r 's,^\s*version:\s*,,i'| sed -r 's,\s*$$,,i')
+
+DEB_ENABLE_TESTS ?= no
+DEB_ENABLE_HOOGLE ?= yes
+
+DEB_DH_GENCONTROL_ARGS_libghc-$(CABAL_PACKAGE)-dev += -- 
'-DGHC-Package=$${haskell:ghc-package}'
+
+ifneq (,$(filter libghc-$(CABAL_PACKAGE)-prof,$(DEB_PACKAGES)))
+ENABLE_PROFILING = --enable-library-profiling
+endif
+
+NO_GHCI_FLAG = $(shell test -e /usr/bin/ghci || echo 
--ghc-option=-DDEBIAN_NO_GHCI; exit 0)
+
+DEB_COMPRESS_EXCLUDE += .haddock .hs .txt
+
+# We do not want to take dependency information
+# from libHS*.so files, because
+# * dh_haskell_shlibs takes care of that and
+# * it would introduced unwanted dependencies on libgmp
+# If the latter can be avoided, this could be changed to
+# DEB_DH_SHLIBDEPS_ARGS_ALL += -- --ignore-missing-info
+# (because we do not (yet) have shlibs files for libHS libraries)
+DEB_DH_SHLIBDEPS_ARGS_ALL += -XlibHS
+DEB_DH_MAKESHLIBS_ARGS_ALL += -XlibHS
+
+# TODO:
+# - some of this would probably be useful for generic Haskell programs,
+#   not just libraries
+# - provide more hooks
+# - get this included in the cdbs package once this gets mature enough (maybe?)
+
+DEB_SETUP_BIN_NAME ?= debian/hlibrary.setup
+DEB_HADDOCK_HTML_DIR ?= /usr/share/doc/libghc-$(CABAL_PACKAGE)-doc/html/
+
+# most likely you don't need to touch this one
+GHC6_VERSION = $(shell ghc --numeric-version)
+GHC_VERSION = $(shell ghc --numeric-

[PATCH 02/11] Fix a bash error - single quote prevents expansion of shell variables (fixed linebreaks)

2015-03-28 Thread David Fox
---
 hlibrary.mk  | 2 +-
 hlibrary.mk.orig | 7 ---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/hlibrary.mk b/hlibrary.mk
index fb91ca5..5408863 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -175,7 +175,7 @@ install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc 
debian/extra-depends
$(if $(HASKELL_HIDE_PACKAGES),sed -i 's/^exposed: 
True$$/exposed: False/' $$pkg_config;) \
install -Dm 644 $$pkg_config debian/$(notdir 
$@)/var/lib/ghc/package.conf.d/$$pkg_config; \
rm -f $$pkg_config
-   if [ 'z$(DEB_GHC_EXTRA_PACKAGES)' != 'z' ] ; then \
+   if [ "z$(DEB_GHC_EXTRA_PACKAGES)" != "z" ] ; then \
mkdir -p debian/$(notdir 
$@)/usr/lib/haskell-packages/extra-packages; \
echo '$(DEB_GHC_EXTRA_PACKAGES)' > debian/$(notdir 
$@)/usr/lib/haskell-packages/extra-packages/$(CABAL_PACKAGE)-$(CABAL_VERSION) ; 
\
fi
diff --git a/hlibrary.mk.orig b/hlibrary.mk.orig
index b7f046b..fb91ca5 100644
--- a/hlibrary.mk.orig
+++ b/hlibrary.mk.orig
@@ -145,7 +145,8 @@ endif
 build/libghc-$(CABAL_PACKAGE)-prof build/libghc-$(CABAL_PACKAGE)-dev:: 
build-ghc-stamp check-ghc-stamp
 
 build-haddock-stamp:
-   [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock 
--builddir=dist-ghc $(DEB_HADDOCK_OPTS)
+   [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock 
--builddir=dist-ghc $(DEB_HADDOCK_OPTS) || \
+ echo "Haddock failed (no modules?), creating empty documentation 
package."
touch build-haddock-stamp
 
 build/haskell-$(CABAL_PACKAGE)-doc build/libghc-$(CABAL_PACKAGE)-doc:: 
configure-ghc-stamp build-haddock-stamp
@@ -167,7 +168,7 @@ debian/extra-depends: debian/tmp-inst-ghc
 DEB_LINTIAN_OVERRIDES_FILE = 
debian/libghc-$(CABAL_PACKAGE)-dev.lintian-overrides
 
 install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/extra-depends
-   cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+   cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; 
find usr/lib/haskell-packages/ghc/lib/ \
\( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc 
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`; \
@@ -186,7 +187,7 @@ install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc 
debian/extra-depends
dh_haskell_shlibdeps -p$(notdir $@)
 
 install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc 
install/libghc-$(CABAL_PACKAGE)-dev debian/extra-depends
-   cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+   cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; 
find usr/lib/haskell-packages/ghc/lib/ \
! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
dh_haskell_provides -p$(notdir $@)
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1427549328-27951-2-git-send-email-...@seereason.com



Re: [PATCH 00/11] Series of patches to support ghcjs packages

2015-03-27 Thread David Fox
These changes are available at
https://github.com/seereason/haskell-devscripts.

On Fri, Mar 27, 2015 at 8:41 AM, David Fox  wrote:

> These eleven patches start with some bug fixes, followed by some
> fairly major changes to parameterize the haskell compiler name,
> finally adding support for ghcjs specifically.  A lot of the changes
> are due to translating make rules to bash code, moving them from
> hlibrary.mk to Dh_Haskell.sh, leaving function calls in hlibrary.mk.
> Then additional rules are added to hlibrary.mk for the ghcjs packages,
> with modified function parameters.  Finally, some disabled debugging
> code is added to give a nice trace of the execution, but this patch is
> optional.
>
> I've successfully built about 100 ghc packages and 50 ghcjs packages
> with these changes.
>
> David Fox (11):
>   Allow building of documentation when when package has no Haskell
> modules
>   Fix a bash error - single quote prevents expansion of shell variables
>   Remove support for obsolete doc package prefix 'haskell-'
>   Pass --with-haddock and --with-ghc to haddock, --package-db to cabal
> configure
>   Reword some error messages and indicate where they originate
>   Add functions to Dh_Haskell.hs
>   Turn the Make rules into shell functions
>   Parameterize the compiler name
>   Add support for building ghcjs packages
>   Add a compiler parameter to the dh_haskell_blurbs script
>   Debugging code (disabled)
>
>  Dh_Haskell.sh| 343
> ---
>  dh_haskell_blurbs|  24 +++-
>  dh_haskell_depends   |  30 +++--
>  dh_haskell_extra_depends |   8 +-
>  dh_haskell_provides  |  26 ++--
>  dh_haskell_shlibdeps |  15 ++-
>  hlibrary.mk  | 121 +++--
>  7 files changed, 438 insertions(+), 129 deletions(-)
>
> --
> 1.9.1
>
>
> --
> To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
> Archive:
> https://lists.debian.org/cam8c2cdb8q9fraq-raomkrvoovhuehqloa+2yauovnh4_7-...@mail.gmail.com
>
>


Re: [PATCH 00/11] Series of patches to support ghcjs packages

2015-03-27 Thread David Fox
Ugh, I think maybe gmail's line wrapping broke these patches.

On Fri, Mar 27, 2015 at 8:46 AM, David Fox  wrote:

> I should have mentioned that these patches are for the haskell-devscripts
> package.  Also, I've been using them for over a year, the 150 builds I
> mention are just for this version 0.9 compatibility update.
>
> On Fri, Mar 27, 2015 at 8:41 AM, David Fox  wrote:
>
>> These eleven patches start with some bug fixes, followed by some
>> fairly major changes to parameterize the haskell compiler name,
>> finally adding support for ghcjs specifically.  A lot of the changes
>> are due to translating make rules to bash code, moving them from
>> hlibrary.mk to Dh_Haskell.sh, leaving function calls in hlibrary.mk.
>> Then additional rules are added to hlibrary.mk for the ghcjs packages,
>> with modified function parameters.  Finally, some disabled debugging
>> code is added to give a nice trace of the execution, but this patch is
>> optional.
>>
>> I've successfully built about 100 ghc packages and 50 ghcjs packages
>> with these changes.
>>
>> David Fox (11):
>>   Allow building of documentation when when package has no Haskell
>> modules
>>   Fix a bash error - single quote prevents expansion of shell variables
>>   Remove support for obsolete doc package prefix 'haskell-'
>>   Pass --with-haddock and --with-ghc to haddock, --package-db to cabal
>> configure
>>   Reword some error messages and indicate where they originate
>>   Add functions to Dh_Haskell.hs
>>   Turn the Make rules into shell functions
>>   Parameterize the compiler name
>>   Add support for building ghcjs packages
>>   Add a compiler parameter to the dh_haskell_blurbs script
>>   Debugging code (disabled)
>>
>>  Dh_Haskell.sh| 343
>> ---
>>  dh_haskell_blurbs|  24 +++-
>>  dh_haskell_depends   |  30 +++--
>>  dh_haskell_extra_depends |   8 +-
>>  dh_haskell_provides  |  26 ++--
>>  dh_haskell_shlibdeps |  15 ++-
>>  hlibrary.mk  | 121 +++--
>>  7 files changed, 438 insertions(+), 129 deletions(-)
>>
>> --
>> 1.9.1
>>
>>
>> --
>> To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
>> with a subject of "unsubscribe". Trouble? Contact
>> listmas...@lists.debian.org
>> Archive:
>> https://lists.debian.org/cam8c2cdb8q9fraq-raomkrvoovhuehqloa+2yauovnh4_7-...@mail.gmail.com
>>
>>
>


Re: [PATCH 00/11] Series of patches to support ghcjs packages

2015-03-27 Thread David Fox
I should have mentioned that these patches are for the haskell-devscripts
package.  Also, I've been using them for over a year, the 150 builds I
mention are just for this version 0.9 compatibility update.

On Fri, Mar 27, 2015 at 8:41 AM, David Fox  wrote:

> These eleven patches start with some bug fixes, followed by some
> fairly major changes to parameterize the haskell compiler name,
> finally adding support for ghcjs specifically.  A lot of the changes
> are due to translating make rules to bash code, moving them from
> hlibrary.mk to Dh_Haskell.sh, leaving function calls in hlibrary.mk.
> Then additional rules are added to hlibrary.mk for the ghcjs packages,
> with modified function parameters.  Finally, some disabled debugging
> code is added to give a nice trace of the execution, but this patch is
> optional.
>
> I've successfully built about 100 ghc packages and 50 ghcjs packages
> with these changes.
>
> David Fox (11):
>   Allow building of documentation when when package has no Haskell
> modules
>   Fix a bash error - single quote prevents expansion of shell variables
>   Remove support for obsolete doc package prefix 'haskell-'
>   Pass --with-haddock and --with-ghc to haddock, --package-db to cabal
> configure
>   Reword some error messages and indicate where they originate
>   Add functions to Dh_Haskell.hs
>   Turn the Make rules into shell functions
>   Parameterize the compiler name
>   Add support for building ghcjs packages
>   Add a compiler parameter to the dh_haskell_blurbs script
>   Debugging code (disabled)
>
>  Dh_Haskell.sh| 343
> ---
>  dh_haskell_blurbs|  24 +++-
>  dh_haskell_depends   |  30 +++--
>  dh_haskell_extra_depends |   8 +-
>  dh_haskell_provides  |  26 ++--
>  dh_haskell_shlibdeps |  15 ++-
>  hlibrary.mk  | 121 +++--
>  7 files changed, 438 insertions(+), 129 deletions(-)
>
> --
> 1.9.1
>
>
> --
> To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
> Archive:
> https://lists.debian.org/cam8c2cdb8q9fraq-raomkrvoovhuehqloa+2yauovnh4_7-...@mail.gmail.com
>
>


[PATCH 09/11] Add support for building ghcjs packages

2015-03-27 Thread David Fox
---
 Dh_Haskell.sh | 22 +-
 hlibrary.mk   | 21 +
 2 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 1e1fce6..7cc690a 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -6,6 +6,14 @@ os(){
   ghc -e 'putStr System.Info.os'
 }

+ghcjs_version(){
+  ghcjs --numeric-ghcjs-version
+}
+
+ghcjs_ghc_version(){
+  ghcjs --numeric-ghc-version
+}
+
 package_prefix(){
 echo $1 | sed -n -e 's|^\([^-]*\)-.*-[^-]*$|\1|p'
 }
@@ -35,6 +43,7 @@ packages_hc(){
 hc_libdir(){
 case $1 in
   ghc) echo "usr/lib/haskell-packages/ghc/lib";;
+  ghcjs) echo "usr/lib/ghcjs/.cabal/lib";;
   *) echo "Don't know package_libdir for $1" >&2; exit 1;;
 esac
 }
@@ -46,6 +55,7 @@ package_libdir(){
 hc_pkgdir(){
 case $1 in
  ghc) echo "var/lib/ghc/package.conf.d";;
+ghcjs) echo
"usr/lib/ghcjs/.ghcjs/`cpu`-`os`-`ghcjs_version`-`ghcjs_ghc_version`/ghcjs/package.conf.d";;
 *) echo "Don't know pkgdir for $1" >&2; exit 1;;
 esac
 }
@@ -57,6 +67,7 @@ package_pkgdir(){
 hc_prefix(){
 case $1 in
   ghc) echo "usr";;
+  ghcjs) echo "usr/lib/ghcjs";;
   *) echo "Don't know prefix for compiler $1" >&2; exit 1;;
 esac
 }
@@ -64,6 +75,7 @@ hc_prefix(){
 hc_haddock(){
 case $1 in
  ghc) echo "haddock";;
+ ghcjs) echo "haddock-ghcjs";;
  *) echo "Don't know pkgdir for $1" >&2; exit 1;;
 esac
 }
@@ -333,11 +345,11 @@ clean_recipe(){
 MAKEFILE=$3
 DEB_LINTIAN_OVERRIDES_FILE=$4
 [ ! -x "${DEB_SETUP_BIN_NAME}" ] || ${DEB_SETUP_BIN_NAME} clean
-rm -rf dist dist-ghc dist-hugs ${DEB_SETUP_BIN_NAME} Setup.hi
Setup.ho Setup.o .*config*
-rm -f configure-ghc-stamp build-ghc-stamp build-hugs-stamp
build-haddock-stamp
-rm -rf debian/tmp-inst-ghc
-rm -f debian/extra-depends-ghc
-rm -f debian/libghc-${CABAL_PACKAGE}-doc.links
+rm -rf dist dist-ghc dist-ghcjs dist-hugs ${DEB_SETUP_BIN_NAME}
Setup.hi Setup.ho Setup.o .*config*
+rm -f configure-ghc-stamp configure-ghcjs-stamp build-ghc-stamp
build-ghcjs-stamp build-hugs-stamp build-haddock-stamp
+rm -rf debian/tmp-inst-ghc debian/tmp-inst-ghcjs
+rm -f debian/extra-depends-ghc debian/extra-depends-ghcjs
+rm -f debian/libghc-${CABAL_PACKAGE}-doc.links
debian/libghcjs-${CABAL_PACKAGE}-doc.links
 if [ -f ${DEB_LINTIAN_OVERRIDES_FILE} ] ; then \
   sed -i '/binary-or-shlib-defines-rpath/ d'
${DEB_LINTIAN_OVERRIDES_FILE} ; \
   find ${DEB_LINTIAN_OVERRIDES_FILE} -empty -delete; \
diff --git a/hlibrary.mk b/hlibrary.mk
index 2c8bd76..2d04d52 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -129,12 +129,16 @@ endif

 build/libghc-$(CABAL_PACKAGE)-prof
build/libghc-$(CABAL_PACKAGE)-dev:: build-ghc-stamp check-ghc-stamp

+build/libghcjs-$(CABAL_PACKAGE)-prof
build/libghcjs-$(CABAL_PACKAGE)-dev:: build-ghc-stamp check-ghc-stamp
+
 build-haddock-stamp:
  . /usr/share/haskell-devscripts/Dh_Haskell.sh && haddock_recipe
"$(DEB_SETUP_BIN_NAME)" "$(DEB_HADDOCK_OPTS)"
"$(DEB_DEFAULT_COMPILER)" "$(DEB_PACKAGES)"
  touch build-haddock-stamp

 build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp

+build/libghcjs-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp
+
 dist-hugs: $(DEB_SETUP_BIN_NAME)
  $(DEB_SETUP_BIN_NAME) configure --hugs --prefix=/usr -v2
--builddir=dist-hugs $(DEB_SETUP_HUGS_CONFIGURE_ARGS)

@@ -144,22 +148,39 @@ build/libhugs-$(CABAL_PACKAGE):: dist-hugs
 debian/tmp-inst-ghc: $(DEB_SETUP_BIN_NAME) build-ghc-stamp
  $(DEB_SETUP_BIN_NAME) copy --builddir=dist-ghc --destdir=debian/tmp-inst-ghc

+debian/tmp-inst-ghcjs: $(DEB_SETUP_BIN_NAME) build-ghc-stamp
+ $(DEB_SETUP_BIN_NAME) copy --builddir=dist-ghcjs
--destdir=debian/tmp-inst-ghcjs
+
 debian/extra-depends-ghc: debian/tmp-inst-ghc
  . /usr/share/haskell-devscripts/Dh_Haskell.sh &&
extra_depends_recipe "$(DEB_SETUP_BIN_NAME)" ghc

+debian/extra-depends-ghcjs: debian/tmp-inst-ghcjs
+ . /usr/share/haskell-devscripts/Dh_Haskell.sh &&
extra_depends_recipe "$(DEB_SETUP_BIN_NAME)" ghcjs
+
 DEB_LINTIAN_OVERRIDES_FILE =
debian/libghc-$(CABAL_PACKAGE)-dev.lintian-overrides

 install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc
debian/extra-depends-ghc
  . /usr/share/haskell-devscripts/Dh_Haskell.sh && \
   install_dev_recipe "$(DEB_SETUP_BIN_NAME)" "$(CABAL_PACKAGE)"
"$(CABAL_VERSION)" "$(HASKELL_HIDE_PACKAGES)"
"$(DEB_GHC_EXTRA_PACKAGES)" $(DEB_LINTIAN_OVERRIDES_FILE) "$(notdir
$@)"

+install/libghcjs-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghcjs
debian/extra-depends-ghcjs
+ . /usr/share/haskell-devscripts/Dh_Haskell.sh && \
+  install_dev_recipe "$(DEB_SETUP_BIN_NAME)" "$(CABAL_PACKAGE)"
"$(CABAL_VERSION)" "$(HASKELL_HIDE_PACKAGES)"
"$(DEB_GHC_EXTRA_PACKAGES)" "$(DEB_LINTIAN_OVERRIDES_FILE)" "$(notdir
$@)"
+
 install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc
install/libghc-$(CABAL_PACKAGE)-dev debian/extra-depends-ghc
  . /usr/share/haskell-devscripts/Dh_Haskell.sh && install_prof_recipe
"$(notdir $@)"

+install/l

[PATCH 11/11] Debugging code (disabled)

2015-03-27 Thread David Fox
Optional - its nice to have this so you can uncomment and see what
haskell-devscripts is actually doing.
---
 Dh_Haskell.sh| 20 
 dh_haskell_blurbs|  3 +++
 dh_haskell_depends   |  3 +++
 dh_haskell_extra_depends |  3 +++
 dh_haskell_provides  |  3 +++
 dh_haskell_shlibdeps |  3 +++
 6 files changed, 35 insertions(+)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 7cc690a..6b783b0 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -340,6 +340,7 @@ find_config_for_ghc(){
 }

 clean_recipe(){
+# local PS5=$PS4; PS4=" + clean_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 CABAL_PACKAGE=$2
 MAKEFILE=$3
@@ -357,14 +358,18 @@ clean_recipe(){

 rm -f ${MAKEFILE}
 rm -rf debian/dh_haskell_shlibdeps
+# PS4=$PS5
 }

 make_setup_recipe(){
+# local PS5=$PS4; PS4=" + make_setup_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 for setup in Setup.lhs Setup.hs; do if test -e $setup; then ghc
--make $setup -o ${DEB_SETUP_BIN_NAME}; exit 0; fi; done
+# PS4=$PS5
 }

 configure_recipe(){
+# local PS5=$PS4; PS4=" + configure_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 CABAL_PACKAGE=$2
 CABAL_VERSION=$3
@@ -390,25 +395,31 @@ configure_recipe(){
  --haddockdir=/`hc_docdir ${hc} ${CABAL_PACKAGE}-${CABAL_VERSION}`
--datasubdir=${CABAL_PACKAGE}\
  --htmldir=/`hc_htmldir ${hc} ${CABAL_PACKAGE}` ${ENABLE_PROFILING}
${NO_GHCI_FLAG} \
  ${DEB_SETUP_GHC6_CONFIGURE_ARGS} ${DEB_SETUP_GHC_CONFIGURE_ARGS}
${OPTIMIZATION} ${TESTS}
+# PS4=$PS5
 }

 build_recipe(){
+# local PS5=$PS4; PS4=" + build_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 DEB_DEFAULT_COMPILER=$2
 DEB_PACKAGES=$3
 hc=`packages_hc "${DEB_DEFAULT_COMPILER}" "${DEB_PACKAGES}"`
 ${DEB_SETUP_BIN_NAME} build --builddir=dist-${hc}
+# PS4=$PS5
 }

 check_recipe(){
+# local PS5=$PS4; PS4=" + check_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 DEB_DEFAULT_COMPILER=$2
 DEB_PACKAGES=$3
 hc=`packages_hc "${DEB_DEFAULT_COMPILER}" "${DEB_PACKAGES}"`
 ${DEB_SETUP_BIN_NAME} test --builddir=dist-${hc} --show-details=always
+# PS4=$PS5
 }

 haddock_recipe(){
+# local PS5=$PS4; PS4=" + haddock_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 DEB_HADDOCK_OPTS=$2
 DEB_DEFAULT_COMPILER=$3
@@ -417,17 +428,21 @@ haddock_recipe(){
 haddock=`hc_haddock ${hc}`
 [ ! -x /usr/bin/${haddock} ] || ${DEB_SETUP_BIN_NAME} haddock
--builddir=dist-${hc} --with-haddock=/usr/bin/${haddock}
--with-ghc=${hc} ${DEB_HADDOCK_OPTS} || \
   echo "Haddock failed (no modules?), creating empty documentation package."
+# PS4=$PS5
 }

 extra_depends_recipe(){
+# local PS5=$PS4; PS4=" + extra_depends_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 hc=$2
 pkg_config=`${DEB_SETUP_BIN_NAME} register --builddir=dist-${hc}
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`
 dh_haskell_extra_depends ${hc} $pkg_config
 rm $pkg_config
+# PS4=$PS5
 }

 install_dev_recipe(){
+# local PS5=$PS4; PS4=" + install_dev_recipe> "; set -x
 DEB_SETUP_BIN_NAME=$1
 CABAL_PACKAGE=$2
 CABAL_VERSION=$3
@@ -457,9 +472,11 @@ install_dev_recipe(){
 dh_haskell_provides -p${PKG}
 dh_haskell_depends -p${PKG}
 dh_haskell_shlibdeps -p${PKG}
+# PS4=$PS5
 }

 install_prof_recipe(){
+# local PS5=$PS4; PS4=" + install_prof_recipe> "; set -x
 PKG=$1
 libdir=`package_libdir ${PKG}`
 ( cd debian/tmp-inst-`package_hc ${PKG}` ; mkdir -p ${libdir} ;
find ${libdir}/ \
@@ -467,9 +484,11 @@ install_prof_recipe(){
 -exec install -Dm 644 '{}' ../${PKG}/'{}' ';' )
 dh_haskell_provides -p${PKG}
 dh_haskell_depends -p${PKG}
+# PS4=$PS5
 }

 install_doc_recipe(){
+# local PS5=$PS4; PS4=" + install_doc_recipe> "; set -x
 CABAL_PACKAGE=$1
 CABAL_VERSION=$2
 DEB_ENABLE_HOOGLE=$3
@@ -493,6 +512,7 @@ install_doc_recipe(){
 sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,,
debian/lib${hc}-${CABAL_PACKAGE}-doc.links
 fi
 dh_haskell_depends -p${PKG}
+# PS4=$PS5
 }

 if ! [ `which grep-dctrl` > /dev/null ] ; then
diff --git a/dh_haskell_blurbs b/dh_haskell_blurbs
index be191bb..9113129 100644
--- a/dh_haskell_blurbs
+++ b/dh_haskell_blurbs
@@ -11,6 +11,9 @@ shift

 . /usr/share/haskell-devscripts/Dh_Haskell.sh

+# PS4=" + dh_haskell_blurbs> "
+# set -x
+
 packages=`dh_listpackages`
 hc=`packages_hc ${DEB_DEFAULT_COMPILER} ${packages}`

diff --git a/dh_haskell_depends b/dh_haskell_depends
index cd84c56..91c3a16 100644
--- a/dh_haskell_depends
+++ b/dh_haskell_depends
@@ -56,6 +56,9 @@ set -e

 . /usr/share/haskell-devscripts/Dh_Haskell.sh

+# PS4=" + dh_haskell_depends> "
+# set -x
+
 for pkg in `dh_listpackages $args`; do
 sfile=debian/$pkg.substvars
 touch $sfile
diff --git a/dh_haskell_extra_depends b/dh_haskell_extra_depends
index 513eb88..da85109 100644
--- a/dh_haskell_extra_depends
+++ b/dh_haskell_extra_depends
@@ -59,6 +59,9 @@ shift

 . /usr/share/haskell-devscripts/Dh_Haskel

[PATCH 10/11] Add a compiler parameter to the dh_haskell_blurbs script

2015-03-27 Thread David Fox
The call to packages_hc won't work without this change.
---
 dh_haskell_blurbs | 5 -
 hlibrary.mk   | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dh_haskell_blurbs b/dh_haskell_blurbs
index 6d6d3a2..be191bb 100644
--- a/dh_haskell_blurbs
+++ b/dh_haskell_blurbs
@@ -6,10 +6,13 @@

 set -e

+DEB_DEFAULT_COMPILER=$1
+shift
+
 . /usr/share/haskell-devscripts/Dh_Haskell.sh

 packages=`dh_listpackages`
-hc=`packages_hc ${packages}`
+hc=`packages_hc ${DEB_DEFAULT_COMPILER} ${packages}`

 for pkg in `dh_listpackages $args`; do
 sfile=debian/$pkg.substvars
diff --git a/hlibrary.mk b/hlibrary.mk
index 2d04d52..30dfbe4 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -188,7 +188,7 @@ install/libhugs-$(CABAL_PACKAGE)::
$(DEB_SETUP_BIN_NAME) dist-hugs debian/extra-

 # Run dh_haskell_blurbs on all packags, useful e.g. for binary packages
 $(patsubst %,install/%,$(DEB_PACKAGES)) :: install/%:
- dh_haskell_blurbs -p$(cdbs_curpkg)
+ dh_haskell_blurbs "$(DEB_DEFAULT_COMPILER)" -p$(cdbs_curpkg)


 # Support for installing executables
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CAM8C2CBBK5-g2=rAmryL2Kon=6iWpCoSu-rY0=ykrsqwn-s...@mail.gmail.com



[PATCH 08/11] Parameterize the compiler name

2015-03-27 Thread David Fox
---
 Dh_Haskell.sh| 182 +++
 dh_haskell_blurbs|  18 +++--
 dh_haskell_depends   |  25 ---
 dh_haskell_extra_depends |   5 +-
 dh_haskell_provides  |  21 +++---
 dh_haskell_shlibdeps |  10 +--
 hlibrary.mk  |  30 
 7 files changed, 185 insertions(+), 106 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 4e56b64..1e1fce6 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -68,6 +68,24 @@ hc_haddock(){
 esac
 }

+hc_docdir(){
+hc=$1
+pkgid=$2
+echo "usr/lib/${hc}-doc/haddock/${pkgid}/"
+}
+
+hc_htmldir(){
+hc=$1
+CABAL_PACKAGE=$2
+echo "usr/share/doc/lib${hc}-${CABAL_PACKAGE}-doc/html/"
+}
+
+hc_hoogle(){
+local hc
+hc=$1
+echo "/usr/lib/${hc}-doc/hoogle/"
+}
+
 strip_hash(){
  echo "$1" | sed 's/-$//'
 }
@@ -91,7 +109,10 @@ dependency(){
 }

 ghc_pkg_field(){
-ghc-pkg --global field $@ | head -n1
+hc=$1
+pkg=$2
+field=$3
+${hc}-pkg --global field ${pkg} ${field} | head -n1
 }

 providing_package_for_ghc(){
@@ -100,9 +121,11 @@ providing_package_for_ghc(){
 local dir
 local dirs
 local lib
-dep=`strip_hash $1`
-dirs=`ghc_pkg_field $dep library-dirs | grep -i ^library-dirs |
cut -d':' -f 2`
-lib=`ghc_pkg_field $dep hs-libraries | grep -i ^hs-libraries |
sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+local hc
+hc=$1
+dep=`strip_hash $2`
+dirs=`ghc_pkg_field $hc $dep library-dirs | grep -i ^library-dirs
| cut -d':' -f 2`
+lib=`ghc_pkg_field $hc $dep hs-libraries | grep -i ^hs-libraries
|  sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
 for dir in $dirs ; do
  if [ -e "${dir}/lib${lib}.a" ] ; then
 package=`dpkg-query -S ${dir}/lib${lib}.a | cut -d':' -f 1` || exit $?
@@ -118,9 +141,11 @@ providing_package_for_ghc_prof(){
 local dir
 local dirs
 local lib
-dep=`strip_hash $1`
-dirs=`ghc_pkg_field $dep library-dirs | grep -i ^library-dirs |
cut -d':' -f 2`
-lib=`ghc_pkg_field $dep hs-libraries | grep -i ^hs-libraries |
sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+local hc
+hc=$1
+dep=`strip_hash $2`
+dirs=`ghc_pkg_field $hc $dep library-dirs | grep -i ^library-dirs
| cut -d':' -f 2`
+lib=`ghc_pkg_field $hc $dep hs-libraries | grep -i ^hs-libraries
| sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
 for dir in $dirs ; do
  if [ -e "${dir}/lib${lib}_p.a" ] ; then
 package=`dpkg-query -S ${dir}/lib${lib}_p.a | cut -d':' -f 1` || exit $?
@@ -166,12 +191,14 @@ cabal_depends(){
 }

 hashed_dependency(){
+local hc
 local type
 local pkgid
 local virpkg
-type=$1
-pkgid=$2
-virtual_pkg=`package_id_to_virtual_package $type $pkgid`
+hc=$1
+type=$2
+pkgid=$3
+virtual_pkg=`package_id_to_virtual_package "${hc}" "$type" $pkgid`
 # As a transition measure, check if dpkg knows about this virtual package
 if dpkg-query -W $virtual_pkg >/dev/null 2>/dev/null;
 then
@@ -183,11 +210,14 @@ depends_for_ghc(){
 local dep
 local packages
 local pkgid
+local hc
+hc=$1
+shift
 for pkgid in `cabal_depends $@` ; do
- dep=`hashed_dependency dev $pkgid`
+ dep=`hashed_dependency ${hc} dev $pkgid`
  if [ -z "$dep" ]
  then
-  pkg=`providing_package_for_ghc $pkgid`
+  pkg=`providing_package_for_ghc $hc $pkgid`
   if [ -n "$pkg" ]
   then
   dep=`dependency $pkg`
@@ -207,11 +237,14 @@ depends_for_ghc_prof(){
 local dep
 local packages
 local pkgid
+local hc
+hc=$1
+shift
 for pkgid in `cabal_depends $@` ; do
- dep=`hashed_dependency prof $pkgid`
+ dep=`hashed_dependency ${hc} prof $pkgid`
  if [ -z "$dep" ]
  then
-  pkg=`providing_package_for_ghc_prof $pkgid`
+  pkg=`providing_package_for_ghc_prof $hc $pkgid`
   if [ -n "$pkg" ]
   then
   dep=`dependency $pkg`
@@ -228,29 +261,39 @@ depends_for_ghc_prof(){
 }

 provides_for_ghc(){
+local hc
 local dep
 local packages
+hc=$1
+shift
 for package_id in `cabal_package_ids $@` ; do
- packages="$packages, `package_id_to_virtual_package dev $package_id`"
+ packages="$packages, `package_id_to_virtual_package "${hc}" dev $package_id`"
 done
 echo $packages | sed -e 's/^,[ ]*//'
 }

 provides_for_ghc_prof(){
+local hc
 local dep
 local packages
+hc=$1
+shift
 for package_id in `cabal_package_ids $@` ; do
- packages="$packages, `package_id_to_virtual_package prof $package_id`"
+ packages="$packages, `package_id_to_virtual_package "${hc}" prof $package_id`"
 done
 echo $packages | sed -e 's/^,[ ]*//'
 }

 package_id_to_virtual_package(){
+ local hc
  local type
- type="$1"
- echo $2 | tr A-Z a-z | \
+ local pkgid
+ hc="$1"
+ type="$2"
+ pkgid="$3"
+ echo ${pkgid} | tr A-Z a-z | \
 grep '[a-z0-9]\+-[0-9\.]\+-' | \
- perl -pe 
's/([a-z0-9-]+)-([0-9\.]+)-(.)

[PATCH 07/11] Turn the Make rules into shell functions

2015-03-27 Thread David Fox
---
 Dh_Haskell.sh | 137 ++
 hlibrary.mk   |  79 +++--
 2 files changed, 152 insertions(+), 64 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index f0a2002..4e56b64 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -283,6 +283,143 @@ find_config_for_ghc(){
 done
 }

+clean_recipe(){
+DEB_SETUP_BIN_NAME=$1
+CABAL_PACKAGE=$2
+MAKEFILE=$3
+DEB_LINTIAN_OVERRIDES_FILE=$4
+[ ! -x "${DEB_SETUP_BIN_NAME}" ] || ${DEB_SETUP_BIN_NAME} clean
+rm -rf dist dist-ghc dist-hugs ${DEB_SETUP_BIN_NAME} Setup.hi
Setup.ho Setup.o .*config*
+rm -f configure-ghc-stamp build-ghc-stamp build-hugs-stamp
build-haddock-stamp
+rm -rf debian/tmp-inst-ghc
+rm -f debian/extra-depends
+rm -f debian/libghc-${CABAL_PACKAGE}-doc.links
+if [ -f ${DEB_LINTIAN_OVERRIDES_FILE} ] ; then \
+  sed -i '/binary-or-shlib-defines-rpath/ d'
${DEB_LINTIAN_OVERRIDES_FILE} ; \
+  find ${DEB_LINTIAN_OVERRIDES_FILE} -empty -delete; \
+fi
+
+rm -f ${MAKEFILE}
+rm -rf debian/dh_haskell_shlibdeps
+}
+
+make_setup_recipe(){
+DEB_SETUP_BIN_NAME=$1
+for setup in Setup.lhs Setup.hs; do if test -e $setup; then ghc
--make $setup -o ${DEB_SETUP_BIN_NAME}; exit 0; fi; done
+}
+
+configure_recipe(){
+DEB_SETUP_BIN_NAME=$1
+CABAL_PACKAGE=$2
+DEB_HADDOCK_DIR=$3
+DEB_HADDOCK_HTML_DIR=$4
+ENABLE_PROFILING=$5
+NO_GHCI_FLAG=$6
+DEB_SETUP_GHC6_CONFIGURE_ARGS=$7
+DEB_SETUP_GHC_CONFIGURE_ARGS=$8
+OPTIMIZATION=$9
+TESTS=$10
+COMPILERS=$11
+
+local GHC_OPTIONS
+for i in `dpkg-buildflags --get LDFLAGS`; do
GHC_OPTIONS="$GHC_OPTIONS -optl$i"; done
+
+${DEB_SETUP_BIN_NAME} configure ${COMPILERS} -v2
--package-db=/var/lib/ghc/package.conf.d \
+--prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib \
+ --builddir=dist-ghc \
+   --ghc-options="${GHC_OPTIONS}" \
+ --haddockdir=${DEB_HADDOCK_DIR} --datasubdir=${CABAL_PACKAGE}\
+ --htmldir=${DEB_HADDOCK_HTML_DIR} ${ENABLE_PROFILING} ${NO_GHCI_FLAG} \
+ ${DEB_SETUP_GHC6_CONFIGURE_ARGS} ${DEB_SETUP_GHC_CONFIGURE_ARGS}
${OPTIMIZATION} ${TESTS}
+}
+
+build_recipe(){
+DEB_SETUP_BIN_NAME=$1
+COMPILER=$2
+${DEB_SETUP_BIN_NAME} build --builddir=dist-${COMPILER}
+}
+
+check_recipe(){
+DEB_SETUP_BIN_NAME=$1
+DEB_DEFAULT_COMPILER=$2
+DEB_PACKAGES=$3
+hc=`packages_hc "${DEB_DEFAULT_COMPILER}" "${DEB_PACKAGES}"`
+${DEB_SETUP_BIN_NAME} test --builddir=dist-${hc} --show-details=always
+}
+
+haddock_recipe(){
+DEB_SETUP_BIN_NAME=$1
+DEB_HADDOCK_OPTS=$2
+COMPILER=$3
+[ ! -x /usr/bin/haddock ] || ${DEB_SETUP_BIN_NAME} haddock
--builddir=dist-${COMPILER} --with-haddock=/usr/bin/haddock
--with-ghc=${COMPILER} ${DEB_HADDOCK_OPTS} || \
+  echo "Haddock failed (no modules?), creating empty documentation package."
+}
+
+extra_depends_recipe(){
+DEB_SETUP_BIN_NAME=$1
+pkg_config=`${DEB_SETUP_BIN_NAME} register --builddir=dist-ghc
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`
+dh_haskell_extra_depends $pkg_config
+rm $pkg_config
+}
+
+install_dev_recipe(){
+DEB_SETUP_BIN_NAME=$1
+CABAL_PACKAGE=$2
+CABAL_VERSION=$3
+HASKELL_HIDE_PACKAGES=$4
+DEB_GHC_EXTRA_PACKAGES=$5
+DEB_LINTIAN_OVERRIDES_FILE=$6
+PKG=$7
+( cd debian/tmp-inst-ghc ; mkdir -p
usr/lib/haskell-packages/ghc/lib ; find
usr/lib/haskell-packages/ghc/lib/ \
+ \( ! -name "*_p.a" ! -name "*.p_hi" ! -type d \) \
+ -exec install -Dm 644 '{}' ../${PKG}/'{}' ';' )
+pkg_config=`${DEB_SETUP_BIN_NAME} register --builddir=dist-ghc
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`
+if [ "${HASKELL_HIDE_PACKAGES}" ]; then sed -i 's/^exposed:
True$/exposed: False/' $pkg_config; fi
+install -Dm 644 $pkg_config
debian/${PKG}/var/lib/ghc/package.conf.d/$pkg_config
+rm -f $pkg_config
+if [ "z${DEB_GHC_EXTRA_PACKAGES}" != "z" ] ; then
+   mkdir -p debian/$(notdir $@)/usr/lib/haskell-packages/extra-packages; \
+ echo '${DEB_GHC_EXTRA_PACKAGES}' >
debian/${PKG}/usr/lib/haskell-packages/extra-packages/${CABAL_PACKAGE}-${CABAL_VERSION}
+fi
+
+grep -s binary-or-shlib-defines-rpath ${DEB_LINTIAN_OVERRIDES_FILE} \
+   || echo binary-or-shlib-defines-rpath >> ${DEB_LINTIAN_OVERRIDES_FILE}
+dh_haskell_provides -p${PKG}
+dh_haskell_depends -p${PKG}
+dh_haskell_shlibdeps -p${PKG}
+}
+
+install_prof_recipe(){
+PKG=$1
+( cd debian/tmp-inst-ghc ; mkdir -p
usr/lib/haskell-packages/ghc/lib ; find
usr/lib/haskell-packages/ghc/lib/ \
+! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
+-exec install -Dm 644 '{}' ../${PKG}/'{}' ';' )
+dh_haskell_provides -p${PKG}
+dh_haskell_depends -p${PKG}
+}
+
+install_doc_recipe(){
+CABAL_PACKAGE=$1
+DEB_HADDOCK_DIR=$2
+DEB_HADDOCK_HTML_DIR=$3
+DEB_ENABLE_HOOGLE=$4
+DEB_HOOGLE_TXT_DIR=$5
+PKG=$6
+mkdir -p debian/${PKG}/${DEB_HADDOCK_HTML_DIR}
+( cd debian/

[PATCH 05/11] Reword some error messages and indicate where they originate

2015-03-27 Thread David Fox
---
 dh_haskell_depends   | 2 +-
 dh_haskell_provides  | 2 +-
 dh_haskell_shlibdeps | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dh_haskell_depends b/dh_haskell_depends
index 4917092..f23271b 100644
--- a/dh_haskell_depends
+++ b/dh_haskell_depends
@@ -68,7 +68,7 @@ for pkg in `dh_listpackages $args`; do
  cfiles="$files"
 fi
 if [ -z "$cfiles" ] ; then
-  echo "No installed package description files can not be found" >&2
+  echo "dh_haskell_depends - no installed package description
files found" >&2
   exit 1
 fi
 case "$pkg" in
diff --git a/dh_haskell_provides b/dh_haskell_provides
index fca4894..cf4923c 100644
--- a/dh_haskell_provides
+++ b/dh_haskell_provides
@@ -74,7 +74,7 @@ for pkg in `dh_listpackages $args`; do
  cfiles="$files"
 fi
 if [ -z "$cfiles" ] ; then
-  echo "No installed package description files can not be found" >&2
+  echo "dh_haskell_provides - no installed package description
files found" >&2
   exit 1
 fi
 case "$pkg" in
diff --git a/dh_haskell_shlibdeps b/dh_haskell_shlibdeps
index 0247e4e..45a1a05 100644
--- a/dh_haskell_shlibdeps
+++ b/dh_haskell_shlibdeps
@@ -42,7 +42,7 @@ done

 if [ -z "$files" ]
 then
- echo "No installed package description files can not be found" >&2
+ echo "dh_haskell_shlibdeps - no installed package description files found" >&2
  exit 1
 fi

-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CAM8C2CAx=Vbc9Tofp0vOav0yvOCCkxZdqE7KvXbkZukE=-a...@mail.gmail.com



[PATCH 06/11] Add functions to Dh_Haskell.hs

2015-03-27 Thread David Fox
These functions are used by the forthcoming bash translations of the make rules.
---
 Dh_Haskell.sh | 70 +++
 1 file changed, 70 insertions(+)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index c5b15b2..f0a2002 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -1,3 +1,73 @@
+cpu(){
+  ghc -e 'putStr System.Info.arch'
+}
+
+os(){
+  ghc -e 'putStr System.Info.os'
+}
+
+package_prefix(){
+echo $1 | sed -n -e 's|^\([^-]*\)-.*-[^-]*$|\1|p'
+}
+
+package_hc(){
+echo $1 | sed -n -e 's|^lib\([^-]*\)-.*-[^-]*$|\1|p'
+}
+
+package_ext(){
+case $1 in
+ # I'm told the ghc build uses these scripts, hence these special cases
+ ghc) echo "dev";;
+ ghc-prof) echo "prof";;
+ *) echo $1 | sed -n -e 's|^[^-]*-.*-\([^-]*\)$|\1|p';;
+esac
+}
+
+packages_hc(){
+DEB_DEFAULT_COMPILER=$1
+DEB_PACKAGES=$2
+hcs=`{ for i in ${DEB_PACKAGES}; do package_hc $i; done; } | sort -u`
+if [ `echo ${hcs} | wc -w` = 0 ]; then hcs=${DEB_DEFAULT_COMPILER}; fi
+if [ `echo ${hcs} | wc -w` != 1 ]; then echo "Multiple compilers
not supported: ${hc}"; exit 1; fi
+echo ${hcs}
+}
+
+hc_libdir(){
+case $1 in
+  ghc) echo "usr/lib/haskell-packages/ghc/lib";;
+  *) echo "Don't know package_libdir for $1" >&2; exit 1;;
+esac
+}
+
+package_libdir(){
+hc_libdir `package_hc $1`
+}
+
+hc_pkgdir(){
+case $1 in
+ ghc) echo "var/lib/ghc/package.conf.d";;
+*) echo "Don't know pkgdir for $1" >&2; exit 1;;
+esac
+}
+
+package_pkgdir(){
+hc_pkgdir `package_hc $1`
+}
+
+hc_prefix(){
+case $1 in
+  ghc) echo "usr";;
+  *) echo "Don't know prefix for compiler $1" >&2; exit 1;;
+esac
+}
+
+hc_haddock(){
+case $1 in
+ ghc) echo "haddock";;
+ *) echo "Don't know pkgdir for $1" >&2; exit 1;;
+esac
+}
+
 strip_hash(){
  echo "$1" | sed 's/-$//'
 }
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cam8c2ccpbpnylueduozxfv4-mcuwazafjy6ywerm95k9d35...@mail.gmail.com



[PATCH 04/11] Pass --with-haddock and --with-ghc to haddock, --package-db to cabal configure

2015-03-27 Thread David Fox
Here we pass the values appropriate for ghc, later these get parameterized.
---
 hlibrary.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hlibrary.mk b/hlibrary.mk
index 20e831a..1e16de9 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -113,7 +113,7 @@ $(DEB_SETUP_BIN_NAME):
  for setup in Setup.lhs Setup.hs; do if test -e $$setup; then ghc
--make $$setup -o $(DEB_SETUP_BIN_NAME); exit 0; fi; done

 configure-ghc-stamp: $(DEB_SETUP_BIN_NAME)
- $(DEB_SETUP_BIN_NAME) configure --ghc -v2 \
+ $(DEB_SETUP_BIN_NAME) configure --ghc -v2
--package-db=/var/lib/ghc/package.conf.d \
  --prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib \
  --builddir=dist-ghc \
  --ghc-options="-optl$$(dpkg-buildflags --get LDFLAGS)" \
@@ -145,7 +145,7 @@ endif
 build/libghc-$(CABAL_PACKAGE)-prof
build/libghc-$(CABAL_PACKAGE)-dev:: build-ghc-stamp check-ghc-stamp

 build-haddock-stamp:
- [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock
--builddir=dist-ghc $(DEB_HADDOCK_OPTS) || \
+ [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock
--builddir=dist-ghc --with-haddock=/usr/bin/haddock --with-ghc=ghc
$(DEB_HADDOCK_OPTS) || \
   echo "Haddock failed (no modules?), creating empty documentation package."
  touch build-haddock-stamp

-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CAM8C2CB1fM9WKmYv_ntnkw_AQzLYfGu=4bfjtcfphyqe15m...@mail.gmail.com



[PATCH 03/11] Remove support for obsolete doc package prefix 'haskell-'

2015-03-27 Thread David Fox
Keeping these would make the subsequent changes uglier.

---
 dh_haskell_depends | 2 +-
 hlibrary.mk| 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dh_haskell_depends b/dh_haskell_depends
index b71cec4..4917092 100644
--- a/dh_haskell_depends
+++ b/dh_haskell_depends
@@ -118,7 +118,7 @@ for pkg in `dh_listpackages $args`; do
 echo "haskell:Recommends=" >> $sfile.tmp
 echo "haskell:Suggests=" >> $sfile.tmp
 ;;
-libghc-*-doc|haskell-*-doc)
+libghc-*-doc)
 grep -v \
 -e ^haskell:Depends \
 -e ^haskell:Recommends \
diff --git a/hlibrary.mk b/hlibrary.mk
index 5408863..20e831a 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -149,7 +149,7 @@ build-haddock-stamp:
   echo "Haddock failed (no modules?), creating empty documentation package."
  touch build-haddock-stamp

-build/haskell-$(CABAL_PACKAGE)-doc
build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp
build-haddock-stamp
+build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp

 dist-hugs: $(DEB_SETUP_BIN_NAME)
  $(DEB_SETUP_BIN_NAME) configure --hugs --prefix=/usr -v2
--builddir=dist-hugs $(DEB_SETUP_HUGS_CONFIGURE_ARGS)
@@ -193,7 +193,7 @@ install/libghc-$(CABAL_PACKAGE)-prof::
debian/tmp-inst-ghc install/libghc-$(CABA
  dh_haskell_provides -p$(notdir $@)
  dh_haskell_depends -p$(notdir $@)

-install/haskell-$(CABAL_PACKAGE)-doc
install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc
build-haddock-stamp debian/extra-depends
+install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc
build-haddock-stamp debian/extra-depends
  mkdir -p debian/$(notdir $@)/$(DEB_HADDOCK_HTML_DIR)
  cd debian/tmp-inst-ghc/ ; find ./$(DEB_HADDOCK_HTML_DIR)/ \
  ! -name "*.haddock" -exec install -Dm 644 '{}' \
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cam8c2cbc3_gseokeb9evsdhyrdqg35vyzvh1ghpjrdiwwg1...@mail.gmail.com



[PATCH 02/11] Fix a bash error - single quote prevents expansion of shell variables

2015-03-27 Thread David Fox
---
 hlibrary.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hlibrary.mk b/hlibrary.mk
index fb91ca5..5408863 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -175,7 +175,7 @@ install/libghc-$(CABAL_PACKAGE)-dev::
debian/tmp-inst-ghc debian/extra-depends
  $(if $(HASKELL_HIDE_PACKAGES),sed -i 's/^exposed: True$$/exposed:
False/' $$pkg_config;) \
  install -Dm 644 $$pkg_config debian/$(notdir
$@)/var/lib/ghc/package.conf.d/$$pkg_config; \
  rm -f $$pkg_config
- if [ 'z$(DEB_GHC_EXTRA_PACKAGES)' != 'z' ] ; then \
+ if [ "z$(DEB_GHC_EXTRA_PACKAGES)" != "z" ] ; then \
  mkdir -p debian/$(notdir $@)/usr/lib/haskell-packages/extra-packages; \
  echo '$(DEB_GHC_EXTRA_PACKAGES)' > debian/$(notdir
$@)/usr/lib/haskell-packages/extra-packages/$(CABAL_PACKAGE)-$(CABAL_VERSION)
; \
  fi
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cam8c2cdxftapuwqutmxn2t7sakvzhrfxhp+fzb02av0qwqh...@mail.gmail.com



[PATCH 00/11] Series of patches to support ghcjs packages

2015-03-27 Thread David Fox
These eleven patches start with some bug fixes, followed by some
fairly major changes to parameterize the haskell compiler name,
finally adding support for ghcjs specifically.  A lot of the changes
are due to translating make rules to bash code, moving them from
hlibrary.mk to Dh_Haskell.sh, leaving function calls in hlibrary.mk.
Then additional rules are added to hlibrary.mk for the ghcjs packages,
with modified function parameters.  Finally, some disabled debugging
code is added to give a nice trace of the execution, but this patch is
optional.

I've successfully built about 100 ghc packages and 50 ghcjs packages
with these changes.

David Fox (11):
  Allow building of documentation when when package has no Haskell
modules
  Fix a bash error - single quote prevents expansion of shell variables
  Remove support for obsolete doc package prefix 'haskell-'
  Pass --with-haddock and --with-ghc to haddock, --package-db to cabal
configure
  Reword some error messages and indicate where they originate
  Add functions to Dh_Haskell.hs
  Turn the Make rules into shell functions
  Parameterize the compiler name
  Add support for building ghcjs packages
  Add a compiler parameter to the dh_haskell_blurbs script
  Debugging code (disabled)

 Dh_Haskell.sh| 343 ---
 dh_haskell_blurbs|  24 +++-
 dh_haskell_depends   |  30 +++--
 dh_haskell_extra_depends |   8 +-
 dh_haskell_provides  |  26 ++--
 dh_haskell_shlibdeps |  15 ++-
 hlibrary.mk  | 121 +++--
 7 files changed, 438 insertions(+), 129 deletions(-)

-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cam8c2cdb8q9fraq-raomkrvoovhuehqloa+2yauovnh4_7-...@mail.gmail.com



[PATCH 01/11] Allow building of documentation when when package has no Haskell modules

2015-03-27 Thread David Fox
At times there have been cabal packages with no modules whose build
would fail without this patch - the earliest version of
transformers-compat for example.

---
 hlibrary.mk | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hlibrary.mk b/hlibrary.mk
index b7f046b..fb91ca5 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -145,7 +145,8 @@ endif
 build/libghc-$(CABAL_PACKAGE)-prof
build/libghc-$(CABAL_PACKAGE)-dev:: build-ghc-stamp check-ghc-stamp

 build-haddock-stamp:
- [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock
--builddir=dist-ghc $(DEB_HADDOCK_OPTS)
+ [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock
--builddir=dist-ghc $(DEB_HADDOCK_OPTS) || \
+  echo "Haddock failed (no modules?), creating empty documentation package."
  touch build-haddock-stamp

 build/haskell-$(CABAL_PACKAGE)-doc
build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp
build-haddock-stamp
@@ -167,7 +168,7 @@ debian/extra-depends: debian/tmp-inst-ghc
 DEB_LINTIAN_OVERRIDES_FILE =
debian/libghc-$(CABAL_PACKAGE)-dev.lintian-overrides

 install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/extra-depends
- cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+ cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ;
find usr/lib/haskell-packages/ghc/lib/ \
  \( ! -name "*_p.a" ! -name "*.p_hi" \) \
  -exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
  pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc
--gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`; \
@@ -186,7 +187,7 @@ install/libghc-$(CABAL_PACKAGE)-dev::
debian/tmp-inst-ghc debian/extra-depends
  dh_haskell_shlibdeps -p$(notdir $@)

 install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc
install/libghc-$(CABAL_PACKAGE)-dev debian/extra-depends
- cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+ cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ;
find usr/lib/haskell-packages/ghc/lib/ \
  ! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
  -exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
  dh_haskell_provides -p$(notdir $@)
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cam8c2cabkme2h4m0jkssnav8_famta0jzk2rjrpawsk7h38...@mail.gmail.com



Re: hsx2hs and haskell-src-exts-1.16

2015-03-18 Thread David Fox
Ah, my support for old utf8-string was broken.  I will upload again.

On Wed, Mar 18, 2015 at 1:14 PM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

> On Wed, 18 Mar 2015 10:54:49 -0700
> David Fox  wrote:
>
> > Ok, I've uploaded hsx2hs-0.13.3 to hackage, with updated repository path.
> > GHC-7.10 support is waiting for changes to haskell-src-meta.
>
> I tried to compile this, but I got the following errors:
>
> src/hsx2hs.hs:31:12:
> Not in scope: `UTF8.readfile'
> Perhaps you meant `UTF8.readFile' (imported from System.IO.UTF8)
>
> src/hsx2hs.hs:73:40:
> Not in scope: `hPutStrLn'
> Perhaps you meant one of these:
>   `UTF8.hPutStrLn' (imported from System.IO.UTF8),
>   `putStrLn' (imported from Prelude)
>
> Correcting UTF8.readfile to UTF8.readFile and hPutStrLn to
> UTF8.hPutStrLn made it compile, but I'm not sure this is what you
> intended.
>
> Regards
> Sven
>
> > On Wed, Mar 18, 2015 at 3:39 AM, Sven Bartscher <
> > sven.bartsc...@weltraumschlangen.de> wrote:
> >
> > > On Tue, 17 Mar 2015 17:50:43 -0700
> > > David Fox  wrote:
> > >
> > > > We build with the changes in https://github.com/seereason/hsx2hs.git
> .
> > >
> > > That looks good, but it would be better, if there would be a release on
> > > hackage, since our infrastructure builds on building packages from
> > > hackage (though it's possible to build packages not from hackage).
> > >
> > > The repository listed on hackage doesn't seem very active. Do you know
> > > whether they're active? If not, have you thought about taking over the
> > > hackage package[1]?
> > >
> > > [1] https://wiki.haskell.org/Taking_over_a_package
> > >
> > > Regards
> > > Sven
> > >
> > > > On Tue, Mar 17, 2015 at 10:26 AM, Sven Bartscher <
> > > > sven.bartsc...@weltraumschlangen.de> wrote:
> > > >
> > > > > Greetings,
> > > > >
> > > > > I'm writing to you, because you are listed as maintainer of the
> haskell
> > > > > package hsx2hs.
> > > > >
> > > > > We (the Debian Haskell Group) are planning on transitioning to ghc
> 7.8
> > > > > after the release of jessie, which will be very soon.
> > > > >
> > > > > This transitions includes upgrading the version of
> haskell-src-exts in
> > > > > debian to 1.16.0.1. Unfortunately hsx2hs can't be build with this
> > > > > version of haskell-src-exts.
> > > > >
> > > > > Could you please release a new version of hsx2hs, which builds with
> > > > > haskell-src-exts-1.16.0.1.
> > > > >
> > > > > Regards
> > > > > Sven
> > > > >
> > >
>


Re: hsx2hs and haskell-src-exts-1.16

2015-03-18 Thread David Fox
It turned out that Jeremy Shaw already had upload rights, and he works for
me.  ;-)

On Wed, Mar 18, 2015 at 11:08 AM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

> On Wed, 18 Mar 2015 10:54:49 -0700
> David Fox  wrote:
>
> > Ok, I've uploaded hsx2hs-0.13.3 to hackage, with updated repository path.
> > GHC-7.10 support is waiting for changes to haskell-src-meta.
>
> Thanks.
> Just out of curiosity: How did you gain upload rights on hsx2hs? When I
> tried to take over setlocale, without the author responding it was a
> lengthy process, with people yelling at me, that I should follow the
> guideline that I'm already following.
>
> Regards
> Sven
>
> > On Wed, Mar 18, 2015 at 3:39 AM, Sven Bartscher <
> > sven.bartsc...@weltraumschlangen.de> wrote:
> >
> > > On Tue, 17 Mar 2015 17:50:43 -0700
> > > David Fox  wrote:
> > >
> > > > We build with the changes in https://github.com/seereason/hsx2hs.git
> .
> > >
> > > That looks good, but it would be better, if there would be a release on
> > > hackage, since our infrastructure builds on building packages from
> > > hackage (though it's possible to build packages not from hackage).
> > >
> > > The repository listed on hackage doesn't seem very active. Do you know
> > > whether they're active? If not, have you thought about taking over the
> > > hackage package[1]?
> > >
> > > [1] https://wiki.haskell.org/Taking_over_a_package
> > >
> > > Regards
> > > Sven
> > >
> > > > On Tue, Mar 17, 2015 at 10:26 AM, Sven Bartscher <
> > > > sven.bartsc...@weltraumschlangen.de> wrote:
> > > >
> > > > > Greetings,
> > > > >
> > > > > I'm writing to you, because you are listed as maintainer of the
> haskell
> > > > > package hsx2hs.
> > > > >
> > > > > We (the Debian Haskell Group) are planning on transitioning to ghc
> 7.8
> > > > > after the release of jessie, which will be very soon.
> > > > >
> > > > > This transitions includes upgrading the version of
> haskell-src-exts in
> > > > > debian to 1.16.0.1. Unfortunately hsx2hs can't be build with this
> > > > > version of haskell-src-exts.
> > > > >
> > > > > Could you please release a new version of hsx2hs, which builds with
> > > > > haskell-src-exts-1.16.0.1.
> > > > >
> > > > > Regards
> > > > > Sven
> > > > >
> > >
>


Re: hsx2hs and haskell-src-exts-1.16

2015-03-18 Thread David Fox
Ok, I've uploaded hsx2hs-0.13.3 to hackage, with updated repository path.
GHC-7.10 support is waiting for changes to haskell-src-meta.

On Wed, Mar 18, 2015 at 3:39 AM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

> On Tue, 17 Mar 2015 17:50:43 -0700
> David Fox  wrote:
>
> > We build with the changes in https://github.com/seereason/hsx2hs.git.
>
> That looks good, but it would be better, if there would be a release on
> hackage, since our infrastructure builds on building packages from
> hackage (though it's possible to build packages not from hackage).
>
> The repository listed on hackage doesn't seem very active. Do you know
> whether they're active? If not, have you thought about taking over the
> hackage package[1]?
>
> [1] https://wiki.haskell.org/Taking_over_a_package
>
> Regards
> Sven
>
> > On Tue, Mar 17, 2015 at 10:26 AM, Sven Bartscher <
> > sven.bartsc...@weltraumschlangen.de> wrote:
> >
> > > Greetings,
> > >
> > > I'm writing to you, because you are listed as maintainer of the haskell
> > > package hsx2hs.
> > >
> > > We (the Debian Haskell Group) are planning on transitioning to ghc 7.8
> > > after the release of jessie, which will be very soon.
> > >
> > > This transitions includes upgrading the version of haskell-src-exts in
> > > debian to 1.16.0.1. Unfortunately hsx2hs can't be build with this
> > > version of haskell-src-exts.
> > >
> > > Could you please release a new version of hsx2hs, which builds with
> > > haskell-src-exts-1.16.0.1.
> > >
> > > Regards
> > > Sven
> > >
>


Re: DHG event at DebConf 15?

2015-03-18 Thread David Fox
On Wed, Mar 18, 2015 at 8:00 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Mittwoch, den 18.03.2015, 14:38 +0100 schrieb Sven Bartscher:
> > Last year it was brought up, to automate the packaging process
> > completely and creating the packages out of the package plan.
> > I didn't follow the discussions very close lately, so I don't know what
> > the status of cabal-debian is, we might want to discuss the details of
> > how this will work and what can be done to get closer to this goal.
>
> good idea! That’s also a good topic for DebCamp, as Kristoffer noticed.
>
> The status is that it is slowly getting more and more usable, while
> there are still minor issues. I try to make sure that all of them are
> reported at https://github.com/ddssff/cabal-debian/issues
>

I am standing by for any reports of experiences or issues with
cabal-debian.   I would also like reports of whether the issues in that
list are still issues.  I've worked on all the ones there, but I'm not 100%
certain whether some of them have been resolved correctly, so I left them
open.


Re: hsx2hs and haskell-src-exts-1.16

2015-03-18 Thread David Fox
Oh, I see Niklas has forked our repo:
https://github.com/niklasbroberg/hsx2hs.  And I see activity there from
November.  Lets see if he responds.  If it is appropriate, Jeremy or I
could take over future maintainance.

On Wed, Mar 18, 2015 at 3:39 AM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

> On Tue, 17 Mar 2015 17:50:43 -0700
> David Fox  wrote:
>
> > We build with the changes in https://github.com/seereason/hsx2hs.git.
>
> That looks good, but it would be better, if there would be a release on
> hackage, since our infrastructure builds on building packages from
> hackage (though it's possible to build packages not from hackage).
>
> The repository listed on hackage doesn't seem very active. Do you know
> whether they're active? If not, have you thought about taking over the
> hackage package[1]?
>
> [1] https://wiki.haskell.org/Taking_over_a_package
>
> Regards
> Sven
>
> > On Tue, Mar 17, 2015 at 10:26 AM, Sven Bartscher <
> > sven.bartsc...@weltraumschlangen.de> wrote:
> >
> > > Greetings,
> > >
> > > I'm writing to you, because you are listed as maintainer of the haskell
> > > package hsx2hs.
> > >
> > > We (the Debian Haskell Group) are planning on transitioning to ghc 7.8
> > > after the release of jessie, which will be very soon.
> > >
> > > This transitions includes upgrading the version of haskell-src-exts in
> > > debian to 1.16.0.1. Unfortunately hsx2hs can't be build with this
> > > version of haskell-src-exts.
> > >
> > > Could you please release a new version of hsx2hs, which builds with
> > > haskell-src-exts-1.16.0.1.
> > >
> > > Regards
> > > Sven
> > >
>


Re: hsx2hs and haskell-src-exts-1.16

2015-03-17 Thread David Fox
We build with the changes in https://github.com/seereason/hsx2hs.git.

On Tue, Mar 17, 2015 at 10:26 AM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

> Greetings,
>
> I'm writing to you, because you are listed as maintainer of the haskell
> package hsx2hs.
>
> We (the Debian Haskell Group) are planning on transitioning to ghc 7.8
> after the release of jessie, which will be very soon.
>
> This transitions includes upgrading the version of haskell-src-exts in
> debian to 1.16.0.1. Unfortunately hsx2hs can't be build with this
> version of haskell-src-exts.
>
> Could you please release a new version of hsx2hs, which builds with
> haskell-src-exts-1.16.0.1.
>
> Regards
> Sven
>


Re: Getting newest versions of packages

2015-01-09 Thread David Fox
On Fri, Jan 9, 2015 at 8:03 AM, Dmitry Bogatov  wrote:

> On 2015-01-09, Joachim Breitner  wrote:
>
> #. I would prefer section by default `unknown`
>

I'm adding a --source-section option to version 4.20.


Re: Getting newest versions of packages

2015-01-09 Thread David Fox
On Fri, Jan 9, 2015 at 10:26 AM, Dmitry Bogatov  wrote:

>
> Sounds nice. But HEAD is one commit from 4.19. Maybe package it?  I
> tried, and it depends on debian-3.85. I `cabal unpack debian` it, and
> there is debian/ in it. What should I do with it?
>

That debianization is my doing - it is supposed to match the result of
applying cabal-debian to itself.  I checked it in to avoid making
cabal-debian a debian dependency of itself.  I'm pretty sure this this is
not the right thing to do.


Re: Getting newest versions of packages

2015-01-09 Thread David Fox
Oh, and there is a debian/Debianize.hs script in the cabal-debian package
itself, one of the unit tests runs it and compares the result to the debian
directory in the git repository.

On Fri, Jan 9, 2015 at 5:31 AM, David Fox  wrote:

> I use the cabal-debian library in a bunch of private packages.  Also, for
> complicated debianizations there is a function in Debian.Debianize.Output
> called "runDebianizeScript" that actually runs the command "runhaskell
> debian/Debianize.hs", and that script definitely requires the cabal-debian
> library to run.
>
> You can see an example of a debian/Debianize.hs script here:
> https://github.com/clckwrks/clckwrks-dot-com/blob/master/debian/Debianize.hs
>
> On Fri, Jan 9, 2015 at 3:27 AM, Joachim Breitner 
> wrote:
>
>> Hi,
>>
>>
>> Am Freitag, den 09.01.2015, 13:55 +0300 schrieb Dmitry Bogatov:
>> > * David Fox  [2015-01-08 06:20:34-0800]
>> > > Also, cabal-debian should be producing library debs, if it isn't
>> there may
>> > > be a bug.
>> >
>> > Seems I was not clear enough. I regret, that haskell-cabal-debian
>> > *debian* source package provides only *cabal-debian* binary, without
>> > *libghc-cabal-debian-dev*. I am working on fixing it.
>>
>> do we really need libghc-cabal-debian-dev? What other package is using
>> it?
>>
>> Note that uploading Haskell library packages comes at a cost, e.g.
>> testing migrations become larger, so we should only package libraries
>> that have actual uses.
>>
>> Lots of Haskell programs define libraries in their .cabal file, but
>> these are only meant to be used by the executable therein.
>>
>> Greetings,
>> Joachim
>>
>> --
>> Joachim "nomeata" Breitner
>> Debian Developer
>>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>>
>>
>


Re: Getting newest versions of packages

2015-01-09 Thread David Fox
I use the cabal-debian library in a bunch of private packages.  Also, for
complicated debianizations there is a function in Debian.Debianize.Output
called "runDebianizeScript" that actually runs the command "runhaskell
debian/Debianize.hs", and that script definitely requires the cabal-debian
library to run.

You can see an example of a debian/Debianize.hs script here:
https://github.com/clckwrks/clckwrks-dot-com/blob/master/debian/Debianize.hs

On Fri, Jan 9, 2015 at 3:27 AM, Joachim Breitner  wrote:

> Hi,
>
>
> Am Freitag, den 09.01.2015, 13:55 +0300 schrieb Dmitry Bogatov:
> > * David Fox  [2015-01-08 06:20:34-0800]
> > > Also, cabal-debian should be producing library debs, if it isn't there
> may
> > > be a bug.
> >
> > Seems I was not clear enough. I regret, that haskell-cabal-debian
> > *debian* source package provides only *cabal-debian* binary, without
> > *libghc-cabal-debian-dev*. I am working on fixing it.
>
> do we really need libghc-cabal-debian-dev? What other package is using
> it?
>
> Note that uploading Haskell library packages comes at a cost, e.g.
> testing migrations become larger, so we should only package libraries
> that have actual uses.
>
> Lots of Haskell programs define libraries in their .cabal file, but
> these are only meant to be used by the executable therein.
>
> Greetings,
> Joachim
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>
>


Re: Getting newest versions of packages

2015-01-08 Thread David Fox
Also, cabal-debian should be producing library debs, if it isn't there may
be a bug.

On Thu, Jan 8, 2015 at 5:16 AM, Dmitry Bogatov  wrote:

> Hello!
>
> I am confused about how should I setup my development environment to
> develop haskell packages. I want to improve cabal-debian-4.17.4, since
> it provides only binary, and I it to provide library as well, because
> it is much more flexible. To build it, I need haskell-debian-3.83.3.1
> from experimental, which conflicts with almost everything. If I
> upgrade ghc to experimental, it is okay, but now I fail to install
> libghc-bool-extras, which is my package and now in sid. I am okay on
> tracking bleeding edge. Where can I read how all this works?
>
> Also, I plan to package git-vogue binary, but it depends on base >=4.7
> (ghc-7.8). What is its fate? Is it any way I can speed up moving of
> ghc-7.8 into at least sid? 7.10 is coming, and we have only 7.8 even
> in experimental.
>
> Same question applies to, for hlint. In experimental it is outdated,
> I am working on getting hlint-1.9.15(which depends `extra` library),
> but how should I check, that this update will not break something?
>
> Again, please point me to memo, how does this all works?
>
> cabal-debian:
>   Installed: 4.17.4-4
>   Candidate: 4.17.4-4
>   Version table:
>  *** 4.17.4-4 0
> 200 http://mirror.yandex.ru/debian/ experimental/main amd64
> Packages
> 100 /var/lib/dpkg/status
>  4.17.4-1 0
> 400 http://mirror.yandex.ru/debian/ jessie/main amd64 Packages
> 300 http://mirror.yandex.ru/debian/ sid/main amd64 Packages
>  1.25-1 0
> 500 http://mirror.yandex.ru/debian/ wheezy/main amd64 Packages
>
> libghc-hlint-dev:
>   Installed: (none)
>   Candidate: 1.8.61-1+b2
>   Package pin: 1.8.61-1+b2
>   Version table:
>  1.8.61-2+b1 500
> 200 http://mirror.yandex.ru/debian/ experimental/main amd64
> Packages
>  1.8.61-1+b2 500
> 400 http://mirror.yandex.ru/debian/ jessie/main amd64 Packages
> 300 http://mirror.yandex.ru/debian/ sid/main amd64 Packages
>  1.8.28-1+b3 500
> 500 http://mirror.yandex.ru/debian/ wheezy/main amd64 Packages
>
> --
> Best regards, Dmitry Bogatov ,
> Free Software supporter, esperantisto and netiquette guardian.
> GPG: 54B7F00D
>
>
> --
> To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
> Archive: https://lists.debian.org/slrnmat0n6.j98.kact...@self.kaction.name
>
>


Re: Getting newest versions of packages

2015-01-08 Thread David Fox
You are better off building these packages from the github source for right
now - cabal-debian is in a development phase

https://github.com/ddssff/cabal-debian
https://github.com/ddssff/debian-haskell

If you check these out right next to each other and set the "local-debian"
flag to "Default: True" in cabal-debian.cabal, you should be able to build
the cabal-debian executable:

  runhaskell Setup build

then you can use it to debianize cabal-debian or anything else.   Also, I'm
interested in hearing what you would like to see in cabal-debian, use
github issues and/or write more here.


On Thu, Jan 8, 2015 at 5:16 AM, Dmitry Bogatov  wrote:

> Hello!
>
> I am confused about how should I setup my development environment to
> develop haskell packages. I want to improve cabal-debian-4.17.4, since
> it provides only binary, and I it to provide library as well, because
> it is much more flexible. To build it, I need haskell-debian-3.83.3.1
> from experimental, which conflicts with almost everything. If I
> upgrade ghc to experimental, it is okay, but now I fail to install
> libghc-bool-extras, which is my package and now in sid. I am okay on
> tracking bleeding edge. Where can I read how all this works?
>
> Also, I plan to package git-vogue binary, but it depends on base >=4.7
> (ghc-7.8). What is its fate? Is it any way I can speed up moving of
> ghc-7.8 into at least sid? 7.10 is coming, and we have only 7.8 even
> in experimental.
>
> Same question applies to, for hlint. In experimental it is outdated,
> I am working on getting hlint-1.9.15(which depends `extra` library),
> but how should I check, that this update will not break something?
>
> Again, please point me to memo, how does this all works?
>
> cabal-debian:
>   Installed: 4.17.4-4
>   Candidate: 4.17.4-4
>   Version table:
>  *** 4.17.4-4 0
> 200 http://mirror.yandex.ru/debian/ experimental/main amd64
> Packages
> 100 /var/lib/dpkg/status
>  4.17.4-1 0
> 400 http://mirror.yandex.ru/debian/ jessie/main amd64 Packages
> 300 http://mirror.yandex.ru/debian/ sid/main amd64 Packages
>  1.25-1 0
> 500 http://mirror.yandex.ru/debian/ wheezy/main amd64 Packages
>
> libghc-hlint-dev:
>   Installed: (none)
>   Candidate: 1.8.61-1+b2
>   Package pin: 1.8.61-1+b2
>   Version table:
>  1.8.61-2+b1 500
> 200 http://mirror.yandex.ru/debian/ experimental/main amd64
> Packages
>  1.8.61-1+b2 500
> 400 http://mirror.yandex.ru/debian/ jessie/main amd64 Packages
> 300 http://mirror.yandex.ru/debian/ sid/main amd64 Packages
>  1.8.28-1+b3 500
> 500 http://mirror.yandex.ru/debian/ wheezy/main amd64 Packages
>
> --
> Best regards, Dmitry Bogatov ,
> Free Software supporter, esperantisto and netiquette guardian.
> GPG: 54B7F00D
>
>
> --
> To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
> Archive: https://lists.debian.org/slrnmat0n6.j98.kact...@self.kaction.name
>
>


Re: A simpler cabal-debian

2014-11-27 Thread David Fox
I would be a little sad to see the parsing of a debianization go, though
I'm not sure I use that feature in real life. Today I am going to take a
stab at the second option (making it do what we want it to do) and if that
doesn't work I will consider the first option (simplified cabal-debian.)  I
have a feeling that as I work on it I might end up leaning towards the
first option even if I am able to fix the copyright inputting.  Splitting
the package in two could be the best of both options.

On Wed, Nov 26, 2014 at 1:02 AM, Joachim Breitner 
wrote:

> Hi David,
>
> the progress of making cabal-debian the default tool for creating new
> Debian packages has stalled. The particular issue at hand is
> https://github.com/ddssff/cabal-debian/issues/7
> where I could not make it work with --compare, partly due to lack of
> understanding of cabal-debian’s internal design.
>
> It seems that some of the complexity causing this slow down is due to
> features like reading data from a debian/ directory, e.g. in order to
> merge or compare. As nice as it is to have these things – for our uses
> we don’t need that. Especially as there is now the general "debdry"
> wrapper (https://packages.debian.org/sid/debdry) which can provide the
> functionality of adjusting the output of auto-generated packaging
> directories.
>
> I think I would already work with a cabal-debian-like tool if I had a
> simple one-way
> "cabal + command line flags + global information → debian/" conversion
> tool that would be much simpler to hack on.
>
> So I see a few ways forward:
>   * It turns out that you also don’t need anything else besides this
> feature. We can take cabal-debian and simplify it greatly.
>   * You need the advanced features, and you (or some else of course)
> figure out how to still make it do what we want it to do.
>   * It makes sense for fork or rewrite the tool
> (cabal-debian-simple, cabal-debian-official, cabal-debian-DHG or
> whatever), fully suited for our needs.
>
> What’s your opinion on this?
>
> Greetings,
> Joachim
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>
>


Re: Making cabal-debian an official tool

2014-09-22 Thread David Fox
Thanks I will look at these soon.

On Mon, Sep 22, 2014 at 7:40 AM, Joachim Breitner 
wrote:

> Hi David,
>
> I filed a few more issues at
> https://github.com/ddssff/cabal-debian/issues but to not only file
> issues, I fixed a few of them.
>
> I didn’t want to push to cabal-debian directly without you doing a bit
> of code review, so I put them in a fork of my own and created a pull
> request:
> https://github.com/ddssff/cabal-debian/pull/20
>
> Please review and pick as desired!
>
> Thanks,
> Joachim
>
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>
>


Re: Adding ghcjs support to haskell-devscripts

2014-09-10 Thread David Fox
I have re-created http://hub.darcs.net/ddssff/haskell-devscripts without
"Remove cases for binary debs in the ghc package".  I still have to make a
few changes you suggested.

On Fri, Aug 29, 2014 at 2:08 PM, Joachim Breitner 
wrote:

> Hi,
>
>
> Am Freitag, den 29.08.2014, 13:29 -0700 schrieb David Fox:
>
> >
> > This has so far been necessary for building ghcjs libraries.
>
> I get it now.
>
>
> > * Move the make recipes from hlibrary.mk to Dh_Haskell.sh
> > Nice cleanup
> > * Add a postinst script to the ghcjs dev library to run
> > recache
> > Shouldn’t this be handled by a dpkg trigger in your ghcjs
> > package?
> > Not pulling.
> >
> >
> > Yes, I would appreciate some guidance on how to do this.
>
> It’s quite simple. Here is what ghc does:
> $ cat ghc.triggers
> interest /var/lib/ghc/package.conf.d
> $ cat ghc.postinst # abbreviated
> case "$1" in
> [..]
> triggered)
> $bindir/ghc-pkg recache --global
> $bindir/ghc-pkg check --global || true
> ;;
> *)
> echo "postinst called with unknown argument \`$1'" >&2
> exit 0
> ;;
> esac
> [..]
>
> So you just need to find a directory where your libghcjs-foo packages
> drop a file into. If there is none, you can come up with one
> (e.g. /var/lib/ghcjs/triggers/) and have haskell-devscripts add an
> empty /var/lib/ghcjs/triggers/pkg-version file to your libghc-js library
> packages.
>
>
> > Yes, I will create revised patches.  Is it too late for you to unpull?
>
> No, I did that in my own working copy and "darcs obliterated" out of it.
>
>
> Greetings from Portland,
> Joachim
> >
> >
> >
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>
>


Re: Making cabal-debian an official tool

2014-08-29 Thread David Fox
On Fri, Aug 29, 2014 at 2:04 PM, Joachim Breitner 
wrote:

>
> If you create the repo there soon I’ll start filing a few issues of
> things that I’d do differently (otherwise I’ll use the bts for now and
> copy them later, which is fine as well).
>

No sooner said than done!

https://github.com/ddssff/cabal-debian

Also see:

https://github.com/ddssff/debian-haskell


>


Re: Adding ghcjs support to haskell-devscripts

2014-08-29 Thread David Fox
On Fri, Aug 29, 2014 at 2:08 PM, Joachim Breitner 
wrote:

>
>
> Greetings from Portland,
>
> I should have gone, but I'm not a Debian developer.  ;-)


Re: Adding ghcjs support to haskell-devscripts

2014-08-29 Thread David Fox
On Fri, Aug 29, 2014 at 10:46 AM, Joachim Breitner 
wrote:

* Allow building of documentation when when package has no Haskell modules
> ✓
> * Fix a bash bug in the dev library install recipe
> ✓
> * Remove cases for binary debs in the ghc package - haskell-devscripts is
> not a build dependency of ghc
> While the package is not a build-dependency (which would induce too many
> build dependency cycles), we _do_ use ./dh_haskell_provides in GHC,
> after copying it there. So this code needs to stay.
>

Ok


> * Remove support for obsolete doc package prefix "haskell-"
> ✓
> * Pass --package-db to the cabal configure command
> ✓, but why?
>

This has so far been necessary for building ghcjs libraries.


> * Pass --with-haddock and --with-ghc to cabal haddock
> again ✓, but why? What does this change?
>

This is also required by ghcjs - it has its own ghcjs-pkg and haddock-ghcjs
executables.


> * Add functions to Dh_Haskell.sh to parse library package names, compute
>   compiler names and compiler dependent paths
> You use “ghc -e” which requires GHCi which is not available on all
> architectures, so this is not good.
> The proper way to do it is to parse the output of "ghc --info".
> I’m pulling it for now.
>

I will try to make this change.


> * Move the make recipes from hlibrary.mk to Dh_Haskell.sh
> Nice cleanup
> * Add a postinst script to the ghcjs dev library to run recache
> Shouldn’t this be handled by a dpkg trigger in your ghcjs package?
> Not pulling.
>

Yes, I would appreciate some guidance on how to do this.


> It looks like not pulling
>  * Remove cases for binary debs in the ghc package - haskell-devscripts
>is not a build dependency of ghc
> prevents me from pulling these patches:

 * Large patch to parameterize the name of the haskell compiler in order
>to support ghcjs
>  * Add duplicates of the libghc rules modified to build libghcjs
>packages
>  * Remove set -x directives in hlibrary.mk
>  * Add improved debugging code (disabled)
>  * Supply default compiler to packages_hc call in dh_haskell_blurbs.
> I’m afraid that this means that the patches I did pull left me with
> something broken.
>
> Not sure how we should proceed from here. Do you want to integrate my
> review until I’m satisfied with the overall result, which I then can
> pull in one go?
>

Yes, I will create revised patches.  Is it too late for you to unpull?


>
>
> I see that os() and cpu() are only used when building ghcjs packages.
> But still, reading that data from ghc --info is saner. Or maybe even
> from dpkg-architecture.
>
>
> Greetings,
> Joachim
>
>


Re: Making cabal-debian an official tool

2014-08-29 Thread David Fox
That is great news!  I think my preference would be to move it to github.com
(I was actually in the process of doing this today - is it ok if I
proceed?) and continue to be the upstream developer - there are some ugly
corners I hope to gradually smooth out.  I would hate for anyone to see the
module Debian.Debianize.Finalize who didn't absolutely have to...

On the other hand, I'm fine with debian/patches if that is better for you
than the github mechanisms.   Mostly I don't want for there to be a fork -
nobody has the time and energy for that.  I'm pretty sure Debian specific
patches belong in the upstream - after all, this is a Debian specific
program!  The stuff that says "lost in the mists of time" can certainly be
removed - I'm positive nobody out there is still using them.



On Fri, Aug 29, 2014 at 10:53 AM, Joachim Breitner 
wrote:

> Hi,
>
> at and after the DebConf talk we decided that we really should be
> creating our Debian packaging more automatically, and we need a tool for
> that. And cabal-debian is already such a tool! So we should use it.
>
> Currently, it is not quite good enough; there are a few things that it
> could or should be doing differently, or where best practices have
> changed a litte (e.g. watch files). So I’d like to find out how best to
> develop these changes.
>
> David, I assume that you are using cabal-debian at Seereason, so you
> might not want our changes without checking them. Do you have a
> suggestion on how we should do this? Should we simply keep the
> Debian-specific patches in debian/patches? Should we have a fork from
> which you sync occasionally? Should we reverse it, i.e. we become the
> primary maintainer, and you submit your patches (if any)?
>
> Also, cabal-debian --help says things like
> (This is an option whose use case is lost in the mists of time.)
> We certainly do not use these things. Should we simply remove it and
> clean it up a bit?
>
> Greetings,
> Joachim
>
>
> --
> Joachim "nomeata" Breitner
> Debian Developer
>   nome...@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
>   JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
>
>


Re: Adding ghcjs support to haskell-devscripts

2014-08-17 Thread David Fox
On Wed, Jul 2, 2014 at 12:14 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Dienstag, den 01.07.2014, 15:30 -0700 schrieb David Fox:
> > Joachim, is there a procedure for submitting changes to
> > haskell-devscripts?  I have changes to support the building of
> > libraries using ghcjs I'd like to submit.
>
> the procedure is to send a patch :-) (or point us to a fork with your
> changes).


Ok, I have created a version of haskell-devscripts that supports ghcjs and
should be backwards compatible with the current version.  The only visible
differences should be removal of support for documentation packages with
the prefix "haskell-" instead of "libghc-".  I also removed a few cases
where it seemed to be building the package "ghc" or "ghc-prof".   The
forked darcs repo is http://hub.darcs.net/ddssff/haskell-devscripts.  There
are fifteen patches, the first two are bug fixes, the rest are an attempt
at a clear exposition of the changes I have made.  There is only one patch
that has a lot of complexity, it has "Largeish patch" in its name.

Basically, I converted all the makefile recipes that were in hlibrary.mk
into bash functions in Dh_Haskell.sh.  This makes it easier to tell what
the makefile is doing and avoids duplication of code between make world and
bash world.  I'm testing it on a bunch of packages now, but the packages
are all fairly uniform, as their debianizations were generated by
cabal-debian.  Obviously, some outside testing would be a good thing.

-david


Re: Mapping dependencies to lowercase in cabal-debian

2014-08-12 Thread David Fox
I have applied this patch and uploaded cabal-debian-4.15.2 to hackage.  It
is worth noting that it would be better if I modified the BinPkgName and
SrcPkgName types in the debian package so they prohibited creation of
values containing upper case.  Also, there is a more sophisticated
mechanism for mapping cabal names to debian names.  It allows you to do
things like map versions of QuickCheck < 2 to libghc-quickcheck2-dev,
others to libghc-quickcheck-dev.  Unfortunately, the library is not (yet)
100% consistent in its treatment of library names because of its long seven
year history.

-david


On Tue, Aug 12, 2014 at 7:39 AM, David Fox  wrote:

> Thanks, I will look into this.
>
>
> On Tue, Aug 5, 2014 at 5:34 AM, Sven Bartscher <
> sven.bartsc...@weltraumschlangen.de> wrote:
>
>> Dear maintainer,
>>
>> We recently dealt with a bug in you package, cabal-debian, about
>> dependencies not being mapped to lowercase before being added to the
>> debianization. This is a bug, since debian package-names are always
>> lowercase.
>> The original bugreport can be seen here:
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756327
>>
>> However, we created a patch, which fixes this problem. We thought you
>> may want to include the patch in your package. For that reason I'm
>> sending it to you.
>>
>> Regards
>> Sven
>> pp. Debian Haskell Group
>>
>
>


Re: Mapping dependencies to lowercase in cabal-debian

2014-08-12 Thread David Fox
Thanks, I will look into this.


On Tue, Aug 5, 2014 at 5:34 AM, Sven Bartscher <
sven.bartsc...@weltraumschlangen.de> wrote:

> Dear maintainer,
>
> We recently dealt with a bug in you package, cabal-debian, about
> dependencies not being mapped to lowercase before being added to the
> debianization. This is a bug, since debian package-names are always
> lowercase.
> The original bugreport can be seen here:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756327
>
> However, we created a patch, which fixes this problem. We thought you
> may want to include the patch in your package. For that reason I'm
> sending it to you.
>
> Regards
> Sven
> pp. Debian Haskell Group
>


Debian packaging repository for ghc

2014-07-19 Thread David Fox
On the page
http://anonscm.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/ghc;a=summary
there is a link to the darcs repository, but it is not valid.  What should
it be?


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-16 Thread David Fox
On Wed, Jul 16, 2014 at 10:38 AM, David Fox  wrote:

> On Wed, Jul 16, 2014 at 12:55 AM, Joachim Breitner 
> wrote:
>
>> Hi,
>>
>> Am Sonntag, den 13.07.2014, 21:54 -0700 schrieb David Fox:
>>
>> > I'm almost certain now that libtinfo-dev should be a dependency of ghc
>> > if it exports terminfo.  If so, I apologize in advance - and after
>> > that nice note you left in the changelog!
>>
>> haskell-terminfo depends on libncurses5-dev, so why do you think it
>> should be libtinfo-dev?
>>
>> Also, what is the problem you are experiencing, and does adding the
>> depends fix it?
>
>
> The problem I'm experiencing is something like "/usr/bin/ld: -ltinfo not
> found" when linking a package that uses the terminfo cabal library.  Adding
> the dependency does fix this.  This is the terminfo library now built into
> ghc, not the external one (which can't be installed now that ghc conflicts
> with it.)
>
> A dependency on libncurses5-dev would actually be better, I see it depends
> on (pulls in) libtinfo-dev.
>
> -david
>
> I don't know whether it is necessary for ghc-doc to conflict with
libghc-terminfo-doc and the others - it only conflicts if they are the same
version, and there's no good reason to build terminfo for the same version
as is built into ghc-doc.


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-16 Thread David Fox
On Wed, Jul 16, 2014 at 12:55 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Sonntag, den 13.07.2014, 21:54 -0700 schrieb David Fox:
>
> > I'm almost certain now that libtinfo-dev should be a dependency of ghc
> > if it exports terminfo.  If so, I apologize in advance - and after
> > that nice note you left in the changelog!
>
> haskell-terminfo depends on libncurses5-dev, so why do you think it
> should be libtinfo-dev?
>
> Also, what is the problem you are experiencing, and does adding the
> depends fix it?


The problem I'm experiencing is something like "/usr/bin/ld: -ltinfo not
found" when linking a package that uses the terminfo cabal library.  Adding
the dependency does fix this.  This is the terminfo library now built into
ghc, not the external one (which can't be installed now that ghc conflicts
with it.)

A dependency on libncurses5-dev would actually be better, I see it depends
on (pulls in) libtinfo-dev.

-david


Re: cabal-debian FTBFS

2014-07-14 Thread David Fox
On Mon, Jul 14, 2014 at 12:21 AM, Joachim Breitner 
wrote:

> Hi,
>
> We got https://bugs.debian.org/753183 a while ago, and I guess we want
> to upload the latest version of cabal-debian. Who of the DHG group uses
> this package and would like to prepare an upload? There is a new major
> version out and since I don’t use this code, I’d rather leave it to
> someone who does, in case packaging changes are needed.


I just uploaded the latest from darcs (4.15) to hackage in case that
resolves any build issues.  I'm happy to look at any issues DHG finds.


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-13 Thread David Fox
On Sun, Jul 13, 2014 at 8:11 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Sonntag, den 13.07.2014, 07:50 -0700 schrieb David Fox:
> > On Fri, Jul 11, 2014 at 3:42 PM, Joachim Breitner 
> > wrote:
> > Am Freitag, den 11.07.2014, 13:12 -0700 schrieb David Fox:
> >
> > > Either way works for me, it is just that I'm getting build
> errors
> > > because our builder decides it needs to build those packages
> and then,
> > > because the cabal versions are the same, they collide with
> > > the .haddock files in ghc.
> >
> >
> > patch welcome :-)
> >
> >
> > I built about 500 different packages with the attached patch.  It just
> > removes terminfo, haskeline, and xhtml from the ignored list in
> > debian/provided_substvars.
>
> I’ll apply it (building right now) and will revisit the question of
> whether these should be package separately some other time.
>

I'm almost certain now that libtinfo-dev should be a dependency of ghc if
it exports terminfo.  If so, I apologize in advance - and after that nice
note you left in the changelog!


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-13 Thread David Fox
On Fri, Jul 11, 2014 at 3:42 PM, Joachim Breitner 
wrote:

> Hi,
>
> Am Freitag, den 11.07.2014, 13:12 -0700 schrieb David Fox:
>
> > Either way works for me, it is just that I'm getting build errors
> > because our builder decides it needs to build those packages and then,
> > because the cabal versions are the same, they collide with
> > the .haddock files in ghc.
>
> patch welcome :-)
>
> I built about 500 different packages with the attached patch.  It just
removes terminfo, haskeline, and xhtml from the ignored list in
debian/provided_substvars.
--- old/debian/provided_substvars   2014-06-10 01:47:34.0 -0700
+++ new/debian/provided_substvars   2014-07-12 06:34:38.637057410 -0700
@@ -5,7 +5,7 @@
 open PKG, 'inplace/bin/ghc-pkg list --simple-output |'
 or die "ghc-pkg list failed: $!";
 
-my @ignored = ('ghc', 'mtl', 'terminfo', 'haskeline', 'utf8-string', 'xhtml', 
'rts', 'stm', 'parallel');
+my @ignored = ('ghc', 'mtl', 'utf8-string', 'rts', 'stm', 'parallel');
 my %ignored;
 $ignored{$_}++ for @ignored;
 


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-11 Thread David Fox
On Fri, Jul 11, 2014 at 3:42 PM, Joachim Breitner 
wrote:

> Hi,
>
> Am Freitag, den 11.07.2014, 13:12 -0700 schrieb David Fox:
>
> > Either way works for me, it is just that I'm getting build errors
> > because our builder decides it needs to build those packages and then,
> > because the cabal versions are the same, they collide with
> > the .haddock files in ghc.
>
> patch welcome :-)
>
>
I will try to look at this.  But it looks like these libraries *should* be
included, so the fix is to add to the provides list:

https://ghc.haskell.org/trac/ghc/ticket/8919
http://www.reddit.com/r/haskell/comments/2af4jf/ghc783_is_out/ciufcfc


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-11 Thread David Fox
On Fri, Jul 11, 2014 at 7:00 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Freitag, den 11.07.2014, 06:03 -0700 schrieb David Fox:
> > I believe that these packages should be in the Provides line for the
> > ghc-doc package:
> >
> >
> > libghc-binary-doc
> > libghc-haskeline-doc
> > libghc-terminfo-doc
> > libghc-xhtml-doc
> >
> >
> > ghc-doc contains a .haddock file for each of them.
>
> I wonder if we shouldn’t rather not ship these libraries with GHC, and
> instead package them separately. That way, we can update them
> independently.
>

Either way works for me, it is just that I'm getting build errors because
our builder decides it needs to build those packages and then, because the
cabal versions are the same, they collide with the .haddock files in ghc.


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-11 Thread David Fox
On Fri, Jul 11, 2014 at 8:42 AM, David Fox  wrote:

>
>
>
> On Fri, Jul 11, 2014 at 7:00 AM, Joachim Breitner 
> wrote:
>
>> Hi,
>>
>> Am Freitag, den 11.07.2014, 06:03 -0700 schrieb David Fox:
>> > I believe that these packages should be in the Provides line for the
>> > ghc-doc package:
>> >
>> >
>> > libghc-binary-doc
>> > libghc-haskeline-doc
>> > libghc-terminfo-doc
>> > libghc-xhtml-doc
>> >
>> >
>> > ghc-doc contains a .haddock file for each of them.
>>
>> I wonder if we shouldn’t rather not ship these libraries with GHC, and
>> instead package them separately. That way, we can update them
>> independently.
>>
>> It seems to me (other than binary) those libraries are not actually
> provided by the ghc package, the .haddock files just snuck into the ghc-doc
> package.
>
>
Ignore that, I was looking at an old build of ghc.


Re: Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-11 Thread David Fox
On Fri, Jul 11, 2014 at 7:00 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Freitag, den 11.07.2014, 06:03 -0700 schrieb David Fox:
> > I believe that these packages should be in the Provides line for the
> > ghc-doc package:
> >
> >
> > libghc-binary-doc
> > libghc-haskeline-doc
> > libghc-terminfo-doc
> > libghc-xhtml-doc
> >
> >
> > ghc-doc contains a .haddock file for each of them.
>
> I wonder if we shouldn’t rather not ship these libraries with GHC, and
> instead package them separately. That way, we can update them
> independently.
>
> It seems to me (other than binary) those libraries are not actually
provided by the ghc package, the .haddock files just snuck into the ghc-doc
package.


Four packages missing from ghc-doc Provides line, 7.8.20140710-1

2014-07-11 Thread David Fox
I believe that these packages should be in the Provides line for the
ghc-doc package:

libghc-binary-doc
libghc-haskeline-doc
libghc-terminfo-doc
libghc-xhtml-doc

ghc-doc contains a .haddock file for each of them.


Re: Adding ghcjs support to haskell-devscripts

2014-07-02 Thread David Fox
On Wed, Jul 2, 2014 at 12:14 AM, Joachim Breitner 
wrote:

> Hi,
>
> Am Dienstag, den 01.07.2014, 15:30 -0700 schrieb David Fox:
> > Joachim, is there a procedure for submitting changes to
> > haskell-devscripts?  I have changes to support the building of
> > libraries using ghcjs I'd like to submit.
>
> the procedure is to send a patch :-) (or point us to a fork with your
> changes).
>
> Oh, I found it - was having trouble finding the darcs repo...


Adding ghcjs support to haskell-devscripts

2014-07-01 Thread David Fox
Joachim, is there a procedure for submitting changes to haskell-devscripts?
 I have changes to support the building of libraries using ghcjs I'd like
to submit.


Re: Packaging Cabal separately

2014-06-10 Thread David Fox
On Tue, Jun 10, 2014 at 2:19 AM, Joachim Breitner  wrote:
> Hi,
>
> Am Montag, den 09.06.2014, 14:04 -0700 schrieb David Fox:
>> Excellent!  Could we have a similarly modified build of 7.8 in experimental?
>
> just merged these and other changes from unstable to experimental and am
> building the package right now.

A quick note on the 7.8 package - it still conflicts with
libghc-cabal-dev.  This doesn't affect me because I've created a
libghc-cabal-ghcjs-dev package for version 1.21 of Cabal, but I wanted
to make sure you knew.   Also, both version 7.6 and 7.8 have
unversioned links in the ghc-doc package like
/usr/lib/ghc-doc/hoogle/Cabal.txt, which would conflict with the
corresponding link in a libghc-cabal-doc package.


-- 
To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cajn_rf7t51h1fnp9d5zoo+txwryhddh9kkhvjufwoy9n22f...@mail.gmail.com



  1   2   >