From 0966be64b0cc1d4b2a57beeb023a00450f7b1a9c Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 22 Oct 2024 17:12:23 +0200 Subject: [PATCH] remove lhelper script, build configuration and dependency support (#1906) * remove lhelper script, build configuration and dependency support * turn lhelper flag into a error --- build.lhelper | 8 ---- scripts/install-dependencies.sh | 29 +++---------- scripts/lhelper.sh | 73 --------------------------------- 3 files changed, 6 insertions(+), 104 deletions(-) delete mode 100644 build.lhelper delete mode 100644 scripts/lhelper.sh diff --git a/build.lhelper b/build.lhelper deleted file mode 100644 index 1fcdca3a..00000000 --- a/build.lhelper +++ /dev/null @@ -1,8 +0,0 @@ -CC="${CC:-gcc}" -CXX="${CXX:-g++}" -CFLAGS= -CXXFLAGS= -LDFLAGS= -BUILD_TYPE=Release - -packages=(pcre2 freetype2 sdl2 lua) diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 00606944..fb593ca6 100644 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -14,20 +14,16 @@ show_help() { echo echo "Available options:" echo - echo "-l --lhelper Install tools required by LHelper and doesn't" - echo " install external libraries." echo " --debug Debug this script." echo } main() { - local lhelper=false - for i in "$@"; do case $i in -s|--lhelper) - lhelper=true - shift + echo "error: support for lhelper has been deprecated" >> /dev/stderr + exit 1 ;; --debug) set -x @@ -45,27 +41,14 @@ main() { fi if [[ "$OSTYPE" == "linux"* ]]; then - if [[ $lhelper == true ]]; then - sudo apt-get install -qq ninja-build - else - sudo apt-get install -qq libfuse2 ninja-build wayland-protocols libsdl2-dev libfreetype6 - fi + sudo apt-get install -qq libfuse2 ninja-build wayland-protocols libsdl2-dev libfreetype6 pip3 install meson elif [[ "$OSTYPE" == "darwin"* ]]; then - if [[ $lhelper == true ]]; then - brew install bash md5sha1sum ninja - else - brew install bash ninja sdl2 - fi + brew install bash ninja sdl2 pip3 install meson dmgbuild elif [[ "$OSTYPE" == "msys" ]]; then - if [[ $lhelper == true ]]; then - pacman --noconfirm -S \ - ${MINGW_PACKAGE_PREFIX}-{ca-certificates,gcc,meson,ninja,ntldd,pkg-config,mesa} unzip - else - pacman --noconfirm -S \ - ${MINGW_PACKAGE_PREFIX}-{ca-certificates,gcc,meson,ninja,ntldd,pkg-config,mesa,freetype,pcre2,SDL2} unzip - fi + pacman --noconfirm -S \ + ${MINGW_PACKAGE_PREFIX}-{ca-certificates,gcc,meson,ninja,ntldd,pkg-config,mesa,freetype,pcre2,SDL2} unzip fi } diff --git a/scripts/lhelper.sh b/scripts/lhelper.sh deleted file mode 100644 index 8d7ccded..00000000 --- a/scripts/lhelper.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -set -e - -show_help() { - echo - echo "Usage: $0 " - echo - echo "Available options:" - echo - echo " --debug Debug this script." - echo "-h --help Show this help and exit." - echo "-p --prefix PREFIX Install directory prefix." - echo " Default: '$HOME/.local'." - echo -} - -main() { - local lhelper_prefix="$HOME/.local" - - for i in "$@"; do - case $i in - -h|--help) - show_help - exit 0 - ;; - -p|--prefix) - lhelper_prefix="$2" - echo "LHelper prefix set to: \"${lhelper_prefix}\"" - shift - shift - ;; - --debug) - set -x - shift - ;; - *) - # unknown option - ;; - esac - done - - if [[ -n $1 ]]; then show_help; exit 1; fi - - if [[ ! -f ${lhelper_prefix}/bin/lhelper ]]; then - - git clone https://github.com/franko/lhelper.git - - # FIXME: This should be set in ~/.bash_profile if not using CI - # export PATH="${HOME}/.local/bin:${PATH}" - mkdir -p "${lhelper_prefix}/bin" - pushd lhelper; bash install "${lhelper_prefix}"; popd - - if [[ "$OSTYPE" == "darwin"* ]]; then - CC=clang CXX=clang++ lhelper create build - else - lhelper create lite-xl build - fi - fi - - # Not using $(lhelper activate lite-xl) to support CI - source "$(lhelper env-source build)" - - # Help MSYS2 to find the SDL2 include and lib directories to avoid errors - # during build and linking when using lhelper. - # Francesco: not sure why this is needed. I have never observed the problem when - # building on window. - # if [[ "$OSTYPE" == "msys" ]]; then - # CFLAGS=-I${LHELPER_ENV_PREFIX}/include/SDL2 - # LDFLAGS=-L${LHELPER_ENV_PREFIX}/lib - # fi -} - -main "$@"