Initial import (#1570360).

This commit is contained in:
Elliott Sales de Andrade 2018-04-23 19:36:21 -04:00
parent 97401806d8
commit ed6bb34922
8 changed files with 86318 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/rmarkdown_1.9.tar.gz

View File

@ -0,0 +1,153 @@
diff --git a/inst/rmd/ioslides/ioslides-13.5.1/fonts/fonts.css b/inst/rmd/ioslides/ioslides-13.5.1/fonts/fonts.css
index a949d32c..1315838e 100644
--- a/inst/rmd/ioslides/ioslides-13.5.1/fonts/fonts.css
+++ b/inst/rmd/ioslides/ioslides-13.5.1/fonts/fonts.css
@@ -8,23 +8,23 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
- src: url(OpenSansSemibold.ttf) format('truetype');
+ src: url(OpenSans-Semibold.ttf) format('truetype');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
- src: url(OpenSansItalic.ttf) format('truetype');
+ src: url(OpenSans-Italic.ttf) format('truetype');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
- src: url(OpenSansSemiboldItalic.ttf) format('truetype');
+ src: url(OpenSans-SemiboldItalic.ttf) format('truetype');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
- src: url(SourceCodePro.ttf) format('truetype');
+ src: url(SourceCodePro-Regular.otf) format('opentype');
}
diff --git a/R/html_dependencies.R b/R/html_dependencies.R
index 47fc8ca3..a6408aaf 100644
--- a/R/html_dependencies.R
+++ b/R/html_dependencies.R
@@ -15,8 +15,8 @@ NULL
#' @export
html_dependency_jquery <- function() {
htmlDependency(name = "jquery",
- version = "1.11.3",
- src = rmarkdown_system_file("rmd/h/jquery-1.11.3"),
+ version = "1.12.4",
+ src = "/usr/share/javascript/jquery/1.12.4/",
script = "jquery.min.js")
}
@@ -82,8 +82,8 @@ html_dependency_navigation <- function(code_menu, source_embed) {
html_dependency_font_awesome <- function() {
htmlDependency(
"font-awesome",
- "4.5.0",
- src = rmarkdown_system_file("rmd/h/font-awesome-4.5.0"),
+ "4.7.0",
+ src = rmarkdown_system_file("rmd/h/font-awesome-4.7.0"),
stylesheet = "css/font-awesome.min.css"
)
}
@@ -280,9 +280,9 @@ html_dependency_highlightjs <- function(highlight) {
htmlDependency(
"highlightjs",
version = "9.12.0",
- src = rmarkdown_system_file("rmd/h/highlightjs"),
- script = "highlight.js",
- stylesheet = paste0(highlight, ".css")
+ src = "/usr/share/javascript/highlight.js",
+ script = "highlight.pack.js",
+ stylesheet = paste0("styles/", highlight, ".css")
)
}
diff --git a/inst/rmd/h/bootstrap-3.3.5/css/cosmo.min.css b/inst/rmd/h/bootstrap-3.3.5/css/cosmo.min.css
index 23aaa5a8..7bfdac28 100644
--- a/inst/rmd/h/bootstrap-3.3.5/css/cosmo.min.css
+++ b/inst/rmd/h/bootstrap-3.3.5/css/cosmo.min.css
@@ -2,19 +2,19 @@
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
- src: url(fonts/SourceSansProLight.ttf) format('truetype');
+ src: url(fonts/SourceSansPro-Light.otf) format('opentype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
- src: url(fonts/SourceSansPro.ttf) format('truetype');
+ src: url(fonts/SourceSansPro-Regular.otf) format('opentype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
- src: url(fonts/SourceSansProBold.ttf) format('truetype');
+ src: url(fonts/SourceSansPro-Bold.otf) format('opentype');
}
/*!
diff --git a/inst/rmd/h/bootstrap-3.3.5/css/lumen.min.css b/inst/rmd/h/bootstrap-3.3.5/css/lumen.min.css
index 2f221d7d..2e01c82a 100644
--- a/inst/rmd/h/bootstrap-3.3.5/css/lumen.min.css
+++ b/inst/rmd/h/bootstrap-3.3.5/css/lumen.min.css
@@ -2,26 +2,26 @@
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
- src: url(fonts/SourceSansProLight.ttf) format('truetype');
+ src: url(fonts/SourceSansPro-Light.otf) format('opentype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
- src: url(fonts/SourceSansPro.ttf) format('truetype');
+ src: url(fonts/SourceSansPro-Regular.otf) format('opentype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
- src: url(fonts/SourceSansProBold.ttf) format('truetype');
+ src: url(fonts/SourceSansPro-Bold.otf) format('opentype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
- src: url(fonts/SourceSansProItalic.ttf) format('truetype');
+ src: url(fonts/SourceSansPro-It.otf) format('opentype');
}
/*
diff --git a/inst/rmd/h/bootstrap-3.3.5/css/readable.min.css b/inst/rmd/h/bootstrap-3.3.5/css/readable.min.css
index 8c0c7de7..ce148218 100644
--- a/inst/rmd/h/bootstrap-3.3.5/css/readable.min.css
+++ b/inst/rmd/h/bootstrap-3.3.5/css/readable.min.css
@@ -2,13 +2,13 @@
font-family: 'Raleway';
font-style: normal;
font-weight: 400;
- src: url(fonts/Raleway.ttf) format('truetype');
+ src: url(fonts/Raleway.otf) format('opentype');
}
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 700;
- src: url(fonts/RalewayBold.ttf) format('truetype');
+ src: url(fonts/Raleway-Bold.otf) format('opentype');
}
/*!

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,44 @@
From 05928b0d1eb6ebba3fcfe67939592f5e11926f51 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 21 Apr 2018 06:25:19 -0400
Subject: [PATCH 10/10] Skip shiny tests.
These would cause a dependency loop.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
tests/testthat/test-params.R | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/testthat/test-params.R b/tests/testthat/test-params.R
index f27360f1..a6635f00 100644
--- a/tests/testthat/test-params.R
+++ b/tests/testthat/test-params.R
@@ -32,6 +32,7 @@ test_that("setting of params works", {
test_that("params render their UI", {
skip_on_cran()
+ skip_if_not_installed("shiny")
# file input is always NULL
ui <- params_value_to_ui(shiny::fileInput, "anything", TRUE)
@@ -59,6 +60,8 @@ test_that("params render their UI", {
})
test_that("parameters are configurable", {
+ skip_if_not_installed("shiny")
+
# Unknown input types are not configurable.
expect_error(params_configurable(list(
input = "unsupported")))
@@ -112,6 +115,7 @@ test_that("parameters are configurable", {
test_that("params hidden w/o show_default", {
skip_on_cran()
+ skip_if_not_installed("shiny")
# file input is always NULL
ui <- params_value_to_ui(shiny::fileInput, "anything", FALSE)
--
2.14.3

257
R-rmarkdown.spec Normal file
View File

@ -0,0 +1,257 @@
%global packname rmarkdown
%global rlibdir %{_datadir}/R/library
# Recursive dependencies.
%global with_suggests 0
Name: R-%{packname}
Version: 1.9
Release: 1%{?dist}
Summary: Dynamic Documents for R
# Main is GPLv3; see bundled Provides below for others.
License: GPLv3 and ASL 2.0 and BSD and MIT and OFL and W3C
URL: https://cran.r-project.org/web/packages/%{packname}/index.html
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
Patch0001: 0001-Remove-bundled-bits.patch
Patch0002: 0008-Add-original-non-minified-Bootswatch-themes.patch
Patch0003: 0009-Add-source-for-code-prettify.patch
Patch0004: 0010-Skip-shiny-tests.patch
# Here's the R view of the dependencies world:
# Depends:
# Imports: R-tools, R-utils, R-knitr >= 1.14, R-yaml >= 2.1.5, R-htmltools >= 0.3.5, R-evaluate >= 0.8, R-base64enc, R-jsonlite, R-rprojroot, R-mime, R-methods, R-stringr >= 1.2.0
# Suggests: R-tinytex, R-shiny >= 0.11, R-tufte, R-testthat, R-digest, R-tibble
# LinkingTo:
# Enhances:
BuildArch: noarch
Requires: R-core
Requires: pandoc >= 1.12.3
Requires: pandoc-citeproc
Requires: R-base64enc
Requires: R-evaluate >= 0.8
Requires: R-htmltools >= 0.3.5
Requires: R-jsonlite
Requires: R-knitr >= 1.14
Requires: R-methods
Requires: R-mime
Requires: R-rprojroot
Requires: R-stringr >= 1.2.0
Requires: R-tools
Requires: R-utils
Requires: R-yaml >= 2.1.5
Suggests: R-digest
Suggests: R-shiny >= 0.11
Suggests: R-tibble
Suggests: R-tufte
BuildRequires: R-devel
BuildRequires: tex(latex)
BuildRequires: pandoc >= 1.12.3
BuildRequires: pandoc-citeproc
BuildRequires: R-base64enc
BuildRequires: R-evaluate >= 0.8
BuildRequires: R-htmltools >= 0.3.5
BuildRequires: R-jsonlite
BuildRequires: R-knitr >= 1.14
BuildRequires: R-methods
BuildRequires: R-mime
BuildRequires: R-rprojroot
BuildRequires: R-stringr >= 1.2.0
BuildRequires: R-tools
BuildRequires: R-utils
BuildRequires: R-yaml >= 2.1.5
BuildRequires: R-digest
BuildRequires: R-testthat
%if %{with_suggests}
BuildRequires: R-shiny >= 0.11
BuildRequires: R-tibble
BuildRequires: R-tufte
%endif
BuildRequires: fontawesome-fonts = 4.7.0
BuildRequires: fontawesome-fonts-web = 4.7.0
Suggests: fontawesome-fonts = 4.7.0
Suggests: fontawesome-fonts-web = 4.7.0
# These are not all packaged, but should *probably* be the names if they are.
# MIT; inst/rmd/h/bootstrap-3.3.5/
# https://github.com/twbs/bootstrap/releases/tag/v3.3.5
Provides: bundled(xstatic-bootstrap-common) = 3.3.5
BuildRequires: adobe-source-sans-pro-fonts
Suggests: adobe-source-sans-pro-fonts
BuildRequires: glyphicons-halflings-fonts
Suggests: glyphicons-halflings-fonts
BuildRequires: google-roboto-fonts
Suggests: google-roboto-fonts
BuildRequires: impallari-raleway-fonts
Suggests: impallari-raleway-fonts
BuildRequires: lato-fonts
Suggests: lato-fonts
# OFL; inst/rmd/h/bootstrap-3.3.5/css/fonts/NewsCycle*.ttf
Provides: bundled(glyphography-news-cycle-fonts) = 0.4
# MIT; inst/rmd/h/ionicons-2.0.1/
# http://ionicons.com/
Provides: bundled(ionicons-fonts) = 2.0.1
# MIT; inst/rmd/h/jqueryui-1.11.4/ (outdated in Fedora)
Provides: bundled(xstatic-jquery-ui-common) = 1.11.4
# MIT; inst/rmd/h/navigation-1.1/tabsets.js
# https://github.com/aidanlister/jquery-stickytabs (partially)
Provides: bundled(js-jquery-stickytabs) = 1.2.4
# MIT; inst/rmd/h/tocify-1.9.1/
# http://gregfranko.com/jquery.tocify.js/
Provides: bundled(js-jquery-tocify) = 1.9.1
# ASL 2.0; inst/rmd/ioslides/ioslides-13.5.1/
Provides: bundled(js-ioslides) = 13.5.1
# MIT; inst/rmd/ioslides/ioslides-13.5.1/js/hammer.js
# https://hammerjs.github.io/
Provides: bundled(js-hammer) = 0.4
# MIT & BSD; inst/rmd/ioslides/ioslides-13.5.1/js/modernizr.custom.45394.js
# https://modernizr.com/
Provides: bundled(js-modernizr) = 2.5.3
# ASL 2.0; inst/rmd/ioslides/ioslides-13.5.1/js/prettify/
# https://github.com/google/code-prettify
Provides: bundled(js-code-prettify) = 20130304
BuildRequires: open-sans-fonts
Suggests: open-sans-fonts
BuildRequires: adobe-source-code-pro-fonts
Suggests: adobe-source-code-pro-fonts
# W3C; inst/rmd/slidy/Slidy2/
# https://www.w3.org/Talks/Tools/Slidy2/
Provides: bundled(js-slidy) = 2
%description
Convert R Markdown documents into a variety of formats.
%prep
%setup -q -c -n %{packname}
pushd %{packname}
# Remove minified things that are unused.
rm inst/rmd/ioslides/ioslides-13.5.1/js/{order,require-1.0.8.min}.js
rm -r inst/rmd/ioslides/ioslides-13.5.1/js/polyfills/
# Remove bundled fonts in ioslides.
rm inst/rmd/ioslides/ioslides-13.5.1/fonts/OpenSans*.ttf
for f in OpenSans-Regular OpenSans-Italic OpenSans-Semibold OpenSans-SemiboldItalic; do
ln -s /usr/share/fonts/open-sans/${f}.ttf inst/rmd/ioslides/ioslides-13.5.1/fonts/${f}.ttf
done
rm inst/rmd/ioslides/ioslides-13.5.1/fonts/SourceCodePro.ttf
ln -s /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Regular.otf inst/rmd/ioslides/ioslides-13.5.1/fonts/SourceCodePro-Regular.otf
# Remove bundled jquery.
rm -r inst/rmd/h/jquery-1.11.3 inst/rmd/h/jquery-AUTHORS.txt
# Remove bundled FontAwesome.
rm -r inst/rmd/h/font-awesome-4.5.0
mkdir inst/rmd/h/font-awesome-4.7.0
ln -s /usr/share/font-awesome-web/css inst/rmd/h/font-awesome-4.7.0/css
ln -s /usr/share/fonts/fontawesome inst/rmd/h/font-awesome-4.7.0/fonts
# Remove bundled highlight.js.
rm -r inst/rmd/h/highlightjs
# Remove bundled fonts from bootstrap.
ln -sf /usr/share/fonts/lato/Lato-Regular.ttf inst/rmd/h/bootstrap-3.3.5/css/fonts/Lato.ttf
ln -sf /usr/share/fonts/lato/Lato-Bold.ttf inst/rmd/h/bootstrap-3.3.5/css/fonts/LatoBold.ttf
ln -sf /usr/share/fonts/lato/Lato-Italic.ttf inst/rmd/h/bootstrap-3.3.5/css/fonts/LatoItalic.ttf
ln -sf /usr/share/fonts/open-sans/OpenSans-Regular.ttf inst/rmd/h/bootstrap-3.3.5/css/fonts/OpenSans.ttf
for f in Bold BoldItalic Italic Light LightItalic; do
ln -sf /usr/share/fonts/open-sans/OpenSans-${f}.ttf inst/rmd/h/bootstrap-3.3.5/css/fonts/OpenSans${f}.ttf
done
rm inst/rmd/h/bootstrap-3.3.5/css/fonts/Raleway*.ttf
for f in Regular Bold; do
ln -s /usr/share/fonts/impallari-raleway/Raleway-${f}.otf inst/rmd/h/bootstrap-3.3.5/css/fonts/
done
rm inst/rmd/h/bootstrap-3.3.5/css/fonts/Roboto*.ttf
ln -s /usr/share/fonts/google-roboto/Roboto-Regular.ttf inst/rmd/h/bootstrap-3.3.5/css/fonts/Roboto.ttf
for f in Light Medium Bold; do
ln -s /usr/share/fonts/google-roboto/Roboto-${f}.ttf inst/rmd/h/bootstrap-3.3.5/css/fonts/Roboto${f}.ttf
done
rm inst/rmd/h/bootstrap-3.3.5/css/fonts/SourceSansPro*.ttf
for f in Bold It Light Regular; do
ln -s /usr/share/fonts/source-sans-pro/SourceSansPro-${f}.otf inst/rmd/h/bootstrap-3.3.5/css/fonts/
done
rm inst/rmd/h/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.*
ln -s /usr/share/fonts/glyphicons-halflings/glyphicons-halflings-regular.ttf inst/rmd/h/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.ttf
# Must be removed: https://bugzilla.redhat.com/show_bug.cgi?id=961642#c4
rm inst/rmd/h/bootstrap-3.3.5/css/fonts/Ubuntu.ttf
# Now fix references to bundled stuff.
%patch0001 -p1
# Restore non-minified source files.
%patch0002 -p1
%patch0003 -p1
# Avoid dependency loop.
%if !%{with_suggests}
%patch0004 -p1
%endif
# Fix executable bits
chmod -x inst/rmd/h/ionicons-2.0.1/{LICENSE,css/*.css}
chmod -x inst/rmd/ioslides/ioslides-13.5.1/js/hammer.js
popd
%build
%install
mkdir -p %{buildroot}%{rlibdir}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
rm -f %{buildroot}%{rlibdir}/R.css
%check
%if %{with_suggests}
%{_bindir}/R CMD check %{packname}
%else
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname}
%endif
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%license %{rlibdir}/%{packname}/COPYING
%license %{rlibdir}/%{packname}/NOTICE
%doc %{rlibdir}/%{packname}/NEWS
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/rmarkdown
%dir %{rlibdir}/%{packname}/rmd
%{rlibdir}/%{packname}/rmd/fragment
%dir %{rlibdir}/%{packname}/rmd/h
%{rlibdir}/%{packname}/rmd/h/_navbar.html
%{rlibdir}/%{packname}/rmd/h/default.html
%{rlibdir}/%{packname}/rmd/h/bootstrap-3.3.5
%{rlibdir}/%{packname}/rmd/h/font-awesome-4.7.0
%{rlibdir}/%{packname}/rmd/h/ionicons-2.0.1
%{rlibdir}/%{packname}/rmd/h/jqueryui-1.11.4
%{rlibdir}/%{packname}/rmd/h/jqueryui-AUTHORS.txt
%{rlibdir}/%{packname}/rmd/h/navigation-1.1
%{rlibdir}/%{packname}/rmd/h/pagedtable-1.1
%{rlibdir}/%{packname}/rmd/h/rmarkdown
%{rlibdir}/%{packname}/rmd/h/rsiframe-1.1
%{rlibdir}/%{packname}/rmd/h/tocify-1.9.1
%{rlibdir}/%{packname}/rmd/ioslides
%{rlibdir}/%{packname}/rmd/slidy
%{rlibdir}/%{packname}/rmd/latex
%changelog
* Sun Apr 22 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.9-1
- initial package for Fedora

View File

@ -1,3 +0,0 @@
# R-rmarkdown
The R-rmarkdown package

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (rmarkdown_1.9.tar.gz) = bc3ee620b6e10c0bc94132869a5bc12c0172404b1ae0ca2d8fb9c4b2b9876c3ad40fdfb3e008f6ebf47da56262c90cf02b7b97051a77a9197c3604e8cd6a6ebf