python 2.7 mass rebuild [release 1.9.1-4mamba;Thu May 23 2013]

This commit is contained in:
Silvan Calarco 2024-01-05 16:25:29 +01:00
parent d27bef7c15
commit 74506511e0
3 changed files with 155 additions and 0 deletions

View File

@ -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.

View File

@ -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 <asm/types.h> /* for videodev2.h */
- #include <linux/videodev.h>
#include <linux/videodev2.h>
#elif defined(__APPLE__)
#include <QuickTime/QuickTime.h>
@@ -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 {

101
python-pygame.spec Normal file
View File

@ -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 <silvan.calarco@mambasoft.it>
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 <silvan.calarco@mambasoft.it> 1.9.1-4mamba
- python 2.7 mass rebuild
* Sat Mar 26 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.1-3mamba
- rebuilt with libjpeg 8
* Sat Oct 30 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 1.9.1-1mamba
- update to 1.9.1
* Fri Oct 03 2008 Tiziana Ferro <tiziana.ferro@email.it> 1.8.1-2mamba
- fixed freesansbold.ttf permissions
* Tue Sep 30 2008 Tiziana Ferro <tiziana.ferro@email.it> 1.8.1-1mamba
- update to 1.8.1
* Tue Aug 09 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.2-1qilnx
- update to version 1.6.2 by autospec
* Mon Dec 20 2004 Massimo Pintore <massimo.pintore@qilinux.it> 1.6-1qilnx
- package created by autospec