From 74506511e09280a66fdb8f5acc2a21d932c1d935 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 16:25:29 +0100 Subject: [PATCH] python 2.7 mass rebuild [release 1.9.1-4mamba;Thu May 23 2013] --- README.md | 2 + python-pygame-1.9.1-remove-v4l.patch | 52 ++++++++++++++ python-pygame.spec | 101 +++++++++++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 python-pygame-1.9.1-remove-v4l.patch create mode 100644 python-pygame.spec diff --git a/README.md b/README.md index 28a77d8..897314b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # python-pygame +Pygame is a set of Python modules designed for writing games. It is written on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system. + diff --git a/python-pygame-1.9.1-remove-v4l.patch b/python-pygame-1.9.1-remove-v4l.patch new file mode 100644 index 0000000..98822d0 --- /dev/null +++ b/python-pygame-1.9.1-remove-v4l.patch @@ -0,0 +1,52 @@ +diff -aur pygame/Setup.in pygame-build/Setup.in +--- pygame/Setup.in 2011-04-13 17:43:50.987447096 +0200 ++++ pygame-build/Setup.in 2011-04-13 17:50:03.554502812 +0200 +@@ -1,2 +1,2 @@ + #This file defines platform specific modules for linux +-_camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG) ++_camera src/_camera.c src/camera_v4l2.c $(SDL) $(DEBUG) +diff -aur pygame/src/_camera.c pygame-build/src/_camera.c +--- pygame/src/_camera.c 2011-04-13 17:43:41.877679441 +0200 ++++ pygame-build/src/_camera.c 2011-04-13 17:50:46.240063533 +0200 +@@ -165,20 +165,8 @@ + PyObject* camera_start (PyCameraObject* self) { + #if defined(__unix__) + if (v4l2_open_device(self) == 0) { +- if (v4l_open_device(self) == 0) { +- v4l2_close_device(self); +- return NULL; +- } else { +- self->camera_type = CAM_V4L; +- if (v4l_init_device(self) == 0) { +- v4l2_close_device(self); +- return NULL; +- } +- if (v4l_start_capturing(self) == 0) { +- v4l2_close_device(self); +- return NULL; +- } +- } ++ v4l2_close_device(self); ++ return NULL; + } else { + self->camera_type = CAM_V4L2; + if (v4l2_init_device(self) == 0) { +diff -aur pygame/src/camera.h pygame-build/src/camera.h +--- pygame/src/camera.h 2011-04-13 17:43:41.901012178 +0200 ++++ pygame-build/src/camera.h 2011-04-13 17:51:31.538890072 +0200 +@@ -38,7 +38,6 @@ + + #include /* for videodev2.h */ + +- #include + #include + #elif defined(__APPLE__) + #include +@@ -64,7 +63,6 @@ + #define RGB_OUT 1 + #define YUV_OUT 2 + #define HSV_OUT 4 +-#define CAM_V4L 1 + #define CAM_V4L2 2 + + struct buffer { diff --git a/python-pygame.spec b/python-pygame.spec new file mode 100644 index 0000000..171cb46 --- /dev/null +++ b/python-pygame.spec @@ -0,0 +1,101 @@ +Name: python-pygame +Version: 1.9.1 +Release: 4mamba +Summary: A set of Python modules designed for writing games +Group: Development/Libraries/Python +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://pygame.org/ +Source: http://pygame.org/ftp/pygame-%{version}release.tar.gz +Patch0: python-pygame-1.9.1-remove-v4l.patch +License: LGPL +BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: libportmidi-devel +BuildRequires: libpython27-devel +BuildRequires: libpython-devel +BuildRequires: libSDL-devel +BuildRequires: libSDL_image-devel +BuildRequires: libSDL_mixer-devel +BuildRequires: libSDL_ttf-devel +BuildRequires: libsmpeg-devel +BuildRequires: libX11-devel +## AUTOBUILDREQ-END +BuildRequires: python-numeric-devel +Requires: python >= 2.3.4 +Requires: python-numeric >= 23.6 +Requires: ttf-freefont + +%description +Pygame is a set of Python modules designed for writing games. It is written on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system. + +%package devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{version} + +%description devel +Pygame is a set of Python modules designed for writing games. +This package contains static libraries and header files need for development. + +%prep +%setup -q -n pygame-%{version}release +%patch0 -p1 + +%build +%{__python} setup.py build << _EOF +Y +_EOF + + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +%{__python} setup.py install --root %{buildroot}\ + --install-lib=%{python_sitearch} \ + --install-headers=%{_includedir}/python/pygame/ +rm -f %{buildroot}%{python_sitearch}/pygame/freesansbold.ttf +ln -s %{_datadir}/fonts/truetype/FreeSansBold.ttf %{buildroot}%{python_sitearch}/pygame/freesansbold.ttf + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%dir %{python_sitearch}/pygame/ +%{python_sitearch}/pygame/* +%{python_sitearch}/pygame-%{version}release-py*.egg-info +#%doc WHATSNEW README.txt + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/python/pygame +%{_includedir}/python/pygame/*.h + +%changelog +* Thu May 23 2013 Silvan Calarco 1.9.1-4mamba +- python 2.7 mass rebuild + +* Sat Mar 26 2011 Silvan Calarco 1.9.1-3mamba +- rebuilt with libjpeg 8 + +* Sat Oct 30 2009 Ercole 'ercolinux' Carpanetto 1.9.1-1mamba +- update to 1.9.1 + +* Fri Oct 03 2008 Tiziana Ferro 1.8.1-2mamba +- fixed freesansbold.ttf permissions + +* Tue Sep 30 2008 Tiziana Ferro 1.8.1-1mamba +- update to 1.8.1 + +* Tue Aug 09 2005 Silvan Calarco 1.6.2-1qilnx +- update to version 1.6.2 by autospec + +* Mon Dec 20 2004 Massimo Pintore 1.6-1qilnx +- package created by autospec