enlightenment-0.17.9999.ebuild 3.2 KB

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