Re: Enable cabal test-suites for hs-ports by default?

2012-12-04 Thread Matthias Kilian
On Mon, Dec 03, 2012 at 10:32:56PM +0100, Matthias Kilian wrote:
 I'd like to add --enable-tests by default in ghc.port.mk, unless a
 hs-ports has set NO_REGRESS=Yes.
[...]

Ignore this for now. Amit Kulkarni suggested to change the behaviour
of Cabal (and push this upstream), and I'll have a look at the code
to check how difficult this would be.

Ciao,
Kili



Re: Enable cabal test-suites for hs-ports by default?

2012-12-04 Thread Predrag Punosevac
On Mon, Dec 03, 2012 at 10:32:56PM +0100, Matthias Kilian wrote:
 I'd like to add --enable-tests by default in ghc.port.mk, unless a
 hs-ports has set NO_REGRESS=Yes.
[...]

This is an OT. Any chance that one of you Haskell guys gets pandoc
ported to OpenBSD.

http://johnmacfarlane.net/pandoc/

I use txt2tags in general but there are few situations where I would
like to be able to use pandoc (yes I know it is available on-line). 

Thank,
Predrag

P.S. I tried installing with cabal but it just returns a slue of
complains. 



text/hs-pandoc (was: Enable cabal test-suites for hs-ports by default?)

2012-12-04 Thread Matthias Kilian
On Tue, Dec 04, 2012 at 02:38:02PM -0500, Predrag Punosevac wrote:
 This is an OT. Any chance that one of you Haskell guys gets pandoc
 ported to OpenBSD.
 
 http://johnmacfarlane.net/pandoc/

Looking at http://hackage.haskell.org/package/pandoc, there are a
couple of dependencies currently not in our ports tree (at least
citeproc-hs, highlighting-kate, json, pandoc-types, temporary,
texmath, and everything those depend on).

This may be an easy job, or it may open a whole can of worms.

 P.S. I tried installing with cabal but it just returns a slue of
 complains. 

Can you send me some logs? Using cabal (the program, from package
cabal-install) should work. If it doesn't, there's some bug either
in pandoc or some of its dependencies, or in our ghc / hs-* ports.

Ciao,
Kili



Re: Enable cabal test-suites for hs-ports by default?

2012-12-04 Thread Alexander Polakov
* Predrag Punosevac punoseva...@gmail.com [121205 00:40]:
 On Mon, Dec 03, 2012 at 10:32:56PM +0100, Matthias Kilian wrote:
  I'd like to add --enable-tests by default in ghc.port.mk, unless a
  hs-ports has set NO_REGRESS=Yes.
 [...]
 
 This is an OT. Any chance that one of you Haskell guys gets pandoc
 ported to OpenBSD.
 
 http://johnmacfarlane.net/pandoc/
 
 P.S. I tried installing with cabal but it just returns a slue of
 complains. 
 

pandoc installs and works fine here on -current/i386.

-- 
Alexander Polakov | plhk.ru



Enable cabal test-suites for hs-ports by default?

2012-12-03 Thread Matthias Kilian
Hi,

I'd like to add --enable-tests by default in ghc.port.mk, unless a
hs-ports has set NO_REGRESS=Yes. However, this will have negative
impact on build times. Not much yet (see below), but as time goes
by, more and more hs-ports may include test-suites, so I better ask
before I just do such a change (proposed diff at the end of this
mail).

We currently have a total of 28 hs-ports which use the test-suite
feature of Cabal. One problem is that one *has* to configure those
ports with --enable-tests or a make regress will *always* fail
(noticed by sthen@ the other day while reviewing the new devel/hs-async
port). The next problem is that --enable-tests causes the test-suites
to be compiled and link during the build stage, not during the
regress stage. So, setting --enable-tests by default in ghc.port.mk
obviously will have an impact at the build time, even if you're not
going to make regress at all.

From those 28 ports, only the 9 ports listed below are buildable
with --enable-tests and without NO_REGRESS=Yes. Building them with
--enable-tests set in ghc.port.mk takes those times (measuring mere
build time, not extract/patch/configure):

1st run: 147.87 real   117.49 user17.80 sys
2nd run: 142.19 real   117.69 user17.72 sys

And building them without --enable-tests set:

