Author Topic: TuxMath  (Read 1100 times)

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
TuxMath
« on: November 02, 2010, 09:20:50 PM »
The current tuxmath in the repo's doesn't seem to work (it is a 2009 build).

I've tried rebuilding version 1.7.2 from the repo's for 2010, as well as building the latest version 1.8, but cannot get either one to run.

The latest ( 1.8 ) gives the following errors:
Code: [Select]
[tln@localhost ~]$ tuxmath
socket(): Address family not supported by protocol
load_image(): ERROR could not load required graphics file status/title.png

[tln@localhost ~]$ find / -iname title.png 2>/dev/null |grep status
/home/tln/src/rpm/BUILD/tuxmath_w_fonts-1.8.0/data/images/status/title.png
/home/tln/src/rpm/BUILD/tuxmath_w_fonts-1.7.2/data/images/status/title.png
/usr/share/games/tuxmath/images/status/title.png

[tln@localhost ~]$ ls -la /usr/share/games/tuxmath/images/status/title.png
-rw-r--r-- 1 root root 32754 2010-11-02 19:18 /usr/share/games/tuxmath/images/status/title.png


..I have no idea where to start with the socket error... I checked the permissions on the .png and it looks OK (above)


Here is the spec I'm working with (..source link in the spec  ;))
Code: [Select]
%define __libtoolize /bin/true
%define Werror_cflags %nil
%define fname tuxmath_w_fonts


Summary: Math game for kids with Tux
Name: tuxmath
Version: 1.8.0
Release: %{mkrel 1}
# Change the Source0 URL with each new release,
# ..as the number after download.php in the URL changes :(
Source0: http://alioth.debian.org/frs/download.php/2684/%{fname}-%{version}.tar.gz
URL: http://alioth.debian.org/frs/?group_id=31080
License: GPLv2+
Group: Education
BuildRequires: SDL-devel
BuildRequires: SDL_ttf-devel
BuildRequires: SDL_mixer-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_Pango-devel
BuildRequires: SDL_net-devel
BuildRequires: librsvg-devel
BuildRequires: imagemagick
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
"Tux, of Math Command" ("TuxMath", for short) is an educational arcade
game starring Tux, the Linux mascot! Based on the classic arcade game
"Missile Command", Tux must defend his cities. In this case, though,
he must do it by solving math problems.

%prep
%setup -q -n %{fname}-%{version}
# Fix incorrect paths hardcoded into the source (#46417) - AdamW
sed -i -e 's,/usr/share/fonts/truetype/ttf-.*/,%{_gamesdatadir}/%{name}/fonts/,g' src/loaders.c

%build
%configure2_5x --bindir=%{_gamesbindir} \
--datadir=%{_gamesdatadir}
%make

%install
rm -rf %{buildroot}
%makeinstall_std


install -d %{buildroot}%{_datadir}/applications
cat <<EOF > %{buildroot}%{_datadir}/applications/%{name}.desktop
[Desktop Entry]
Name=TuxMath
Comment=Math game for kids with Tux
Exec=%{_gamesbindir}/%{name}
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=true
Categories=X-MandrivaLinux-MoreApplications-Education-Other;Game;KidsGame;Educational;Teaching;
EOF


mkdir -p %{buildroot}%{_iconsdir}/hicolor/{48x48,32x32,16x16}/apps
convert -scale 16x16 data/images/icons/%{name}.ico %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png
convert -scale 32x32 data/images/icons/%{name}.ico %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png
convert -scale 48x48 data/images/icons/%{name}.ico %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png

%find_lang %{name}

%post
%{update_menus}
%{update_icon_cache hicolor}

%postun
%{clean_menus}
%{clean_icon_cache hicolor}

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
#%doc AUTHORS ChangeLog README
%{_datadir}/doc/%{name}/*

%{_gamesbindir}/%{name}
%{_gamesbindir}/%{name}admin
%{_gamesbindir}/%{name}server
%{_gamesbindir}/%{name}testclient
%{_gamesbindir}/generate_lesson
%{_gamesdatadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_iconsdir}/hicolor/*/apps/%{name}.png



%changelog
* Tue Nov 2 2010 travisn000 <travisn000 at gm_il> 1.8.0-1pclos2010
- Rebuild for PCLinuxOS



Any ideas ???

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: TuxMath
« Reply #1 on: November 03, 2010, 05:47:18 AM »
..I wasn't having any difficulty getting either version to build, but I did update the spec as you suggested and rebuilt / re-installed anyway.  

Unfortunately, I'm still getting the same errors listed in my initial post when I try to run it.  

(..the image loading error is there with both versions... just a different image causes the error)

??? :-\
« Last Edit: November 03, 2010, 05:55:40 AM by travisn000 »

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: TuxMath
« Reply #2 on: November 03, 2010, 01:40:53 PM »
The current tuxmath in the repo's doesn't seem to work (it is a 2009 build).

I've tried rebuilding version 1.7.2 from the repo's for 2010, as well as building the latest version 1.8, but cannot get either one to run.

