Initial import (#1631996).

This commit is contained in:
Elliott Sales de Andrade 2018-09-24 15:55:51 -04:00
parent 2d58b7593e
commit d70acfae97
4 changed files with 239 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/fs_1.2.6.tar.gz

148
0001-Use-system-libuv.patch Normal file
View File

@ -0,0 +1,148 @@
From 00d1cfafea1476fa6a9696100d64cd8aebe929a3 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 22 Sep 2018 23:50:25 -0400
Subject: [PATCH] Use system libuv.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
inst/COPYRIGHTS | 79 -------------------------------------------------
src/Makevars | 24 ++-------------
2 files changed, 3 insertions(+), 100 deletions(-)
diff --git a/inst/COPYRIGHTS b/inst/COPYRIGHTS
index 912533e3..ed998717 100644
--- a/inst/COPYRIGHTS
+++ b/inst/COPYRIGHTS
@@ -4,85 +4,6 @@ version 3.
Included below is license and copyright information for externally maintained
libraries used by fs. All other code in fs is copyright RStudio, Inc.
-libuv is licensed for use as follows:
-
-====
-Copyright (c) 2015-present libuv project contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-====
-
-This license applies to parts of libuv originating from the
-https://github.com/joyent/libuv repository:
-
-====
-
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-
-====
-
-This license applies to all parts of libuv that are not externally
-maintained libraries.
-
-The externally maintained libraries used by libuv are:
-
- - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license.
-
- - inet_pton and inet_ntop implementations, contained in src/inet.c, are
- copyright the Internet Systems Consortium, Inc., and licensed under the ISC
- license.
-
- - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three
- clause BSD license.
-
- - pthread-fixes.c, copyright Google Inc. and Sony Mobile Communications AB.
- Three clause BSD license.
-
- - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design
- Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement
- n° 289016). Three clause BSD license.
-
-Additional copyrights in libuv which do not appear above:
-
-Copyright Fedor Indutny. All rights reserved.
-Copyright (c) 2015 Saúl Ibarra Corretgé <saghul@gmail.com>.
-Copyright (c) 2013, Ben Noordhuis
-Copyright StrongLoop, Inc.
-Copyright (c) 2016, Kari Tristan Helgason <kthelgason@gmail.com>
-
The files in src/bsd are from libbsd (https://cgit.freedesktop.org/libbsd) and
use one of the following licenses:
diff --git a/src/Makevars b/src/Makevars
index a5d2e3d6..6e08a28f 100644
--- a/src/Makevars
+++ b/src/Makevars
@@ -1,6 +1,6 @@
UNAME := $(shell uname)
-PKG_LIBS = ./libuv/.libs/libuv.a
+PKG_LIBS = $(shell pkgconf --libs libuv)
SOURCES = $(wildcard *.cc unix/*.cc)
OBJECTS = $(SOURCES:.cc=.o) RcppExports.o
@@ -19,29 +19,11 @@ ifeq ($(UNAME), Linux)
OBJECTS += bsd/setmode.o bsd/strmode.o bsd/reallocarray.o
endif
-PKG_CPPFLAGS = -I./libuv/include -I.
+PKG_CPPFLAGS = $(shell pkgconf --cflags libuv) -I.
all: $(SHLIB)
-$(SHLIB): libuv/.libs/libuv.a
-
-libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4
- cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4
-
-libuv/Makefile: libuv/m4/lt~obsolete.m4
- (cd libuv \
- && touch aclocal.m4 \
- && touch -r aclocal.m4 configure Makefile.in \
- && CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure --quiet)
-
-libuv/.libs/libuv.a: libuv/Makefile
- $(MAKE) --directory=libuv \
- HAVE_DTRACE=0
-
-.PHONY: shlib-clean clean
-
-shlib-clean: clean
+.PHONY: clean
clean:
- $(MAKE) --directory=libuv distclean
rm -f $(OBJECTS)
--
2.17.1

89
R-fs.spec Normal file
View File

@ -0,0 +1,89 @@
%global packname fs
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 1.2.6
Release: 1%{?dist}
Summary: Cross-Platform File System Operations Based on 'libuv'
License: GPLv3
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-Use-system-libuv.patch
# Here's the R view of the dependencies world:
# Depends:
# Imports: R-methods, R-Rcpp
# Suggests: R-testthat, R-covr, R-pillar >= 1.0.0, R-crayon, R-withr
# LinkingTo:
# Enhances:
Requires: R-methods
Requires: R-Rcpp
Suggests: R-testthat
Suggests: R-pillar >= 1.0.0
Suggests: R-crayon
Suggests: R-withr
BuildRequires: pkgconfig(libuv) >= 1.18.0
BuildRequires: R-devel
BuildRequires: tex(latex)
BuildRequires: R-methods
BuildRequires: R-Rcpp-devel
BuildRequires: R-testthat
BuildRequires: R-pillar >= 1.0.0
BuildRequires: R-crayon
BuildRequires: R-withr
%description
A cross-platform interface to file system operations, built on top of the
'libuv' C library.
%prep
%setup -q -c -n %{packname}
pushd %{packname}
# Remove bundled libuv.
%patch0001 -p1
rm -rf src/libuv
sed -i -e '/libuv/d' MD5
# Don't need coverage; it's not packaged either.
sed -i 's/, covr//g' DESCRIPTION
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
export LANG=C.UTF-8
%{_bindir}/R CMD check %{packname}
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS.md
%license %{rlibdir}/%{packname}/COPYRIGHTS
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/WORDLIST
%dir %{rlibdir}/%{packname}/libs
%{rlibdir}/%{packname}/libs/%{packname}.so
%changelog
* Sat Sep 22 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.6-1
- initial package for Fedora

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (fs_1.2.6.tar.gz) = 8730ff5376cc9f051787aa99cf607328f0f96f3e05147e1dbe7d043e6d8af916dc15483769fda65e8f2c086539a0382f2afbf71f9d70f287c7c37cb083802d71