summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2019-12-16 22:37:03 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2019-12-16 22:39:00 +0100
commited97a7c22e8bba9908edfd7b7a557ae7750571ec (patch)
tree0b071bcb52a6a447d87da160622289d34de33a32 /x11-libs
parentdev-util/dwarves: revbump to -r1 to use newer elfutils (diff)
downloadgentoo-ed97a7c22e8bba9908edfd7b7a557ae7750571ec.tar.gz
gentoo-ed97a7c22e8bba9908edfd7b7a557ae7750571ec.tar.bz2
gentoo-ed97a7c22e8bba9908edfd7b7a557ae7750571ec.zip
x11-libs/fox: fix USE=-truetype and use EAPI=7
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>
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/fox/files/fox-1.7.67-no-truetype.patch46
-rw-r--r--x11-libs/fox/fox-1.7.67.ebuild10
2 files changed, 53 insertions, 3 deletions
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
index 000000000000..6f91d9746a1e
--- /dev/null
+++ b/x11-libs/fox/files/fox-1.7.67-no-truetype.patch
@@ -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]));
+
diff --git a/x11-libs/fox/fox-1.7.67.ebuild b/x11-libs/fox/fox-1.7.67.ebuild
index 0be6c0ddb46b..0f09d1a6053e 100644
--- a/x11-libs/fox/fox-1.7.67.ebuild
+++ b/x11-libs/fox/fox-1.7.67.ebuild
@@ -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
}