The latest ( 1.8 ) gives the following errors:
Code: [Select]
[tln@localhost ~]$ tuxmath
socket(): Address family not supported by protocol
load_image(): ERROR could not load required graphics file status/title.png

[tln@localhost ~]$ find / -iname title.png 2>/dev/null |grep status
/home/tln/src/rpm/BUILD/tuxmath_w_fonts-1.8.0/data/images/status/title.png
/home/tln/src/rpm/BUILD/tuxmath_w_fonts-1.7.2/data/images/status/title.png
/usr/share/games/tuxmath/images/status/title.png

[tln@localhost ~]$ ls -la /usr/share/games/tuxmath/images/status/title.png
-rw-r--r-- 1 root root 32754 2010-11-02 19:18 /usr/share/games/tuxmath/images/status/title.png


..I have no idea where to start with the socket error... I checked the permissions on the .png and it looks OK (above)


Here is the spec I'm working with (..source link in the spec  ;))
Code: [Select]
%define __libtoolize /bin/true
%define Werror_cflags %nil
%define fname tuxmath_w_fonts


Summary: Math game for kids with Tux
Name: tuxmath
Version: 1.8.0
Release: %{mkrel 1}
# Change the Source0 URL with each new release,
# ..as the number after download.php in the URL changes :(
Source0: http://alioth.debian.org/frs/download.php/2684/%{fname}-%{version}.tar.gz
URL: http://alioth.debian.org/frs/?group_id=31080
License: GPLv2+
Group: Education
BuildRequires: SDL-devel
BuildRequires: SDL_ttf-devel
BuildRequires: SDL_mixer-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_Pango-devel
BuildRequires: SDL_net-devel
BuildRequires: librsvg-devel
BuildRequires: imagemagick
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
"Tux, of Math Command" ("TuxMath", for short) is an educational arcade
game starring Tux, the Linux mascot! Based on the classic arcade game
"Missile Command", Tux must defend his cities. In this case, though,
he must do it by solving math problems.

%prep
%setup -q -n %{fname}-%{version}
# Fix incorrect paths hardcoded into the source (#46417) - AdamW
sed -i -e 's,/usr/share/fonts/truetype/ttf-.*/,%{_gamesdatadir}/%{name}/fonts/,g' src/loaders.c

%build
%configure2_5x --bindir=%{_gamesbindir} \
--datadir=%{_gamesdatadir}
%make

%install
rm -rf %{buildroot}
%makeinstall_std


install -d %{buildroot}%{_datadir}/applications
cat <<EOF > %{buildroot}%{_datadir}/applications/%{name}.desktop
[Desktop Entry]
Name=TuxMath
Comment=Math game for kids with Tux
Exec=%{_gamesbindir}/%{name}
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=true
Categories=X-MandrivaLinux-MoreApplications-Education-Other;Game;KidsGame;Educational;Teaching;
EOF


mkdir -p %{buildroot}%{_iconsdir}/hicolor/{48x48,32x32,16x16}/apps
convert -scale 16x16 data/images/icons/%{name}.ico %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png
convert -scale 32x32 data/images/icons/%{name}.ico %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png
convert -scale 48x48 data/images/icons/%{name}.ico %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png

%find_lang %{name}

%post
%{update_menus}
%{update_icon_cache hicolor}

%postun
%{clean_menus}
%{clean_icon_cache hicolor}

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
#%doc AUTHORS ChangeLog README
%{_datadir}/doc/%{name}/*

%{_gamesbindir}/%{name}
%{_gamesbindir}/%{name}admin
%{_gamesbindir}/%{name}server
%{_gamesbindir}/%{name}testclient
%{_gamesbindir}/generate_lesson
%{_gamesdatadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_iconsdir}/hicolor/*/apps/%{name}.png



%changelog
* Tue Nov 2 2010 travisn000 <travisn000 at gm_il> 1.8.0-1pclos2010
- Rebuild for PCLinuxOS



Any ideas ???



I just installed this last Thursday (Oct 28,2 010) for my daughter, and it ran fine...???
Quote
socket(): Address family not supported by protocol


Have you made any changes (to audio settings, etc)?
(Does Tuxmath use SDL?  I don't recall... http://www.google.ca/search?q=socket%28%29%3A+Address+family+not+supported+by+protocol+%2BSDL&btnG=Search&hl=en&client=firefox-a&hs=avj&rls=com.pclinuxos%3Aen-US%3Aunofficial&sa=2)

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: TuxMath
« Reply #3 on: November 03, 2010, 02:05:13 PM »
Thanks for the replies...

I tried it on two different PC's, but with the same results.  Perhaps I will set the kids up with a fresh install and/or user account this evening and try again (..it sounds like I may have a bad config).

Thanks again!
« Last Edit: November 03, 2010, 02:46:39 PM by travisn000 »

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: TuxMath
« Reply #4 on: November 03, 2010, 02:42:13 PM »
PS..    

apparently version 1.8 supports network (LAN) play which will allow a group of kids to work together;  when I get home I can post a link for the SRPM / RPM if any one wants to test..  I will send it to Tex for the repos after I get it working at home.