BZ2 libriary for psp?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
gambiting
Posts: 154
Joined: Thu Aug 17, 2006 5:39 pm

BZ2 libriary for psp?

Post by gambiting »

Hi! I just want to know - is there bz2 libriary(for compressing files) for psp,becouse I need it,and I can't find it anywhere.If it's not available on psp,maybe you could help me port it to psp?Thanks in advance.
kolaaaa
Posts: 15
Joined: Mon Apr 16, 2007 11:09 pm
Location: Paris

Post by kolaaaa »

Hi,

I guess it is not in the repository (but there is zlib).
I made a Makefile, it build and install the library, but I didn't test it.

1 - Download and unpack : bzip2 1.0.4
2 - Copy this Makefile, instead of the one include in the official source
3 - Then in your shell :
$ make
$ make install

This will build and install the library (libbz2.a) and the header (bzlib.h).
You may have errors when linking your application, if some functions need by the library don't exist in pspsdk, report it.

kolaaaa

[EDIT : Makefile path corrected. Use PREFIX=$(shell psp-config --psp-prefix).]
Last edited by kolaaaa on Sun May 27, 2007 7:24 pm, edited 3 times in total.
gambiting
Posts: 154
Joined: Thu Aug 17, 2006 5:39 pm

Post by gambiting »

Big thanks to you!!!! It works,my program compiles now.But you need to fix path that your makefile copy bzlib.h into.It should be copied to "/usr/local/pspdev/psp/include",instead of "'/usr/local/pspdev/include" - for me it worked in this first case.And so maybe you should ask admin if you could include it in svn repository?It may be useful for others.And thanks again :-)
kolaaaa
Posts: 15
Joined: Mon Apr 16, 2007 11:09 pm
Location: Paris

Post by kolaaaa »

Yes you are right, it's the wrong path for bzlib.h and libbz2.a. I'll correct that, and few other mistake (LDFLAGS=.... is not necessary, I was very tired).
I will make some tests to be sure that the library work as we want to. And I'll add it to the repository if admins accept it ?

kolaaaa
kolaaaa
Posts: 15
Joined: Mon Apr 16, 2007 11:09 pm
Location: Paris

Post by kolaaaa »

I confirm that the library is working proprely. All tests carried out by bzip2 are passed successfully on the PSP (compress and decompress some samples files, and compare them with references files).

Do I add the lib on pspdev ?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

kolaaaa wrote:Do I add the lib on pspdev ?
Sure, that would be good
kolaaaa
Posts: 15
Joined: Mon Apr 16, 2007 11:09 pm
Location: Paris

Post by kolaaaa »

It's commited in /bzip2 .
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

thanks very much kolaaaa :)
10011011 00101010 11010111 10001001 10111010
Post Reply