enlightenment-0.20.5.ebuild 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. MY_P=${P/_/-}
  5. if [[ ${PV} == *9999 ]] ; then
  6. EGIT_SUB_PROJECT="core"
  7. EGIT_URI_APPEND="${PN}"
  8. else
  9. SRC_URI="https://download.enlightenment.org/rel/apps/${PN}/${MY_P}.tar.xz"
  10. EKEY_STATE="snap"
  11. fi
  12. inherit enlightenment
  13. DESCRIPTION="Enlightenment DR17 window manager"
  14. LICENSE="BSD-2"
  15. SLOT="0.17/${PV%%_*}"
  16. KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
  17. __CONF_MODS=(
  18. applications bindings dialogs display
  19. interaction intl menus
  20. paths performance randr shelves theme
  21. window-manipulation window-remembers
  22. )
  23. __NORM_MODS=(
  24. appmenu backlight bluez4 battery
  25. clock conf connman cpufreq everything
  26. fileman fileman-opinfo gadman geolocation
  27. ibar ibox lokker
  28. mixer msgbus music-control notification
  29. pager packagekit pager-plain policy-mobile quickaccess
  30. shot start syscon systray tasks teamwork temperature tiling
  31. winlist wizard wl-desktop-shell wl-drm wl-text-input
  32. wl-weekeyboard wl-wl wl-x11 xkbswitch xwayland
  33. )
  34. IUSE_E_MODULES=(
  35. ${__CONF_MODS[@]/#/enlightenment_modules_conf-}
  36. ${__NORM_MODS[@]/#/enlightenment_modules_}
  37. )
  38. IUSE="pam spell static-libs systemd ukit wayland ${IUSE_E_MODULES[@]/#/+}"
  39. RDEPEND="
  40. pam? ( sys-libs/pam )
  41. systemd? ( sys-apps/systemd )
  42. wayland? (
  43. dev-libs/efl[wayland]
  44. >=dev-libs/wayland-1.8.0
  45. >=x11-libs/pixman-0.31.1
  46. >=x11-libs/libxkbcommon-0.3.1
  47. )
  48. >=dev-libs/efl-1.17[X]
  49. >=media-libs/elementary-1.17
  50. x11-libs/xcb-util-keysyms"
  51. DEPEND="${RDEPEND}"
  52. S=${WORKDIR}/${MY_P}
  53. src_prepare() {
  54. epatch "${FILESDIR}"/quickstart.diff
  55. enlightenment_src_prepare
  56. }
  57. # Sanity check to make sure module lists are kept up-to-date.
  58. check_modules() {
  59. local detected=$(
  60. awk -F'[\\[\\](, ]' '$1 == "AC_E_OPTIONAL_MODULE" { print $3 }' \
  61. configure.ac | sed 's:_:-:g' | LC_COLLATE=C sort
  62. )
  63. local sorted=$(
  64. printf '%s\n' ${IUSE_E_MODULES[@]/#enlightenment_modules_} | \
  65. LC_COLLATE=C sort
  66. )
  67. if [[ ${detected} != "${sorted}" ]] ; then
  68. local out new old
  69. eerror "The ebuild needs to be kept in sync."
  70. echo "${sorted}" > ebuild-iuse
  71. echo "${detected}" > configure-detected
  72. out=$(diff -U 0 ebuild-iuse configure-detected | sed -e '1,2d' -e '/^@@/d')
  73. new=$(echo "${out}" | sed -n '/^+/{s:^+::;p}')
  74. old=$(echo "${out}" | sed -n '/^-/{s:^-::;p}')
  75. eerror "Add these modules: $(echo ${new})"
  76. eerror "Drop these modules: $(echo ${old})"
  77. die "please update the ebuild"
  78. fi
  79. }
  80. src_configure() {
  81. check_modules
  82. E_ECONF=(
  83. --disable-install-sysactions
  84. $(use_enable doc)
  85. $(use_enable nls)
  86. $(use_enable pam)
  87. $(use_enable systemd)
  88. --enable-device-udev
  89. $(use_enable ukit mount-udisks)
  90. $(use_enable wayland)
  91. )
  92. local u c
  93. for u in ${IUSE_E_MODULES[@]} ; do
  94. c=${u#enlightenment_modules_}
  95. # Disable modules by hand since we default to enabling them all.
  96. case ${c} in
  97. wl-*|xwayland)
  98. if ! use wayland ; then
  99. E_ECONF+=( --disable-${c} )
  100. continue
  101. fi
  102. ;;
  103. esac
  104. E_ECONF+=( $(use_enable ${u} ${c}) )
  105. done
  106. enlightenment_src_configure
  107. }
  108. src_install() {
  109. enlightenment_src_install
  110. insinto /etc/enlightenment
  111. newins "${FILESDIR}"/gentoo-sysactions.conf sysactions.conf
  112. }