summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Ostorga <vostorga@gentoo.org>2009-07-23 14:51:59 +0000
committerVictor Ostorga <vostorga@gentoo.org>2009-07-23 14:51:59 +0000
commite90ff506379d83bed5152546b8e3f9bf75f0e54e (patch)
tree878498d03c59e08ae11fc586216d0437f70fbea8 /media-libs
parentarm/ia64/m68k/s390/sh stable wrt #274468 (diff)
downloadgentoo-2-e90ff506379d83bed5152546b8e3f9bf75f0e54e.tar.gz
gentoo-2-e90ff506379d83bed5152546b8e3f9bf75f0e54e.tar.bz2
gentoo-2-e90ff506379d83bed5152546b8e3f9bf75f0e54e.zip
Fix compilation with glibc-2.10, wrt bug #274305 , Patch thanks to Markus Dittrich <markusle@gentoo.org>
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/svgalib/ChangeLog7
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch109
-rw-r--r--media-libs/svgalib/svgalib-1.9.25.ebuild3
3 files changed, 117 insertions, 2 deletions
diff --git a/media-libs/svgalib/ChangeLog b/media-libs/svgalib/ChangeLog
index a48a1b7bc7f1..f0d32f567408 100644
--- a/media-libs/svgalib/ChangeLog
+++ b/media-libs/svgalib/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/svgalib
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.84 2009/02/28 00:12:14 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.85 2009/07/23 14:51:59 vostorga Exp $
+
+ 23 Jul 2009; Víctor Ostorga <vostorga@gentoo.org> svgalib-1.9.25.ebuild,
+ +files/svgalib-1.9.25-glibc210.patch:
+ Fix compilation with glibc-2.10, wrt bug #274305
+ Patch thanks to Markus Dittrich <markusle@gentoo.org>
28 Feb 2009; Christian Faulhammer <fauli@gentoo.org>
+files/svgalib-1.9.25-linux2.6.28.patch, metadata.xml,
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch b/media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch
new file mode 100644
index 000000000000..ed80935e955a
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch
@@ -0,0 +1,109 @@
+diff -Naur svgalib-1.9.25/utils/gtf/gtfcalc.c svgalib-1.9.25.new/utils/gtf/gtfcalc.c
+--- svgalib-1.9.25/utils/gtf/gtfcalc.c 2005-07-10 15:33:16.000000000 -0400
++++ svgalib-1.9.25.new/utils/gtf/gtfcalc.c 2009-07-09 15:39:08.743610103 -0400
+@@ -64,7 +64,9 @@
+
+ /*-------------------------- Implementation -------------------------------*/
+
+-static double round(double v)
++static double svg_round(double v);
++
++double svg_round(double v)
+ {
+ return floor(v + 0.5);
+ }
+@@ -84,9 +86,9 @@
+ ****************************************************************************/
+ {
+ c->margin = GC.margin;
+- c->cellGran = round(GC.cellGran);
+- c->minPorch = round(GC.minPorch);
+- c->vSyncRqd = round(GC.vSyncRqd);
++ c->cellGran = svg_round(GC.cellGran);
++ c->minPorch = svg_round(GC.minPorch);
++ c->vSyncRqd = svg_round(GC.vSyncRqd);
+ c->hSync = GC.hSync;
+ c->minVSyncBP = GC.minVSyncBP;
+ if (GC.k == 0)
+@@ -140,13 +142,13 @@
+ vFreq = hFreq = dotClock = freq;
+
+ /* Round pixels to character cell granularity */
+- hPixels = round(hPixels / c.cellGran) * c.cellGran;
++ hPixels = svg_round(hPixels / c.cellGran) * c.cellGran;
+
+ /* For interlaced mode halve the vertical parameters, and double
+ * the required field refresh rate.
+ */
+ if (wantInterlace) {
+- vLines = round(vLines / 2);
++ vLines = svg_round(vLines / 2);
+ vFieldRate = vFreq * 2;
+ dotClock = dotClock * 2;
+ interlace = 0.5;
+@@ -158,8 +160,8 @@
+
+ /* Determine the lines for margins */
+ if (wantMargins) {
+- topMarginLines = round(c.margin / 100 * vLines);
+- botMarginLines = round(c.margin / 100 * vLines);
++ topMarginLines = svg_round(c.margin / 100 * vLines);
++ botMarginLines = svg_round(c.margin / 100 * vLines);
+ }
+ else {
+ topMarginLines = 0;
+@@ -173,11 +175,11 @@
+ (vLines + (2*topMarginLines) + c.minPorch + interlace) * 1000000;
+
+ /* Find the number of lines in vSync + back porch */
+- vSyncBP = round(c.minVSyncBP / hPeriodEst);
++ vSyncBP = svg_round(c.minVSyncBP / hPeriodEst);
+ }
+ else if (type == GTF_lockHF) {
+ /* Find the number of lines in vSync + back porch */
+- vSyncBP = round((c.minVSyncBP * hFreq) / 1000);
++ vSyncBP = svg_round((c.minVSyncBP * hFreq) / 1000);
+ }
+
+ /* Find the number of lines in the V back porch alone */
+@@ -205,8 +207,8 @@
+
+ /* Find the number of pixels in the left and right margins */
+ if (wantMargins) {
+- leftMarginPixels = round(hPixels * c.margin) / (100 * c.cellGran);
+- rightMarginPixels = round(hPixels * c.margin) / (100 * c.cellGran);
++ leftMarginPixels = svg_round(hPixels * c.margin) / (100 * c.cellGran);
++ rightMarginPixels = svg_round(hPixels * c.margin) / (100 * c.cellGran);
+ }
+ else {
+ leftMarginPixels = 0;
+@@ -235,17 +237,17 @@
+ }
+
+ /* Find the number of pixels in blanking time */
+- hBlankPixels = round((hTotalActivePixels * idealDutyCycle) /
++ hBlankPixels = svg_round((hTotalActivePixels * idealDutyCycle) /
+ ((100 - idealDutyCycle) * 2 * c.cellGran)) * (2 * c.cellGran);
+
+ /* Find the total number of pixels */
+ hTotalPixels = hTotalActivePixels + hBlankPixels;
+
+ /* Find the horizontal back porch */
+- hBackPorch = round((hBlankPixels / 2) / c.cellGran) * c.cellGran;
++ hBackPorch = svg_round((hBlankPixels / 2) / c.cellGran) * c.cellGran;
+
+ /* Find the horizontal sync width */
+- hSyncWidth = round(((c.hSync/100) * hTotalPixels) / c.cellGran) * c.cellGran;
++ hSyncWidth = svg_round(((c.hSync/100) * hTotalPixels) / c.cellGran) * c.cellGran;
+
+ /* Find the horizontal sync + back porch */
+ hSyncBP = hBackPorch + hSyncWidth;
+@@ -258,7 +260,7 @@
+ hPeriod = 1000 / hFreq;
+
+ /* Find the number of lines in vSync + back porch */
+- vSyncBP = round((c.minVSyncBP * hFreq) / 1000);
++ vSyncBP = svg_round((c.minVSyncBP * hFreq) / 1000);
+
+ /* Find the number of lines in the V back porch alone */
+ vBackPorch = vSyncBP - c.vSyncRqd;
diff --git a/media-libs/svgalib/svgalib-1.9.25.ebuild b/media-libs/svgalib/svgalib-1.9.25.ebuild
index 610c549509c8..34d6b8660beb 100644
--- a/media-libs/svgalib/svgalib-1.9.25.ebuild
+++ b/media-libs/svgalib/svgalib-1.9.25.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.25.ebuild,v 1.8 2009/02/28 00:12:14 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.25.ebuild,v 1.9 2009/07/23 14:51:59 vostorga Exp $
EAPI=1
@@ -33,6 +33,7 @@ src_unpack() {
epatch "${FILESDIR}"/${PN}-1.9.19-pic.patch #51698
epatch "${FILESDIR}"/${PN}-1.9.25-build.patch
epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.28.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-glibc210.patch #274305
}
src_compile() {