SHA256
1
0
forked from pool/gnubg

Accepting request 40923 from home:cwh

Copy from home:cwh/gnubg via accept of submit request 40923 revision 8.
Request was accepted with message:
Reviewed ok

OBS-URL: https://build.opensuse.org/request/show/40923
OBS-URL: https://build.opensuse.org/package/show/games/gnubg?expand=0&rev=1
This commit is contained in:
Pavol Rusnak 2010-06-01 22:03:24 +00:00 committed by Git OBS Bridge
commit 0b102e86bc
8 changed files with 250 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,11 @@
--- configure.in 2008-03-28 20:28:03.000000000 +0100
+++ configure.in.new 2010-05-19 12:04:47.000000000 +0200
@@ -96,7 +96,7 @@
PKG_CHECK_MODULES(GTHREAD, [gthread-2.0], have_gthread="yes", [AC_MSG_WARN("No thread support in glib")])
PKG_CHECK_MODULES(LIBXML2, libxml-2.0, AC_DEFINE(HAVE_LIBXML2,1,Define if you want to use libxml2 to parse XML.), [])
PKG_CHECK_MODULES(FREETYPE2, [freetype2], AC_DEFINE(HAVE_FREETYPE, 1, Define if you have freetype2), [])
-PKG_CHECK_MODULES(LIBPNG, [libpng12], AC_DEFINE(HAVE_LIBPNG, 1, Define if you have libpng), [])
+PKG_CHECK_MODULES(LIBPNG, [libpng14], AC_DEFINE(HAVE_LIBPNG, 1, Define if you have libpng), [])
PKG_CHECK_MODULES(ESD, [esound], AC_DEFINE(HAVE_ESD, 1, Define if you have esound), [AC_MSG_WARN("No esound support")])
PKG_CHECK_MODULES(CAIRO, [cairo >= 1.2], AC_DEFINE(HAVE_CAIRO,1,Define if you want to use libcairo), [AC_MSG_WARN("No cairo support")])
PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 1.0], AC_DEFINE(HAVE_PANGOCAIRO,1,Define if you want to use pangocairo), [AC_MSG_WARN("No pangocairo support")])

13
export.c_libpng14.patch Normal file
View File

@ -0,0 +1,13 @@
--- export.c 2008-03-14 07:20:05.000000000 +0100
+++ export.c.new 2010-05-19 13:39:20.000000000 +0200
@@ -516,8 +516,8 @@
atext[1].compression = PNG_TEXT_COMPRESSION_NONE;
#ifdef PNG_iTXt_SUPPORTED
- text_ptr[0].lang = NULL;
- text_ptr[1].lang = NULL;
+ atext[0].lang = NULL;
+ atext[1].lang = NULL;
#endif
png_set_text (ppng, pinfo, atext, 2);

3
gnubg-0.9.0-1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a529d6a4adb67601599655ce2603f57622919753dc45774f69bebe696220287a
size 16279912

73
gnubg.changes Normal file
View File

@ -0,0 +1,73 @@
-------------------------------------------------------------------
Fri May 28 15:11:59 UTC 2010 - cwh@novell.com
- added desktop file
- use libpng 1.4 for Factory (11.3)
- updated package description
-------------------------------------------------------------------
Fri May 21 09:40:59 UTC 2010 - cwh@novell.com
- fixing fedora build (libpng version)
-------------------------------------------------------------------
Thu May 20 17:04:51 UTC 2010 - cwh@novell.com
- fix building on >11.2 by requiring libpng less than 1.4
- wrap long BuildRequires
-------------------------------------------------------------------
Wed May 19 09:29:38 UTC 2010 - cwh@novell.com
- fixed buffer overflow
- fixed filelist
- added debug packages
-------------------------------------------------------------------
Tue May 18 16:13:38 UTC 2010 - cwh@novell.com
- updated to 0.9.0
- fixed specfile for openSUSE buildservice and current distributions
-------------------------------------------------------------------
Sat Nov 18 2006 - ace@gnubg.org
- some slight changes in specfile
-------------------------------------------------------------------
Wed Dec 28 2004 - ace@gnubg.org
- new weights including pruning
-------------------------------------------------------------------
Mon Oct 11 2004 - ace@gnubg.org
- fixed some minor bugs
-------------------------------------------------------------------
Wed Sep 01 2004 - ace@gnubg.org
- new rpms with 3d enabled
-------------------------------------------------------------------
Wed Nov 05 2003 - ace@gnubg.org
- made the spec suit to redhat and suse <ace@gnubg.org>
- disabled 3d (still problems with nvidia)
- added gpg signature
-------------------------------------------------------------------
Thu Oct 23 2003 - ace@gnubg.org
- disabled gdbm and guile
- changed info- and manpath
-------------------------------------------------------------------
Mon Oct 20 2003 - ace@gnubg.org
- divided into three packages (gnubg, databases, sounds)
-------------------------------------------------------------------
Fri Oct 18 2003 - ace@gnubg.org
- initial package (Version 0.14)

