rpms/pyglet/F-10 pyglet-lib-loading-order.patch, NONE, 1.1 pyglet.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Orcan Ogetbil oget at rpmfusion.org
Fri Jan 16 19:50:12 CET 2009


Author: oget

Update of /cvs/free/rpms/pyglet/F-10
In directory se02.es.rpmfusion.net:/tmp/cvs-serv13312/F-10

Modified Files:
	.cvsignore sources 
Added Files:
	pyglet-lib-loading-order.patch pyglet.spec 
Log Message:
* Fri Jan 16 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 1.1.2-5
- Add Requires: avbin libGL libGLU

* Thu Jan 15 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 1.1.2-4
- Patch to load the correct (GL*) libraries
- Drop mesa-libGL, mesa-libGLU dependencies

* Mon Dec 01 2008 Orcan Ogetbil <orcanbahri [AT] yahoo [DOT] com> 1.1.2-3
- Updated description.
- Some minor improvements in the SPEC file.

* Sun Nov 23 2008 Orcan Ogetbil <orcanbahri [AT] yahoo [DOT] com> 1.1.2-2
- Removed the extra font dependency (reverting to the default system font).
- Added Requires.

* Sun Nov 23 2008 Orcan Ogetbil <orcanbahri [AT] yahoo [DOT] com> 1.1.2-1
- Initial build.


pyglet-lib-loading-order.patch:

--- NEW FILE pyglet-lib-loading-order.patch ---
diff -rupN old/pyglet-1.1.2/pyglet/lib.py new/pyglet-1.1.2/pyglet/lib.py
--- old/pyglet-1.1.2/pyglet/lib.py	2008-08-26 06:44:55.000000000 -0400
+++ new/pyglet-1.1.2/pyglet/lib.py	2009-01-15 22:27:59.000000000 -0500
@@ -101,24 +101,24 @@ class LibraryLoader(object):
         platform_names.extend(names)
         for name in platform_names:
             try:
-                lib = ctypes.cdll.LoadLibrary(name)
-                if _debug_lib:
-                    print name
-                if _debug_trace:
-                    lib = _TraceLibrary(lib)
-                return lib
-            except OSError:
                 path = self.find_library(name)
                 if path:
-                    try:
-                        lib = ctypes.cdll.LoadLibrary(path)
-                        if _debug_lib:
-                            print path
-                        if _debug_trace:
-                            lib = _TraceLibrary(lib)
-                        return lib
-                    except OSError:
-                        pass
+                    lib = ctypes.cdll.LoadLibrary(path)
+                    if _debug_lib:
+                        print path
+                    if _debug_trace:
+                        lib = _TraceLibrary(lib)
+                    return lib
+            except OSError:
+                try:
+                    lib = ctypes.cdll.LoadLibrary(name)
+                    if _debug_lib:
+                        print name
+                    if _debug_trace:
+                        lib = _TraceLibrary(lib)
+                    return lib
+                except OSError:
+                    pass
         raise ImportError('Library "%s" not found.' % names[0])
 
     find_library = lambda self, name: ctypes.util.find_library(name)


--- NEW FILE pyglet.spec ---
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           pyglet
Version:        1.1.2
Release:        5%{?dist}
Summary:        A cross-platform windowing and multimedia library for Python
Group:          Development/Libraries
License:        BSD
URL:            http://www.pyglet.org/
Source0:        http://pyglet.googlecode.com/files/%{name}-%{version}.tar.gz
#This patch makes sure that the library loader uses the find_library() facility of 
#ctypes.utils so that the library path is taken from the linker. Normally, pyglet would 
#try to load "libx.so" (which is of -devel type) when the library "x" is called and 
#this would make pyglet fail in certain cases. For instance, when pyglet requests the 
#GL library, it may try to load libGL.so from mesa-libGL-devel, which is not desired.
Patch0:         pyglet-lib-loading-order.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools-devel
Requires:       gdk-pixbuf, gtk2, openal 
Requires:       avbin libGL libGLU

%description
Pyglet provides an object-oriented programming interface for developing
games and other visually-rich applications for Windows, Mac OS X and
Linux. Pyglet loads images, sound, music and video in almost any format 
and can optionally use AVbin to play back audio formats such as MP3, 
OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264, WMV
and Xvid.

