app-text/qpdf: add USE=perl to control the perl/fix-qdf dep
authorMike Frysinger <vapier@gentoo.org>
Tue, 6 Dec 2016 22:22:20 +0000 (17:22 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 6 Dec 2016 22:24:39 +0000 (17:24 -0500)
The only reason we depend on perl is for the fix-qdf helper script
written in perl.  That's a heavy dep when all you want is the libqdf
library.  Add USE=perl to control it.

app-text/qpdf/metadata.xml
app-text/qpdf/qpdf-5.1.1-r1.ebuild [moved from app-text/qpdf/qpdf-5.1.1.ebuild with 80% similarity]
app-text/qpdf/qpdf-5.1.2-r1.ebuild [moved from app-text/qpdf/qpdf-5.1.2.ebuild with 81% similarity]
app-text/qpdf/qpdf-5.1.3-r1.ebuild [moved from app-text/qpdf/qpdf-5.1.3.ebuild with 80% similarity]
app-text/qpdf/qpdf-6.0.0-r1.ebuild [moved from app-text/qpdf/qpdf-6.0.0.ebuild with 80% similarity]

index 2027270a829753301b684504da407aae08435686..ce823e597ac861c4a2a2e36f84f6ec7ec9af2ee9 100644 (file)
@@ -5,6 +5,9 @@
                <email>printing@gentoo.org</email>
                <name>Gentoo Printing Project</name>
        </maintainer>
+       <use>
+               <flag name="perl">Install fix-qdf tool (for reverting PDF edits) written in perl</flag>
+       </use>
        <upstream>
                <remote-id type="sourceforge">qpdf</remote-id>
        </upstream>
similarity index 80%
rename from app-text/qpdf/qpdf-5.1.1.ebuild
rename to app-text/qpdf/qpdf-5.1.1-r1.ebuild
index bcd0f7f4745bc32707e95753e0f952b1f7331578..c347e71eb23d00b856f0c4513a5b537e31b7cfef 100644 (file)
@@ -13,17 +13,18 @@ SRC_URI="mirror://sourceforge/qpdf/${P}.tar.gz"
 LICENSE="Artistic-2"
 SLOT="0/13" # subslot = libqpdf soname version
 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris"
-IUSE="doc examples static-libs test"
+IUSE="doc examples perl static-libs test"
 
 RDEPEND="dev-libs/libpcre
-       sys-libs/zlib
-       >=dev-lang/perl-5.8"
+       sys-libs/zlib"
 DEPEND="${RDEPEND}
        test? (
                sys-apps/diffutils
                media-libs/tiff
                app-text/ghostscript-gpl
        )"
+# Only need perl for the installed tools.
+RDEPEND+=" perl? ( >=dev-lang/perl-5.8 )"
 
 DOCS=( ChangeLog README TODO )
 
@@ -41,6 +42,11 @@ src_configure() {
 src_install() {
        default
 
+       if ! use perl ; then
+               rm "${ED}"/usr/bin/fix-qdf || die
+               rm "${ED}"/usr/share/man/man1/fix-qdf.1 || die
+       fi
+
        if use doc ; then
                dodoc doc/qpdf-manual.pdf
                dohtml doc/*
similarity index 81%
rename from app-text/qpdf/qpdf-5.1.2.ebuild
rename to app-text/qpdf/qpdf-5.1.2-r1.ebuild
index 694f56c97f30da36d25bcbe3031ec1dc6f8c11e8..041bdcff1364c28e2255ab1df2d80e788cd639f1 100644 (file)
@@ -13,17 +13,18 @@ SRC_URI="mirror://sourceforge/qpdf/${P}.tar.gz"
 LICENSE="Artistic-2"
 SLOT="0/13" # subslot = libqpdf soname version
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris"
-IUSE="doc examples static-libs test"
+IUSE="doc examples perl static-libs test"
 
 RDEPEND="dev-libs/libpcre
-       sys-libs/zlib
-       >=dev-lang/perl-5.8"
+       sys-libs/zlib"
 DEPEND="${RDEPEND}
        test? (
                sys-apps/diffutils
                media-libs/tiff
                app-text/ghostscript-gpl
        )"
+# Only need perl for the installed tools.
+RDEPEND+=" perl? ( >=dev-lang/perl-5.8 )"
 
 DOCS=( ChangeLog README TODO )
 
@@ -41,6 +42,11 @@ src_configure() {
 src_install() {
        default
 
+       if ! use perl ; then
+               rm "${ED}"/usr/bin/fix-qdf || die
+               rm "${ED}"/usr/share/man/man1/fix-qdf.1 || die
+       fi
+
        if use doc ; then
                dodoc doc/qpdf-manual.pdf
                dohtml doc/*
similarity index 80%
rename from app-text/qpdf/qpdf-5.1.3.ebuild
rename to app-text/qpdf/qpdf-5.1.3-r1.ebuild
index ebfd5d539ef0e13566db1bdfcbae1bbdc068b077..52e8a6f4bf891ca815d3e3b8f5a7472fb1ce4adf 100644 (file)
@@ -13,17 +13,18 @@ SRC_URI="mirror://sourceforge/qpdf/${P}.tar.gz"
 LICENSE="Artistic-2"
 SLOT="0/13" # subslot = libqpdf soname version
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris"
-IUSE="doc examples static-libs test"
+IUSE="doc examples perl static-libs test"
 
 RDEPEND="dev-libs/libpcre
-       sys-libs/zlib
-       >=dev-lang/perl-5.8"
+       sys-libs/zlib"
 DEPEND="${RDEPEND}
        test? (
                sys-apps/diffutils
                media-libs/tiff
                app-text/ghostscript-gpl
        )"
+# Only need perl for the installed tools.
+RDEPEND+=" perl? ( >=dev-lang/perl-5.8 )"
 
 DOCS=( ChangeLog README TODO )
 
@@ -41,6 +42,11 @@ src_configure() {
 src_install() {
        default
 
+       if ! use perl ; then
+               rm "${ED}"/usr/bin/fix-qdf || die
+               rm "${ED}"/usr/share/man/man1/fix-qdf.1 || die
+       fi
+
        if use doc ; then
                dodoc doc/qpdf-manual.pdf
                dohtml doc/*
similarity index 80%
rename from app-text/qpdf/qpdf-6.0.0.ebuild
rename to app-text/qpdf/qpdf-6.0.0-r1.ebuild
index b31f1b04b5af6cd42b1468d9f87a953e24e09b76..f7939cebf095580af55fa734e151c450733c4471 100644 (file)
@@ -13,17 +13,18 @@ SRC_URI="mirror://sourceforge/qpdf/${P}.tar.gz"
 LICENSE="Artistic-2"
 SLOT="0/17" # subslot = libqpdf soname version
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris"
-IUSE="doc examples static-libs test"
+IUSE="doc examples perl static-libs test"
 
 RDEPEND="dev-libs/libpcre
-       sys-libs/zlib
-       >=dev-lang/perl-5.8"
+       sys-libs/zlib"
 DEPEND="${RDEPEND}
        test? (
                sys-apps/diffutils
                media-libs/tiff
                app-text/ghostscript-gpl
        )"
+# Only need perl for the installed tools.
+RDEPEND+=" perl? ( >=dev-lang/perl-5.8 )"
 
 DOCS=( ChangeLog README TODO )
 
@@ -41,6 +42,11 @@ src_configure() {
 src_install() {
        default
 
+       if ! use perl ; then
+               rm "${ED}"/usr/bin/fix-qdf || die
+               rm "${ED}"/usr/share/man/man1/fix-qdf.1 || die
+       fi
+
        if use doc ; then
                dodoc doc/qpdf-manual.pdf
                dohtml doc/*