R.cygclass

Cygport Reference Manual

### TABLE OF CONTENTS

- R.cygclass

- R
- R_CFLAGS
- R_LIBS
- R_HOME
- R_INCLUDEDIR
- R_SITELIB
- CATEGORY (R)
- SUMMARY (R)
- HOMEPAGE (R)
- SRC_URI (R)
- R_CONFIGURE_ARGS
- R_compile
- R_install
- src_compile (R)
- src_install (R)

## R.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

      inherit R

DESCRIPTION

R is a GNU implementation of S, a language and environment for statistical computing and graphics.

The primary purpose of R.cygclass is for creating Cygwin packages from CRAN packages, the R equivalent of Perl's CPAN. CRAN package builds are driven by R itself.

Most CRAN packages build OOTB, but creating a Cygwin package may be helpful if a patch is required or if the build requirements are substantial (e.g. RGtk2, the GTK+ bindings which are used in several GUIs). When using R.cygclass to build a CRAN package, NAME must be "R-" followed by the CRAN package name. In most such cases, the R.cygclass src_compile and src_install should suffice.

Alternatively, the definitions in this cygclass can be used to help build an R-dependent package which does not use CRAN, e.g. rkward.

EXAMPLE

      inherit R

      NAME="R-RODBC"
      VERSION=1.3-7
      RELEASE=1
      CATEGORY="Math"
      SUMMARY="R ODBC interface"
      DESCRIPTION="ODBC database interface for the R statistic programming language"

      R_CONFIGURE_ARGS="--with-odbc-manager=iodbc"

REQUIRES

pkg-config, R

SEE ALSO

mirror_cran

## R

[ Top ] [ R.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the R interpreter.

## R_CFLAGS

[ Top ] [ R.cygclass ] [ Definitions ]

DESCRIPTION

Compile flags for the libR C library.

## R_LIBS

[ Top ] [ R.cygclass ] [ Definitions ]

DESCRIPTION

Link flags for the libR C library.

## R_HOME

[ Top ] [ R.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the R main directory.

## R_INCLUDEDIR

[ Top ] [ R.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the directory containing libR C library headers.

## R_SITELIB

[ Top ] [ R.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for third-party R modules.

## CATEGORY (R)

[ Top ] [ R.cygclass ] [ Overloads ]

DEFINITION

    CATEGORY="Math Science"

## SUMMARY (R)

[ Top ] [ R.cygclass ] [ Overloads ]

DEFINITION

    SUMMARY="R ${ORIG_PN} package"

## HOMEPAGE (R)

[ Top ] [ R.cygclass ] [ Overloads ]

DESCRIPTION

Web address for the R module on CRAN.

## SRC_URI (R)

[ Top ] [ R.cygclass ] [ Overloads ]

DESCRIPTION

Download location for the R module on CRAN.

## R_CONFIGURE_ARGS

[ Top ] [ R.cygclass ] [ Variables ]

SYNOPSIS

      R_CONFIGURE_ARGS="arg1 [arg2 ...]"

DESCRIPTION

A string containing flag(s) to be passed to the configure script used by module packages containing native code.

## R_compile

[ Top ] [ R.cygclass ] [ Compile Functions ]

SYNOPSIS

      cd $B
      R_compile

DESCRIPTION

Configures and compiles an R module packages. Due to the nature of CRAN packages, the package is not compiled in B, but is compiled and "installed" into a temporary directory.

## R_install

[ Top ] [ R.cygclass ] [ Install Functions ]

SYNOPSIS

      R_install

DESCRIPTION

Installs the R module into $D. Due to the nature of CRAN packages, all this does is copy from the temporary directory used in R_compile.

## src_compile (R)

[ Top ] [ R.cygclass ] [ Overloads ]

DEFINITION

    src_compile() {
            mkdir -p ${B}/${ORIG_PN}
            lndirs ${S} ${B}/${ORIG_PN}
            R_compile
    }

## src_install (R)

[ Top ] [ R.cygclass ] [ Overloads ]

DEFINITION

    src_install() {
            R_install
    }