%package examples
Summary: Examples for pyglet module
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description examples
Pyglet provides an object-oriented programming interface for developing
games and other visually-rich applications for Windows, Mac OS X and
Linux. Pyglet loads images, sound, music and video in almost any format 
and can optionally use AVbin to play back audio formats such as MP3, 
OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264, WMV
and Xvid. This package provides example scripts for pyglet usage.

%package doc
Summary: API documentation of pyglet
Group: Documentation

%description doc
Pyglet provides an object-oriented programming interface for developing
games and other visually-rich applications for Windows, Mac OS X and
Linux. Pyglet loads images, sound, music and video in almost any format 
and can optionally use AVbin to play back audio formats such as MP3, 
OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264, WMV
and Xvid. This package provides API documentation of pyglet.

%prep

%setup -q

%patch0 -p2 -b .loading.order

# Fixes for various permission and EOL encoding problems:
# Everything is reported to upstream:
# http://code.google.com/p/pyglet/issues/detail?id=368
chmod +x tools/*.py
chmod +x examples/*.py
chmod +x examples/soundspace/soundspace.py
sed 's|#!/usr/bin/env python|#|' examples/soundspace/reader.py > reader.py.tmp
touch -r examples/soundspace/reader.py reader.py.tmp
mv -f reader.py.tmp examples/soundspace/reader.py
chmod 644 CHANGELOG NOTICE
sed 's/\r//' NOTICE > NOTICE.tmp
touch -r NOTICE NOTICE.tmp
mv -f NOTICE.tmp NOTICE
chmod -x doc/html/programming_guide/*.py

# Remove the preshipped font (it will use the saved_by_zero.ttf font if 
# larabie-fonts-uncommon is installed)
rm examples/astraea/res/saved_by_zero.ttf
sed "s@\(resource.add_font('saved_by_zero.ttf')\)@try: \1\nexcept: pass@" examples/astraea/astraea.py > astrea.py.tmp
touch -r examples/astraea/astraea.py astrea.py.tmp
mv -f astrea.py.tmp examples/astraea/astraea.py
chmod +x examples/astraea/astraea.py

%build
echo "Nothing to build."


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --root $RPM_BUILD_ROOT
install -dm 755  $RPM_BUILD_ROOT/%{_datadir}/%{name}
cp -a examples/* $RPM_BUILD_ROOT/%{_datadir}/%{name}
cp -a tools/*    $RPM_BUILD_ROOT/%{_datadir}/%{name}

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc CHANGELOG LICENSE NOTICE README 
%{python_sitelib}/*.egg-info
%{python_sitelib}/%{name}

%files doc
%defattr(-,root,root,-)
%doc LICENSE doc/*

%files examples
%defattr(-,root,root,-)
%doc LICENSE
%{_datadir}/%{name}

%changelog
* Fri Jan 16 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 1.1.2-5
- Add Requires: avbin libGL libGLU

* Thu Jan 15 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 1.1.2-4
- Patch to load the correct (GL*) libraries
- Drop mesa-libGL, mesa-libGLU dependencies

* Mon Dec 01 2008 Orcan Ogetbil <orcanbahri [AT] yahoo [DOT] com> 1.1.2-3
- Updated description.
- Some minor improvements in the SPEC file.

* Sun Nov 23 2008 Orcan Ogetbil <orcanbahri [AT] yahoo [DOT] com> 1.1.2-2
- Removed the extra font dependency (reverting to the default system font).
- Added Requires.

* Sun Nov 23 2008 Orcan Ogetbil <orcanbahri [AT] yahoo [DOT] com> 1.1.2-1
- Initial build.


Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/pyglet/F-10/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	16 Jan 2009 18:05:01 -0000	1.1
+++ .cvsignore	16 Jan 2009 18:50:12 -0000	1.2
@@ -0,0 +1 @@
+pyglet-1.1.2.tar.gz


Index: sources
===================================================================
RCS file: /cvs/free/rpms/pyglet/F-10/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	16 Jan 2009 18:05:01 -0000	1.1
+++ sources	16 Jan 2009 18:50:12 -0000	1.2
@@ -0,0 +1 @@
+6f16950d8af58b6ad19951aebf694508  pyglet-1.1.2.tar.gz



More information about the rpmfusion-commits mailing list