summaryrefslogtreecommitdiff
path: root/rstudio/Pkgfile
blob: f289f367086dc31edff2d733170f8f974c320f11 (plain)
    1 # Description: RStudio - an Interface for GNU R
    2 # URL: https://www.rstudio.com/
    3 # Maintainer: Tim Biermann, tbier at posteo dot de
    4 # Depends on: ant boost hyphen libevent libsoci mathjax nodejs openjdk8 pandoc-bin qtwebengine r
    5 
    6 name=rstudio
    7 version=1.4.1103
    8 release=1
    9 
   10 source=(https://github.com/rstudio/rstudio/archive/v$version/$name-$version.tar.gz
   11   # https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-mathematics/rstudio/files
   12   rstudio-1.2.5042-boost-1.73.0.patch rstudio-1.3.1056-boost-1.74.0.patch
   13   pandoc-version.patch)
   14 git=(https://github.com/rstudio/rstudio.git)
   15 
   16 build() {
   17   ## if you want your git snapshot to be a particular version
   18   ## uncomment below and change every occurance of $name-$version to $name
   19   #git checkout v$version $name
   20 
   21   patch -Np1 -d $name-$version -i $SRC/rstudio-1.2.5042-boost-1.73.0.patch
   22   patch -Np1 -d $name-$version -i $SRC/rstudio-1.3.1056-boost-1.74.0.patch
   23   # it's probing for an old pandoc-version, fixing that
   24   patch -Np1 -d $name-$version -i $SRC/pandoc-version.patch
   25 
   26   export R_LIBS_USER="$PKG/usr/lib/R/library/"
   27 
   28   (pushd $name-$version/dependencies/common
   29   local pandoc_version=$(prt-get current pandoc-bin)
   30   install -d pandoc node/10.19.0/bin
   31   ln -sfT /usr/share/myspell/dicts dictionaries
   32   ln -sfT /usr/share/mathjax mathjax-27
   33   ln -sfT /usr/bin/ "pandoc/${pandoc_version/\-1/}"
   34   ln -sfT /usr/bin/node node/10.19.0/bin/node
   35   bash install-packages
   36   unset pandoc_version)
   37 
   38   export PATH="/usr/lib/java/openjdk8/jre/bin/:${PATH}"
   39   cmake -S $name-$version -B build -G Ninja \
   40     -D CMAKE_INSTALL_PREFIX=/usr/lib/rstudio \
   41     -D CMAKE_BUILD_TYPE=Release \
   42     -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
   43     -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
   44     -D RSTUDIO_TARGET=Desktop \
   45     -D RSTUDIO_USE_SYSTEM_BOOST=ON \
   46     -D RSTUDIO_USE_SYSTEM_SOCI=ON \
   47     -D Boost_NO_BOOST_CMAKE=ON \
   48     -D QT_QMAKE_EXECUTABLE=/usr/lib/qt5/bin/qmake \
   49     -D RSTUDIO_BUNDLE_QT=FALSE \
   50     -Wno-dev
   51 
   52   cmake --build build
   53   DESTDIR=$PKG cmake --install build
   54 
   55   install -dm755 $PKG/usr/bin/
   56   ln -s /usr/lib/$name/bin/$name $PKG/usr/bin/$name
   57   sed -i 's|/usr/lib/rstudio/bin/rstudio|/usr/bin/rstudio|g' $PKG/usr/share/applications/rstudio.desktop
   58 
   59   find $PKG \(\
   60     -iname '*README*' -o \
   61     -iname '*COPYING*' -o \
   62     -iname 'INSTALL' \
   63     \) -delete || true
   64 }

Generated by cgit