From 4dca8f6e75948d489e8127119ce3787cb97ee1e2 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 4 Sep 2008 02:51:28 +0000 Subject: Reworked Text.Pandoc.ODT to use zip-archive instead of calling external 'zip'. + Removed utf8-string and xml-light modules, and unneeded content.xml. + Removed code for building reference.odt from Setup.hs. The ODT is now built using template haskell in Text.Pandoc.ODT. + Removed copyright statements for utf8-string and xml modules, since they are no longer included in the source. + README: Removed claim that 'zip' is needed for ODT production. + Removed dependency on 'zip' from debian/control. + Text.Pandoc.Shared: Removed withTempDir, added inDirectory. + Added makeZip to Text.Pandoc.TH. + pandoc.cabal: Added dependencies on old-time, zip-archive, and utf8-string. Added markdown2pdf files to extra-sources list. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1417 788f1e2b-df1e-0410-8736-df70ead52e1b --- Setup.hs | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'Setup.hs') diff --git a/Setup.hs b/Setup.hs index c51c53bb1..9be68f8ce 100644 --- a/Setup.hs +++ b/Setup.hs @@ -12,7 +12,6 @@ import Data.Maybe ( fromJust, isNothing, catMaybes ) main = defaultMainWithHooks $ simpleUserHooks { runTests = runTestSuite - , preConf = checkReferenceODT , postBuild = makeManPages } -- | Run test suite. @@ -20,34 +19,6 @@ runTestSuite _ _ _ _ = do inDirectory "tests" $ runCommand "runhaskell -i.. RunTests.hs" >>= waitForProcess return () --- | If reference.odt needs rebuilding, build it. -checkReferenceODT _ _ = inDirectory "odt-styles" $ do - let refodt = "reference.odt" - let deps = [ "meta.xml", "content.xml", "settings.xml", "META-INF/manifest.xml", - "Thumbnails/thumbnail.png", "styles.xml", "mimetype" ] - modifiedDeps <- modifiedDependencies refodt deps - if null modifiedDeps - then return () - else makeReferenceODT modifiedDeps - return emptyHookedBuildInfo - --- | Create reference.odt by zipping up sources in odt-styles directory. -makeReferenceODT :: [FilePath] -> IO () -makeReferenceODT sources = do - zipPathMaybe <- findExecutable "zip" - if isNothing zipPathMaybe - then error $ "The 'zip' command, which is needed to build reference.odt\n" ++ - "from sources in the odt-styles directory, was not found.\n" ++ - "Try again after installing zip (http://www.info-zip.org/Zip.html).\n" ++ - "Or use the pandoc source tarball, which contains a prebuilt reference.odt." - else do - putStrLn "Creating reference.odt:" - ec <- runProcess (fromJust zipPathMaybe) (["-9", "-r", "reference.odt"] ++ sources) - Nothing Nothing Nothing Nothing (Just stderr) >>= waitForProcess - case ec of - ExitSuccess -> return () - _ -> error "Error creating ODT." - -- | Build man pages from markdown sources in man/man1/. makeManPages _ _ _ _ = do mapM makeManPage ["pandoc.1", "hsmarkdown.1", "html2markdown.1", "markdown2pdf.1"] -- cgit v1.2.3