Hi Greg, > >> I'll dig into this a bit. I simply didn't need to worry about this up > >> until now as all the other ports don't do much custom Setup.hs work. > > > > I don't know if there will be any cases other than man pages and > > git-annex's command aliases. Not sure how much effort it's worth. > > The default action of doing nothing is valid :)
Incidentally, I asked the maintainer how man pages are supposed to be installed, and they said it's best to use the Makefile if you want a complete installation. Probably not worth changing our port, but something to keep in mind in case this turns out to be a pattern. https://git-annex.branchable.com/bugs/__91__Patch__93___fix___34__mdwn2man__58___cannot_execute_-_...__34__/ A few notes / questions: * I fixed a couple of typos in https://github.com/falsifian/ports/commit/98111e702634842865a3d27675b6848e3fb2b7ca * I added example usage for cabal-bundler. I hope I got it right: https://github.com/falsifian/ports/commit/f21cb097f215831b1d08443f9074073895a13731 * If I find more time to work on this, should I polish my git-annex port, or is there something more useful I could be doing with your Cabal infrastructure? (I installed darcs and it seems to work.) * I tried to enable tests, partly because Darcs has a comprehensive test suite. I ran into some trouble. My WIP is here: https://github.com/falsifian/ports/commit/99cb0e33e2263cf15979a19bf068d3ffff45630c One problem is that cabal-bundler doesn't seem to be outputting test dependencies. (I tried manually adding some, not included in my commit.) Another is that, even if I add test dependencies manually, I end up with strange results like this: falsifian moth darcs $ make test ===> Regression tests for darcs-2.16.2 cd /usr/local/ports/pobj/darcs-2.16.2/darcs-2.16.2 && /usr/bin/env -i PORTSDIR="/usr/ports" LIBTOOL="/usr/bin/libtool" PATH='/usr/local/ports/pobj/darcs-2.16.2/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin' PREFIX='/usr/local' LOCALBASE='/usr/local' X11BASE='/usr/X11R6' CFLAGS='-O2 -pipe' TRUEPREFIX='/usr/local' DESTDIR='' HOME='/darcs-2.16.2_writes_to_HOME' PICFLAG="-fpic" BINGRP=bin BINOWN=root BINMODE=755 NONBINMODE=644 DIRMODE=755 INSTALL_COPY=-c INSTALL_STRIP=-s MANGRP=bin MANOWN=root MANMODE=644 BSD_INSTALL_PROGRAM="/usr/local/ports/pobj/darcs-2.16.2/bin/install -c -s -m 755" BSD_INSTALL_SCRIPT="/usr/local/ports/pobj/darcs-2.16.2/bin/install -c -m 755" BSD_INSTALL_DATA="/usr/local/ports/pobj/darcs-2.16.2/bin/install -c -m 644" BSD_INSTALL_MAN="/usr/local/ports/pobj/darcs-2.16.2/bin/install -c -m 644" BSD_INSTALL_PROGRAM_DIR="/usr/local/ports/pobj/darcs-2.16.2/bin/install -d -m 755" BSD_INSTALL_SCRIPT_DIR="/usr/local/ports/pobj/darcs-2.16.2/bin/install -d -m 755" BSD_INSTALL_DATA_DIR="/usr/local/ports/pobj/darcs-2.16.2/bin/install -d -m 755" BSD_INSTALL_MAN_DIR="/usr/local/ports/pobj/darcs-2.16.2/bin/install -d -m 755" HOME=/usr/local/ports/pobj/darcs-2.16.2 /usr/local/bin/cabal v2-test --offline --disable-benchmarks -w /usr/local/bin/ghc -j1 --flags="curl -library" Warning: No remote package servers have been specified. Usually you would have one specified in the config file. Resolving dependencies... cabal: Could not resolve dependencies: [__0] trying: random-1.2.0 (user goal) [__1] trying: splitmix-0.1.0.3 (user goal) [__2] trying: splitmix:!bench [__3] rejecting: splitmix:*test (cyclic dependencies; conflict set: random, splitmix) [__1] fail (backjumping, conflict set: random, splitmix) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: random, splitmix splitmix's test target depends on random and random depends on splitmix. Normally this doesn't cause any problem; I don't know why it's a problem here. * It's a pity that your approach doesn't allow Cabal-based ports to share dependencies. Some thoughts on mitigating or solving this, in decreasing order of plausability: * Is it possible to hand-pick some particularly slow ones, make packages for them, and then tell Cabal to use those packages? E.g. aeson takes a while to build. * nixpkgs (the only package system I'm really familiar with) deals with Cabal by automatically generating package descriptions for everything on hackage. I wonder if something along those lines would be do-able. I guess it would be ugly to fill the ports tree with hundreds(?) of directories each with an auto-generated package. I'm not sure if there's a way to smoosh it all into one big file. E.g. I see there's something called "multi-packages", but I'm guessing that's not designed to handle hundreds of subpackages. * Is it possible to cheat, by having all the Cabal-based ports share their Cabal directory? So if I build darcs then git-annex, Cabal has access to all the build products from darcs when it builds git-annex. I guess one problem is this might make the build output depend on the order in which you build things, if Cabal opportunistically uses whatever versions are there. * Are you planning to commit these changes all at once? Or is there some way to have an intermediate state where both old-style and new-style packages work? > Thanks > Greg -- James
