/[gentoo-x86]/sci-mathematics/rstudio/rstudio-0.98.1028.ebuild
Gentoo

Contents of /sci-mathematics/rstudio/rstudio-0.98.1028.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Feb 28 04:39:43 2015 UTC (4 years, 10 months ago) by gienah
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +3 -3 lines
Patch rstudio-0.98.1091 to build with boost 1.57

(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 618E971F)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/rstudio/rstudio-0.98.1028.ebuild,v 1.2 2014/12/06 12:32:01 gienah Exp $
4
5 EAPI=5
6
7 inherit eutils cmake-utils gnome2-utils versionator fdo-mime java-pkg-2 pax-utils
8
9 # TODO
10 # * package gin and gwt
11 # * use dict from tree, linguas
12 # * do src_test (use junit from tree?)
13
14 # update from scripts in dependencies/common
15 GWTVER=2.6.0
16 GINVER=1.5
17 SELENIUMVER=2.37.0
18 CHROMEDRIVER_VER=2.7
19 PANDOC_VER=1.12.3
20 PACKRAT_VER=0.3.0
21 RMARKDOWN_VER=0.2.49
22
23 DESCRIPTION="IDE for the R language"
24 HOMEPAGE="http://www.rstudio.org
25 https://github.com/rstudio/rstudio/"
26 SRC_URI="https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
27 https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
28 https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
29 https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUMVER}.zip
30 https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUMVER}.jar
31 https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
32 https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
33 http://dev.gentoo.org/~hasufell/distfiles/packrat_${PACKRAT_VER}.tar.gz
34 http://dev.gentoo.org/~hasufell/distfiles/rmarkdown_${RMARKDOWN_VER}.tar.gz"
35
36 LICENSE="AGPL-3"
37 SLOT="0"
38 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
39 IUSE=""
40
41 QTVER=4.8
42 QTSLOT=4
43 RDEPEND="
44 app-text/pandoc
45 dev-haskell/pandoc-citeproc
46 >=dev-lang/R-2.11.1
47 >=dev-libs/boost-1.50
48 dev-libs/mathjax
49 dev-libs/openssl:0
50 sys-apps/util-linux
51 sys-libs/zlib
52 >=virtual/jre-1.5:=
53 x11-libs/pango
54 >=dev-qt/qtcore-${QTVER}:${QTSLOT}
55 >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
56 >=dev-qt/qtgui-${QTVER}:${QTSLOT}
57 >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
58 >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}"
59 DEPEND="${RDEPEND}
60 app-arch/unzip
61 dev-java/ant-core
62 >=virtual/jdk-1.5
63 virtual/pkgconfig"
64 # test? ( dev-java/junit:4 )
65
66 src_unpack() {
67 unpack ${P}.tar.gz gwt-${GWTVER}.zip
68 cd "${S}" || die
69 mkdir -p src/gwt/lib/{gin,gwt} \
70 dependencies/common/dictionaries \
71 src/gwt/lib/selenium/${SELENIUMVER} \
72 src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
73 mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
74 unzip -qd src/gwt/lib/gin/${GINVER} \
75 "${DISTDIR}"/gin-${GINVER}.zip || die
76 unzip -qd dependencies/common/dictionaries \
77 "${DISTDIR}"/core-dictionaries.zip || die
78 unzip -qd src/gwt/lib/selenium/${SELENIUMVER} \
79 "${DISTDIR}"/selenium-java-${SELENIUMVER}.zip || die
80 cp "${DISTDIR}"/selenium-server-standalone-${SELENIUMVER}.jar \
81 src/gwt/lib/selenium/${SELENIUMVER}/ || die
82 cp "${DISTDIR}"/chromedriver-linux \
83 src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
84 cd dependencies/common || die
85 unpack packrat_${PACKRAT_VER}.tar.gz
86 unpack rmarkdown_${RMARKDOWN_VER}.tar.gz
87 cp "${DISTDIR}"/rmarkdown_${RMARKDOWN_VER}.tar.gz \
88 . || die
89 cp "${DISTDIR}"/packrat_${PACKRAT_VER}.tar.gz \
90 . || die
91 }
92
93 src_prepare() {
94 java-pkg-2_src_prepare
95
96 find . -name .gitignore -delete || die
97
98 epatch "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
99 "${FILESDIR}"/${PN}-0.98.932-paths.patch \
100 "${FILESDIR}"/${PN}-0.98.932-pandoc.patch \
101 "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch
102
103 # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
104 # this sed hack for now. ~RMH
105 sed -i \
106 -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
107 src/cpp/server/ServerOptions.cpp \
108 src/cpp/session/SessionOptions.cpp || die
109
110 # use mathjax from system
111 ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
112
113 # make sure icons and mime stuff are with prefix
114 sed -i \
115 -e "s:/usr:${EPREFIX}/usr:g" \
116 CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
117
118 # specify that namespace core the is in the global namespace and not
119 # relative to some other namespace (like its ::core not ::boost::core)
120 find . \( -name *.cpp -or -name *.hpp \) -exec sed \
121 -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
122 }
123
124 src_configure() {
125 export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
126 export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
127 export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
128
129 local mycmakeargs=(
130 -DDISTRO_SHARE=share/${PN}
131 -DRSTUDIO_INSTALL_FREEDESKTOP=ON
132 -DRSTUDIO_TARGET=Desktop
133 )
134
135 cmake-utils_src_configure
136 }
137
138 src_compile() {
139 cmake-utils_src_compile
140 }
141
142 src_install() {
143 cmake-utils_src_install
144 pax-mark m "${ED}usr/bin/rstudio"
145 }
146
147 pkg_preinst() {
148 gnome2_icon_savelist
149 java-pkg-2_pkg_preinst
150 }
151
152 pkg_postinst() {
153 fdo-mime_desktop_database_update
154 fdo-mime_mime_database_update
155 gnome2_icon_cache_update
156 }
157
158 pkg_postrm() {
159 fdo-mime_desktop_database_update
160 fdo-mime_mime_database_update
161 gnome2_icon_cache_update
162 }

  ViewVC Help
Powered by ViewVC 1.1.20