-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance(main/{plutolang->libpluto}): several changes
* rename plutolang to libpluto * rename subpkg libpluto to plutolang * build package with php scripts instead
- Loading branch information
Showing
15 changed files
with
79 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters