cygwin aspell installing new language - dictionary

have a problem with adding new language to cygwin.
As source for language i tried using ubuntu dictionary files.
It would be interesting if anyone could install any non default languages in cygwin spell checker.

The Ubuntu packages use different directories (/usr/lib/aspell vs. /usr/lib/aspell-0.60 on Cygwin), so this isn't going to work. Instead, I suggest you build and install these from the source in one of the following ways:
Download the latest source tarball for your language from http://ftpmirror.gnu.org/aspell/dict/, unpack the tarball, then run ./configure, make, and make install.
Use cygport to build a package for you, then manually install it. For example, create an aspell-lt.cygport file with the following contents:
ASPELL_COMPAT=6
inherit aspell-dict
NAME="aspell-lt"
VERSION=1.2.1.0
RELEASE=1
CATEGORY="Text"
SUMMARY="Aspell Lithuanian dictionaries"
Then run cygport aspell-lt.cygport fetch prep build install package. Such a package would then be fit for contribution to the Cygwin distribution.

Related

Precompile R packages for specific Linux flavor

We have established a simple local CRAN-like repository for R packages. There are many users, all of which use the same version of Linux.
Is there a way of convincing R to provide pre-compiled Linux packages instead just source ones? The compilation step takes a considerable amount of time for anyone using our repository. It should be possible to precompile and reuse the same binaries, since we can guarantee that the Linux version is consistent for all users.
How could one hack something like this together?
In the very narrow sense of "all of which use the same version of Linux" you actually have an option (that happens to be relatively littler known). Create binary packages using e.g.
R CMD INSTALL --build nameOfDirectoryWithSources
As R CMD INSTALL --help says it
--build build binaries of the installed package(s)
and these are not .deb or .rpm alike packages: no dependency information or alike is added. But they do exactly what you ask for: save on compilation time.
I am not aware of a repository structure one can build of this though.

How to create CRAN ready R package that has external dependency libxml2

I have created an R package that I would like to submit to CRAN. It contains code that needs to be compiled in plain C and this code depends on the libxml2 library.
My current solution is to let Linux and Mac users install the libxml2-dev package, which lets them compile and install the R source package.
For Windows, I have created a special binary R-package that contains the required binary dependency. When reading the CRAN guidelines I see that only source packages may be uploaded and that they may not contain any binary files.
After those guidelines, my questions are:
Is it ok for Mac/Linux to have the user install libxml2-dev prior to installing the R package or are there alternative solutions?
How should I do for Windows where the libxml2 is not straight forward to install for an end user?
As mentioned above, you can just copy over what the xml2 package does:
To get things to work on Linux/MacOS, copy the files configure and /src/Makevars.in. Note that macOS includes a copy of libxml2 by default, so you can safely link to -lxml2 as you would do on Linux.
For Windows need to copy the files src/Makevars.win and tools/winlibs.R from xml2. This is a simple script that automatically downloads and statically links libxml2 from rwinlib when building the R package on Windows.
These build scripts are tested to work on (almost) any platform.

How to use R CMD INSTALL to install only essential files

I am using R CMD INSTALL to install libraries from a folder with .zip binaries to my rlibs directory. When I do this, many folders for each library are installed in the rlibs directory. Take for example the bit package. I have downloaded the bit_1.1-12.zip file from https://cran.r-project.org/web/packages/bit/index.html.
Now I install it by using the following command:
R CMD INSTALL --library=./r_libs ./external/bit_1.1-12.zip
This will create a file structure underneath the folder ./r_libs/bit
Now here is my question: How can I install only the essential library files that R needs to import? I believe this is the ./r_libs/bit/libs/ folder (I might be wrong). Currently there is plenty of additional folders installed, such as html, help, Meta, and more.
I have tried several options that R CMD INSTALL --help gives me. The description in https://stat.ethz.ch/R-manual/R-devel/library/utils/html/INSTALL.html tells me to install just the compiled code for another sub-architecture, use --libs-only. However,
R CMD INSTALL --libs-only --library=./r_libs ./external/bit_1.1-12.zip
gives me an error message that there is no ./r_libs/bit/lib directory. The options --no-html, --no-help seem to not do anything.
I am working on a Windows 7 machine using R add-on package installer 3.0.2.
What am I missing here?
Thank you.

Installing the R interpeter and R as a shared library uder the same tree

I am a bit confused about how to install R (via compilation) as a shared library.
The instructions here (Rpy2) say that I should do the following:
# <go to the R source directory>
make distclean
./configure --enable-R-shlib
make
make install
but the first make (make distclean) would remove any previous installation of R under the same directory tree (e.g. the contents of the bin folder).
What if I want to use the same installation for the R interpreter and the shared libraries? For example, say I want to use the interpreter to install R packages, and then the shared library of the installation to call R (and those packages) from Rpy2.
Otherwise, how can I install R packages for use through Rpy2?
./configure --enable-R-shlib
Will tell to build R's shared libraries in addition to what is normally built (the executable, the documentation, etc...)
Also
make install
will install R (default is /usr/local). This is where you'll want to find your R executable. Calling make distclean will only affect the build directory, not the installed R.

Installing an R package from the source files

I am trying to install the r package "segue" from the source. Unfortunately, there's no tarball provided at this time, and I don't know how to compile and install a package from the binary files. I'm on a mac, if that helps.
Thanks!
As the author of Segue, I threw you a bone and rolled the tar ball for you :)
What you see on the Google Code page is not the binary files, they are the source files. Now me doing it for you is not that helpful for helping you understand packages. So if you wanted to build this yourself, here's how you would do it:
clone the source tree so you have a local copy on your machine. Make sure you have Mercurial installed and then type hg clone https://segue.googlecode.com/hg/ segue to clone the code to your machine.
build the package, test it, and install with the following three commands:
R CMD build segue/
R CMD check segue_0.02.tar.gz
R CMD INSTALL segue_0.02.tar.gz
I've never actually used a Mac so I think these commands are right. I know they work on Linux. So let me know if I need to alter these instructions for Mac. You're helping me write documentation!

Resources