pspdev / psplibraries

A script to automatically build open-source libraries for PSP homebrew development.
47 stars 45 forks source link

Use PSPBUILDs for building libraries #66

Closed sharkwouter closed 3 years ago

sharkwouter commented 4 years ago

With this PR the psplibraries repo will be replaced with a set of PSPBUILDs and probably a build script. Installing within the toolchain should be changed to use a repository when this is merged.

This is still work in progress. The following libraries need to be ported to PSPBUILDs:

Currently I've removed the scripts which I won't be using at all and kept the scripts which can still serve as reference while porting this repo. These will also be removed later.

I've also added contributor guidelines which states the requirements a PSPBUILD should meet to be accepted into this repo.

I have not figured out yet how to build libraries which depend upon other libraries within this repo. There must be some way to do this automatically.

We might want to make a separate branch for this work, so I won't have to port 37 libraries on my own.

sharkwouter commented 4 years ago

For libpspvram, I'm using this repo as source instead of psp-ports: https://github.com/albe/libpspvram

sharkwouter commented 4 years ago

We should probably define some groups. There should be a group for all the packages in this library probably, something like psplibraries. Then you could install all of them with psp-pacman -S psplibraries.

There could also be groups for SDL and SDL2, something like psplibraries-sdl could work. Dunno if any other groups would make sense.

sharkwouter commented 4 years ago

Thanks to @Sir-Fortesque sqlite has been added.

sharkwouter commented 4 years ago

I've added 2 script files called libraries.sh and parse_pspbuild.sh. The libraries.sh script builds and installs all PSPBUILDs in this github repository and it takes the dependencies into account while doing so. A PSPBUILD will only be build when all dependencies have been build and installed. It will throw some warnings if a package has already been build in an earlier step, but this probably isn't an issue.

The parse_pspbuild.sh script exists because I use the source command to get the variables in a PSPBUILD. This needed to be in a separate script to keep my environment clean inside libraries.sh.

This implementation does make a couple of assumptions, though:

Let me know if any of these are problematic.

sharkwouter commented 4 years ago

@wally4000 and @dbeef what should the license on psp-cmake and the toolchain files be? I've packaged it now, but there is no license. The toolchain script and the createpbp script are long enough to need one.

dbeef commented 4 years ago

@wally4000 and @dbeef what should the license on psp-cmake and the toolchain files be? I've packaged it now, but there is no license. The toolchain script and the createpbp script are long enough to need one.

I'd say MIT license for CreatePBP.cmake. I can't say for the cmake toolchain file, as I am not the only contributor, but I would agree on MIT too.

sharkwouter commented 4 years ago

After chatting with dbeef and wally, it was decided that we'd use GPL for psp-cmake. I've added it.

sharkwouter commented 4 years ago

Since MacOS doesn't have the -D option for the install command, I've updated the current PSPBUILDs to not use it.

sharkwouter commented 4 years ago

I've added libpng and libmikmod.

I'm getting closer and closer to only having psp-ports libraries left, though (although I'm not there yet). Do I continue packaging those libraries in the way I did with pspgl or should I wait until they have been moved out of psp-ports?

Here is a list of libraries which require the psp-ports repo:

sharkwouter commented 4 years ago

I've added openal, but renamed it to openal-soft. I did add openal to provides.

sharkwouter commented 4 years ago

I've added freetype2 from here instead of from psp-ports: https://github.com/pspdev/freetype2

It does rely on a change to psp-pacman which we didn't agree on yet, but I accidentally pushed. Let me know if I need to revert that and add the extra lines to the pspbuild instead: https://github.com/pspdev/psp-pacman/commit/2ece16371e1dd851769d34ffb41443656a6bd830

sharkwouter commented 4 years ago

Lua was added thanks to @protheory8

sharkwouter commented 4 years ago

Thanks @protheory8 for making PSPBUILDs for libmad, libtremor and libbulletml

sharkwouter commented 4 years ago

This should be just about ready now. The resulting libraries should all match what is currently in psplibraries with the exceptions of the SDL/SDL2 based libraries and freetype2 which now use the pspdev repos instead of psp-ports. Fixing problems with the libraries themselves directly, upgrading libraries or adding new libraries was out of scope for this PR.

One possible issue with this PR is that the libraries.sh script can probably not be executed with sudo or as root. I don't think we should change that, though.

carstene1ns commented 4 years ago

Please fix your whitespaces! Decide on one style and stick to it.

sharkwouter commented 4 years ago

Okay now every whitespace is 4 spaces, every install command uses a space after -m and no install or cp command should now repeat the filename.

carstene1ns commented 4 years ago

Sorry, if my comments feel a bit pedantic sometimes. :grinning:

sharkwouter commented 4 years ago

Sorry for the commit spam, I rebased on master to get rid of the conflict

sharkwouter commented 4 years ago

This is still missing a change from #71 and the repo change for pspgl.

sharkwouter commented 3 years ago

I'm going to close this in favor or creating a new repository.