Initial import (#1559200).

This commit is contained in:
Elliott Sales de Andrade 2018-03-23 19:13:49 -04:00
parent 9abb620931
commit afc60b9fc2
5 changed files with 149 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/processx_2.0.0.1.tar.gz

View File

@ -0,0 +1,66 @@
From 925bc090ec7a6151a919ec5c52123e86bd1042c6 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 21 Mar 2018 06:02:04 -0400
Subject: [PATCH] Define BSWAP_32 in the correct place.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
src/unix/processx-unix.h | 15 +++++++++++++++
src/unix/processx.c | 15 ---------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/unix/processx-unix.h b/src/unix/processx-unix.h
index c762d15..2971051 100644
--- a/src/unix/processx-unix.h
+++ b/src/unix/processx-unix.h
@@ -17,6 +17,21 @@
#include "../processx.h"
+/* Define BSWAP_32 on Big Endian systems */
+#ifdef WORDS_BIGENDIAN
+#if (defined(__sun) && defined(__SVR4))
+#include <sys/byteorder.h>
+#elif (defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__)))
+#include <libkern/OSByteOrder.h>
+#define BSWAP_32 OSSwapInt32
+#elif (defined(__OpenBSD__))
+#define BSWAP_32(x) swap32(x)
+#elif (defined(__GLIBC__))
+#include <byteswap.h>
+#define BSWAP_32(x) bswap_32(x)
+#endif
+#endif
+
typedef struct processx_handle_s {
int exitcode;
int collected; /* Whether exit code was collected already */
diff --git a/src/unix/processx.c b/src/unix/processx.c
index 8914da1..3682c3d 100644
--- a/src/unix/processx.c
+++ b/src/unix/processx.c
@@ -13,21 +13,6 @@ static void processx__child_init(processx_handle_t *handle, int pipes[3][2],
static SEXP processx__make_handle(SEXP private, int cleanup);
static void processx__handle_destroy(processx_handle_t *handle);
-/* Define BSWAP_32 on Big Endian systems */
-#ifdef WORDS_BIGENDIAN
-#if (defined(__sun) && defined(__SVR4))
-#include <sys/byteorder.h>
-#elif (defined(__APPLE__) && defined(__ppc__) || defined(__ppc64__))
-#include <libkern/OSByteOrder.h>
-#define BSWAP_32 OSSwapInt32
-#elif (defined(__OpenBSD__))
-#define BSWAP_32(x) swap32(x)
-#elif (defined(__GLIBC__))
-#include <byteswap.h>
-#define BSWAP_32(x) bswap_32(x)
-#endif
-#endif
-
extern processx__child_list_t child_list_head;
extern processx__child_list_t *child_list;
extern processx__child_list_t child_free_list_head;
--
2.14.3

81
R-processx.spec Normal file
View File

@ -0,0 +1,81 @@
%global packname processx
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 2.0.0.1
Release: 1%{?dist}
Summary: Execute and Control System Processes
License: MIT
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-Define-BSWAP_32-in-the-correct-place.patch
# Here's the R view of the dependencies world:
# Depends:
# Imports: R-assertthat R-crayon R-debugme R-R6 R-utils
# Suggests: R-covr R-testthat R-withr
# LinkingTo:
# Enhances:
Requires: R-assertthat R-crayon R-debugme R-R6 R-utils
BuildRequires: R-devel tex(latex)
BuildRequires: R-assertthat R-crayon R-debugme R-R6 R-utils
BuildRequires: R-testthat R-withr
%description
Portable tools to run system processes in the background. It can check if
a background process is running; wait on a background process to finish;
get the exit status of finished processes; kill background processes and
their children; restart processes. It can read the standard output and
error of the processes, using non-blocking connections. 'processx' can
poll a process for standard output or error, with a timeout. It can also
poll several processes at once.
%prep
%setup -q -c -n %{packname}
pushd %{packname}
%patch0001 -p1
popd
# Don't need coverage; it's not packaged either.
sed -i 's/covr, //g' %{packname}/DESCRIPTION
%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
%{_bindir}/R CMD check %{packname}
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS.md
%doc %{rlibdir}/%{packname}/README.markdown
%doc %{rlibdir}/%{packname}/internals.md
%license %{rlibdir}/%{packname}/LICENSE
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%dir %{rlibdir}/%{packname}/libs
%{rlibdir}/%{packname}/libs/%{packname}.so
%changelog
* Wed Mar 21 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.0.1-1
- initial package for Fedora

View File

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

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (processx_2.0.0.1.tar.gz) = 407a2833a02bb594759fa5948886d6af61d7730dc86007dca5d96c8ccfe2fba041dce4aa870eca994089887be0f98e0cf8151aeaf272b2e285ef0b75420124f1