pal-0.4.3-r2.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit prefix toolchain-funcs
  5. DESCRIPTION="Command-line calendar program"
  6. HOMEPAGE="http://palcal.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/palcal/${P}.tgz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
  11. IUSE="nls"
  12. RDEPEND="
  13. >=dev-libs/glib-2.0
  14. nls? ( virtual/libintl )
  15. sys-libs/ncurses:0
  16. sys-libs/readline:0
  17. "
  18. DEPEND="
  19. ${RDEPEND}
  20. nls? ( sys-devel/gettext )
  21. virtual/pkgconfig
  22. "
  23. PATCHES=(
  24. "${FILESDIR}"/${PV}-strip.patch
  25. "${FILESDIR}"/${PV}-ldflags.patch
  26. "${FILESDIR}"/${P}-pkg_config.patch
  27. "${FILESDIR}"/${P}-prefix.patch
  28. "${FILESDIR}"/fix-Wformat-security-errors.patch
  29. )
  30. src_prepare() {
  31. default
  32. cd src || die "failed to change to the src directory"
  33. eprefixify Makefile.defs input.c Makefile
  34. sed -i -e 's/ -o root//g' {.,convert}/Makefile || die
  35. tc-export PKG_CONFIG
  36. }
  37. src_compile() {
  38. cd src || die "failed to change to the src directory"
  39. emake CC="$(tc-getCC)" OPT="${CFLAGS}" LDOPT="${LDFLAGS}"
  40. }
  41. src_install() {
  42. dodoc ChangeLog doc/example.css
  43. cd src || die "failed to change to the src directory"
  44. emake DESTDIR="${D}" install-man install-bin install-share
  45. if use nls; then
  46. emake DESTDIR="${D}" install-mo
  47. fi
  48. }