Skip to content

Commit

Permalink
Merge pull request #42 from project-81/dev/ubuntu-24
Browse files Browse the repository at this point in the history
Updates for Ubuntu 24 / Raspberry Pi 5
  • Loading branch information
vkottler authored May 15, 2024
2 parents f8c7437 + c955308 commit b4ab892
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 8 deletions.
10 changes: 10 additions & 0 deletions data/lua-5.4.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version=5.4.6
prefix=/usr/local
libdir=/usr/local/lib
includedir=/usr/local/include

Name: Lua
Description: A powerful, fast, lightweight, embeddable scripting language
Version: 5.4.6
Cflags: -I${includedir}
Libs: -L${libdir} -llua -lm
1 change: 0 additions & 1 deletion scripts/sh/install_arm_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ BASE_URL=https://developer.arm.com/-/media/Files/downloads/gnu

GCC_VERSION=12.2
VARIANT=mpacbti-rel1
HOST_ARCH=$(uname -m)
TOOLCHAIN=arm-none-eabi

DIRECTORY=arm-gnu-toolchain-$GCC_VERSION.$VARIANT-$HOST_ARCH-$TOOLCHAIN
Expand Down
16 changes: 12 additions & 4 deletions scripts/sh/install_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
sudo apt-get update && sudo apt-get upgrade -y

# micropython circuitpython
TASKS+=(git python rcmpy neovim zsh ninja-src tio clang)
TASKS+=(git python rcmpy pkgconf lua neovim zsh ninja-src tio clang)

TASKS+=(picotool go fzf-src rust)
TASKS+=(picotool go fzf-src rust locale)

if is_rpi; then
run_install raspberrypi
Expand All @@ -14,18 +14,26 @@ fi
# build tools
PACKAGES+=(cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential)
PACKAGES+=(libstdc++-arm-none-eabi-newlib mold gcc-13 g++-13)
PACKAGES+=(emscripten)

# gnu
PACKAGES+=(autoconf automake texinfo flex bison help2man gawk libtool-bin)

# unused: swig
PACKAGES+=(device-tree-compiler pkgconf libncurses-dev)
PACKAGES+=(device-tree-compiler libncurses-dev)

# gdb and other dev tooling
PACKAGES+=(gdb-multiarch lcov)

# utilities
PACKAGES+=(tmux ack htop mtools shellcheck tree)
PACKAGES+=(tmux ack htop mtools shellcheck tree xdg-utils)

# needed by tio
PACKAGES+=(libglib2.0-dev)

if is_wsl; then
PACKAGES+=(wslu)
fi

if ! is_rpi; then
if ! is_wsl; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/sh/install_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ else

# Determine which variant to download.
VARIANT=""
case $(uname -m) in
case "$HOST_ARCH" in
aarch64)
VARIANT=arm64;;
armv6l)
Expand Down
37 changes: 37 additions & 0 deletions scripts/sh/install_lua.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

PROJECT=lua
export LUA_VERSION=5.4
LUA_RELEASE=6

LUA_VER=$PROJECT-$LUA_VERSION
LUA_SLUG=$LUA_VER.$LUA_RELEASE

# What does any of this do?
# export LUA_DIR=/usr/local/lib/$PROJECT/$LUA_VERSION
# export LUA_CPATH="?.so;$LUA_DIR/?.so"
# export LUA_PATH="?.$PROJECT;$LUA_DIR/?.$PROJECT"

if ! is_cmd $PROJECT; then
safe_pushd "$THIRD_PARTY"

if [ ! -d $LUA_SLUG ]; then
curl -L -R -O https://www.$PROJECT.org/ftp/$LUA_SLUG.tar.gz
tar zxf $LUA_SLUG.tar.gz
rm $LUA_SLUG.tar.gz
fi

safe_pushd $LUA_SLUG

make -j all
make test
sudo_cmd make install

safe_popd

safe_popd

# Copy custom pkgconf file.
sudo_cmd mkdir -p /usr/local/lib/pkgconfig
sudo_cmd cp "$REPO/data/$LUA_VER.pc" /usr/local/lib/pkgconfig
fi
27 changes: 27 additions & 0 deletions scripts/sh/install_pkgconf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

PROJECT=pkgconf

if ! is_cmd $PROJECT; then
clone_third_party_github $PROJECT $PROJECT

safe_pushd "$THIRD_PARTY/$PROJECT"

git checkout $PROJECT-2.2.0

if [ ! -f configure ]; then
./autogen.sh
fi

./configure
make -j

sudo_cmd make install
sudo_cmd ldconfig

safe_popd
fi

if ! is_cmd pkg-config; then
ln -s "$(which $PROJECT)" "$INSTALL_PREFIX/bin/pkg-config"
fi
10 changes: 9 additions & 1 deletion scripts/variables.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export PYTHON_VERSION=3.11
export PYTHON_VERSION=3.12

[ "$GO_VERSION" ] || export GO_VERSION=1.20

Expand All @@ -7,3 +7,11 @@ test "$VENV"

UDEV_DEST=/usr/lib/udev/rules.d
test $UDEV_DEST

HOST_ARCH=$(uname -m)
test "$HOST_ARCH"

# Better place to declare this?
PKG_CONFIG_PATH="/usr/lib/$HOST_ARCH-linux-gnu/pkgconfig"
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/share/pkgconfig"
export PKG_CONFIG_PATH

0 comments on commit b4ab892

Please sign in to comment.