wm2-4-r1.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Small, unconfigurable window manager"
  6. HOMEPAGE="http://www.all-day-breakfast.com/wm2/"
  7. SRC_URI="http://www.all-day-breakfast.com/wm2/${P}.tar.gz"
  8. SLOT="0"
  9. LICENSE="freedist"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE=""
  12. RDEPEND="x11-libs/libXmu"
  13. DEPEND="${RDEPEND}
  14. x11-proto/xextproto"
  15. src_prepare() {
  16. epatch "${FILESDIR}/${P}-gentoo.patch"
  17. sed -e "s/CFLAGS/CXXFLAGS/" \
  18. -e "s/\$(CCC) -o/\$(CCC) \$(LDFLAGS) -o/" \
  19. -i Makefile || die #334681
  20. sed 's/^#//' Config.h > wm2.conf
  21. if [ -e "/etc/wm2.conf" ]; then
  22. echo "#undef _CONFIG_H_" >> Config.h
  23. awk '/^[^/]/{print "#" $0}' /etc/wm2.conf >> Config.h
  24. fi
  25. }
  26. src_compile() {
  27. emake \
  28. CXXFLAGS="${CXXFLAGS}" \
  29. CCC="$(tc-getCXX)" \
  30. LDFLAGS="${LDFLAGS}"
  31. }
  32. src_install() {
  33. dobin wm2
  34. insinto /etc
  35. doins wm2.conf
  36. dodoc README
  37. }
  38. pkg_postinst() {
  39. echo
  40. elog "wm2 is unconfigurable after you have installed. If you want to"
  41. elog "change settings of wm2, please have a look at /etc/wm2.conf"
  42. elog "and rewrite it, then emerge wm2 again (wm2 ebuild uses settings"
  43. elog "from that file automatically). If you think wm2 lacks some important"
  44. elog "features that you want to use (such as background pixmaps),"
  45. elog "consider using wmx, written by the same author."
  46. echo
  47. }