summaryrefslogtreecommitdiff
path: root/rstudio/Pkgfile
blob: 579fc12283a9d5e99fe02f3cc4b0035c2926937a (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 hyphen libevent libsoci mathjax npm openjdk8 pandoc-bin qtwebengine r yaml-cpp yarn
    5 
    6 name=rstudio
    7 version=1.4.1717
    8 release=3
    9 
   10 source=(https://github.com/rstudio/rstudio/archive/v$version/$name-$version.tar.gz
   11   # https://src.fedoraproject.org/rpms/rstudio/tree/rawhide
   12   0000-unbundle-dependencies-common.patch 0003-fix-resources-path.patch
   13   0002-fix-rstudio-exec-path.patch 0004-use-system-node.patch)
   14 
   15 build() {
   16   patch -Np1 -d $name-$version -i $SRC/0000-unbundle-dependencies-common.patch
   17   patch -Np1 -d $name-$version -i $SRC/0002-fix-rstudio-exec-path.patch
   18   patch -Np1 -d $name-$version -i $SRC/0003-fix-resources-path.patch
   19   patch -Np1 -d $name-$version -i $SRC/0004-use-system-node.patch
   20 
   21   export R_LIBS_USER="$PKG/usr/lib/R/library/"
   22   export JAVA_ANT_REWRITE_CLASSPATH="yes"
   23   export JAVA_TOOL_OPTIONS="-Djava.util.prefs.userRoot=$SRC"
   24 
   25   export JAVA_HOME=/usr/lib/java/openjdk8
   26   export PATH="${JAVA_HOME}/bin/:${PATH}"
   27 
   28   (pushd $name-$version/dependencies/common
   29   install -d node/10.19.0/bin
   30   ln -sfT /usr/share/myspell/dicts dictionaries
   31   ln -sfT /usr/share/mathjax mathjax-27
   32   ln -sfT /usr/bin/pandoc pandoc
   33   ln -sfT /usr/bin/node node/10.19.0/bin/node
   34   bash install-packages
   35   yarn config set ignore-engines true
   36   yarn install)
   37 
   38   pushd $name-$version/src/gwt
   39 
   40   pushd panmirror/src/editor
   41   npm install --no-optional --legacy-peer-deps
   42   popd
   43 
   44   ant clean
   45   ant build
   46   popd
   47 
   48   sed -i 's@gwt_build ALL@gwt_build@g' $name-$version/src/gwt/CMakeLists.txt
   49 
   50   cmake -S $name-$version -B build -G Ninja \
   51     -D CMAKE_INSTALL_PREFIX=/usr/lib/rstudio \
   52     -D CMAKE_BUILD_TYPE=Release \
   53     -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
   54     -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
   55     -D QT_QMAKE_EXECUTABLE=/usr/lib/qt5/bin/qmake \
   56     -D RSTUDIO_TARGET=Desktop \
   57     -D RSTUDIO_USE_SYSTEM_BOOST=ON \
   58     -D RSTUDIO_USE_SYSTEM_SOCI=ON \
   59     -D RSTUDIO_USE_SYSTEM_YAML_CPP=ON \
   60     -D Boost_NO_BOOST_CMAKE=ON \
   61     -D RSTUDIO_BUNDLE_QT=FALSE \
   62     -D RSTUDIO_CRASHPAD_ENABLED=FALSE \
   63     -Wno-dev
   64 
   65   cmake --build build
   66   DESTDIR=$PKG cmake --install build
   67 
   68   install -dm755 $PKG/usr/bin/
   69   ln -s /usr/lib/$name/bin/$name $PKG/usr/bin/$name
   70   sed -i 's|/usr/lib/rstudio/bin/rstudio|/usr/bin/rstudio|g' $PKG/usr/share/applications/rstudio.desktop
   71 
   72   find $PKG \(\
   73     -iname '*README*' -o \
   74     -iname '*COPYING*' -o \
   75     -iname 'INSTALL' \
   76     \) -delete || true
   77 }

Generated by cgit