rpms/pygame/devel pygame-1.7.1-64bit-2.patch, NONE, 1.1 pygame.spec, 1.15, 1.16
Christopher Stone (xulchris)
fedora-extras-commits at redhat.com
Sun May 13 03:48:21 UTC 2007
Author: xulchris
Update of /cvs/extras/rpms/pygame/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15318
Modified Files:
pygame.spec
Added Files:
pygame-1.7.1-64bit-2.patch
Log Message:
apply 64-bit patch from hans bz#239899
pygame-1.7.1-64bit-2.patch:
--- NEW FILE pygame-1.7.1-64bit-2.patch ---
--- pygame-1.7.1release/src/surface.c~ 2007-05-12 09:55:02.000000000 +0200
+++ pygame-1.7.1release/src/surface.c 2007-05-12 09:55:02.000000000 +0200
@@ -1353,7 +1353,7 @@
if(rect && kw)
{
PyObject *key, *value;
- int pos=0;
+ Py_ssize_t pos=0;
while(PyDict_Next(kw, &pos, &key, &value))
{
if((PyObject_SetAttr(rect, key, value) == -1))
--- pygame-1.7.1release/src/event.c~ 2007-05-12 09:53:06.000000000 +0200
+++ pygame-1.7.1release/src/event.c 2007-05-12 09:53:06.000000000 +0200
@@ -534,7 +534,7 @@
if(keywords)
{
PyObject *key, *value;
- int pos = 0;
+ Py_ssize_t pos = 0;
while(PyDict_Next(keywords, &pos, &key, &value))
PyDict_SetItem(dict, key, value);
}
--- pygame-1.7.1release/src/image.c~ 2007-05-12 10:01:24.000000000 +0200
+++ pygame-1.7.1release/src/image.c 2007-05-12 10:01:24.000000000 +0200
@@ -291,7 +291,8 @@
PyObject *surfobj, *string=NULL;
char *format, *data, *pixels;
SDL_Surface *surf, *temp=NULL;
- int w, h, color, len, flipped=0;
+ int w, h, color, flipped=0;
+ Py_ssize_t len;
int Rmask, Gmask, Bmask, Amask, Rshift, Gshift, Bshift, Ashift, Rloss, Gloss, Bloss, Aloss;
int hascolorkey, colorkey;
@@ -605,7 +606,8 @@
PyObject *string;
char *format, *data;
SDL_Surface *surf = NULL;
- int w, h, len, flipped=0;
+ int w, h, flipped=0;
+ Py_ssize_t len;
int loopw, looph;
if(!PyArg_ParseTuple(arg, "O!(ii)s|i", &PyString_Type, &string, &w, &h, &format, &flipped))
@@ -729,7 +731,8 @@
PyObject *buffer;
char *format, *data;
SDL_Surface *surf = NULL;
- int w, h, len;
+ int w, h;
+ Py_ssize_t len;
PyObject *surfobj;
if(!PyArg_ParseTuple(arg, "O(ii)s|i", &buffer, &w, &h, &format))
--- pygame-1.7.1release/src/rect.c~ 2007-05-12 09:54:41.000000000 +0200
+++ pygame-1.7.1release/src/rect.c 2007-05-12 09:54:41.000000000 +0200
@@ -589,7 +589,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop=0;
+ Py_ssize_t loop=0;
PyObject* dict, *key, *val;
PyObject* ret = NULL;
@@ -640,7 +640,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop=0;
+ Py_ssize_t loop=0;
PyObject* dict, *key, *val;
PyObject* ret = NULL;
Index: pygame.spec
===================================================================
RCS file: /cvs/extras/rpms/pygame/devel/pygame.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- pygame.spec 23 Apr 2007 22:57:03 -0000 1.15
+++ pygame.spec 13 May 2007 03:47:47 -0000 1.16
@@ -2,15 +2,18 @@
Name: pygame
Version: 1.7.1
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: Python modules for writing games
+
Group: Development/Languages
License: LGPL
URL: http://www.pygame.org
Patch0: %{name}-%{version}-config.patch
Patch1: %{name}-%{version}-64bit.patch
+Patch2: %{name}-%{version}-64bit-2.patch
Source0: http://pygame.org/ftp/%{name}-%{version}release.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
BuildRequires: python-devel python-numeric
BuildRequires: SDL_ttf-devel SDL_image-devel SDL_mixer-devel
Requires: python-numeric
@@ -39,33 +42,40 @@
This package contains headers required to build applications that use
pygame.
+
%prep
-%setup -q -n %{name}-%{version}release
-%patch0 -p0 -b .config
-%patch1 -p0 -b .64bit
+%setup -qn %{name}-%{version}release
+%patch0 -p0 -b .config~
+%patch1 -p0 -b .64bit~
+%patch2 -p1 -b .64bit-2~
# rpmlint fixes
-rm -f examples/.#stars.py.1.7
+rm -f "examples/.#stars.py.1.7"
# These files must be provided by pygame-nonfree(-devel) packages on a
# repository that does not have restrictions on providing non-free software
rm -f src/ffmovie.[ch]
+
%build
-CFLAGS="%{optflags}" %{__python} setup.py build
+CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+
%install
-rm -rf %{buildroot}
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
%check
# base_test fails in mock, unable to find soundcard
-PYTHONPATH="%{buildroot}%{python_sitearch}" %{__python} test/base_test.py || :
-PYTHONPATH="%{buildroot}%{python_sitearch}" %{__python} test/image_test.py
-PYTHONPATH="%{buildroot}%{python_sitearch}" %{__python} test/rect_test.py
+PYTHONPATH="$RPM_BUILD_ROOT%{python_sitearch}" %{__python} test/base_test.py || :
+PYTHONPATH="$RPM_BUILD_ROOT%{python_sitearch}" %{__python} test/image_test.py
+PYTHONPATH="$RPM_BUILD_ROOT%{python_sitearch}" %{__python} test/rect_test.py
+
%clean
-rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,root,root,-)
@@ -85,7 +95,12 @@
%dir %{_includedir}/python*/%{name}
%{_includedir}/python*/%{name}/*.h
+
%changelog
+* Sat May 12 2007 Christopher Stone <chris.stone at gmail.com> 1.7.1-13
+- Apply 64-bit patch for python 2.5 (bz #239899)
+- Some minor spec file cleanups
+
* Mon Apr 23 2007 Christopher Stone <chris.stone at gmail.com> 1.7.1-12
- Revert back to version 1.7.1-9
More information about the fedora-extras-commits
mailing list