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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (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.1: +5 -4 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.1091.ebuild,v 1.1 2014/12/06 12:32:01 gienah Exp $
4
5 EAPI=5
6
7 inherit eutils user cmake-utils gnome2-utils pam 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.4.2
20 PACKRAT_VER=0.98.1000
21 RMARKDOWN_VER=0.98.1000
22 SHINYAPPS_VER=0.98.1000
23
24 DESCRIPTION="IDE for the R language"
25 HOMEPAGE="http://www.rstudio.org
26 https://github.com/rstudio/rstudio/"
27 SRC_URI="https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
28 https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
29 https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
30 https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUMVER}.zip
31 https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUMVER}.jar
32 https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
33 https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
34 http://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
35 http://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
36 http://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz"
37
38 LICENSE="AGPL-3"
39 SLOT="0"
40 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
41 IUSE="dedicated server"
42
43 QTVER=4.8
44 QTSLOT=4
45 RDEPEND="
46 app-text/pandoc
47 dev-haskell/pandoc-citeproc
48 >=dev-lang/R-2.11.1
49 >=dev-libs/boost-1.50:=
50 >=dev-libs/mathjax-2.3
51 dev-libs/openssl:0
52 sys-apps/util-linux
53 sys-libs/zlib
54 >=virtual/jre-1.5:=
55 x11-libs/pango
56 !dedicated? (
57 >=dev-qt/qtcore-${QTVER}:${QTSLOT}
58 >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
59 >=dev-qt/qtgui-${QTVER}:${QTSLOT}
60 >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
61 >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}
62 server? ( virtual/pam )
63 )
64 dedicated? ( virtual/pam )"
65 DEPEND="${RDEPEND}
66 app-arch/unzip
67 dev-java/ant-core
68 >=virtual/jdk-1.5
69 virtual/pkgconfig"
70 # test? ( dev-java/junit:4 )
71
72 src_unpack() {
73 unpack ${P}.tar.gz gwt-${GWTVER}.zip
74 cd "${S}" || die
75 mkdir -p src/gwt/lib/{gin,gwt} \
76 dependencies/common/dictionaries \
77 src/gwt/lib/selenium/${SELENIUMVER} \
78 src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
79 mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
80 unzip -qd src/gwt/lib/gin/${GINVER} \
81 "${DISTDIR}"/gin-${GINVER}.zip || die
82 unzip -qd dependencies/common/dictionaries \
83 "${DISTDIR}"/core-dictionaries.zip || die
84 unzip -qd src/gwt/lib/selenium/${SELENIUMVER} \
85 "${DISTDIR}"/selenium-java-${SELENIUMVER}.zip || die
86 cp "${DISTDIR}"/selenium-server-standalone-${SELENIUMVER}.jar \
87 src/gwt/lib/selenium/${SELENIUMVER}/ || die
88 cp "${DISTDIR}"/chromedriver-linux \
89 src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
90 cd dependencies/common || die
91 unpack packrat-${PACKRAT_VER}.tar.gz
92 unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
93 unpack shinyapps-${RMARKDOWN_VER}.tar.gz
94 cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
95 . || die
96 cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
97 . || die
98 cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
99 . || die
100 }
101
102 src_prepare() {
103 java-pkg-2_src_prepare
104
105 find . -name .gitignore -delete || die
106
107 epatch "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
108 "${FILESDIR}"/${PN}-0.98.932-paths.patch \
109 "${FILESDIR}"/${PN}-0.98.1091-pandoc.patch \
110 "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch \
111 "${FILESDIR}"/${PN}-0.98.1091-boost-1.57.patch
112
113 # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
114 # this sed hack for now. ~RMH
115 sed -i \
116 -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
117 src/cpp/server/ServerOptions.cpp \
118 src/cpp/session/SessionOptions.cpp || die
119
120 # use mathjax from system
121 ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
122
123 # make sure icons and mime stuff are with prefix
124 sed -i \
125 -e "s:/usr:${EPREFIX}/usr:g" \
126 CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
127
128 # specify that namespace core the is in the global namespace and not
129 # relative to some other namespace (like its ::core not ::boost::core)
130 find . \( -name *.cpp -or -name *.hpp \) -exec sed \
131 -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
132
133 # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
134 sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
135 -i src/cpp/server/ServerOptions.cpp \
136 || die
137
138 # Set the rsession.conf file location for Gentoo prefix
139 sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
140 -i src/cpp/session/SessionOptions.cpp \
141 || die
142 }
143
144 src_configure() {
145 export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
146 export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
147 export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
148
149 local mycmakeargs=(
150 -DDISTRO_SHARE=share/${PN}
151 $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
152 -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
153 )
154
155 cmake-utils_src_configure
156 }
157
158 src_compile() {
159 cmake-utils_src_compile
160 }
161
162 src_install() {
163 cmake-utils_src_install
164 pax-mark m "${ED}usr/bin/rstudio"
165 doconfd "${FILESDIR}"/rstudio-server.conf
166 dodir /etc/rstudio
167 insinto /etc/rstudio
168 doins "${FILESDIR}"/rsession.conf
169 dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
170 if use dedicated || use server; then
171 dopamd src/cpp/server/extras/pam/rstudio
172 newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
173 fi
174 }
175
176 pkg_preinst() {
177 use dedicated || gnome2_icon_savelist
178 java-pkg-2_pkg_preinst
179 }
180
181 pkg_postinst() {
182 use dedicated || { fdo-mime_desktop_database_update
183 fdo-mime_mime_database_update
184 gnome2_icon_cache_update ;}
185
186 if use dedicated || use server; then
187 enewgroup rstudio-server
188 enewuser rstudio-server -1 -1 -1 rstudio-server
189 fi
190 }
191
192 pkg_postrm() {
193 use dedicated || { fdo-mime_desktop_database_update
194 fdo-mime_mime_database_update
195 gnome2_icon_cache_update ;}
196 }

  ViewVC Help
Powered by ViewVC 1.1.20