[R-pkg-devel] Proper way to cleanup after build third party components?

Dirk Eddelbuettel edd at debian.org
Mon Jun 5 00:13:32 CEST 2017

On 5 June 2017 at 00:51, Konstantin Sorokin wrote:
| This third party component is a compression library for which my package
| provides bindings and I need to build this library first. Look at the lines
| starting from
| https://github.com/thekvs/zstdr/blob/8ea428b33d986667494d940c66732dbbc66871b3/configure.ac#L34

The common paradigm is to first build below src/, and to then link via
src/Makevars to the static library you just built.

I don't have a real go-to example of a package that does this but you could
look into the BioConductor package RGBL (which builds Boost Graph first)
and/or the nloptr package (which, if need be, downloads nlopt and builds it;
my contribution there was the other part of finding / using a libnlopt if on
the system).

I wondered about this when CRANberries told me about your package. I guess
you can't assume the Zstandard library to be present?  Maybe one day the
hybrid approach of nloptr may work for you.


http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the R-package-devel mailing list