windowmaker-9999.ebuild 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils git-r3
  5. DESCRIPTION="The fast and light GNUstep window manager"
  6. HOMEPAGE="http://www.windowmaker.org/"
  7. SRC_URI="http://www.windowmaker.org/pub/source/release/WindowMaker-extra-0.1.tar.gz"
  8. EGIT_REPO_URI="git://repo.or.cz/wmaker-crm.git"
  9. EGIT_BRANCH="next"
  10. SLOT="0"
  11. LICENSE="GPL-2"
  12. IUSE="gif imagemagick jpeg modelock nls png tiff webp xinerama +xpm xrandr"
  13. KEYWORDS=""
  14. DEPEND="media-libs/fontconfig
  15. >=x11-libs/libXft-2.1.0
  16. x11-libs/libXmu
  17. x11-libs/libXpm
  18. x11-libs/libXt
  19. x11-libs/libXv
  20. gif? ( >=media-libs/giflib-4.1.0-r3 )
  21. imagemagick? ( media-gfx/imagemagick )
  22. jpeg? ( virtual/jpeg:0= )
  23. png? ( media-libs/libpng:0= )
  24. tiff? ( media-libs/tiff:0 )
  25. webp? ( media-libs/libwebp )
  26. xinerama? ( x11-libs/libXinerama )
  27. xrandr? ( x11-libs/libXrandr )"
  28. RDEPEND="${DEPEND}
  29. nls? ( >=sys-devel/gettext-0.10.39 )
  30. !app-i18n/scim-anthy[gtk3]"
  31. src_unpack() {
  32. # wm-extras
  33. unpack ${A}
  34. git-r3_src_unpack
  35. }
  36. src_prepare() {
  37. # Fix some paths
  38. for file in WindowMaker/*menu* util/wmgenmenu.c; do
  39. if [[ -r $file ]] ; then
  40. sed -i -e "s:/usr/local/GNUstep/Applications/WPrefs.app:${EPREFIX}/usr/bin/:g;" "$file" || die
  41. sed -i -e "s:/usr/local/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die
  42. sed -i -e "s:/opt/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die
  43. fi;
  44. done;
  45. eautoreconf
  46. }
  47. src_configure() {
  48. local myconf
  49. # image format types
  50. myconf="$(use_enable imagemagick magick) $(use_enable jpeg) $(use_enable gif) $(use_enable png) $(use_enable tiff) $(use_enable webp) $(use_enable xpm)"
  51. # non required X capabilities
  52. myconf="${myconf} $(use_enable modelock) $(use_enable xrandr randr) $(use_enable xinerama)"
  53. if use nls; then
  54. [[ -z $LINGUAS ]] && export LINGUAS="$(ls po/*.po | sed 's:po/\(.*\)\.po$:\1:' | xargs)"
  55. else
  56. myconf="${myconf} --disable-locale"
  57. fi
  58. # default settings with $myconf appended
  59. econf \
  60. --sysconfdir="${EPREFIX}"/etc/X11 \
  61. --with-x \
  62. --enable-usermenu \
  63. --with-pixmapdir="${EPREFIX}"/usr/share/pixmaps \
  64. --localedir="${EPREFIX}"/usr/share/locale \
  65. ${myconf}
  66. cd ../WindowMaker-extra-0.1
  67. econf
  68. }
  69. src_compile() {
  70. emake
  71. # WindowMaker Extra Package (themes and icons)
  72. cd ../WindowMaker-extra-0.1
  73. emake
  74. }
  75. src_install() {
  76. emake DESTDIR="${D}" install
  77. dodoc AUTHORS BUGFORM BUGS ChangeLog INSTALL* FAQ* \
  78. README* NEWS TODO
  79. # WindowMaker Extra
  80. cd ../WindowMaker-extra-0.1
  81. emake DESTDIR="${D}" install
  82. newdoc README README.extra
  83. # create wmaker session shell script
  84. echo "#!/usr/bin/env bash" > wmaker
  85. echo "${EPREFIX}/usr/bin/wmaker" >> wmaker
  86. exeinto /etc/X11/Sessions/
  87. doexe wmaker
  88. insinto /usr/share/xsessions
  89. doins "${FILESDIR}"/wmaker.desktop
  90. make_desktop_entry /usr/bin/wmaker
  91. }