Code Monkey home page Code Monkey logo

Comments (9)

jgm avatar jgm commented on August 15, 2024

That's weird. Normally Cabal defines a CPP macro MIN_VERSION_base to indicate the version of the base library that was used in compiling. I check against this to deal with differences in UTF8 handling between GHC 6.12 and previous versions. Apparently this macro is not being defined when the library is not built. I think this might be a Cabal bug; at least, the documentation gives no reason to think it would work this way.

Looks like if you reproduce the "Build-depends" fields of the Library stanza in the Executable stanza (in pandoc.cabal), it works. But I should get in touch with Cabal people to figure out whether or not there's a bug here.

from pandoc.

jgm avatar jgm commented on August 15, 2024

Update: This seems to be due to a change in Cabal 1.8. Now Cabal will ignore build-depends in the Library stanza if Buildable is False. That means I need to either get rid of the "library" flag, or repeat the Build-depends in the executable stanzas. Either solution will work, but the latter involves ugly and error-prone repetition. So now I'm thinking I should just get rid of the "library" flag. It's hard to see what use it is, anyway. You need to have lots of Haskell libraries installed in order to compile pandoc anyway, so why would you then object to installing one more? Packagers who want to install just the pandoc executable, and don't want ANY haskell libraries installed, should presumably build in a chroot (where the needed library dependencies can also be installed). Does that seem reasonable?

from pandoc.

jgm avatar jgm commented on August 15, 2024

I removed the library flag in 7d8c8c7.
Starting with the next release, the arch package will have to be modified.

from pandoc.

dubiousjim avatar dubiousjim commented on August 15, 2024

Hi John, did you get the reply I sent a few days ago through the github interface? Basically, I was asking whether you could explain what difference the library flag makes? Or point me to where to find out. I'm guessing I need to read the cabal docs.

from pandoc.

dubiousjim avatar dubiousjim commented on August 15, 2024

The impression I have right now of the change you've made is that one can no longer include "-f-library" on the "runhaskell Setup configure ..." line. So the result is that the "runhaskell Setup copy ..." line will install the libraries together with the executables. So if we want an executable-only package, our package script will have to itself take care of pruning the libraries out of the chroot that is going to be compressed into the package. Right? Easy enough to manage. (In fact, that's what my own local version of the package script is doing right now.)

EDIT: Previous maintainer of this packaged dropped it, so I've adopted it. Can you take a look at this build script

from pandoc.

jgm avatar jgm commented on August 15, 2024

Yes, right, -f-library was supposed to disable building and installing the library. Now you'll have to deal with this another way. I don't know much about arch build scripts, but yours looks like it should work, as far as I can tell.

from pandoc.

dubiousjim avatar dubiousjim commented on August 15, 2024

Yeah, the arch-related details don't matter much. I was just checking if it should be ok to delete the stuff pandoc's install step put into /usr/lib, and also the /usr/share/pandoc-VERSION/markdown2pdf script (which you said was uneccessary and no longer maintained). Here's what ends up left (after some things are moved around):

/usr/bin/markdown2pdf
/usr/bin/pandoc
/usr/share/licenses/pandoc/COPYRIGHT
/usr/share/man/man1/markdown2pdf.1.gz
/usr/share/man/man1/pandoc.1.gz
/usr/share/pandoc-1.5.1.1/data/LaTeXMathML.js
/usr/share/pandoc-1.5.1.1/data/MathMLinHTML.js
/usr/share/pandoc-1.5.1.1/reference.odt
/usr/share/pandoc-1.5.1.1/s5/default/framing.css
/usr/share/pandoc-1.5.1.1/s5/default/opera.css
/usr/share/pandoc-1.5.1.1/s5/default/outline.css
/usr/share/pandoc-1.5.1.1/s5/default/pretty.css
/usr/share/pandoc-1.5.1.1/s5/default/print.css
/usr/share/pandoc-1.5.1.1/s5/default/s5-core.css
/usr/share/pandoc-1.5.1.1/s5/default/slides.js.comment
/usr/share/pandoc-1.5.1.1/s5/default/slides.js.packed
/usr/share/pandoc-1.5.1.1/templates/context.template
/usr/share/pandoc-1.5.1.1/templates/docbook.template
/usr/share/pandoc-1.5.1.1/templates/html.template
/usr/share/pandoc-1.5.1.1/templates/latex.template
/usr/share/pandoc-1.5.1.1/templates/man.template
/usr/share/pandoc-1.5.1.1/templates/markdown.template
/usr/share/pandoc-1.5.1.1/templates/mediawiki.template
/usr/share/pandoc-1.5.1.1/templates/opendocument.template
/usr/share/pandoc-1.5.1.1/templates/plain.template
/usr/share/pandoc-1.5.1.1/templates/rst.template
/usr/share/pandoc-1.5.1.1/templates/rtf.template
/usr/share/pandoc-1.5.1.1/templates/texinfo.template

from pandoc.

jgm avatar jgm commented on August 15, 2024

Yeah, that should be all you need. You might want to have it install the README somewhere, too (also BUGS and changelog). These would naturally go in /usr/share/pandoc-1.5.1.1. But they're not absolutely necessary.

from pandoc.

dubiousjim avatar dubiousjim commented on August 15, 2024

Thanks, you caught a packaging bug.

from pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.