[Pkg-haskell-commits] darcs: haskell-devscripts: Txt files have local path.

kiwamu at debian.or.jp kiwamu at debian.or.jp
Thu Oct 4 16:49:39 UTC 2012


Thu Oct  4 16:44:36 UTC 2012  kiwamu at debian.or.jp
  * Txt files have local path.
  Ignore-this: 5ee32e72a0bd753c16c5d0d78f2d7706

    M ./haddock-collect -5 +5
    M ./hlibrary.mk -2 +1

Thu Oct  4 16:44:36 UTC 2012  kiwamu at debian.or.jp
  * Txt files have local path.
  Ignore-this: 5ee32e72a0bd753c16c5d0d78f2d7706
diff -rN -u old-haskell-devscripts//haddock-collect new-haskell-devscripts//haddock-collect
--- old-haskell-devscripts//haddock-collect	2012-10-04 16:49:39.582242514 +0000
+++ new-haskell-devscripts//haddock-collect	2012-10-04 16:49:39.602222103 +0000
@@ -39,17 +39,17 @@
 --    return $ BL8.unpack . decompress $ c
   | otherwise = readFile file
 
-readAndPrint :: URL -> String -> FilePath -> FilePath -> IO ()
-readAndPrint prefix strip outdir file = do
+readAndPrint :: FilePath -> FilePath -> FilePath -> IO ()
+readAndPrint strip outdir file = do
   f <- readFileGz file
   writeFile outfile $ filterHaddock url f
     where dropgz f | takeExtension f == ".gz" = dropExtension f
                    | otherwise                = f
           outfile = outdir </> takeFileName (dropgz file)
-          url = prefix ++ (fromMaybe "" . stripPrefix strip . dropFileName $ file)
+          url = normalise $ "file:/" ++ (fromMaybe "" . stripPrefix strip . dropFileName $ file)
 
 main :: IO ()
 main = do
-  [p, s, o] <- getArgs
+  [s, o] <- getArgs
   c <- getContents
-  mapM_ (readAndPrint p s o) (lines c)
+  mapM_ (readAndPrint s o) (lines c)
diff -rN -u old-haskell-devscripts//hlibrary.mk new-haskell-devscripts//hlibrary.mk
--- old-haskell-devscripts//hlibrary.mk	2012-10-04 16:49:39.558233938 +0000
+++ new-haskell-devscripts//hlibrary.mk	2012-10-04 16:49:39.606223410 +0000
@@ -57,7 +57,6 @@
 DEB_HADDOCK_OPTS += --hyperlink-source
 endif
 
-DEB_HOOGLE_URLPREFIX = http://localhost/cgi-bin/hoogle/file
 DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/
 
 MAKEFILE := debian/hlibrary.Makefile
@@ -176,7 +175,7 @@
 		debian/$(notdir $@)/$(DEB_HADDOCK_DIR)
 	mkdir -p debian/$(notdir $@)/$(DEB_HOOGLE_TXT_DIR)
 	find debian/$(notdir $@)/$(DEB_HADDOCK_HTML_DIR) -name "*.txt" | \
-	  /usr/bin/haddock-collect $(DEB_HOOGLE_URLPREFIX) \
+	  /usr/bin/haddock-collect \
 	  debian/$(notdir $@) debian/$(notdir $@)/$(DEB_HOOGLE_TXT_DIR)
 	dh_haskell_depends -p$(notdir $@)
 





More information about the Pkg-haskell-commits mailing list