You are not logged in.
I've been trying to suppress a printf statement (that should be encompassed by #ifdef DEBUG) in the python module pygame for python 2.7.
The official repository has this package as python2-pygame, version 1.9.1, but this still has the debug messages as default.
I removed pygame using the -R flag of pacman, thus keeping the dependencies. I then went and downloaded the pygame tarball from their website, made the change to the source file in question, and was planning to build it myself -- but that failed with an error:
src/camera.h:42:32: fatal error: linux/videodev.h: No such file or directory
#include <linux/videodev.h>Thus, I'm clearing missing something on my machine.
I really just want to rebuild this package with one line in the source changed, but don't really know what I am doing when it comes to building/installing modules or messing with packages. Any help or pointers would be appreciated.
Last edited by sternenhimmel (2014-04-13 00:49:02)
Offline
Offline
For the build error; v4l support was removed upstream from the kernel years ago, don't try to build with support for it. But yes, use abs instead of building by hand.
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
So I did try using ABS to check out the package tree and go from there, but was unable to actually get the package I was looking for, am I missing something?
I tried:
abs python2-pygameand
abs extra/python2-pygameAlthough it doesn't fail in any sense that I can see, there is also no package tree for python2-pygame in /var/abs/. There is one for python-pygame, but I assume this is for versions of python 3.x.x.
The package in question is here:
https://www.archlinux.org/packages/extr … n2-pygame/
Edit: After looking at the PKGBUILD file for python-pygame, appears that this is for python2-pygame -- they just have the same name for the ABS.
Now I just have to figure out how to modify the source and rebuild...
Last edited by sternenhimmel (2014-04-01 02:45:56)
Offline
Okay. I am struggling to get the modified source built -- or rather, it's building and installing just fine, but minus the changes I made.
I made one change to a source file, joystick.c, to suppress a statement of the sort:
printf("SDL_JoystickGetAxis value:%d:\n", value);and commented it out to read:
//printf("SDL_JoystickGetAxis value:%d:\n", value);I then used this statement to make an archive from the source:
sudo tar cpfz pygame-1.9.1release_mod.tar.gz pygame-1.9.1release/*I then moved this file to the folder with PKGBUILD, and changed the PKGBUILD source line to read:
source=(pygame-${pkgver}release_mod.tar.gz)I then ran makpkg with these flags:
makepkg -f --skipintegFinally I removed the existing installation of python2-pygame.
sudo pacman -R python2-pygameAnd installed the new version:
sudo pacman -U python2-pygame-1.9.1-8-x86_64.pkg.tar.xzHowever, when I actually run the python script that uses this library, I am still getting the SDL_JoystickGetAxis output. Not sure where to go from here, or if I am doing something wrong when modifying the source?
Last edited by sternenhimmel (2014-04-01 03:40:51)
Offline
Are you sure pacman isn't installing from the repo? Or from its cache? What is the pacman output?
You might have to prepend /the/path/to/python2-pygame.
https://wiki.archlinux.org/index.php/pa … l_commands
Offline
Make a patch and apply it in prepare()
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Are you sure pacman isn't installing from the repo? Or from its cache? What is the pacman output?
You might have to prepend /the/path/to/python2-pygame.
https://wiki.archlinux.org/index.php/pa … l_commands
Gave the absolute path to the package with the same results -- still getting output from joystick.c
Forgive my ignorance, but I have no idea how to make a patch...
Offline
Google and you will find lots of good howtoes
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Forgive my ignorance, but I have no idea how to make a patch...
Maybe https://bbs.archlinux.org/viewtopic.php … 4#p1396064 helps a bit.
Offline
To give an update, I ended up following this guide on patching:
https://wiki.archlinux.org/index.php/Patching_in_ABS
And was able to make a successful patch, rebuild, and install successfully.
Thanks for the help!
Offline
That wiki page needs updating and fixing, eg patching should be done in prepare() not build()
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
I noticed that too, but just assumed the python package and a special PKGBUILD file, and used prepare() instead of build().
Offline