[kstars] safer glibc TIME_UTC FTBFS patch
Kevin Kofler
kkofler at fedoraproject.org
Sun Jun 10 21:49:11 UTC 2012
commit ccf87f3d880e037cffa2e063ddd81d7982e42743
Author: Kevin Kofler <kevin.kofler at chello.at>
Date: Sun Jun 10 23:48:55 2012 +0200
safer glibc TIME_UTC FTBFS patch
* Sun Jun 10 2012 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.8.90-2
- safer glibc TIME_UTC FTBFS patch
kstars-4.8.90-glibc.patch | 76 +++++++++++++++-----------------------------
kstars.spec | 11 ++++--
2 files changed, 33 insertions(+), 54 deletions(-)
---
diff --git a/kstars-4.8.90-glibc.patch b/kstars-4.8.90-glibc.patch
index 63f4c0e..a81787f 100644
--- a/kstars-4.8.90-glibc.patch
+++ b/kstars-4.8.90-glibc.patch
@@ -1,54 +1,30 @@
-diff -up kstars-4.8.90/kstars/indi/indielement.h.glibc kstars-4.8.90/kstars/indi/indielement.h
---- kstars-4.8.90/kstars/indi/indielement.h.glibc 2012-05-22 19:28:05.000000000 -0500
-+++ kstars-4.8.90/kstars/indi/indielement.h 2012-06-10 15:31:40.593760560 -0500
-@@ -45,7 +45,7 @@ typedef enum {PG_NONE = 0, PG_TEXT, PG_N
+From a3dfa72dada14952d3477712c758ad6d884173e5 Mon Sep 17 00:00:00 2001
+Message-Id: <a3dfa72dada14952d3477712c758ad6d884173e5.1339364774.git.kevin.kofler at chello.at>
+From: Kevin Kofler <kevin.kofler at chello.at>
+Date: Sun, 10 Jun 2012 23:41:42 +0200
+Subject: [PATCH] #undef TIME_UTC to fix conflict with glibc
+
+TIME_UTC is now defined as a macro, so it needs to be undefined before being
+used in an enum.
+
+This is a safer fix for the build failure.
+---
+ kstars/indi/indielement.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/kstars/indi/indielement.h b/kstars/indi/indielement.h
+index cd05717..93be2ba 100644
+--- a/kstars/indi/indielement.h
++++ b/kstars/indi/indielement.h
+@@ -44,6 +44,8 @@ typedef enum {PG_NONE = 0, PG_TEXT, PG_NUMERIC, PG_BUTTONS,
+ PG_RADIO, PG_MENU, PG_LIGHTS, PG_BLOB} PGui;
/* INDI std properties */
++/* new versions of glibc define TIME_UTC as a macro */
++#undef TIME_UTC
/* N.B. Need to modify corresponding entry in indidevice.cpp when changed */
--enum stdProperties { CONNECTION, DEVICE_PORT, TIME_UTC, TIME_LST, TIME_UTC_OFFSET, GEOGRAPHIC_COORD, /* General */
-+enum stdProperties { CONNECTION, DEVICE_PORT, INDI_TIME_UTC, TIME_LST, TIME_UTC_OFFSET, GEOGRAPHIC_COORD, /* General */
+ enum stdProperties { CONNECTION, DEVICE_PORT, TIME_UTC, TIME_LST, TIME_UTC_OFFSET, GEOGRAPHIC_COORD, /* General */
EQUATORIAL_COORD, EQUATORIAL_EOD_COORD, EQUATORIAL_EOD_COORD_REQUEST, HORIZONTAL_COORD, /* Telescope */
- TELESCOPE_ABORT_MOTION, ON_COORD_SET, SOLAR_SYSTEM, TELESCOPE_MOTION_NS, /* Telescope */
- TELESCOPE_MOTION_WE, TELESCOPE_PARK, /* Telescope */
-diff -up kstars-4.8.90/kstars/indi/indiproperty.cpp.glibc kstars-4.8.90/kstars/indi/indiproperty.cpp
---- kstars-4.8.90/kstars/indi/indiproperty.cpp.glibc 2012-05-22 19:28:05.000000000 -0500
-+++ kstars-4.8.90/kstars/indi/indiproperty.cpp 2012-06-10 15:32:03.994468064 -0500
-@@ -481,7 +481,7 @@ int INDI_P::buildTextGUI(XMLEle *root, Q
- return 0;
-
- // INDI STD, but we use our own controls
-- if (name == "TIME_UTC")
-+ if (name == "INDI_TIME_UTC")
- {
- setupSetButton("Time");
- QObject::connect(set_w, SIGNAL(clicked()), indistd, SLOT(newTime()));
-diff -up kstars-4.8.90/kstars/indi/indistd.cpp.glibc kstars-4.8.90/kstars/indi/indistd.cpp
---- kstars-4.8.90/kstars/indi/indistd.cpp.glibc 2012-05-22 19:28:05.000000000 -0500
-+++ kstars-4.8.90/kstars/indi/indistd.cpp 2012-06-10 15:32:38.381038171 -0500
-@@ -248,7 +248,7 @@ void INDIStdDevice::setTextValue(INDI_P
- switch (pp->stdID)
- {
-
-- case TIME_UTC:
-+ case INDI_TIME_UTC:
- if ( Options::useTimeUpdate() && !driverTimeUpdated)
- {
- driverTimeUpdated = true;
-@@ -570,7 +570,7 @@ void INDIStdDevice::updateTime()
- lp->updateValue(ksw->data()->geo()->TZ());
- pp->newText();
-
-- pp = dp->findProp("TIME_UTC");
-+ pp = dp->findProp("INDI_TIME_UTC");
- if (!pp) return;
-
- lp = pp->findElement("UTC");
-@@ -682,7 +682,7 @@ void INDIStdDevice::createDeviceInit()
-
- if ( Options::useTimeUpdate() && Options::useComputerSource())
- {
-- prop = dp->findProp("TIME_UTC");
-+ prop = dp->findProp("INDI_TIME_UTC");
- if (prop)
- {
- driverTimeUpdated = false;
+--
+1.7.6.5
+
diff --git a/kstars.spec b/kstars.spec
index e98b134..acba127 100644
--- a/kstars.spec
+++ b/kstars.spec
@@ -1,8 +1,8 @@
-Name: kstars
-Summary: Desktop Planetarium
+Name: kstars
+Summary: Desktop Planetarium
Version: 4.8.90
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
#URL: https://projects.kde.org/projects/kde/kdeedu/kstars
@@ -16,7 +16,7 @@ URL: http://edu.kde.org/kstars
Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
## upstreamable patches
-# newer glibc c11 defines/uses TIME_UTC itself, use something else
+# newer glibc c11 defines/uses TIME_UTC itself, #undef it
Patch50: kstars-4.8.90-glibc.patch
BuildRequires: desktop-file-utils
@@ -92,6 +92,9 @@ fi
%changelog
+* Sun Jun 10 2012 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.8.90-2
+- safer glibc TIME_UTC FTBFS patch
+
* Sun Jun 10 2012 Rex Dieter <rdieter at fedoraproject.org> - 4.8.90-1
- 4.8.90
More information about the scm-commits
mailing list