Skip to content

Commit

Permalink
enhance(main/{plutolang->libpluto}): several changes
Browse files Browse the repository at this point in the history
* rename plutolang to libpluto
* rename subpkg libpluto to plutolang
* build package with php scripts instead
  • Loading branch information
mbekkomo committed Aug 27, 2024
1 parent 36a2c69 commit 7d18253
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 178 deletions.
4 changes: 2 additions & 2 deletions packages/hugo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://gohugo.io/
TERMUX_PKG_DESCRIPTION="A fast and flexible static site generator"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.133.0"
TERMUX_PKG_VERSION="0.133.1"
TERMUX_PKG_SRCURL=https://github.com/gohugoio/hugo/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=98685a1ac7cceef51f4f23a8fa5a86a32db18c21c3a3f380a5d8a211c420caba
TERMUX_PKG_SHA256=36bc419ed33b9a2accfbb2c947c261002a25f7b1bfad7c42a7874247e7bf1688
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libc++"

Expand Down
44 changes: 44 additions & 0 deletions packages/libpluto/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
TERMUX_PKG_HOMEPAGE=https://plutolang.github.io/
TERMUX_PKG_DESCRIPTION="Shared library for the Pluto interpreter"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Komo @cattokomo"
TERMUX_PKG_VERSION="0.9.4"
TERMUX_PKG_SRCURL=https://github.com/PlutoLang/Pluto/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=6a4fae052a9ad47e29a6767047c3e55ab5c887486d14e39248657ff43b45875c
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libc++"
TERMUX_PKG_BUILD_DEPENDS="readline"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_BREAKS="plutolang (<< 0.9.4-2)"
TERMUX_PKG_REPLACES="plutolang (<< 0.9.4-2)"

# can't use php version from termux repo, there's no build for the version
_php_version="8.3.9"
_tarball_checksum="6c7b45dabc362c9c447c6c9688f8922d0cfa3d5c4618d632c504342d37085e2f"

termux_step_configure() {
mkdir -p "${TERMUX_PKG_CACHEDIR}/php"
termux_download "https://dl.static-php.dev/static-php-cli/common/php-${_php_version}-cli-linux-x86_64.tar.gz" \
"${TERMUX_PKG_CACHEDIR}/php.tar.gz" \
"${_tarball_checksum}"
tar -zxf "${TERMUX_PKG_CACHEDIR}/php.tar.gz" -C "${TERMUX_PKG_CACHEDIR}/php"
chmod +x "${TERMUX_PKG_CACHEDIR}/php/php"
export PATH="${TERMUX_PKG_CACHEDIR}/php:$PATH"
}

termux_step_make() {
local build linkreadline
CXXFLAGS+=" -DLUA_USE_LINUX -DLUA_USE_READLINE"
CXXFLAGS="${CPPFLAGS} ${CXXFLAGS}" php scripts/compile.php "${CXX}"
for build in pluto plutoc shared static; do
linkreadline=""
[[ "$build" == "pluto" ]] && linkreadline="-lreadline"
ANDROID_ROOT= LDFLAGS="${LDFLAGS} ${linkreadline}" php scripts/link_"$build".php "${CXX}"
done
}

termux_step_make_install() {
install -Dm755 -t "${TERMUX_PREFIX}/bin" src/pluto{,c}
install -Dm644 -t "${TERMUX_PREFIX}/lib" src/libpluto{.so,static.a}
install -Dm644 -t "${TERMUX_PREFIX}/include" src/{lua,lauxlib,lualib,luaconf}.h src/lua.hpp
}
3 changes: 3 additions & 0 deletions packages/libpluto/plutolang.subpackage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TERMUX_SUBPKG_INCLUDE="bin/"
TERMUX_SUBPKG_DEPENDS="readline"
TERMUX_SUBPKG_DESCRIPTION="A superset of Lua 5.4 with a focus on general-purpose programming."
24 changes: 24 additions & 0 deletions packages/libpluto/scripts-common.php.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/scripts/common.php b/scripts/common.php
index 66ea1d0..366643f 100644
--- a/scripts/common.php
+++ b/scripts/common.php
@@ -44,12 +44,19 @@ function check_compiler()
}
}
}
+ if (getenv("CXXFLAGS"))
+ {
+ $compiler .= " ".getenv("CXXFLAGS");
+ }
}

function prepare_link()
{
global $compiler;
$compiler .= " -L".__DIR__."/../src/vendor/Soup -lsoup";
+ if (getenv("LDFLAGS")) {
+ $compiler .= " ".getenv("LDFLAGS");
+ }
}

function resolve_installed_program($exe)
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/nnn/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/jarun/nnn
TERMUX_PKG_DESCRIPTION="Free, fast, friendly file browser"
TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.9"
TERMUX_PKG_VERSION="5.0"
TERMUX_PKG_SRCURL=https://github.com/jarun/nnn/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=9e25465a856d3ba626d6163046669c0d4010d520f2fb848b0d611e1ec6af1b22
TERMUX_PKG_SHA256=31e8fd85f3dd7ab2bf0525c3c0926269a1e6d35a5343a6714315642370d8605a
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="file, findutils, readline, wget, libandroid-support, lzip"
TERMUX_PKG_BUILD_IN_SRC=true
Expand Down
39 changes: 0 additions & 39 deletions packages/plutolang/Makefile.patch

This file was deleted.

26 changes: 0 additions & 26 deletions packages/plutolang/build.sh

This file was deleted.

17 changes: 0 additions & 17 deletions packages/plutolang/intrin-detection.patch

This file was deleted.

30 changes: 0 additions & 30 deletions packages/plutolang/intrin-patch.patch

This file was deleted.

2 changes: 0 additions & 2 deletions packages/plutolang/libpluto.subpackage.sh

This file was deleted.

55 changes: 0 additions & 55 deletions packages/plutolang/src-Makefile.patch

This file was deleted.

5 changes: 2 additions & 3 deletions packages/tree-sitter/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/tree-sitter/tree-sitter
TERMUX_PKG_DESCRIPTION="An incremental parsing system for programming tools"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
TERMUX_PKG_VERSION="0.22.6"
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION="0.23.0"
TERMUX_PKG_SRCURL=https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=e2b687f74358ab6404730b7fb1a1ced7ddb3780202d37595ecd7b20a8f41861f
TERMUX_PKG_SHA256=6403b361b0014999e96f61b9c84d6950d42f0c7d6e806be79382e0232e48a11b
TERMUX_PKG_BREAKS="libtreesitter"
TERMUX_PKG_REPLACES="libtreesitter"
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
4 changes: 2 additions & 2 deletions x11-packages/nextcloud-client/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://nextcloud.com/
TERMUX_PKG_DESCRIPTION="Command-line client tool for Nextcloud."
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.13.2"
TERMUX_PKG_VERSION="3.13.3"
TERMUX_PKG_SRCURL="https://github.com/nextcloud/desktop/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=81670e54ff53761d506e523d75d0bc9220a5ef5002e3aeebe1f9750dedc1d28d
TERMUX_PKG_SHA256=4f1b0ffae207a8ab29d10f9cb6d51e107263cf45d138234bd8be1554eb12661f
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="dbus, dbus-glib, libdbusmenu-qt, qtkeychain, qt5-qtbase, qt5-qttools, inotify-tools, libsqlite, karchive, qt5-qtwebsockets, qt5-qtsvg, qt5-qtwebengine"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools, qt5-qttools-cross-tools, pkg-config, qt5-qmake, qt5-qtbase, qt5-qttools"
Expand Down

0 comments on commit 7d18253

Please sign in to comment.