1st run:  99.50 real83.72 user11.38 sys
2nd run: 101.19 real85.14 user11.30 sys

devel/hs-aeson, devel/hs-async, devel/hs-base64-bytestring,
devel/hs-concurrent-extra, devel/hs-lifted-base, devel/hs-network,
devel/hs-network-conduit, devel/hs-split, devel/hs-unordered-containers

Most of the remaining ports are failing during configure time,
because --enable-regress causes them to require some dependencies
we don't yet have in the ports tree. For now, they'll just get
NO_REGRESS=Yes:

archivers/hs-zlib-bindings, devel/hs-blaze-builder-conduit,
devel/hs-blaze-textual, devel/hs-conduit, devel/hs-hashable,
devel/hs-monad-par, devel/hs-simple-sendfile, lang/feldspar/language,
lang/hs-syntactic, net/hs-HTTP, security/hs-mwc-random, security/hs-skein,
textproc/hs-blaze-html, textproc/hs-blaze-markup, www/hs-clientsession,
www/hs-http-types, www/hs-warp

Two ports fail during build and need NO_REGRESS=Yes, too:

devel/hs-text, textproc/hs-attoparsec

Should this go in?

Ciao,
Kili

here's the diff that would go in:

Index: lang/ghc/ghc.port.mk
===
RCS file: /cvs/ports/lang/ghc/ghc.port.mk,v
retrieving revision 1.26
diff -u -p -r1.26 ghc.port.mk
--- lang/ghc/ghc.port.mk8 Nov 2012 22:21:45 -   1.26
+++ lang/ghc/ghc.port.mk3 Dec 2012 21:26:03 -
@@ -57,6 +57,10 @@ MODGHC_SETUP_CONF_ARGS +=--docdir=\$$da
 MODGHC_SETUP_CONF_ARGS +=  --libsubdir=ghc/\$$pkgid
 .  endif
 
+.  if !${NO_REGRESS:L:Myes}
+MODGHC_SETUP_CONF_ARGS +=  --enable-tests
+.  endif
+
 .  if ${MODGHC_BUILD:L:Mhaddock}
 BUILD_DEPENDS +=   devel/haddock \
lang/ghc,-doc
Index: archivers/hs-zlib-bindings/Makefile
===
RCS file: /cvs/ports/archivers/hs-zlib-bindings/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- archivers/hs-zlib-bindings/Makefile 28 Oct 2012 23:24:28 -  1.7
+++ archivers/hs-zlib-bindings/Makefile 3 Dec 2012 21:26:03 -
@@ -19,4 +19,7 @@ MODGHC_BUILD =cabal hackage haddock re
 RUN_DEPENDS =  archivers/hs-zlib=0.5.2.0,0.6
 BUILD_DEPENDS =${RUN_DEPENDS}
 
+# Missing dependencies (hs-hspec).
+NO_REGRESS =   Yes
+
 .include bsd.port.mk
Index: devel/hs-async/Makefile
===
RCS file: /cvs/ports/devel/hs-async/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- devel/hs-async/Makefile 2 Dec 2012 20:10:22 -   1.1.1.1
+++ devel/hs-async/Makefile 3 Dec 2012 21:26:03 -
@@ -20,8 +20,4 @@ MODGHC_BUILD =cabal hackage haddock re
 BUILD_DEPENDS =${RUN_DEPENDS}
 RUN_DEPENDS =  devel/hs-stm=2.2,2.5
 
-# Needs --enable-test, which will probably set by ghc.port.mk soon
-# (when I have some numbers about build times).
-NO_REGRESS =   Yes
-
 .include bsd.port.mk
Index: devel/hs-blaze-builder-conduit/Makefile
===
RCS file: /cvs/ports/devel/hs-blaze-builder-conduit/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- devel/hs-blaze-builder-conduit/Makefile 28 Oct 2012 23:26:38 -  
1.2
+++ devel/hs-blaze-builder-conduit/Makefile 3 Dec 2012 21:26:03 -
@@ -25,4 +25,7 @@ RUN_DEPENDS = devel/hs-blaze-builder=0
devel/hs-text=0.11 \
devel/hs-transformers=0.2.2,0.4
 
+# Missing dependencies (hs-hspec).
+NO_REGRESS =   Yes
+
 .include bsd.port.mk