Advertisement
Guest User

cinnamon-1.8.2.ebuild

a guest
May 13th, 2013
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.21 KB | None | 0 0
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: $
  4.  
  5. EAPI="5"
  6. GCONF_DEBUG="no"
  7. GNOME2_LA_PUNT="yes"
  8. PYTHON_COMPAT=( python{2_6,2_7} )
  9. PYTHON_REQ_USE="xml"
  10.  
  11. inherit autotools eutils gnome2 multilib pax-utils python-single-r1
  12.  
  13. DESCRIPTION="A fork of GNOME Shell with layout similar to GNOME 2"
  14. HOMEPAGE="http://cinnamon.linuxmint.com/"
  15.  
  16. MY_PV="${PV/_p/-UP}"
  17. MY_P="${PN}-${MY_PV}"
  18.  
  19. SRC_URI="https://github.com/linuxmint/Cinnamon/tarball/${MY_PV} -> ${MY_P}.tar.gz"
  20.  
  21. LICENSE="GPL-2+"
  22. SLOT="0"
  23. IUSE="+bluetooth +networkmanager"
  24. KEYWORDS="~amd64 ~x86"
  25.  
  26. # gnome-desktop-2.91.2 is needed due to header changes, db82a33 in gnome-desktop
  27. # latest gsettings-desktop-schemas is needed due to commit 602fa1c6
  28. # latest g-c-c is needed due to https://bugs.gentoo.org/show_bug.cgi?id=360057
  29. # libXfixes-5.0 needed for pointer barriers
  30. # gnome-menus-3.2.0.1-r1 needed for new 10-xdg-menu-gnome
  31. COMMON_DEPEND=">=dev-libs/glib-2.29.10:2
  32. >=dev-libs/gjs-1.29.18
  33. >=dev-libs/gobject-introspection-0.10.1
  34. x11-libs/gdk-pixbuf:2[introspection]
  35. >=x11-libs/gtk+-3.0.0:3[introspection]
  36. >=media-libs/clutter-1.7.5:1.0[introspection]
  37. media-libs/cogl:1.0=[introspection]
  38. app-misc/ca-certificates
  39. >=dev-libs/json-glib-0.13.2
  40. >=gnome-base/gnome-desktop-2.91.2:3=[introspection]
  41. >=gnome-base/gsettings-desktop-schemas-2.91.91
  42. >=media-libs/gstreamer-0.10.16:0.10
  43. >=media-libs/gst-plugins-base-0.10.16:0.10
  44. net-libs/libsoup:2.4[introspection]
  45. >=sys-auth/polkit-0.100[introspection]
  46. >=x11-wm/muffin-1.7.4[introspection]
  47.  
  48. dev-libs/dbus-glib
  49. dev-libs/libxml2:2
  50. x11-libs/pango[introspection]
  51. >=dev-libs/libcroco-0.6.2:0.6
  52.  
  53. gnome-base/gconf:2[introspection]
  54. >=gnome-base/gnome-menus-3.2.0.1-r1:3[introspection]
  55. gnome-base/librsvg
  56. media-libs/libcanberra
  57. media-sound/pulseaudio
  58.  
  59. >=x11-libs/startup-notification-0.11
  60. x11-libs/libX11
  61. >=x11-libs/libXfixes-5.0
  62. x11-apps/mesa-progs
  63.  
  64. ${PYTHON_DEPS}
  65.  
  66. bluetooth? ( >=net-wireless/gnome-bluetooth-3.4:=[introspection] )
  67. networkmanager? (
  68. gnome-base/libgnome-keyring
  69. >=net-misc/networkmanager-0.8.999[introspection] )"
  70. # Runtime-only deps are probably incomplete and approximate.
  71. # Each block:
  72. # 2. Introspection stuff + dconf needed via imports.gi.*
  73. # 3. gnome-session is needed for gnome-session-quit
  74. # 4. Control shell settings
  75. # 5. accountsservice is needed for GdmUserManager (0.6.14 needed for fast
  76. # user switching with gdm-3.1.x)
  77. # 6. caribou needed for on-screen keyboard
  78. # 7. xdg-utils needed for xdg-open, used by extension tool
  79. # 8. gconf-python, imaging, lxml needed for cinnamon-settings
  80. # 9. gnome-icon-theme-symbolic needed for various icons
  81. # 10. pygobject needed for menu editor
  82. # 11. nemo - default file manager, tightly integrated with cinnamon
  83. # 12. timedated or DateTimeMechanism implementation for cinnamon-settings
  84. RDEPEND="${COMMON_DEPEND}
  85. >=gnome-base/dconf-0.4.1
  86. >=gnome-base/libgnomekbd-2.91.4[introspection]
  87. sys-power/upower[introspection]
  88.  
  89. >=gnome-base/gnome-session-3.2.1-r1
  90.  
  91. >=gnome-base/gnome-settings-daemon-2.91
  92. >=gnome-base/gnome-control-center-2.91.92-r1
  93.  
  94. >=sys-apps/accountsservice-0.6.14[introspection]
  95.  
  96. >=app-accessibility/caribou-0.3
  97.  
  98. x11-misc/xdg-utils
  99.  
  100. dev-python/dbus-python[${PYTHON_USEDEP}]
  101. dev-python/gconf-python:2
  102. dev-python/imaging
  103. dev-python/lxml
  104.  
  105. x11-themes/gnome-icon-theme-symbolic
  106.  
  107. dev-python/pygobject:3[${PYTHON_USEDEP}]
  108.  
  109. gnome-extra/nemo
  110.  
  111. || (
  112. app-admin/openrc-settingsd
  113. >=sys-apps/systemd-30
  114. <gnome-base/gnome-settings-daemon-3.3.5 )
  115.  
  116. networkmanager? (
  117. net-misc/mobile-broadband-provider-info
  118. sys-libs/timezone-data )"
  119. DEPEND="${COMMON_DEPEND}
  120. >=sys-devel/gettext-0.17
  121. virtual/pkgconfig
  122. >=dev-util/intltool-0.40
  123. gnome-base/gnome-common
  124. !!=dev-lang/spidermonkey-1.8.2*"
  125. # libmozjs.so is picked up from /usr/lib while compiling, so block at build-time
  126. # https://bugs.gentoo.org/show_bug.cgi?id=360413
  127.  
  128. S="${WORKDIR}/linuxmint-Cinnamon-ded6f27"
  129.  
  130. pkg_setup() {
  131. python-single-r1_pkg_setup
  132. }
  133.  
  134. src_prepare() {
  135. # Fix cinnamon-settings lspci path
  136. epatch "${FILESDIR}/${PN}-1.7.8-settings-lspci.patch"
  137. # Fix automagic gnome-bluetooth dep, bug #398145
  138. epatch "${FILESDIR}/${PN}-1.6.1-automagic-gnome-bluetooth.patch"
  139.  
  140. # Make networkmanager optional, bug #398593
  141. epatch "${FILESDIR}/${PN}-1.7.8-optional-networkmanager.patch"
  142.  
  143. # Gentoo uses /usr/libexec
  144. sed -e "s:/usr/lib/gnome-session/gnome-session-check-accelerated:${EPREFIX}/usr/libexec/gnome-session-check-accelerated:"
  145. \
  146. -i "files/usr/share/gnome-session/sessions/cinnamon.session" || die "sed 1 failed"
  147.  
  148. # Gentoo uses /usr/$(get_libdir), not /usr/lib even for python
  149. sed -e "s:/usr/lib/:/usr/$(get_libdir)/:" \
  150. -e 's:"/usr/lib":"/usr/'"$(get_libdir)"'":' \
  151. -i files/usr/bin/cinnamon-menu-editor \
  152. -i files/usr/bin/cinnamon-settings \
  153. -i files/usr/lib/cinnamon-menu-editor/cme/config.py \
  154. -i files/usr/lib/cinnamon-menu-editor/cme/MainWindow.py \
  155. -i files/usr/lib/cinnamon-settings/cinnamon-settings.py || die "sed 2 failed"
  156. if [[ "$(get_libdir)" != lib ]]; then
  157. mv files/usr/lib "files/usr/$(get_libdir)" || die "mv failed"
  158. fi
  159.  
  160. if ! use bluetooth; then
  161. rm -rv files/usr/share/cinnamon/applets/bluetooth@cinnamon.org || die
  162. fi
  163.  
  164. if ! use networkmanager; then
  165. rm -rv files/usr/share/cinnamon/applets/network@cinnamon.org || die
  166. fi
  167.  
  168. eautoreconf
  169. gnome2_src_prepare
  170.  
  171. # Drop G_DISABLE_DEPRECATED for sanity on glib upgrades; bug #384765
  172. # Note: sed Makefile.in because it is generated from several Makefile.ams
  173. sed -e 's/-DG_DISABLE_DEPRECATED//g' \
  174. -i src/Makefile.in browser-plugin/Makefile.in || die "sed 3 failed"
  175. }
  176.  
  177. src_configure() {
  178. # Don't error out on warnings
  179. gnome2_src_configure \
  180. --enable-compile-warnings=maximum \
  181. --disable-schemas-compile \
  182. --disable-jhbuild-wrapper-script \
  183. $(use_with bluetooth) \
  184. $(use_enable networkmanager) \
  185. --with-ca-certificates="${EPREFIX}/etc/ssl/certs/ca-certificates.crt" \
  186. BROWSER_PLUGIN_DIR="${EPREFIX}/usr/$(get_libdir)/nsbrowser/plugins"
  187. }
  188.  
  189. src_install() {
  190. gnome2_src_install
  191. python_optimize "${ED}usr/$(get_libdir)/cinnamon-"{settings,menu-editor}
  192. # Fix broken shebangs
  193. sed -e "s%#!.*python%#!$(python_get_PYTHON)%" \
  194. -i "${ED}usr/bin/cinnamon-"{launcher,menu-editor,settings} \
  195. -i "${ED}usr/$(get_libdir)/cinnamon-settings/cinnamon-settings.py" || die
  196.  
  197. # Required for gnome-shell on hardened/PaX, bug #398941
  198. pax-mark mr "${ED}usr/bin/cinnamon"
  199. }
  200.  
  201. pkg_postinst() {
  202. gnome2_pkg_postinst
  203.  
  204. if ! has_version '>=media-libs/gst-plugins-good-0.10.23:0.10' || \
  205. ! has_version 'media-plugins/gst-plugins-vp8:0.10'; then
  206. ewarn "To make use of Cinnamon's built-in screen recording utility,"
  207. ewarn "you need to either install >=media-libs/gst-plugins-good-0.10.23:0.10"
  208. ewarn "and media-plugins/gst-plugins-vp8:0.10, or use dconf-editor to change"
  209. ewarn "org.cinnamon.recorder/pipeline to what you want to use."
  210. fi
  211.  
  212. if ! has_version ">=x11-base/xorg-server-1.11"; then
  213. ewarn "If you use multiple screens, it is highly recommended that you"
  214. ewarn "upgrade to >=x11-base/xorg-server-1.11 to be able to make use of"
  215. ewarn "pointer barriers which will make it easier to use hot corners."
  216. fi
  217.  
  218. if has_version "<x11-drivers/ati-drivers-12"; then
  219. ewarn "Cinnamon has been reported to show graphical corruption under"
  220. ewarn "x11-drivers/ati-drivers-11.*; you may want to use GNOME in"
  221. ewarn "fallback mode, or switch to open-source drivers."
  222. fi
  223.  
  224. if has_version "media-libs/mesa[video_cards_radeon]"; then
  225. elog "Cinnamon is unstable under classic-mode r300/r600 mesa drivers."
  226. elog "Make sure that gallium architecture for r300 and r600 drivers is"
  227. elog "selected using 'eselect mesa'."
  228. if ! has_version "media-libs/mesa[gallium]"; then
  229. ewarn "You will need to emerge media-libs/mesa with USE=gallium."
  230. fi
  231. fi
  232.  
  233. if has_version "media-libs/mesa[video_cards_intel]"; then
  234. elog "Cinnamon is unstable under gallium-mode i915/i965 mesa drivers."
  235. elog "Make sure that classic architecture for i915 and i965 drivers is"
  236. elog "selected using 'eselect mesa'."
  237. if ! has_version "media-libs/mesa[classic]"; then
  238. ewarn "You will need to emerge media-libs/mesa with USE=classic."
  239. fi
  240. fi
  241. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement