forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: https://bugs.gentoo.org/742161 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
f515561
commit 46f414b
Showing
1 changed file
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,55 @@ | ||
# Copyright 1999-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=4 | ||
EAPI=7 | ||
|
||
DESCRIPTION="Apsfilter Prints So Fine, It Leads To Extraordinary Results" | ||
HOMEPAGE="http://www.apsfilter.org" | ||
SRC_URI="http://www.apsfilter.org/download/${P}.tar.bz2" | ||
S="${WORKDIR}/${PN}" | ||
|
||
KEYWORDS="~alpha ~amd64 ppc sparc x86" | ||
IUSE="cups" | ||
SLOT="0" | ||
LICENSE="GPL-2" | ||
|
||
RDEPEND="|| ( net-print/cups net-print/lprng ) | ||
RDEPEND=" | ||
app-text/ghostscript-gpl | ||
>=app-text/psutils-1.17 | ||
>=app-text/a2ps-4.13b-r4 | ||
net-print/cups | ||
virtual/awk | ||
virtual/imagemagick-tools | ||
virtual/mta" | ||
DEPEND="${RDEPEND}" | ||
|
||
S=${WORKDIR}/${PN} | ||
|
||
src_configure() { | ||
# assume thet lprng is installed if cups isn't USEd | ||
use cups && \ | ||
myconf="--with-printcap=/etc/cups/printcap --with-spooldir=/var/spool/cups" || \ | ||
myconf="--with-printcap=/etc/lprng/printcap" | ||
local myconf= | ||
|
||
# assume that lprng is installed if cups isn't USEd | ||
if use cups ; then | ||
myconf="--with-printcap=/etc/cups/printcap --with-spooldir=/var/spool/cups" | ||
else | ||
myconf="--with-printcap=/etc/lprng/printcap" | ||
fi | ||
|
||
# econf doesn't work here :( | ||
./configure --prefix=/usr --mandir=/usr/share/man \ | ||
--docdir=/usr/share/doc/${PF} --sysconfdir=/etc ${myconf} || die | ||
./configure \ | ||
--prefix="${EPREFIX}/usr" \ | ||
--mandir=/usr/share/man \ | ||
--docdir=/usr/share/doc/${PF} \ | ||
--sysconfdir=/etc \ | ||
"${myconf} ${EXTRA_ECONF}" \ | ||
|| die | ||
} | ||
|
||
src_install() { | ||
emake DESTDIR="${D}" install | ||
dosym /usr/share/apsfilter/SETUP /usr/bin/apsfilter | ||
use cups && \ | ||
dosym /etc/cups/printcap /etc/printcap || \ | ||
dosym /etc/lprng/printcap /etc/printcap | ||
emake DESTDIR="${ED}" install | ||
dosym ../share/apsfilter/SETUP /usr/bin/apsfilter | ||
|
||
if use cups ; then | ||
dosym ../cups/printcap /etc/printcap | ||
else | ||
dosym ../lprng/printcap /etc/printcap | ||
fi | ||
} |