106
gnubg.spec Normal file
View File

@ -0,0 +1,106 @@
###############################################################
#
# Spec file for package gnubg (Version 0.9.0).
#
# Copyright (c) 2003 Achim Mueller, Germany.
# Updated by Christopher Hofmann in 2010
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# please send bugfixes or comments to info@gnubg.org
#
###############################################################
Name: gnubg
License: GNU General Public License (GPL) - all versions
Group: Amusements/Games/Board/Other
Summary: Plays and analyzes backgammon games and matches on a world class level
Version: 0.9.0
Release: 0
Source: %{name}-%{version}-1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
URL: http://www.gnubg.org
BuildRequires: bison flex python-devel glibc-devel glib2-devel libxml2-devel
BuildRequires: freetype2-devel libpng-devel gtk2-devel gtkglext-devel
BuildRequires: libesd-devel sqlite3-devel
%if 0%{?suse_version} > 1120
BuildRequires: libpng-devel >= 1.4
%else
BuildRequires: libpng-devel
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
AutoReqProv: on
Patch0: gnubgmodule_bufferoverflow.patch
Patch1: configure.in_libpngversion.patch
Patch2: export.c_libpng14.patch
%description
Program for playing and analysing backgammon positions, games and matches. It is based on a neural network. It currently plays at about the level of a championship flight tournament player. Depending on its parameters and its luck in recent games, it rates from around 1900 to 2000 on FIBS, the First Internet Backgammon Server -- at its strongest, it ranks in the top 5 of over 6000 rated players there and is gradually improving.
%package databases
Summary: Databases for gnubg
Requires: %{name}
Group: Amusements/Games/Board/Other
%description databases
This package contains the GNU Backgammon bearoff databases.
%package sounds
Summary: Sounds for gnubg
Requires: %{name}
Group: Amusements/Games/Board/Other
%description sounds
This package contains the sounds for GNU Backgammon.
%prep
%setup -q -n gnubg
%patch0 -p1
%if 0%{?suse_version} > 1120
%patch1
%patch2
%endif
%build
autoreconf -fi
export SUSE_ASNEEDED=0
%configure
make %{?jobs:-j%jobs}
%install
%makeinstall
%if 0%{?suse_version}
%suse_update_desktop_file -c %name "GNU Backgammon" "Backgammon Board Game" "%name -w" /usr/share/%name/%name.png "Game;BoardGame;"
%endif
%find_lang %{name}
%debug_package
%clean
rm -rf ${RPM_BUILD_ROOT}
%files -f %{name}.lang
%defattr(-,root,root)
%doc ABOUT-NLS AUTHORS CODING COPYING NEWS README TODO
%{_bindir}/*
%{_mandir}/man?/%{name}*
%docdir /usr/share/gnubg/doc
%if 0%{?suse_version}
/usr/share/applications/gnubg.desktop
%endif
/usr/share/gnubg
%exclude /usr/share/gnubg/*.bd
%exclude /usr/share/gnubg/sounds
%files databases
%defattr(-,root,root)
/usr/share/gnubg/*.bd
%files sounds
%defattr(-,root,root)
/usr/share/gnubg/sounds
%changelog -n gnubg

View File

@ -0,0 +1,20 @@
--- gnubg/gnubgmodule.c.~1.79.~ 2008-02-18 07:20:04.000000000 +0100
+++ gnubg/gnubgmodule.c 2010-05-19 11:08:26.000000000 +0200
@@ -881,7 +881,7 @@
PyObject *pyBoard = NULL;
int nChequers = 15;
int nPoints = 6;
- unsigned int anBoard[ 25 ];
+ unsigned int anBoard[ 2 ][ 25 ];
memcpy( anBoard, msBoard(), sizeof(TanBoard) );
@@ -897,7 +897,7 @@
static PyObject *PythonPositionFromBearoff( PyObject* self UNUSED_PARAM, PyObject *args )
{
- unsigned int anBoard[ 25 ];
+ unsigned int anBoard[ 2 ][ 25 ];
int iPos = 0;
int nChequers = 15;
int nPoints = 6;