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

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

  ViewVC Help
Powered by ViewVC 1.1.20