c2esp-26.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. MY_P=${PN}${PV}
  6. DESCRIPTION="A cups filter for Kodak ESP printers"
  7. HOMEPAGE="http://cupsdriverkodak.sf.net/"
  8. SRC_URI="mirror://sourceforge/cupsdriverkodak/files/${MY_P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~x86"
  12. IUSE=""
  13. S=${WORKDIR}/${MY_P}
  14. DEPEND=">=media-libs/jbigkit-2.0-r1
  15. >=net-print/cups-1.4"
  16. RDEPEND="${DEPEND}"
  17. src_prepare() {
  18. epatch "${FILESDIR}"/${P}-ldflags-cppflags.patch
  19. # Remove embedded media-libs/jbigkit
  20. rm -f *jbig* || die
  21. # Remove the embedded jbig files from the Makefile's dependencies:
  22. sed -i \
  23. -e '/^[a-z0-9.]*:/s/\$(LIBJBG[[:digit:]]*)//g' \
  24. -e '/^[a-z0-9.]*:/s/jbig[^ ]*\.h//g' \
  25. -e '/\$(INSTALL).*COPYING/d' \
  26. Makefile || die
  27. # Use Gentoo-style cups paths
  28. sed -i -e s,/usr/lib/cups/filter,/usr/libexec/cups/filter,g ppd/*.ppd || die
  29. }
  30. src_compile() {
  31. emake -j1 CC="$(tc-getCC)" LIBJBG=-ljbig LIBJBG85=-ljbig85
  32. }
  33. src_install() {
  34. emake \
  35. DESTDIR="${D}" \
  36. FILTERBIN="${D}"/usr/libexec/cups/filter \
  37. DOCDIR="${ED}"/usr/share/doc/${PF} \
  38. install
  39. }