x11-libs/fox: port Soap's QA fixes to 1.6
authorJason A. Donenfeld <zx2c4@gentoo.org>
Mon, 30 Dec 2019 14:09:53 +0000 (15:09 +0100)
committerJason A. Donenfeld <zx2c4@gentoo.org>
Mon, 30 Dec 2019 14:09:53 +0000 (15:09 +0100)
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
x11-libs/fox/fox-1.6.57-r1.ebuild

index a33093e968d8c81f2ccc191ff20aa54f9ddd98bd..3b8d8ad7645b10316f7b47c0045f2ff7202c4531 100644 (file)
@@ -14,18 +14,20 @@ SLOT="1.6"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
 IUSE="+bzip2 +jpeg +opengl +png tiff +truetype +zlib debug doc profile"
 
-RDEPEND="x11-libs/libXrandr
-       x11-libs/libXcursor
+RDEPEND="
        x11-libs/fox-wrapper
+       x11-libs/libXcursor
+       x11-libs/libXrandr
        bzip2? ( app-arch/bzip2 )
        jpeg? ( virtual/jpeg )
        opengl? ( virtual/glu virtual/opengl )
        png? ( media-libs/libpng:0= )
        tiff? ( media-libs/tiff:0= )
-       truetype? ( media-libs/freetype:2
-               x11-libs/libXft )
-       zlib? ( sys-libs/zlib )
-"
+       truetype? (
+               media-libs/freetype:2
+               x11-libs/libXft
+       )
+       zlib? ( sys-libs/zlib )"
 DEPEND="${RDEPEND}
        x11-base/xorg-proto
        x11-libs/libXt"
@@ -36,7 +38,7 @@ src_prepare() {
 
        local d
        for d in utils windows adie calculator pathfinder shutterbug; do
-               sed -i -e "s:${d}::" Makefile.am
+               sed -i -e "s:${d}::" Makefile.am || die
        done
 
        # Respect system CXXFLAGS
@@ -50,6 +52,7 @@ src_prepare() {
 
 src_configure() {
        econf \
+               --disable-static \
                --enable-$(usex debug debug release) \
                $(use_enable bzip2 bz2lib) \
                $(use_enable jpeg) \
@@ -63,7 +66,7 @@ src_configure() {
 
 src_compile() {
        emake
-       use doc && emake -C "${S}"/doc docs
+       use doc && emake -C doc docs
 }
 
 src_install() {
@@ -73,28 +76,29 @@ src_install() {
                artdir="${EPREFIX}"/usr/share/doc/${PF}/html/art \
                screenshotsdir="${EPREFIX}"/usr/share/doc/${PF}/html/screenshots
 
-       CP="${ED}/usr/bin/ControlPanel"
-       if [[ -f ${CP} ]] ; then
-               mv "${CP}" "${ED}/usr/bin/fox-ControlPanel-${SLOT}" || \
+       local CP="${ED}"/usr/bin/ControlPanel
+       if [[ -f ${CP} ]]; then
+               mv "${CP}" "${ED}"/usr/bin/fox-ControlPanel-${SLOT} || \
                        die "Failed to install ControlPanel"
        fi
 
-       for doc in ADDITIONS AUTHORS LICENSE_ADDENDUM README TRACING ; do
-               [[ -f $doc ]] && dodoc $doc
-       done
+       dodoc ADDITIONS AUTHORS LICENSE_ADDENDUM README TRACING
 
-       # remove documentation if USE=-doc
-       use doc || rm -fr "${D}/usr/share/doc/${PF}/html"
-
-       # install class reference docs if USE=doc
        if use doc; then
+               # install class reference docs if USE=doc
                docinto html
-               dodoc -r "${S}/doc/ref"
+               dodoc -r doc/ref
+       else
+               # remove documentation if USE=-doc
+               rm -rf "${ED}"/usr/share/doc/${PF}/html || die
        fi
 
        # slot fox-config
-       if [[ -f ${D}/usr/bin/fox-config ]] ; then
-               mv "${D}/usr/bin/fox-config" "${D}/usr/bin/fox-${SLOT}-config" \
+       if [[ -f ${ED}/usr/bin/fox-config ]] ; then
+               mv "${ED}"/usr/bin/fox-config "${ED}"/usr/bin/fox-${SLOT}-config \
                || die "failed to install fox-config"
        fi
+
+       # no static archives
+       find "${D}" -name '*.la' -delete || die
 }