Skip to content

Commit

Permalink
init: source upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rhynec committed Sep 17, 2023
0 parents commit 6364cfc
Show file tree
Hide file tree
Showing 167 changed files with 24,681 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/scripts/req.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
apt-get update
apt-get -y upgrade
apt-get -y install autoconf automake bison build-essential bzip2 ccache curl \
flex git-core libelf-dev libgmp3-dev libncurses5-dev libssl-dev libtool \
libtool-bin libz-dev make patch pkg-config python python-dev subversion \
texinfo wget zip zlib1g-dev
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy SDK
on: workflow_dispatch
permissions:
contents: write

jobs:
deploy-sdk:
runs-on: ubuntu-20.04

container:
image: debian:bullseye

steps:
- uses: actions/checkout@v4

- name: Install build requirements
run: ./.github/scripts/req.sh

- name: Build SDK
run: ./build-sudo.sh

- name: Compress SDK
run: tar --directory=/usr/local --owner=0 --group=0 -zcf ./bullseye-sdk.tar.gz PSDK3v2

- name: Stash SDK
uses: actions/upload-artifact@v2
with:
name: release-artifact
path: ./bullseye-sdk.tar.gz

- name: Get current date/time
id: fnames
run: |
echo "::set-output name=date::$(date +'%Y.%m.%d')"
- name: Deploy release
uses: softprops/action-gh-release@v1
with:
name: "SDK Binaries (${{steps.fnames.outputs.date}})"
tag_name: "refs/tags/${{steps.fnames.outputs.date}}"
files: ./bullseye-sdk.tar.gz
prerelease: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
Thumbs.db
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# NixSDK

NixSDK is soft recreation of Estwald's [PSDK3v2](https://github.com/Estwald/PSDK3v2), compilable on newer
Linux systems (only tested on Debian 11). All the credit goes to the ps3dev developers and everyone
who contributed to the creation of PSL1GHT and its related libraries.

**Important Note:** This is merely a distribution of older versions of the current ps3dev projects.
No meaningful changes were made to the source code aside from scripting tweaks.

## Sources:

### Current Repos:

