[Rd] how to include a windows dll in a package
Uwe Ligges
ligges at statistik.uni-dortmund.de
Tue Aug 15 15:34:05 CEST 2006
Gabor Csardi wrote:
> Thank you for the answer.
>
> On Tue, Aug 15, 2006 at 02:09:59PM +0100, Prof Brian Ripley wrote:
>> On Tue, 15 Aug 2006, Gabor Csardi wrote:
> [...]
>>> what is the correct way to include a dll in a source package, that
>>> is expected to be installed in the libs directory?
>> You could put it in inst/libs. But we discourage that.
>> (And if you do do this, watch out for licence conditions.)
>
> Why is this discouraged? Not that i like putting binary files into packages,
> i understand that this is against good taste. But is there a more serious
> reason?
1. It's not really nice, since GPL tells something about distributing
the *sources*. Anyway, XML's binary version also ships the dll ...
2. For example, non-Windows installations won't require that dll.
> libxml2 is GPL, my package is GPL, R is GPL, so this part should be fine.
>
>>> Or in general is there a better way than supplying the dll to use a
>>> third-party library (libxml2) in a package which should build on windows as
>>> well?
>> As I understand it, several package maintainers have set up arrangements
>> with Uwe Ligges to do this, based on DLLs they have supplied him.
>> Package XML being an example, so I suspect Uwe already knows all about
>> libxml2. You could actually avoid this by depending on XML and arranging
>> to have XML/libs in the PATH at load time.
>
> I don't really like depending on the XML package, since i don't actually use
> the functions provided by this package, i only want to use libxml2, which is
> not even part of the XML source package.
You can copy from the XML package:
configure.win should contain at least:
#!/bin/sh
mkdir $DPKG/libs
cp $LIB_XML/lib/libxml2.dll $DPKG/libs
and Makevars.win can make use of
${LIB_XML}/include
${LIB_XML}/lib
The name of the environment variable to the XML stuff, LIB_XML, is fixed
due to my setup on the machine that build the Windows binaries.
Uwe Ligges
> Gabor
>
>> --
>> Brian D. Ripley, ripley at stats.ox.ac.uk
>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford, Tel: +44 1865 272861 (self)
>> 1 South Parks Road, +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK Fax: +44 1865 272595
>
More information about the R-devel
mailing list