From d39884a9f6f5bfab38f6ab983a28d3cef9212ae3 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 10 Dec 2020 09:22:34 -0700 Subject: [PATCH] Version 0.5.0. - Drop upstreamed -script patch. - Do not even link to fonts; modify the CSS to point to system fonts. - Remove all traces of html5shiv. --- python-sphinx_rtd_theme-html5shiv.patch | 58 +++++++++++++++ python-sphinx_rtd_theme-script.patch | 39 ---------- python-sphinx_rtd_theme-unbundle-fonts.patch | 31 ++++++++ python-sphinx_rtd_theme.spec | 77 +++++++++----------- sources | 4 +- 5 files changed, 127 insertions(+), 82 deletions(-) create mode 100644 python-sphinx_rtd_theme-html5shiv.patch delete mode 100644 python-sphinx_rtd_theme-script.patch create mode 100644 python-sphinx_rtd_theme-unbundle-fonts.patch diff --git a/python-sphinx_rtd_theme-html5shiv.patch b/python-sphinx_rtd_theme-html5shiv.patch new file mode 100644 index 0000000..39de0a1 --- /dev/null +++ b/python-sphinx_rtd_theme-html5shiv.patch @@ -0,0 +1,58 @@ +--- package.json.orig 2020-06-17 09:58:25.000000000 -0600 ++++ package.json 2020-12-10 08:27:04.247691945 -0700 +@@ -16,7 +16,6 @@ + "css-loader": "^3.1.0", + "file-loader": "^3.0.1", + "font-awesome": "^4.7.0", +- "html5shiv": "^3.7.3", + "imports-loader": "^0.8.0", + "jquery": "^3.4.1", + "lato-font": "^3.0.0", +--- package-lock.json.orig 2020-06-17 09:58:25.000000000 -0600 ++++ package-lock.json 2020-12-10 08:27:28.658644927 -0700 +@@ -3614,12 +3614,6 @@ + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true + }, +- "html5shiv": { +- "version": "3.7.3", +- "resolved": "https://registry.npmjs.org/html5shiv/-/html5shiv-3.7.3.tgz", +- "integrity": "sha1-14qEo2e8uacQEA1XgCw4ewhGMdI=", +- "dev": true +- }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", +--- sphinx_rtd_theme/layout.html.orig 2020-06-17 09:58:25.000000000 -0600 ++++ sphinx_rtd_theme/layout.html 2020-12-10 08:28:12.607551700 -0700 +@@ -45,9 +45,6 @@ + + {# JAVASCRIPTS #} + {%- block scripts %} +- + {%- if not embedded %} + {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #} + {% if sphinx_version >= "1.8.0" %} +--- webpack.common.js.orig 2020-06-17 09:58:25.000000000 -0600 ++++ webpack.common.js 2020-12-10 08:26:44.191730575 -0700 +@@ -1,6 +1,5 @@ + const path = require("path"); + const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +-const CopyPlugin = require('copy-webpack-plugin'); + + module.exports = { + entry: { +@@ -66,11 +65,5 @@ module.exports = { + filename: "css/[name].css?[hash]", + chunkFilename: "css/[name].css?[hash]" + }), +- new CopyPlugin([ +- { +- from: 'node_modules/html5shiv/dist/*.min.js', +- flatten: true, +- to: path.resolve(__dirname,'sphinx_rtd_theme/static/js') }, +- ]), + ] + }; diff --git a/python-sphinx_rtd_theme-script.patch b/python-sphinx_rtd_theme-script.patch deleted file mode 100644 index 069bb90..0000000 --- a/python-sphinx_rtd_theme-script.patch +++ /dev/null @@ -1,39 +0,0 @@ -Remove deprecated use of script_files - -Fixes sphinx-doc/sphinx#6088 - -* Add script block -* Fix build error - ---- sphinx_rtd_theme/layout.html.orig 2019-02-12 12:37:47.000000000 -0700 -+++ sphinx_rtd_theme/layout.html 2019-08-06 09:02:26.103136905 -0600 -@@ -29,6 +29,7 @@ - {% endif %} - - {# JAVASCRIPTS #} -+ {%- block scripts %} - - {%- if not embedded %} - {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #} -@@ -62,6 +63,7 @@ - href="{{ pathto('_static/opensearch.xml', 1) }}"/> - {%- endif %} - {%- endif %} -+ {%- endblock %} - - {# CSS #} - ---- sphinx_rtd_theme/search.html.orig 2019-02-12 12:37:47.000000000 -0700 -+++ sphinx_rtd_theme/search.html 2019-08-06 09:03:25.597117851 -0600 -@@ -9,7 +9,10 @@ - #} - {%- extends "layout.html" %} - {% set title = _('Search') %} --{% set script_files = script_files + ['_static/searchtools.js'] %} -+{%- block scripts %} -+ {{ super() }} -+ -+{%- endblock %} - {% block footer %} -