From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54948) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS3Rv-0000B9-F1 for guix-patches@gnu.org; Tue, 05 Nov 2019 13:21:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iS3Ru-0001TN-0g for guix-patches@gnu.org; Tue, 05 Nov 2019 13:21:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58469) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iS3Rt-0001TD-T6 for guix-patches@gnu.org; Tue, 05 Nov 2019 13:21:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iS3Rt-0005OR-Np for guix-patches@gnu.org; Tue, 05 Nov 2019 13:21:01 -0500 Subject: [bug#37988] [PATCH v3 3/6] gnu: Add r-rprotobuflib. Resent-Message-ID: From: zimoun Date: Tue, 5 Nov 2019 19:19:54 +0100 Message-Id: <20191105181954.26339-1-zimon.toutoune@gmail.com> In-Reply-To: <8736fah38i.fsf@elephly.net> References: <8736fah38i.fsf@elephly.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37988@debbugs.gnu.org Cc: zimoun * gnu/packages/bioconductor.scm (r-rprotobuflib): New variable. * gnu/packages/patches/r-rprotobuflib-unbundle-dependency.patch: New file. --- gnu/packages/bioconductor.scm | 31 ++++++++++ .../r-rprotobuflib-unbundle-dependency.patch | 57 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 gnu/packages/patches/r-rprotobuflib-unbundle-dependency.patch diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm index 92e5d3ec0b..801e52245b 100644 --- a/gnu/packages/bioconductor.scm +++ b/gnu/packages/bioconductor.scm @@ -38,6 +38,7 @@ #:use-module (gnu packages netpbm) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) #:use-module (gnu packages statistics) #:use-module (gnu packages web) #:use-module (srfi srfi-1)) @@ -6166,3 +6167,33 @@ data.") (synopsis "Visualization for flow cytometry data") (description "This package provides visualization tools for flow cytometry data.") (license license:artistic2.0))) + +(define-public r-rprotobuflib + (package + (name "r-rprotobuflib") + (version "1.6.0") + (source + (origin + (method url-fetch) + (uri (bioconductor-uri "RProtoBufLib" version)) + (sha256 + (base32 + "1vhwxw7281n5wpg30ik3m1gwarfmj4b8cqxdvj0sck44yx24lphg")) + ;; Remove bundled binaries: + ;; src/win/lib/{i386,x64}/libprotobuf.a + (modules '((guix build utils))) + (snippet '(begin + (delete-file-recursively "src/win") + #t)) + (patches + (search-patches "r-rprotobuflib-unbundle-dependency.patch")))) + (properties + `((upstream-name . "RProtoBufLib"))) + (build-system r-build-system) + (propagated-inputs + `(("protobuf-2" ,protobuf-2))) + (home-page "https://bioconductor.org/packages/RProtoBufLib") + (synopsis "C++ headers and static libraries of Protocol buffers") + (description "This package provides the headers and static library of +Protocol buffers for other R packages to compile and link against.") + (license license:bsd-3))) diff --git a/gnu/packages/patches/r-rprotobuflib-unbundle-dependency.patch b/gnu/packages/patches/r-rprotobuflib-unbundle-dependency.patch new file mode 100644 index 0000000000..c26b6c7e0f --- /dev/null +++ b/gnu/packages/patches/r-rprotobuflib-unbundle-dependency.patch @@ -0,0 +1,57 @@ +diff --git a/configure b/configure +index 7edae5f..eff2489 100755 +--- a/configure ++++ b/configure +@@ -2856,39 +2856,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +-#untar the lib +-BASEPBNAME="protobuf-2.6.0" +-PBTGZNAME=${BASEPBNAME}.tgz +-cd src +-if test -d ./${BASEPBNAME}; then +- echo 'found ' $BASEPBNAME ' header sources and tar archive;using what is there.' +-else +- echo "untarring protobuf ..."; +- gunzip -dc ${PBTGZNAME} | tar xf -; +-fi; +- +-#run this bootstrap script to update all the gnu auto build files (e.g. automake symlinked fils (e.g. ./compile), alocal.m4,etc... ) +-cd ${BASEPBNAME} +-#./autogen.sh +-#automake --add-missing #do this because the old Autoconf (e.g. 2.13) may not handle this in autoreconf +-#mv m4/lt~obsolete.m4 m4/lt-obsolete.m4 # R CMD check gives warning about ~ character in filename +-cd .. +- +-echo "building protobuf..."; +-PBBUILD=$(pwd)/pb_build +-if test -d ${PBBUILD}; then +- echo 'found ' $PBBUILD ' ;using what is there.' +-else +- mkdir ${PBBUILD} +-fi; +- +-cd ${BASEPBNAME}; +-./configure --enable-static=yes --with-pic=yes --enable-shared=no --prefix="${PBBUILD}" --libdir="${PBBUILD}/lib" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" CC="${CC}" CFLAGS="${CFLAGS}" +-$MAKE install +- +-cd ../../ +- +- + + + ac_config_files="$ac_config_files src/Makevars" +diff --git a/src/Makevars.in b/src/Makevars.in +index 63803fb..575d507 100644 +--- a/src/Makevars.in ++++ b/src/Makevars.in +@@ -10,9 +10,6 @@ all: copying + + #copy hdf5 library headers to package include + copying: $(GS_LIB) +- mkdir -p "${USER_INCLUDE}" +- cp -r @PBBUILD@/include/google ${USER_INCLUDE} + mkdir -p "${USER_LIB_DIR}" +- cp @PBBUILD@/lib/* ${USER_LIB_DIR} + cp $(GS_LIB) ${USER_LIB_DIR}/GatingSet.pb.o -- 2.23.0