[Git][haskell-team/DHG_packages][master] 4 commits: ghc-exactprint: Sourceful post-NEW upload

Ilias Tsitsimpis gitlab at salsa.debian.org
Fri Aug 7 16:55:52 BST 2020



Ilias Tsitsimpis pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
3c9fa429 by Ilias Tsitsimpis at 2020-08-07T18:30:39+03:00
ghc-exactprint: Sourceful post-NEW upload

- - - - -
24ecab15 by Ilias Tsitsimpis at 2020-08-07T18:35:24+03:00
ghc: Fix gen_contents_index

The output of `ghc-pkg dump` has changed and now indents values with
spaces to make then line up. In some cases, it also wraps single line
values to the next line. Use `ghc-pkg field` to extract the necessary
fields, instead of parsing the output of `ghc-pkg dump`.

Closes: #966069

- - - - -
c3b20536 by Ilias Tsitsimpis at 2020-08-07T18:44:43+03:00
ghc: Use locally-installed MathJax.js in gen_contents_index

Closes: 890627

- - - - -
c98ccb71 by Ilias Tsitsimpis at 2020-08-07T18:51:55+03:00
ghc: Remove hard-coded googleapis font URL

Closes: #963690

- - - - -


5 changed files:

- p/ghc/debian/changelog
- p/ghc/debian/gen_contents_index
- + p/ghc/debian/patches/haddock-remove-googleapis-fonts
- p/ghc/debian/patches/series
- p/haskell-ghc-exactprint/debian/changelog


Changes:

=====================================
p/ghc/debian/changelog
=====================================
@@ -1,3 +1,13 @@
+ghc (8.8.3-4) UNRELEASED; urgency=medium
+
+  * Fix gen_contents_index to use ghc-pkg to parse the package database
+    (Closes: #966069)
+  * Use locally-installed MathJax.js when generating library docs
+    (Closes: #890627)
+  * Patch Haddock to remove hard-coded googleapis font URL (Closes: #963690)
+
+ -- Ilias Tsitsimpis <iliastsi at debian.org>  Fri, 07 Aug 2020 18:31:56 +0300
+
 ghc (8.8.3-3) unstable; urgency=medium
 
   * Reupload due to bad debian/rules merge


=====================================
p/ghc/debian/gen_contents_index
=====================================
@@ -11,12 +11,13 @@ exit 0 unless (-d "/usr/share/doc/ghc-doc/html/libraries/" and -r "/usr/share/do
 
 # Add everything from the global Cabal registry to index.
 if (-e '/usr/bin/ghc-pkg') {
-    open CABAL, 'ghc-pkg dump --global |' or warn "ghc-pkg dump failed: $!";
+    open CABAL, "/usr/bin/ghc-pkg --global --simple-output field '*' name,version,haddock-interfaces,haddock-html |" or warn "ghc-pkg dump failed: $!";
     addInfo (\*CABAL, \%pkgs, \@ifaces);
     close CABAL;
 }
 
 exec ('haddock', '--gen-index', '--gen-contents',
+      '--mathjax', 'file:///usr/share/javascript/mathjax/MathJax.js',
       '-o', '/usr/share/doc/ghc-doc/html/libraries/',
       '-t'. 'Haskell Hierarchical Libraries',
       '-p', '/usr/share/doc/ghc-doc/html/libraries/prologue.txt',
@@ -24,22 +25,14 @@ exec ('haddock', '--gen-index', '--gen-contents',
 
 sub addInfo {
     my $fh = shift;
-    my %dat;
     while (<$fh>) {
-	if (/^name: (.*)/) {
-	    $dat{pkg} = $1;
-	} elsif (/^version: (.*)/) {
-	    $dat{ver} = $1;
-	} elsif (/^haddock-interfaces: (.*)/) {
-	    $dat{ifaces} = $1;
-	} elsif (/^haddock-html: (.*)/) {
-	    $dat{html} = $1;
-	} elsif (/^---/) {
-	    process(\%dat, @_);
-	    %dat = ();
-	}
+        my %dat;
+        chomp ($dat{pkg} = $_);
+        chomp ($dat{ver} = <$fh>);
+        chomp ($dat{ifaces} = <$fh>);
+        chomp ($dat{html} = <$fh>);
+        process(\%dat, @_);
     }
-    process(\%dat, @_);
 }
 
 sub process {
@@ -51,13 +44,13 @@ sub process {
     my $p = $$dat{pkg}.'-'.$$dat{ver};
     return undef if (exists $$pkgs{$p});
     if ($$dat{html} =~ m,^/usr/share/doc/ghc-doc/html/libraries/(.*),) {
-	$path = $1;
+        $path = $1;
     } elsif ($$dat{html} =~ m,^/usr/share/doc/([^/]*-doc/html/.*),) {
-	$path = "../../../$1";
+        $path = "../../../$1";
     }
 
     if (defined $path && -r $$dat{ifaces}) {
-	$$pkgs{$p} = 1;
-	push @ifaces, "--read-interface=$path,$$dat{ifaces}";
+        $$pkgs{$p} = 1;
+        push @ifaces, "--read-interface=$path,$$dat{ifaces}";
     }
 }


=====================================
p/ghc/debian/patches/haddock-remove-googleapis-fonts
=====================================
@@ -0,0 +1,24 @@
+Description: Remove hard-coded googleapis font URL
+Bug: https://github.com/haskell/haddock/issues/1211
+Bug-Debian: https://bugs.debian.org/963690
+
+Index: b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
+===================================================================
+--- a/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
++++ b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
+@@ -127,13 +127,13 @@ headHtml docTitle themes mathjax_url =
+     , thetitle << docTitle
+     , styleSheet themes
+     , thelink ! [ rel "stylesheet", thetype "text/css", href quickJumpCssFile] << noHtml
+-    , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml
++    -- , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml
+     , script ! [src haddockJsFile, emptyAttr "async", thetype "text/javascript"] << noHtml
+     , script ! [thetype "text/x-mathjax-config"] << primHtml mjConf
+     , script ! [src mjUrl, thetype "text/javascript"] << noHtml
+     ]
+   where
+-    fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"
++    -- fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"
+     mjUrl = fromMaybe "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" mathjax_url
+     mjConf = unwords [ "MathJax.Hub.Config({"
+                      ,   "tex2jax: {"


=====================================
p/ghc/debian/patches/series
=====================================
@@ -12,3 +12,4 @@ llvm-arm-unknown-linux-gnueabi.patch
 fix-32bit-atomic
 3c12355ece0fa14e534c71a9f7327eda9773fad9.patch
 11f8eef5a9625c77f78a829406c446b615ed6168.patch
+haddock-remove-googleapis-fonts


=====================================
p/haskell-ghc-exactprint/debian/changelog
=====================================
@@ -1,3 +1,9 @@
+haskell-ghc-exactprint (0.6.2-2) unstable; urgency=medium
+
+  * Sourceful post-NEW upload
+
+ -- Ilias Tsitsimpis <iliastsi at debian.org>  Fri, 07 Aug 2020 08:22:38 +0300
+
 haskell-ghc-exactprint (0.6.2-1) unstable; urgency=low
 
   * Initial release



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/2742960bf48d5c1a83762e1ef2f06cfd3917729b...c98ccb71af71cd28d46302732536cc277febbd2a

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/2742960bf48d5c1a83762e1ef2f06cfd3917729b...c98ccb71af71cd28d46302732536cc277febbd2a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20200807/0d6eacbf/attachment-0001.html>


More information about the Pkg-haskell-commits mailing list