x11-libs/fox: fix USE=-truetype and use EAPI=7
authorJason A. Donenfeld <zx2c4@gentoo.org>
Mon, 16 Dec 2019 21:37:03 +0000 (22:37 +0100)
committerJason A. Donenfeld <zx2c4@gentoo.org>
Mon, 16 Dec 2019 21:39:00 +0000 (22:39 +0100)
We're not going to revbump it, because the code changes only affect code
that's compiled with USE=-truetype, which wouldn't compile at all
before.

While we're at it, bump to EAPI=7.

Package-Manager: Portage-2.3.82, Repoman-2.3.20
Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
x11-libs/fox/files/fox-1.7.67-no-truetype.patch [new file with mode: 0644]
x11-libs/fox/fox-1.7.67.ebuild

diff --git a/x11-libs/fox/files/fox-1.7.67-no-truetype.patch b/x11-libs/fox/files/fox-1.7.67-no-truetype.patch
new file mode 100644 (file)
index 0000000..6f91d97
--- /dev/null
@@ -0,0 +1,46 @@
+diff -ru fox-1.7.67/lib/FXFont.cpp /var/tmp/portage/x11-libs/fox-1.7.67/work/fox-1.7.67/lib/FXFont.cpp
+--- fox-1.7.67/lib/FXFont.cpp  2019-05-08 05:21:21.000000000 +0200
++++ /var/tmp/portage/x11-libs/fox-1.7.67/work/fox-1.7.67/lib/FXFont.cpp        2019-12-16 22:19:32.510138232 +0100
+@@ -829,26 +829,26 @@
+       // Weight
+       if(wantweight){
+-        dweight=Math::iabs(weight-wantweight);
++        dweight=Math::iabs((FXint)(weight-wantweight));
+         }
+       else{
+-        dweight=Math::iabs(weight-FXFont::Normal);
++        dweight=Math::iabs((FXint)(weight-FXFont::Normal));
+         }
+       // Slant
+       if(wantslant){
+-        dslant=Math::iabs(slant-wantslant);
++        dslant=Math::iabs((FXint)(slant-wantslant));
+         }
+       else{
+-        dslant=Math::iabs(slant-FXFont::Straight);
++        dslant=Math::iabs((FXint)(slant-FXFont::Straight));
+         }
+       // Set width
+       if(wantsetwidth){
+-        dsetwidth=Math::iabs(setwidth-wantsetwidth);
++        dsetwidth=Math::iabs((FXint)(setwidth-wantsetwidth));
+         }
+       else{
+-        dsetwidth=Math::iabs(setwidth-FXFont::NonExpanded);
++        dsetwidth=Math::iabs((FXint)(setwidth-FXFont::NonExpanded));
+         }
+       // Pitch
+@@ -900,7 +900,7 @@
+       // should be multiplied by (100/90).
+       else{
+         size=(yres*points)/res;
+-        dsize=Math::iabs(size-wantsize);
++        dsize=Math::iabs((FXint)(size-wantsize));
+         }
+       FXTRACE((160,"%4d: dweight=%-3d dsize=%3d dslant=%d dsetwidth=%d dscalable=%d dpolymorph=%d xres=%-3d yres=%-3d xlfd=\"%s\"\n",f,dweight,dsize,dslant,dsetwidth,dscalable,dpolymorph,xres,yres,fontnames[f]));
+
index 0be6c0ddb46bbcf5811a11a8e4dcfc5920674e42..0f09d1a6053e8315b45e82761db0cb79a04b59c4 100644 (file)
@@ -1,9 +1,9 @@
 # Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit autotools versionator
+inherit autotools
 
 LICENSE="LGPL-2.1"
 SLOT="1.7"
@@ -31,7 +31,11 @@ DESCRIPTION="C++ Toolkit for developing Graphical User Interfaces easily and eff
 HOMEPAGE="http://www.fox-toolkit.org/"
 SRC_URI="ftp://ftp.fox-toolkit.org/pub/${P}.tar.gz"
 
+PATCHES=( "${FILESDIR}"/"${PN}"-1.7.67-no-truetype.patch )
+
 src_prepare() {
+       default
+
        sed -i '/#define REXDEBUG 1/d' lib/FXRex.cpp || die "Unable to remove spurious debug line."
        local d
        for d in windows adie calculator pathfinder shutterbug; do
@@ -92,7 +96,7 @@ src_install() {
 
        # slot fox-config
        if [[ -f ${D}/usr/bin/fox-config ]] ; then
-               mv "${D}/usr/bin/fox-config" "${D}/usr/bin/fox-$(get_version_component_range 1-2 ${PV})-config" \
+               mv "${D}/usr/bin/fox-config" "${D}/usr/bin/fox-${SLOT}-config" \
                || die "failed to install fox-config"
        fi
 }