Github messages for voidlinux
 help / color / mirror / Atom feed
From: chexum <chexum@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] ghc: allow building with current Sphinx
Date: Sat, 10 Jul 2021 23:17:33 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31898@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1922 bytes --]

There is a new pull request by chexum against master on the void-packages repository

https://github.com/chexum/void-packages ghc-884
https://github.com/void-linux/void-packages/pull/31898

ghc: allow building with current Sphinx
./srcpkg build ghc fails with current tools:

"inplace/bin/ghc-stage1" [...] /build/cbits/longlong.p_o
Running Sphinx v4.0.2

Configuration error:
There is a syntax error in your configuration file: (unicode error) 'unicodeescape' codec can't decode bytes in position 1-2: truncated \uXXXX escape (conf.py, line 87)

...
make: *** [Makefile:128: all] Error 2

According to https://gitlab.haskell.org/ghc/ghc/-/issues/19962

>> This fix is to use raw strings, as already done in master:
>> https://gitlab.haskell.org/ghc/ghc/-/blob/master/docs/users_guide/conf.py#L96

Sanitized from commit (only small parts apply)
https://gitlab.haskell.org/ghc/ghc/-/commit/83407ffc7acc00cc025b9f6ed063add9ab9f9bcc

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

[skip CI] build might take over 3 hours with a single CPU - local build/pkg tested

#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/31898.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ghc-884-31898.patch --]
[-- Type: text/x-diff, Size: 2357 bytes --]

From f427a699740524c92f1544bedd7cb8346515d073 Mon Sep 17 00:00:00 2001
From: J Farkas <chexum+git@gmail.com>
Date: Sat, 10 Jul 2021 19:28:54 +0000
Subject: [PATCH] ghc: allow building with current Sphinx

./srcpkg build ghc fails with current tools:

"inplace/bin/ghc-stage1" [...] /build/cbits/longlong.p_o
Running Sphinx v4.0.2

Configuration error:
There is a syntax error in your configuration file: (unicode error) 'unicodeescape' codec can't decode bytes in position 1-2: truncated \uXXXX escape (conf.py, line 87)

...
make: *** [Makefile:128: all] Error 2

According to https://gitlab.haskell.org/ghc/ghc/-/issues/19962

>> This fix is to use raw strings, as already done in master:
>> https://gitlab.haskell.org/ghc/ghc/-/blob/master/docs/users_guide/conf.py#L96

Sanitized from commit (only small parts apply)
https://gitlab.haskell.org/ghc/ghc/-/commit/83407ffc7acc00cc025b9f6ed063add9ab9f9bcc
---
 srcpkgs/ghc/patches/sphinx-unicode.patch | 17 +++++++++++++++++
 srcpkgs/ghc/template                     |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ghc/patches/sphinx-unicode.patch

diff --git a/srcpkgs/ghc/patches/sphinx-unicode.patch b/srcpkgs/ghc/patches/sphinx-unicode.patch
new file mode 100644
index 000000000000..0286b9c2bd31
--- /dev/null
+++ b/srcpkgs/ghc/patches/sphinx-unicode.patch
@@ -0,0 +1,17 @@
+diff -rpU2 ghc-8.8.4-orig/docs/users_guide/conf.py ghc-8.8.4/docs/users_guide/conf.py
+--- ghc-8.8.4-orig/docs/users_guide/conf.py	2020-07-08 16:43:03.000000000 +0000
++++ ghc-8.8.4/docs/users_guide/conf.py	2021-07-10 20:25:33.536928487 +0000
+@@ -78,5 +78,5 @@ latex_elements = {
+     'inputenc': '',
+     'utf8extra': '',
+-    'preamble': '''
++    'preamble': r'''
+ \usepackage{fontspec}
+ \usepackage{makeidx}
+@@ -84,5 +84,5 @@ latex_elements = {
+ \setromanfont{DejaVu Serif}
+ \setmonofont{DejaVu Sans Mono}
+-\setlength{\\tymin}{45pt}
++\setlength{\tymin}{45pt}
+ ''',
+ }
diff --git a/srcpkgs/ghc/template b/srcpkgs/ghc/template
index 082c56f70358..90ce760a09d6 100644
--- a/srcpkgs/ghc/template
+++ b/srcpkgs/ghc/template
@@ -2,7 +2,7 @@
 pkgname=ghc
 # Keep this synchronized with http://www.stackage.org/lts
 version=8.8.4
-revision=2
+revision=3
 wrksrc="ghc-${version%[!0-9]}"
 build_style=gnu-configure
 hostmakedepends="automake docbook-xsl ghc-bin libxslt libnuma-devel

             reply	other threads:[~2021-07-10 21:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10 21:17 chexum [this message]
2021-07-11 12:08 ` chexum
2021-07-17  3:36 ` [PR REVIEW] " ericonr
2021-07-17  7:44 ` chexum
2021-07-18 21:11 ` ericonr
2021-07-18 21:19 ` [PR PATCH] [Updated] " chexum
2021-07-20 20:07 ` ericonr
2021-07-20 20:07 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31898@inbox.vuxu.org \
    --to=chexum@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).