LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-14-2012, 07:58 AM   #1
t35t
LQ Newbie
 
Registered: Mar 2012
Posts: 18

Rep: Reputation: Disabled
Pygame 1.9.1 on Slackware64 14.0


Hi all,

I am trying to build and install pygame 1.9.1 on a Slackware64 14.0 machine. When I type ;

python setup.py build

I get ;

In file included from src/_camera.c:36:0:
src/camera.h:42:32: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

Failure is originating from pygame.camera module trying to build.
Any ideas for a workaround ?

Thanks in advance.
 
Old 12-14-2012, 09:02 AM   #2
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,404

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
apply these modifications to slackbuilds.org build script
Code:
--- pygame.orig/pygame.SlackBuild       2012-12-12 05:49:22.067570944 +0100
+++ pygame/pygame.SlackBuild    2012-12-14 15:59:02.123999930 +0100
@@ -4,8 +4,8 @@
 # Modified by the SlackBuilds.org project
 
 NAME=pygame
-VERSION=1.7.1
-BUILD=${BUILD:-3}
+VERSION=1.9.1
+BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 
 # Automatically determine the architecture we're building on:
@@ -34,6 +34,9 @@
 chown -R root:root .
 chmod -R u+w,go+r-w,a-s .
 
+# This header moved elsewhere
+sed -i "s|linux/videodev.h|libv4l1-videodev.h|" src/camera.h
+
 # Python programs use the CFLAGS specified used by python itself
 python -u config.py || exit 1
 python setup.py install --root=$PKG
diff -Naur pygame.orig/pygame.info pygame/pygame.info
--- pygame.orig/pygame.info     2012-12-12 05:49:22.067570944 +0100
+++ pygame/pygame.info  2012-12-14 16:00:25.757998902 +0100
@@ -1,8 +1,8 @@
 PRGNAM="pygame"
-VERSION="1.7.1"
+VERSION="1.9.1"
 HOMEPAGE="http://www.pygame.org/"
-DOWNLOAD="http://www.pygame.org/ftp/pygame-1.7.1release.tar.gz"
-MD5SUM="05d86d1af446f79411359400951053b7"
+DOWNLOAD="http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz"
+MD5SUM="1c4cdc708d17c8250a2d78ef997222fc"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
 REQUIRES="smpeg"
 
Old 12-14-2012, 09:11 AM   #3
t35t
LQ Newbie
 
Registered: Mar 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
apply these modifications to slackbuilds.org build script
Code:
--- pygame.orig/pygame.SlackBuild       2012-12-12 05:49:22.067570944 +0100
+++ pygame/pygame.SlackBuild    2012-12-14 15:59:02.123999930 +0100
@@ -4,8 +4,8 @@
 # Modified by the SlackBuilds.org project
 
 NAME=pygame
-VERSION=1.7.1
-BUILD=${BUILD:-3}
+VERSION=1.9.1
+BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 
 # Automatically determine the architecture we're building on:
@@ -34,6 +34,9 @@
 chown -R root:root .
 chmod -R u+w,go+r-w,a-s .
 
+# This header moved elsewhere
+sed -i "s|linux/videodev.h|libv4l1-videodev.h|" src/camera.h
+
 # Python programs use the CFLAGS specified used by python itself
 python -u config.py || exit 1
 python setup.py install --root=$PKG
diff -Naur pygame.orig/pygame.info pygame/pygame.info
--- pygame.orig/pygame.info     2012-12-12 05:49:22.067570944 +0100
+++ pygame/pygame.info  2012-12-14 16:00:25.757998902 +0100
@@ -1,8 +1,8 @@
 PRGNAM="pygame"
-VERSION="1.7.1"
+VERSION="1.9.1"
 HOMEPAGE="http://www.pygame.org/"
-DOWNLOAD="http://www.pygame.org/ftp/pygame-1.7.1release.tar.gz"
-MD5SUM="05d86d1af446f79411359400951053b7"
+DOWNLOAD="http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz"
+MD5SUM="1c4cdc708d17c8250a2d78ef997222fc"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
 REQUIRES="smpeg"
How can I do that automatically, using "diff" command ? What do you exactly mean by apply these modifications ?
 
Old 12-14-2012, 09:22 AM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,404

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
you can either:
- see the lines changed above and modify the original files accordingly with a text editor;
- save the text above as a file called my.patch and from the folder of the slackbuild of pygame do a
Code:
patch -p1 -i /path/to/my.patch
the slackbuild I modified is here

http://slackbuilds.org/repository/14.0/python/pygame/

Last edited by ponce; 12-14-2012 at 09:28 AM.
 
Old 12-14-2012, 09:30 AM   #5
t35t
LQ Newbie
 
Registered: Mar 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
you can either:
- see the lines changed above and modify the original files accordingly with a text editor;
- save the text above as a file called my.patch and from the folder of the slackbuild of pygame do a
Code:
patch -p1 -i /path/to/my.patch
the slackbuild I modified is here

http://slackbuilds.org/repository/14.0/python/pygame/
Worked like a charm.
Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware64-C client wont detect Slackware64-C Samba server slackass Slackware 5 08-07-2009 11:23 PM
Anybody used pygame before? How easy is it to use? vharishankar Programming 6 07-29-2006 08:17 AM
Help installing pygame Mike2001 Linux - Software 1 09-11-2004 06:12 PM
Install pygame davholla Linux - Software 0 04-02-2004 05:37 AM
pygame kierwind Linux - Software 5 05-21-2003 04:19 AM


All times are GMT -5. The time now is 12:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration