diff options
author | salo <salo@pkgsrc.org> | 2005-05-06 00:30:17 +0000 |
---|---|---|
committer | salo <salo@pkgsrc.org> | 2005-05-06 00:30:17 +0000 |
commit | ab0eb1aed4eb14a0ff3760af28c1c136191ce206 (patch) | |
tree | fbdf5c2632a33d6b8cd4a5bd802188c32cd95538 /games | |
parent | 6ae3ba876ded4af8129466d2169abefea2390675 (diff) | |
download | pkgsrc-ab0eb1aed4eb14a0ff3760af28c1c136191ce206.tar.gz |
Pullup ticket 472 - requested by Klaus Heinz
gcc fixes for enigma
Revisions pulled up:
- pkgsrc/games/enigma/Makefile 1.9
- pkgsrc/games/enigma/distinfo 1.3-1.4
- pkgsrc/games/enigma/patches/patch-aj 1.1-1.2
- pkgsrc/games/enigma/patches/patch-ak 1.1-1.2
- pkgsrc/games/enigma/patches/patch-al 1.1-1.2
- pkgsrc/games/enigma/patches/patch-am 1.1-1.2
- pkgsrc/games/enigma/patches/patch-an 1.1-1.2
Module Name: pkgsrc
Committed By: heinz
Date: Wed Apr 20 00:58:08 UTC 2005
Modified Files:
pkgsrc/games/enigma: Makefile distinfo
Added Files:
pkgsrc/games/enigma/patches: patch-aj patch-ak patch-al patch-am
patch-an
Log Message:
Applied patches found at
http://bugzilla.fedora.us/attachment.cgi?id=3D919&action=3Dview
as patch-aj .. patch-an in order to fix PR pkg/29385.
Patch-am was changed slightly: a white-space-only change was omitted and
the comments from two "friend" declarations were removed in order to not
break support for gcc 2.95.
---
Module Name: pkgsrc
Committed By: salo
Date: Fri May 6 00:03:25 UTC 2005
Modified Files:
pkgsrc/games/enigma: distinfo
pkgsrc/games/enigma/patches: patch-aj patch-ak patch-al patch-am
patch-an
Log Message:
Add RCSIDs, remove diff command line. (hi heinz!)
Diffstat (limited to 'games')
-rw-r--r-- | games/enigma/Makefile | 4 | ||||
-rw-r--r-- | games/enigma/distinfo | 7 | ||||
-rw-r--r-- | games/enigma/patches/patch-aj | 23 | ||||
-rw-r--r-- | games/enigma/patches/patch-ak | 33 | ||||
-rw-r--r-- | games/enigma/patches/patch-al | 96 | ||||
-rw-r--r-- | games/enigma/patches/patch-am | 28 | ||||
-rw-r--r-- | games/enigma/patches/patch-an | 25 |
7 files changed, 213 insertions, 3 deletions
diff --git a/games/enigma/Makefile b/games/enigma/Makefile index 33a81418134..907090857c1 100644 --- a/games/enigma/Makefile +++ b/games/enigma/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.6 2005/01/24 14:56:47 wiz Exp $ +# $NetBSD: Makefile,v 1.6.2.1 2005/05/06 00:30:17 salo Exp $ # DISTNAME= enigma-0.81 -PKGREVISION= 3 +PKGREVISION= 5 CATEGORIES= games MASTER_SITES= http://savannah.nongnu.org/download/enigma/ diff --git a/games/enigma/distinfo b/games/enigma/distinfo index f1fccc4d340..116e6a05b99 100644 --- a/games/enigma/distinfo +++ b/games/enigma/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2005/02/23 23:11:56 agc Exp $ +$NetBSD: distinfo,v 1.2.2.1 2005/05/06 00:30:17 salo Exp $ SHA1 (enigma-0.81.tar.gz) = 3f42bf495a62934649266ec04be5ed214b4429ab RMD160 (enigma-0.81.tar.gz) = dc1508f188ba2547ea192654c799dc9d75d47421 @@ -12,3 +12,8 @@ SHA1 (patch-af) = b0dd5a949c9cefbbc4f048f6ce83b62a781716e7 SHA1 (patch-ag) = 455cdb80b0971c3cee5bda7ce7cc2e0619bdecbf SHA1 (patch-ah) = 24302914139ce8580d9378a8c4d5a61a6680c13b SHA1 (patch-ai) = 0240adb55183e5bc1148413a55e0c5612b662efa +SHA1 (patch-aj) = bbeb4e8d10bade4f1fb8eaea7f394e3ed31abb4b +SHA1 (patch-ak) = cae9bb854341bcf1e1e0d239c4917d18930f3dc4 +SHA1 (patch-al) = f515967113e648d8683b812b54112910f789c39f +SHA1 (patch-am) = 412cac295d0a1af2453d1e514eb34a3ef2a982f4 +SHA1 (patch-an) = 1cc1662e4da61d2376fe62229aa68bac748c5517 diff --git a/games/enigma/patches/patch-aj b/games/enigma/patches/patch-aj new file mode 100644 index 00000000000..e69028c2afb --- /dev/null +++ b/games/enigma/patches/patch-aj @@ -0,0 +1,23 @@ +$NetBSD: patch-aj,v 1.2.2.2 2005/05/06 00:30:17 salo Exp $ + +--- src/object_mixins.hh 2003-07-12 12:04:47.000000000 +0200 ++++ 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 --git a/games/enigma/patches/patch-ak b/games/enigma/patches/patch-ak new file mode 100644 index 00000000000..b6c88a51743 --- /dev/null +++ b/games/enigma/patches/patch-ak @@ -0,0 +1,33 @@ +$NetBSD: patch-ak,v 1.2.2.2 2005/05/06 00:30:17 salo Exp $ + +--- src/px/alist.hh 2003-01-12 20:32:43.000000000 +0100 ++++ 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 --git a/games/enigma/patches/patch-al b/games/enigma/patches/patch-al new file mode 100644 index 00000000000..f191c338fb8 --- /dev/null +++ b/games/enigma/patches/patch-al @@ -0,0 +1,96 @@ +$NetBSD: patch-al,v 1.2.2.2 2005/05/06 00:30:17 salo Exp $ + +--- src/px/array2.hh 2003-05-19 14:14:36.000000000 +0200 ++++ 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 --git a/games/enigma/patches/patch-am b/games/enigma/patches/patch-am new file mode 100644 index 00000000000..c8e98ba3977 --- /dev/null +++ b/games/enigma/patches/patch-am @@ -0,0 +1,28 @@ +$NetBSD: patch-am,v 1.2.2.2 2005/05/06 00:30:17 salo Exp $ + +--- src/px/dict.hh.orig Sun May 18 20:45:07 2003 ++++ src/px/dict.hh +@@ -101,8 +101,11 @@ namespace px + public: + typedef Iter<value_type> iterator; + typedef Iter<const value_type> const_iterator; +- friend class iterator; +- friend class const_iterator; ++ // pkgsrc: In order to still support gcc 2.95 we do not remove those ++ // two friends (like the Fedora patch does). OTOH gcc3.4.3 does not ++ // like using the typedef'ed types from above as friends. ++ friend class Iter<value_type>; ++ friend class Iter<const value_type>; + + Dict(size_type table_size = 257); + ~Dict(); +@@ -126,7 +129,8 @@ namespace px + + 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; + } + diff --git a/games/enigma/patches/patch-an b/games/enigma/patches/patch-an new file mode 100644 index 00000000000..db28385d12f --- /dev/null +++ b/games/enigma/patches/patch-an @@ -0,0 +1,25 @@ +$NetBSD: patch-an,v 1.2.2.2 2005/05/06 00:30:17 salo Exp $ + +--- src/px/video.cc 2003-07-31 09:28:04.000000000 +0200 ++++ 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; + } + } + } |