600th commit!

1. Update the bc patch to remove an unnecessary line.
2. Update README.md to mention the port system.
3. Improve the port system!!
This commit is contained in:
apio 2022-10-23 17:15:38 +02:00
parent 1a82bbb234
commit 185757e2a7
4 changed files with 47 additions and 18 deletions

View File

@ -70,5 +70,24 @@ Prebuilt ISO images for every version can be found at [pub.cloudapio.eu](https:/
These images are built manually whenever I decide to make a new version, and thus don't reflect the latest changes on the `main` branch. These images are built manually whenever I decide to make a new version, and thus don't reflect the latest changes on the `main` branch.
## Is there third-party software I can use on Luna?
Yes, actually! Check out the [ports](ports/) directory.
Right now, only [bc](https://github.com/gavinhoward/bc) is ported, because right now our C Library is quite primitive and doesn't support projects more complex than that.
And bc itself doesn't run very well... most notably, user input doesn't echo. But that's on our side. At least it runs!
You should also keep in mind that it is not possible to compile software written in any language other than C for Luna right now.
But feel free to try to port some program yourself and add it to the ports directory!
Port usage:
`ports/add-port.sh <port-name>` will build and add a port to the list of installed ports, and the built port will automatically get installed into the system root every time you run Luna.
`ports/remove-port.sh <port-name>` will remove the port from the list of installed ports, remove built files from the system root, as well as the build directory.
`ports/make-package.sh <port-name>` will compile the port and make a package archive from it, which may be used in the future with a package manager :)
## License ## License
Luna is open-source and free software under the [BSD-2 License](LICENSE). Luna is open-source and free software under the [BSD-2 License](LICENSE).

View File

@ -8,6 +8,21 @@ source tools/env.sh
cd ports cd ports
unset pkgname
unset pkgver
unset pkgurl
unset pkgmode
unset setupdir
unset builddir
unset installdir
unset srcdir
unset port_unpack
unset port_patch
unset port_configure
unset port_build
unset port_install
unset port_uninstall
export DESTDIR=${DESTDIR:-"$LUNA_ROOT/initrd"} export DESTDIR=${DESTDIR:-"$LUNA_ROOT/initrd"}
export listdir=$PWD export listdir=$PWD
@ -90,7 +105,10 @@ cd $installdir
echo "Installing $pkgname version $pkgver..." echo "Installing $pkgname version $pkgver..."
port_install port_install
echo "$pkgname" >> $listdir/ports.list if ! [ "$SKIP_ADD_TO_PORTS_LIST" = "1" ]
cat $listdir/ports.list | sort | uniq | tee $listdir/ports.list >/dev/null # avoid duplicates then
echo "$pkgname" >> $listdir/ports.list
cat $listdir/ports.list | sort | uniq | tee $listdir/ports.list >/dev/null # avoid duplicates
echo "Success! Registered port: $pkgname version $pkgver." echo "Success! Registered port: $pkgname version $pkgver."
fi

View File

@ -32,15 +32,6 @@ diff --color -rN -u bc-vanilla/include/library.h bc-6.0.4/include/library.h
diff --color -rN -u bc-vanilla/src/vm.c bc-6.0.4/src/vm.c diff --color -rN -u bc-vanilla/src/vm.c bc-6.0.4/src/vm.c
--- a/bc-6.0.4/src/vm.c 2022-09-26 19:34:35.000000000 +0200 --- a/bc-6.0.4/src/vm.c 2022-09-26 19:34:35.000000000 +0200
+++ b/bc-6.0.4/src/vm.c 2022-10-21 17:29:13.511229371 +0200 +++ b/bc-6.0.4/src/vm.c 2022-10-21 17:29:13.511229371 +0200
@@ -49,7 +49,7 @@
#include <sys/types.h>
#include <unistd.h>
-#else // _WIN32
+#else
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -193,7 +193,7 @@ @@ -193,7 +193,7 @@
static void static void
bc_vm_sigaction(void) bc_vm_sigaction(void)

View File

@ -4,20 +4,21 @@ set -e
source $(dirname $0)/../tools/env.sh source $(dirname $0)/../tools/env.sh
export DESTDIR=$PWD/pkgroot
export SKIP_ADD_TO_PORTS_LIST=1
source $LUNA_ROOT/ports/$1/package.sh source $LUNA_ROOT/ports/$1/package.sh
mkdir $PWD/pkgroot mkdir pkgroot
DESTDIR=$PWD/pkgroot $LUNA_ROOT/ports/add-port.sh $pkgname $LUNA_ROOT/ports/add-port.sh $pkgname
cd pkgroot cd pkgroot
tar cJf ../$pkgname-$pkgver.pkg.tar.xz * tar cJf ../$pkgname-$pkgver.pkg.tar.xz *
cd .. cd -
DESTDIR=$PWD/pkgroot $LUNA_ROOT/ports/remove-port.sh $pkgname rm -rf pkgroot
rm -rf $PWD/pkgroot
echo "Built package $pkgname-$pkgver.pkg.tar.xz" echo "Built package $pkgname-$pkgver.pkg.tar.xz"