[fedora-extras-commits] rpms/enigma/devel enigma-0.81-gcc34.patch, NONE, 1.1 enigma.spec, 1.2, 1.3

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Wed Nov 10 23:18:41 UTC 2004


Changeset from: mschwendt

Update of /cvs/extras/rpms/enigma/devel
In directory cvs.fedora.redhat.com:/tmp/cvs-serv6338

Modified Files:
	enigma.spec 
Added Files:
	enigma-0.81-gcc34.patch 
Log Message:
Fix build for FC3. Binary seems to work, but checking with Thorsten (fedora.us #2269)...

enigma-0.81-gcc34.patch:

--- NEW FILE enigma-0.81-gcc34.patch ---
diff -Nur enigma-0.81-orig/src/object_mixins.hh enigma-0.81/src/object_mixins.hh
--- enigma-0.81-orig/src/object_mixins.hh	2003-07-12 12:04:47.000000000 +0200
+++ enigma-0.81/src/object_mixins.hh	2004-11-11 00:05:24.000000000 +0100
@@ -80,14 +80,14 @@
     template <class T>
     class OnOffBase : public T {
     protected:
-        OnOffBase(const char *kind) : T(kind) { set_attrib("on", 0.0); }
+        OnOffBase(const char *kind) : T(kind) { this->set_attrib("on", 0.0); }
 
-        bool is_on() const { return int_attrib("on") == 1; }
+        bool is_on() const { return this->int_attrib("on") == 1; }
 
         void set_on(bool newon) {
             if (newon != is_on()) {
-                set_attrib("on", Value(newon));
-                init_model();
+                this->set_attrib("on", Value(newon));
+                this->init_model();
                 notify_onoff(newon);
             }
         }
diff -Nur enigma-0.81-orig/src/px/alist.hh enigma-0.81/src/px/alist.hh
--- enigma-0.81-orig/src/px/alist.hh	2003-01-12 20:32:43.000000000 +0100
+++ enigma-0.81/src/px/alist.hh	2004-11-11 00:04:26.855388248 +0100
@@ -43,7 +43,7 @@
         // Lookup of keys
         //
         iterator find (const key_type &key) {
-            iterator i=begin(), e=end();
+            iterator i=this->begin(), e=this->end();
             for (; i!=e; ++i) 
                 if (i->first == key)
                     break;
@@ -51,7 +51,7 @@
         }
 
         const_iterator find (const key_type &key) const {
-            const_iterator i=begin(), e=end();
+            const_iterator i=this->begin(), e=this->end();
             for (; i!=e; ++i) 
                 if (i->first == key)
                     break;
@@ -60,8 +60,8 @@
 
 	VAL &operator[] (const key_type &key) { 
             iterator i=find(key);
-            if (i==end())
-                i=insert(end(), make_pair(key, VAL()));
+            if (i==this->end())
+                i=insert(this->end(), make_pair(key, VAL()));
             return i->second;
         }
     };
diff -Nur enigma-0.81-orig/src/px/array2.hh enigma-0.81/src/px/array2.hh
--- enigma-0.81-orig/src/px/array2.hh	2003-05-19 14:14:36.000000000 +0200
+++ enigma-0.81/src/px/array2.hh	2004-11-11 00:04:26.855388248 +0100
@@ -70,14 +70,14 @@
         // Destructor
         ~Array2() { destroy_elements(); }
 
-        iterator begin() { return first; }
-        iterator end() { return last; }
-        const_iterator begin() const { return first; }
-        const_iterator end() const { return last; }
-        iterator row_begin(size_type y) { return first + y*w; }
-        iterator row_end(size_type y) { return first + y*w + w; }
-        const_iterator row_begin(size_type y) const { return first + y*w; }
-        const_iterator row_end(size_type y) const { return first + y*w + w; }
+        iterator begin() { return this->first; }
+        iterator end() { return this->last; }
+        const_iterator begin() const { return this->first; }
+        const_iterator end() const { return this->last; }
+        iterator row_begin(size_type y) { return this->first + y*w; }
+        iterator row_end(size_type y) { return this->first + y*w + w; }
+        const_iterator row_begin(size_type y) const { return this->first + y*w; }
+        const_iterator row_end(size_type y) const { return this->first + y*w + w; }
 
 
         void swap(Array2<T,A> &a2);
@@ -86,13 +86,13 @@
         size_type height()const { return h; }
 
 
-        T&	 get(size_type x, size_type y) { return first[y*w+x]; }
-        const T& get(size_type x, size_type y) const { return first[y*w+x]; }
+        T&	 get(size_type x, size_type y) { return this->first[y*w+x]; }
+        const T& get(size_type x, size_type y) const { return this->first[y*w+x]; }
         T& 	 operator()(size_type x, size_type y) { return get(x,y); }
         const T& operator()(size_type x, size_type y) const { return get(x,y); }
 
         void 	 set(size_type x, size_type y, const T& val) {
-            first[y*w+x] = val;
+            this->first[y*w+x] = val;
         }
 
         /*! Fill the array with some value or the default value. */
@@ -112,19 +112,19 @@
     Array2<T,A>::Array2(int ww, int hh, const T& val, const A& a)
     : Array2Base<T,A>(a, ww*hh), w(ww), h(hh)
     {
-        std::uninitialized_fill(first, last, val);
+        std::uninitialized_fill(this->first, this->last, val);
     }
 
     template <class T, class A>
     Array2<T,A>::Array2(const Array2<T,A> &a)
     : Array2Base<T,A>(a.alloc, a.last-a.first)
     {
-        std::uninitialized_copy(a.begin(), a.end(), first);
+        std::uninitialized_copy(a.begin(), a.end(), this->first);
     }
 
     template <class T, class A>
     void Array2<T,A>::destroy_elements() {
-        for (T* p=first; p!=last; ++p)
+        for (T* p=this->first; p!=this->last; ++p)
             p->~T();
     }
 
@@ -132,7 +132,7 @@
     void Array2<T,A>::fill (const T& val)
     {
         destroy_elements();
-        std::uninitialized_fill(first, last, val);
+        std::uninitialized_fill(this->first, this->last, val);
     }
 
     /*! Resize the array in place, but discard any old array
@@ -142,7 +142,7 @@
     {
         destroy_elements();
         Array2Base<T,A>::resize(w_*h_);
-        std::uninitialized_fill(first, last, val);
+        std::uninitialized_fill(this->first, this->last, val);
         w = w_;
         h = h_;
     }
@@ -150,8 +150,8 @@
     template <class T, class A>
     void Array2<T,A>::swap(Array2<T,A> &a2)
     {
-        std::swap(first, a2.first);
-        std::swap(last, a2.last);
+        std::swap(this->first, a2.first);
+        std::swap(this->last, a2.last);
         std::swap(w, a2.w);
         std::swap(h, a2.h);
     }
diff -Nur enigma-0.81-orig/src/px/dict.hh enigma-0.81/src/px/dict.hh
--- enigma-0.81-orig/src/px/dict.hh	2003-05-18 20:45:07.000000000 +0200
+++ enigma-0.81/src/px/dict.hh	2004-11-11 00:05:03.865761816 +0100
@@ -101,8 +101,8 @@
     public:
 	typedef Iter<value_type>                iterator;
   	typedef Iter<const value_type>          const_iterator;
-        friend class iterator;
-        friend class const_iterator;        
+      //friend class iterator;
+      //friend class const_iterator;        
 
 	Dict(size_type table_size = 257);
         ~Dict();
@@ -126,7 +126,8 @@
 	
 	const T& lookup(const std::string &key) const {
 	    Entry *e = find_entry(key);
-	    if (!e) throw XInvalidKey();
+// rational: see above + XInvalidKey is not declared anywhere
+//	    if (!e) throw XInvalidKey();
 	    return e->pair.second;
 	}
 
@@ -199,7 +200,7 @@
     }
 
     template <class T>
-    typename Dict<T>::const_iterator 
+    typename Dict<T>::const_iterator
     Dict<T>::find (const std::string &key) const 
     {
         unsigned h = hash(key) % nbuckets;
diff -Nur enigma-0.81-orig/src/px/video.cc enigma-0.81/src/px/video.cc
--- enigma-0.81-orig/src/px/video.cc	2003-07-31 09:28:04.000000000 +0200
+++ enigma-0.81/src/px/video.cc	2004-11-11 00:04:26.855388248 +0100
@@ -207,16 +207,16 @@
         void set_pixels(int n, const int* xlist, const int* ylist, Uint32 color)
         {
             const int *xp = xlist, *yp = ylist;
-            if (NOCLIP(gs)) {
+            if (NOCLIP(this->gs)) {
                 for (int i=n; i > 0; --i) {
                     int x = *xp++, y = *yp++;
-                    *pixel_pointer(x,y) = gs.pcolor;
+                    *pixel_pointer(x,y) = this->gs.pcolor;
                 }
             } else {
                 for (int i=n; i > 0; --i) {
                     int x = *xp++, y = *yp++;
-                    if (clip_pixel (gs, x, y))
-                        *pixel_pointer(x,y) = gs.pcolor;
+                    if (clip_pixel (this->gs, x, y))
+                        *pixel_pointer(x,y) = this->gs.pcolor;
                 }
             }
         }


Index: enigma.spec
===================================================================
RCS file: /cvs/extras/rpms/enigma/devel/enigma.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- enigma.spec	8 Nov 2004 04:16:11 -0000	1.2
+++ enigma.spec	10 Nov 2004 23:18:39 -0000	1.3
@@ -1,13 +1,13 @@
 Name:           enigma
 Version:        0.81
-Release:        0.fdr.2.2
-Epoch:          0
+Release:        3
 Summary:        Clone of the ATARI game Oxyd
 
 Group:          Amusements/Games
 License:        GPL
 URL:            http://www.nongnu.org/enigma/
 Source0:        http://savannah.nongnu.org/download/enigma/enigma-%{version}.tar.gz
+Patch:          enigma-0.81-gcc34.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	SDL-devel >= 0:1.2  SDL_image-devel >= 0:1.2 SDL_mixer-devel >= 0:1.2
@@ -23,6 +23,7 @@
 
 %prep
 %setup -q
+%patch -p1 -b .gcc34
 
 %build
 %configure --enable-optimize
@@ -55,6 +56,9 @@
 %{_datadir}/applications/*enigma.desktop
 
 %changelog
+* Thu Nov 11 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.81-3
+- Fix a number of C++ issues for FC3/GCC 3.4.
+
 * Fri Jun 11 2004 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0:0.81-0.fdr.2
 - Build-Require zlib-devel, tetex
 - Don't install INSTALL




More information about the fedora-extras-commits mailing list