diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/do-not-override-build-commands.patch | 21 | ||||
-rw-r--r-- | debian/patches/fonts-only-ttf-woff2.patch | 64 | ||||
-rw-r--r-- | debian/patches/remove-html5shiv.patch | 22 | ||||
-rw-r--r-- | debian/patches/replace-webpack-imports.patch | 67 | ||||
-rw-r--r-- | debian/patches/series | 5 | ||||
-rw-r--r-- | debian/patches/tests-configuration.patch | 33 |
6 files changed, 212 insertions, 0 deletions
diff --git a/debian/patches/do-not-override-build-commands.patch b/debian/patches/do-not-override-build-commands.patch new file mode 100644 index 0000000..ca70751 --- /dev/null +++ b/debian/patches/do-not-override-build-commands.patch @@ -0,0 +1,21 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Sun, 23 Aug 2020 18:04:51 +0300 +Subject: Do not override Python build commands + +We do not use webpack in debian packaging. +--- + setup.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 36a2a98..e42f539 100644 +--- a/setup.py ++++ b/setup.py +@@ -90,7 +90,5 @@ setup( + cmdclass={ + 'update_translations': UpdateTranslationsCommand, + 'transifex': TransifexCommand, +- 'build_assets': WebpackBuildCommand, +- 'watch': WebpackDevelopCommand, + }, + ) diff --git a/debian/patches/fonts-only-ttf-woff2.patch b/debian/patches/fonts-only-ttf-woff2.patch new file mode 100644 index 0000000..05d7e80 --- /dev/null +++ b/debian/patches/fonts-only-ttf-woff2.patch @@ -0,0 +1,64 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Fri, 29 Jun 2018 14:54:26 +0300 +Subject: Use only TTF and WOFF2 fonts for Lato, only WOFF2 for RobotoSlab + +Also use different file names for compatibility with packages built +against sphinx-rtd-theme 0.2.4. +--- + src/sass/_theme_font_local.sass | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/src/sass/_theme_font_local.sass b/src/sass/_theme_font_local.sass +index 48f22e7..31da232 100644 +--- a/src/sass/_theme_font_local.sass ++++ b/src/sass/_theme_font_local.sass +@@ -1,30 +1,27 @@ +-$lato-font-path: "~lato-font/fonts" +-$roboto-font-path: "~roboto-fontface/fonts/roboto-slab" +- + @font-face + font-family: 'Lato' +- src: url('#{$lato-font-path}/lato-normal/lato-normal.woff2') format('woff2'), url('#{$lato-font-path}/lato-normal/lato-normal.woff') format('woff') ++ src: url('../fonts/Lato-Regular.woff2') format('woff2'), url('../fonts/Lato-Regular.ttf') format('truetype') + font-weight: 400 + font-style: normal + font-display: $font-display + + @font-face + font-family: 'Lato' +- src: url('#{$lato-font-path}/lato-bold/lato-bold.woff2') format('woff2'), url('#{$lato-font-path}/lato-bold/lato-bold.woff') format('woff') ++ src: url('../fonts/Lato-Bold.woff2') format('woff2'), url('../fonts/Lato-Bold.ttf') format('truetype') + font-weight: 700 + font-style: normal + font-display: $font-display + + @font-face + font-family: 'Lato' +- src: url('#{$lato-font-path}/lato-bold-italic/lato-bold-italic.woff2') format('woff2'), url('#{$lato-font-path}/lato-bold-italic/lato-bold-italic.woff') format('woff') ++ src: url('../fonts/Lato-BoldItalic.woff2') format('woff2'), url('../fonts/Lato-BoldItalic.ttf') format('truetype') + font-weight: 700 + font-style: italic + font-display: $font-display + + @font-face + font-family: 'Lato' +- src: url('#{$lato-font-path}/lato-normal-italic/lato-normal-italic.woff2') format('woff2'), url('#{$lato-font-path}/lato-normal-italic/lato-normal-italic.woff') format('woff') ++ src: url('../fonts/Lato-Italic.woff2') format('woff2'), url('../fonts/Lato-Italic.ttf') format('truetype') + font-weight: 400 + font-style: italic + font-display: $font-display +@@ -33,12 +30,12 @@ $roboto-font-path: "~roboto-fontface/fonts/roboto-slab" + font-family: 'Roboto Slab' + font-style: normal + font-weight: 400 +- src: url('#{$roboto-font-path}/Roboto-Slab-Regular.woff2') format('woff2'), url('#{$roboto-font-path}/Roboto-Slab-Regular.woff') format('woff') ++ src: url('../fonts/RobotoSlab-Regular.woff2') format('woff2') + font-display: $font-display + + @font-face + font-family: 'Roboto Slab' + font-style: normal + font-weight: 700 +- src: url('#{$roboto-font-path}/Roboto-Slab-Bold.woff2') format('woff2'), url('#{$roboto-font-path}/Roboto-Slab-Bold.woff') format('woff') ++ src: url('../fonts/RobotoSlab-Bold.woff2') format('woff2') + font-display: $font-display diff --git a/debian/patches/remove-html5shiv.patch b/debian/patches/remove-html5shiv.patch new file mode 100644 index 0000000..f9d0ace --- /dev/null +++ b/debian/patches/remove-html5shiv.patch @@ -0,0 +1,22 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Wed, 16 Dec 2020 20:50:55 +0300 +Subject: Remove html5shiv dependency + +--- + sphinx_rtd_theme/layout.html | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html +index c8a3076..cfa84a2 100644 +--- a/sphinx_rtd_theme/layout.html ++++ b/sphinx_rtd_theme/layout.html +@@ -62,9 +62,6 @@ + + {#- JAVASCRIPTS #} + {%- block scripts %} +- <!--[if lt IE 9]> +- <script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script> +- <![endif]--> + {%- 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_info >= (1, 8) -%} diff --git a/debian/patches/replace-webpack-imports.patch b/debian/patches/replace-webpack-imports.patch new file mode 100644 index 0000000..475faa3 --- /dev/null +++ b/debian/patches/replace-webpack-imports.patch @@ -0,0 +1,67 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Sun, 23 Aug 2020 17:59:25 +0300 +Subject: Replace webpack-style imports with normal ones + +The ~ syntax is only supported by webpack, which we do not use: +https://github.com/webpack-contrib/sass-loader#resolving-import-at-rules +--- + src/sass/_theme_variables.sass | 2 +- + src/sass/badge_only.sass | 4 ++-- + src/sass/theme.sass | 6 +++--- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/sass/_theme_variables.sass b/src/sass/_theme_variables.sass +index d9a5310..5b47605 100644 +--- a/src/sass/_theme_variables.sass ++++ b/src/sass/_theme_variables.sass +@@ -2,7 +2,7 @@ + // that are set in wyrm_core/wy_variables.sass. You'll find wyrm in bower_components if you're looking + // for a reference. + +-$fa-font-path: "~font-awesome/fonts" ++$fa-font-path: "../fonts" + $static-img: "../img/" + + $nav-content-width: 800px +diff --git a/src/sass/badge_only.sass b/src/sass/badge_only.sass +index 2b09416..b8cdac3 100644 +--- a/src/sass/badge_only.sass ++++ b/src/sass/badge_only.sass +@@ -8,8 +8,8 @@ $border-box-sizing: false !default + + @import wyrm_core/wy_variables + @import theme_variables +-@import ~bourbon/app/assets/stylesheets/bourbon +-@import ~bourbon-neat/app/assets/stylesheets/neat ++@import bourbon ++@import neat + @import wyrm_core/mixin + @import wyrm_core/grid_settings + @import _theme_badge_fa +diff --git a/src/sass/theme.sass b/src/sass/theme.sass +index 73e77e4..3330736 100644 +--- a/src/sass/theme.sass ++++ b/src/sass/theme.sass +@@ -13,11 +13,11 @@ + @import theme_variables + + // bourbon.io framework +-@import ~bourbon/app/assets/stylesheets/bourbon ++@import bourbon + + // Bourbon.io/neat framework, with some default media queries + @import wyrm_core/grid_settings +-@import ~bourbon-neat/app/assets/stylesheets/neat ++@import neat + // Some corrections for neat + @import wyrm_core/neat_extra + +@@ -28,7 +28,7 @@ + @import wyrm_core/mixin + + // Font Awesome with wyrm extras +-@import ~font-awesome/scss/font-awesome ++@import font-awesome + @import wyrm_core/font_icon_defaults + + // Wyrm core styles used in this theme diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..af4c556 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,5 @@ +fonts-only-ttf-woff2.patch +tests-configuration.patch +replace-webpack-imports.patch +do-not-override-build-commands.patch +remove-html5shiv.patch diff --git a/debian/patches/tests-configuration.patch b/debian/patches/tests-configuration.patch new file mode 100644 index 0000000..d331d06 --- /dev/null +++ b/debian/patches/tests-configuration.patch @@ -0,0 +1,33 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Fri, 29 Jun 2018 16:58:36 +0300 +Subject: Make it possible to run upstream tests + +- Do not use readthedocs-sphinx-ext, it is not packaged. +- Point to local version of sphinx_rtd_theme. +--- + tests/util.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/tests/util.py b/tests/util.py +index c9fdcc1..38fe839 100644 +--- a/tests/util.py ++++ b/tests/util.py +@@ -34,8 +34,8 @@ def build(root, builder='html', **kwargs): + confoverrides['html_theme'] = 'sphinx_rtd_theme' + extensions = confoverrides.get('extensions', []) + extensions.append('sphinx_rtd_theme') +- extensions.append('readthedocs_ext.readthedocs') + confoverrides['extensions'] = extensions ++ confoverrides['html_theme_path'] = [os.path.abspath('../../..')] + kwargs['confoverrides'] = confoverrides + + try: +@@ -55,7 +55,6 @@ def build(root, builder='html', **kwargs): + + + def build_all(root, **kwargs): +- for builder in ['html', 'singlehtml', 'readthedocs', 'readthedocsdirhtml', +- 'readthedocssinglehtml', 'readthedocssinglehtmllocalmedia']: ++ for builder in ['html', 'singlehtml']: + with build(root, builder, **kwargs) as ret: + yield ret |