- [PSL1GHT](https://github.com/ps3dev/PSL1GHT)
- [ps3toolchain](https://github.com/ps3dev/ps3toolchain)
- [ps3libraries](https://github.com/ps3dev/ps3libraries)

### Swapped PSL1GHT components:

- [scetool](https://github.com/wargio/scetool)
- [keys/curves](https://github.com/MiscPS3/KeysCurves)

## Building:

1) Install the following software:
```bash
autoconf, automake, bison, flex, gcc, libelf, make, makeinfo,
ncurses, patch, python, subversion, wget, zlib, libtool, python,
bzip2, gmp, pkg-config, g++, libssl-dev, clang
```

2) Set environment variables:
```
export PS3SDK=/usr/local/PSDK3v2
export PS3DEV=$PS3SDK/ps3dev
export PSL1GHT=$PS3SDK/psl1ght
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
```

3) Run ./build.sh or ./build-sudo.sh

The SDK will be installed to /usr/local/PSDK3v2
17 changes: 17 additions & 0 deletions build-sudo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

## Enter the PSDK3v2 directory.
cd "`dirname $0`" || { echo "ERROR: Could not enter the PSDK3v2 directory."; exit 1; }

## Set up the environment.
export PS3SDK=/usr/local/PSDK3v2
export PS3DEV=$PS3SDK/ps3dev
export PSL1GHT=$PS3SDK/psl1ght

## Set up the path.
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin

## Run the toolchain script.
./build.sh $@ || { echo "ERROR: Could not run the PSDK3v2 script."; exit 1; }
35 changes: 35 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

## Enter the SDK directory.
cd "`dirname $0`" || { echo "ERROR: Could not enter the SDK directory."; exit 1; }

## Fetch the build scripts.
BUILD_SCRIPTS=`ls scripts/*.sh | sort`

## If specific steps were requested...
if [ $1 ]; then

## Find the requested build scripts.
REQUESTS=""

for STEP in $@; do
SCRIPT=""
for i in $BUILD_SCRIPTS; do
if [ `basename $i | cut -d'-' -f1` -eq $STEP ]; then
SCRIPT=$i
break
fi
done

[ -z $SCRIPT ] && { echo "ERROR: unknown step $STEP"; exit 1; }

REQUESTS="$REQUESTS $SCRIPT"
done

## Only run the requested build scripts
BUILD_SCRIPTS="$REQUESTS"
fi

## Run the build scripts.
for SCRIPT in $BUILD_SCRIPTS; do "$SCRIPT" || { echo "$SCRIPT: Failed."; exit 1; } done

Binary file added libraries/archive/NoRSX.tar.gz
Binary file not shown.
Binary file added libraries/archive/cairo-1.10.0.tar.gz
Binary file not shown.
Binary file added libraries/archive/curl-7.31.0.tar.gz
Binary file not shown.
Binary file added libraries/archive/faad2-2.7.tar.gz
Binary file not shown.
Binary file added libraries/archive/flac-1.2.1.tar.gz
Binary file not shown.
Binary file added libraries/archive/freetype-2.4.3.tar.gz
Binary file not shown.
Binary file added libraries/archive/jpegsrc.v8b.tar.gz
Binary file not shown.
Binary file added libraries/archive/jsonc.tar.gz
Binary file not shown.
Binary file added libraries/archive/libmad-0.15.1b.tar.gz
Binary file not shown.
Binary file added libraries/archive/libmikmod-3.1.11.tar.gz
Binary file not shown.
Binary file added libraries/archive/libogg-1.2.1.tar.gz
Binary file not shown.
Binary file added libraries/archive/libpng-1.4.4.tar.gz
Binary file not shown.
Binary file added libraries/archive/libtheora-1.1.1.tar.bz2
Binary file not shown.
Binary file added libraries/archive/libvorbis-1.3.2.tar.gz
Binary file not shown.
Binary file added libraries/archive/libxml2-2.7.8.tar.gz
Binary file not shown.
Binary file added libraries/archive/libzip-0.9.3.tar.bz2
Binary file not shown.
Binary file added libraries/archive/pixman-0.20.0.tar.gz
Binary file not shown.
Binary file added libraries/archive/polarssl-1.2.8.tar.gz
Binary file not shown.
Binary file added libraries/archive/ps3soundlib.tar.gz
Binary file not shown.
Binary file added libraries/archive/sdl_psl1ght.tar.gz
Binary file not shown.
Binary file added libraries/archive/sdl_psl1ght_libs.tar.gz
Binary file not shown.
Binary file added libraries/archive/tiff-3.9.4.tar.gz
Binary file not shown.
Binary file added libraries/archive/tiny3d.tar.gz
Binary file not shown.
Binary file added libraries/archive/zlib-1.2.8.tar.gz
Binary file not shown.
5 changes: 5 additions & 0 deletions libraries/depends/check-autoconf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# check-autoconf.sh by Naomi Peori (naomi@peori.ca)

## Check for autoconf.
autoconf --version 1> /dev/null || { echo "ERROR: Install autoconf before continuing."; exit 1; }
5 changes: 5 additions & 0 deletions libraries/depends/check-automake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# check-automake.sh by Naomi Peori (naomi@peori.ca)

## Check for automake.
automake --version 1> /dev/null || { echo "ERROR: Install automake before continuing."; exit 1; }
5 changes: 5 additions & 0 deletions libraries/depends/check-libtool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# check-libtool.sh by Naomi Peori (naomi@peori.ca)

## Check for libtool.
{ libtool --version || libtool -V; } 1> /dev/null || { echo "ERROR: Install libtool before continuing."; exit 1; }
5 changes: 5 additions & 0 deletions libraries/depends/check-make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# check-make.sh by Naomi Peori (naomi@peori.ca)

## Check for make.
which ${MAKE:-make} 1> /dev/null || { echo "ERROR: Install make before continuing."; exit 1; }
5 changes: 5 additions & 0 deletions libraries/depends/check-pkg-config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# check-pkg-config.sh by Naomi Peori (naomi@peori.ca)

## Check for pkg-config.
pkg-config --version 1> /dev/null || { echo "ERROR: Install pkg-config before continuing."; exit 1; }
5 changes: 5 additions & 0 deletions libraries/depends/check-ps3toolchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# check-ps3toolchain.sh by Naomi Peori (naomi@peori.ca)

## Check for ps3-gcc.
ppu-gcc --version 1> /dev/null || { echo "ERROR: Install the ps3toolchain before continuing."; exit 1; }
8 changes: 8 additions & 0 deletions libraries/depends/check-psl1ght.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
# check-psl1ght.sh by Dan Peori (dan.peori@oopo.net)

## Check if $PSL1GHT is set.
if test ! $PSL1GHT; then { echo "ERROR: Set \$PSL1GHT before continuing."; exit 1; } fi

## Check for the $PSL1GHT directory.
( ls -ld $PSL1GHT || mkdir -p $PSL1GHT ) 1> /dev/null 2> /dev/null || { echo "ERROR: Create $PSL1GHT before continuing."; exit 1; }
5 changes: 5 additions & 0 deletions libraries/depends/check-wget.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# check-wget.sh by Naomi Peori (naomi@peori.ca)

## Check for wget.
wget -V 1> /dev/null || { echo "ERROR: Install wget before continuing."; exit 1; }
20 changes: 20 additions & 0 deletions libraries/patches/libcurl-7.31.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c
--- a/src/tool_dirhie.c
+++ b/src/tool_dirhie.c
@@ -118,6 +118,7 @@
if not ending with DIR_CHAR, we need to prune it */
if(tempdir2 != NULL) {
size_t dlen = strlen(dirbuildup);
+ struct stat st;
if(dlen)
sprintf(&dirbuildup[dlen], "%s%s", DIR_CHAR, tempdir);
else {
@@ -126,7 +127,7 @@
else
sprintf(dirbuildup, "%s%s", DIR_CHAR, tempdir);
}
- if(access(dirbuildup, F_OK) == -1) {
+ if(stat(dirbuildup, &st) == -1) {
if(-1 == mkdir(dirbuildup,(mode_t)0000750)) {
show_dir_errno(errors, dirbuildup);
result = CURLE_WRITE_ERROR;
Loading

0 comments on commit 6364cfc

Please sign in to comment.