diff options
author | jperkin <jperkin@pkgsrc.org> | 2012-09-26 11:10:16 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2012-09-26 11:10:16 +0000 |
commit | 6da9bb00072a5efb61decde3348580c3f60acc30 (patch) | |
tree | 2ec6fbb95b94397af3b018d8c689665cd778f3d4 /x11/kdebase3 | |
parent | 9027e58233ce0bdab975210c070d79c9fec74fd6 (diff) | |
download | pkgsrc-6da9bb00072a5efb61decde3348580c3f60acc30.tar.gz |
Cast arguments to log() to appease strict compilers / platforms.
Fixes package on Solaris.
Diffstat (limited to 'x11/kdebase3')
-rw-r--r-- | x11/kdebase3/distinfo | 4 | ||||
-rw-r--r-- | x11/kdebase3/patches/patch-kcontrol_access_kcmaccess.cpp | 45 | ||||
-rw-r--r-- | x11/kdebase3/patches/patch-kxkb_kcmmisc.cpp | 37 |
3 files changed, 85 insertions, 1 deletions
diff --git a/x11/kdebase3/distinfo b/x11/kdebase3/distinfo index 65f3d8ff2c5..d134be00964 100644 --- a/x11/kdebase3/distinfo +++ b/x11/kdebase3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.115 2012/01/20 16:59:19 joerg Exp $ +$NetBSD: distinfo,v 1.116 2012/09/26 11:10:16 jperkin Exp $ SHA1 (Daemon.README) = eb1e6af52adc02ded77af17e8953134b7e60d23b RMD160 (Daemon.README) = 39edd92ed4314397080f32a8caff0ac3f716ecf4 @@ -60,5 +60,7 @@ SHA1 (patch-gd) = 39469384668e4ee7fc489406e2813100fc90aa9b SHA1 (patch-ge) = 8470cf03d768d784714e926281757e9d68749360 SHA1 (patch-gf) = 78de196a700fa9cd5e221ff57c295fdb3562f931 SHA1 (patch-kcheckpass_checkpass_pam.c) = b5dd2e50c5f1047d3c195836c8b2d06e11edea3b +SHA1 (patch-kcontrol_access_kcmaccess.cpp) = f7eaec78fa13f2cfb5b97ca84c10f3e403b64919 SHA1 (patch-kdesud) = acc40c2d1fb65e404a7aa0dbb6eae72fa7ac6a5e SHA1 (patch-kicker_applets_launcher_easyvector.h) = 7bcb64630a71cb3740ccf203b63dcdcbb7b30675 +SHA1 (patch-kxkb_kcmmisc.cpp) = 6e31f261c872dc942305a7c25e8c03c089bc272a diff --git a/x11/kdebase3/patches/patch-kcontrol_access_kcmaccess.cpp b/x11/kdebase3/patches/patch-kcontrol_access_kcmaccess.cpp new file mode 100644 index 00000000000..4e8b4d80700 --- /dev/null +++ b/x11/kdebase3/patches/patch-kcontrol_access_kcmaccess.cpp @@ -0,0 +1,45 @@ +$NetBSD: patch-kcontrol_access_kcmaccess.cpp,v 1.1 2012/09/26 11:10:16 jperkin Exp $ + +Cast arguments to log(). + +--- kcontrol/access/kcmaccess.cpp.orig Wed Sep 26 09:28:31 2012 ++++ kcontrol/access/kcmaccess.cpp Wed Sep 26 09:29:52 2012 +@@ -63,13 +63,13 @@ + this->min = min; + this->max = max; + sliderMax = (int)floor (0.5 +- + 2*(log(max)-log(min)) / (log(max)-log(max-1))); ++ + 2*(log((float)max)-log((float)min)) / (log((float)max)-log((float)max-1))); + m_slider->setRange(0, sliderMax); + m_slider->setSteps(step, sliderMax/10); + m_slider->setTickInterval(sliderMax/10); + +- double alpha = sliderMax / (log(max) - log(min)); +- double logVal = alpha * (log(value())-log(min)); ++ double alpha = sliderMax / (log((float)max) - log((float)min)); ++ double logVal = alpha * (log((float)value())-log((float)min)); + m_slider->setValue ((int)floor (0.5 + logVal)); + + connect(m_slider, SIGNAL(valueChanged(int)), +@@ -86,8 +86,8 @@ + { + + if(m_slider) { +- double alpha = sliderMax / (log(max) - log(min)); +- double logVal = alpha * (log(val)-log(min)); ++ double alpha = sliderMax / (log((float)max) - log((float)min)); ++ double logVal = alpha * (log((float)val)-log((float)min)); + m_slider->setValue ((int)floor (0.5 + logVal)); + } + +@@ -96,8 +96,8 @@ + + void ExtendedIntNumInput::slotSliderValueChanged(int val) + { +- double alpha = sliderMax / (log(max) - log(min)); +- double linearVal = exp (val/alpha + log(min)); ++ double alpha = sliderMax / (log((float)max) - log((float)min)); ++ double linearVal = exp (val/alpha + log((float)min)); + m_spin->setValue ((int)floor(0.5 + linearVal)); + } + diff --git a/x11/kdebase3/patches/patch-kxkb_kcmmisc.cpp b/x11/kdebase3/patches/patch-kxkb_kcmmisc.cpp new file mode 100644 index 00000000000..55fb2fe99ba --- /dev/null +++ b/x11/kdebase3/patches/patch-kxkb_kcmmisc.cpp @@ -0,0 +1,37 @@ +$NetBSD: patch-kxkb_kcmmisc.cpp,v 1.1 2012/09/26 11:10:17 jperkin Exp $ + +Cast calls to log(). + +--- kxkb/kcmmisc.cpp.orig Wed Sep 26 08:57:08 2012 ++++ kxkb/kcmmisc.cpp Wed Sep 26 09:05:19 2012 +@@ -64,7 +64,7 @@ + ui->rate->setRange(0.2, 50, 5, false); + + sliderMax = (int)floor (0.5 +- + 2*(log(5000)-log(100)) / (log(5000)-log(4999))); ++ + 2*(log((float)5000)-log((float)100)) / (log((float)5000)-log((float)4999))); + ui->delaySlider->setRange(0, sliderMax); + ui->delaySlider->setSteps(sliderMax/100, sliderMax/10); + ui->delaySlider->setTickInterval(sliderMax/10); +@@ -196,8 +196,8 @@ + } + + void KeyboardConfig::delaySliderChanged (int value) { +- double alpha = sliderMax / (log(5000) - log(100)); +- double linearValue = exp (value/alpha + log(100)); ++ double alpha = sliderMax / (log((float)5000) - log((float)100)); ++ double linearValue = exp (value/alpha + log((float)100)); + + ui->delay->setValue((int)floor(0.5 + linearValue)); + +@@ -205,8 +205,8 @@ + } + + void KeyboardConfig::delaySpinboxChanged (int value) { +- double alpha = sliderMax / (log(5000) - log(100)); +- double logVal = alpha * (log(value)-log(100)); ++ double alpha = sliderMax / (log((float)5000) - log((float)100)); ++ double logVal = alpha * (log((float)value)-log((float)100)); + + ui->delaySlider->setValue ((int)floor (0.5 + logVal)); + |