asclock-2.0.12-r1.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=3
  4. inherit eutils toolchain-funcs
  5. IUSE=""
  6. DESCRIPTION="Clock applet for AfterStep"
  7. SRC_URI="http://www.tigr.net/afterstep/download/asclock/${P}.tar.gz"
  8. HOMEPAGE="http://tigr.net/afterstep/applets/"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 ~mips ppc sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
  12. DEPEND="x11-libs/libXpm"
  13. RDEPEND="${DEPEND}
  14. x11-proto/xextproto
  15. x11-proto/xproto"
  16. src_prepare() {
  17. epatch "${FILESDIR}"/${PN}-gcc41.patch
  18. ln -s themes/classic default_theme
  19. }
  20. src_configure() { :; }
  21. src_compile() {
  22. local x
  23. # will break Solaris
  24. [[ ${CHOST} == *-linux-gnu ]] && CFLAGS="${CFLAGS} \
  25. -Dlinux \
  26. -D_POSIX_C_SOURCE=199309L \
  27. -D_POSIX_SOURCE \
  28. -D_XOPEN_SOURCE"
  29. for x in asclock parser symbols config
  30. do
  31. $(tc-getCC) \
  32. ${CPPFLAGS} ${CFLAGS} ${ASFLAGS} \
  33. -I"${EPREFIX}"/usr/include \
  34. -D_BSD_SOURCE \
  35. -D_SVID_SOURCE \
  36. -DFUNCPROTO=15 \
  37. -DNARROWPROTO \
  38. -c -o ${x}.o ${x}.c || die "compile asclock failed"
  39. done
  40. $(tc-getCC) \
  41. ${LDFLAGS} \
  42. -o asclock \
  43. asclock.o parser.o symbols.o config.o \
  44. -L"${EPREFIX}"/usr/lib \
  45. -L"${EPREFIX}"/usr/lib/X11 \
  46. -lXpm -lXext -lX11 || die "link asclock failed"
  47. }
  48. src_install() {
  49. dobin asclock
  50. local themesdir="/usr/share/${PN}/themes"
  51. insinto ${themesdir}
  52. doins -r themes/*
  53. dodoc README README.THEMES TODO
  54. cd "${D}"/${themesdir}
  55. rm -f Freeamp/Makefile{,.*}
  56. ln -s classic default_theme
  57. }