From 6ae1dbe1dec477ed347294adc0680da06f674875 Mon Sep 17 00:00:00 2001 From: "Mr.Panda-Developer" Date: Fri, 4 Sep 2026 09:35:26 +0200 Subject: [PATCH 01/10] add lua an nvim to the package repository --- packages/lua/5.5.1/targets.toml | 32 +++++++++++++++ packages/lua/build.bat | 61 +++++++++++++++++++++++++++++ packages/lua/build.sh | 30 ++++++++++++++ packages/lua/package.toml | 8 ++++ packages/lua/test.bat | 57 +++++++++++++++++++++++++++ packages/lua/test.sh | 47 ++++++++++++++++++++++ packages/neovim/0.12.4/targets.toml | 32 +++++++++++++++ packages/neovim/build.bat | 41 +++++++++++++++++++ packages/neovim/build.sh | 12 ++++++ packages/neovim/package.toml | 8 ++++ 10 files changed, 328 insertions(+) create mode 100644 packages/lua/5.5.1/targets.toml create mode 100644 packages/lua/build.bat create mode 100644 packages/lua/build.sh create mode 100644 packages/lua/package.toml create mode 100644 packages/lua/test.bat create mode 100644 packages/lua/test.sh create mode 100644 packages/neovim/0.12.4/targets.toml create mode 100644 packages/neovim/build.bat create mode 100644 packages/neovim/build.sh create mode 100644 packages/neovim/package.toml diff --git a/packages/lua/5.5.1/targets.toml b/packages/lua/5.5.1/targets.toml new file mode 100644 index 0000000..d33af25 --- /dev/null +++ b/packages/lua/5.5.1/targets.toml @@ -0,0 +1,32 @@ +version = "5.5.1" +license = "MIT license" + +dependencies = [ + +] + +build_dependencies = [ + make, +] + +[source.unix] +url = "https://github.com/lua/lua/releases/tag/v5.5.1.tar.gz" +mirrors = [ +] +checksum = "1c4b4068d67061f2a2231ad2b5422e77acea1487ea9890f6320af614f4373dce" + +[source.windows] +url = "https://github.com/lua/lua/releases/tag/v5.5.1.tar.gz" +mirrors = [ +] +checksum = "1c4b4068d67061f2a2231ad2b5422e77acea1487ea9890f6320af614f4373dce" + +[targets.linux] +source = "unix" + +[targets.mac] +source = "unix" +skip_symlinking = true + +[targets.windows] +source = "windows" \ No newline at end of file diff --git a/packages/lua/build.bat b/packages/lua/build.bat new file mode 100644 index 0000000..fa33246 --- /dev/null +++ b/packages/lua/build.bat @@ -0,0 +1,61 @@ +cd lua-%PACKIT_PACKAGE_VERSION% + +REM Read Visual Studio install path +for /f "tokens=* usebackq" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere" -latest -property installationPath`) do ( + set "VSPATH=%%i" +) + +if not exist "%VSPATH%" ( + echo Visual Studio cannot be loaded from %VSPATH% + exit /b 1 +) + +REM Check if vcvarsall.bat exists +set "VCVARSALL=%VSPATH%\VC\Auxiliary\Build\vcvarsall.bat" +if not exist "%VCVARSALL%" ( + echo vcvarsall.bat cannot be loaded from %VCVARSALL% + exit /b 1 +) + +echo Found vcvarsall.bat at %VCVARSALL% + +REM Retrieve architecture from target +if "%PACKIT_TARGET%"=="x86_64-pc-windows-msvc" ( + set "ARCH=x64" +) else if "%PACKIT_TARGET%"=="aarch64-pc-windows-msvc" ( + set "ARCH=arm64" +) else ( + echo Target %PACKIT_TARGET% is not supported for this package + exit /b 1 +) + +REM Set MSVC build environment +call "%VCVARSALL%" %ARCH% +if ERRORLEVEL 1 ( + echo Failed to initialize Visual Studio build environment + exit /b %ERRORLEVEL% +) + +REM Build Lua +make +if ERRORLEVEL 1 ( + echo Lua build failed + exit /b %ERRORLEVEL% +) + +REM Install binaries +robocopy src "%PACKIT_PACKAGE_PATH%\bin" lua.exe lua.exe +if %ERRORLEVEL% GEQ 8 exit /b %ERRORLEVEL% + +robocopy src "%PACKIT_PACKAGE_PATH%\bin" luac.exe luac.exe +if %ERRORLEVEL% GEQ 8 exit /b %ERRORLEVEL% + +REM Install headers +robocopy src "%PACKIT_PACKAGE_PATH%\include" lua.h lualib.h lauxlib.h luaconf.h +if %ERRORLEVEL% GEQ 8 exit /b %ERRORLEVEL% + +REM Install library +robocopy src "%PACKIT_PACKAGE_PATH%\lib" lua.lib +if %ERRORLEVEL% GEQ 8 exit /b %ERRORLEVEL% + +exit /b 0 \ No newline at end of file diff --git a/packages/lua/build.sh b/packages/lua/build.sh new file mode 100644 index 0000000..6826f69 --- /dev/null +++ b/packages/lua/build.sh @@ -0,0 +1,30 @@ +```sh +#!/bin/sh + +cd lua-$PACKIT_PACKAGE_VERSION + +# Build Lua +make + +if [ $? -ne 0 ]; then + echo "Lua build failed" + exit 1 +fi + +# Install Lua into the Packit package directory +make install INSTALL_TOP="$PACKIT_PACKAGE_PATH" + +if [ $? -ne 0 ]; then + echo "Lua installation failed" + exit 1 +fi + +# Move man pages to share/man +if [ -d "$PACKIT_PACKAGE_PATH/man" ]; then + mkdir -p "$PACKIT_PACKAGE_PATH/share/man" + mv "$PACKIT_PACKAGE_PATH/man/man1" "$PACKIT_PACKAGE_PATH/share/man/man1" + rmdir "$PACKIT_PACKAGE_PATH/man" +fi + +exit 0 +``` diff --git a/packages/lua/package.toml b/packages/lua/package.toml new file mode 100644 index 0000000..6166992 --- /dev/null +++ b/packages/lua/package.toml @@ -0,0 +1,8 @@ +name = "lua" +description = "The lua language" +homepage = "https://lua.org/home.html" +versions = [ "5.5.1"] + +[supported_versions] +unix = "5.5.1" +windows = "5.5.1" \ No newline at end of file diff --git a/packages/lua/test.bat b/packages/lua/test.bat new file mode 100644 index 0000000..de452bc --- /dev/null +++ b/packages/lua/test.bat @@ -0,0 +1,57 @@ +```bat +@echo off + +set "TEST_TEXT=shoot for the stars, aim for the moon" + +REM Test Lua interpreter +for /f "delims=" %%i in ('"%PACKIT_PACKAGE_PATH%\bin\lua.exe" -e "print(""shoot for the stars, aim for the moon"")"') do ( + set "RESULT=%%i" +) + +if not "%RESULT%"=="%TEST_TEXT%" ( + echo Lua interpreter test failed + exit /b 1 +) + +REM Create a Lua source file +echo print("shoot for the stars, aim for the moon") > test.lua + +REM Test running a Lua source file +set "RESULT=" +for /f "delims=" %%i in ('"%PACKIT_PACKAGE_PATH%\bin\lua.exe" test.lua') do ( + set "RESULT=%%i" +) + +if not "%RESULT%"=="%TEST_TEXT%" ( + echo Lua script execution test failed + del /q test.lua + exit /b 1 +) + +REM Test Lua compiler +"%PACKIT_PACKAGE_PATH%\bin\luac.exe" -o test.luac test.lua + +if ERRORLEVEL 1 ( + echo Lua compiler test failed + del /q test.lua + exit /b 1 +) + +REM Test running compiled Lua bytecode +set "RESULT=" +for /f "delims=" %%i in ('"%PACKIT_PACKAGE_PATH%\bin\lua.exe" test.luac') do ( + set "RESULT=%%i" +) + +if not "%RESULT%"=="%TEST_TEXT%" ( + echo Lua bytecode execution test failed + del /q test.lua + del /q test.luac + exit /b 1 +) + +del /q test.lua +del /q test.luac + +exit /b 0 +``` diff --git a/packages/lua/test.sh b/packages/lua/test.sh new file mode 100644 index 0000000..ebfb976 --- /dev/null +++ b/packages/lua/test.sh @@ -0,0 +1,47 @@ +```sh +#!/bin/sh + +test_text="shoot for the stars, aim for the moon" + +# Test Lua interpreter +result=$("$PACKIT_PACKAGE_PATH/bin/lua" -e 'print("shoot for the stars, aim for the moon")') + +if [ "$result" != "$test_text" ]; then + echo "Lua interpreter test failed" + exit 1 +fi + +# Create a Lua source file +echo 'print("shoot for the stars, aim for the moon")' > test.lua + +# Test running a Lua source file +result=$("$PACKIT_PACKAGE_PATH/bin/lua" test.lua) + +if [ "$result" != "$test_text" ]; then + echo "Lua script execution test failed" + rm -f test.lua + exit 1 +fi + +# Test Lua compiler +"$PACKIT_PACKAGE_PATH/bin/luac" -o test.luac test.lua + +if [ $? -ne 0 ]; then + echo "Lua compiler test failed" + rm -f test.lua + exit 1 +fi + +# Test running compiled Lua bytecode +result=$("$PACKIT_PACKAGE_PATH/bin/lua" test.luac) + +if [ "$result" != "$test_text" ]; then + echo "Lua bytecode execution test failed" + rm -f test.lua test.luac + exit 1 +fi + +rm -f test.lua test.luac + +exit 0 +``` diff --git a/packages/neovim/0.12.4/targets.toml b/packages/neovim/0.12.4/targets.toml new file mode 100644 index 0000000..6953d25 --- /dev/null +++ b/packages/neovim/0.12.4/targets.toml @@ -0,0 +1,32 @@ +version = "0.12.4" +license = "Apache 2.0" + +dependencies = [ + gettext, +] + +build_dependencies = [ + cmake, +] + +[source.unix] +url = "https://github.com/neovim/neovim/archive/refs/tags/v0.12.4.tar.gz" +mirrors = [ +] +checksum = "2727da95d2b8b809bc7c71e085452e47dfe1d8aa7cfaa15c68004e23f6f0a6dd" + +[source.windows] +url = "https://github.com/neovim/neovim/archive/refs/tags/v0.12.4.tar.gz" +mirrors = [ +] +checksum = "2727da95d2b8b809bc7c71e085452e47dfe1d8aa7cfaa15c68004e23f6f0a6dd" + +[targets.linux] +source = "unix" + +[targets.mac] +source = "unix" +skip_symlinking = true + +[targets.windows] +source = "windows" \ No newline at end of file diff --git a/packages/neovim/build.bat b/packages/neovim/build.bat new file mode 100644 index 0000000..8c7f586 --- /dev/null +++ b/packages/neovim/build.bat @@ -0,0 +1,41 @@ +@echo off + +cd neovim-%PACKIT_PACKAGE_VERSION% + +REM Read Visual Studio install path +for /f "tokens=* usebackq" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere" -latest -property installationPath`) do ( + set VSPATH=%%i +) + +if not exist "%VSPATH%" ( + echo Visual Studio cannot be loaded from %VSPATH% + exit /b 1 +) + +set "VCVARSALL=%VSPATH%\VC\Auxiliary\Build\vcvarsall.bat" +if not exist "%VCVARSALL%" ( + echo vcvarsall.bat cannot be loaded from %VCVARSALL% + exit /b 1 +) + +if "%PACKIT_TARGET%"=="x86_64-pc-windows-msvc" ( + set ARCH=x64 +) else if "%PACKIT_TARGET%"=="aarch64-pc-windows-msvc" ( + set ARCH=arm64 +) else ( + echo Unsupported target %PACKIT_TARGET% + exit /b 1 +) + +call "%VCVARSALL%" %ARCH% + +cmake -B build ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_PREFIX="%PACKIT_PACKAGE_PATH%" +if ERRORLEVEL 1 exit /b %ERRORLEVEL% + +cmake --build build --config Release +if ERRORLEVEL 1 exit /b %ERRORLEVEL% + +cmake --install build --config Release +if ERRORLEVEL 1 exit /b %ERRORLEVEL% \ No newline at end of file diff --git a/packages/neovim/build.sh b/packages/neovim/build.sh new file mode 100644 index 0000000..24ebda8 --- /dev/null +++ b/packages/neovim/build.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +cd "neovim-$PACKIT_PACKAGE_VERSION" + +cmake -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$PACKIT_PACKAGE_PATH" + +cmake --build build + +cmake --install build \ No newline at end of file diff --git a/packages/neovim/package.toml b/packages/neovim/package.toml new file mode 100644 index 0000000..99b0e61 --- /dev/null +++ b/packages/neovim/package.toml @@ -0,0 +1,8 @@ +name = "neovim" +description = "hyperextensible Vim-based text editor" +homepage = "https://github.com/neovim/neovim" +versions = [ "0.12.4"] + +[supported_versions] +unix = "0.12.4" +windows = "0.12.4" \ No newline at end of file From c108933894b0ba7999ebd198b8fa7760f06df44a Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:15:18 +0200 Subject: [PATCH 02/10] Update the build dependencies Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/5.5.1/targets.toml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/lua/5.5.1/targets.toml b/packages/lua/5.5.1/targets.toml index d33af25..fe9def6 100644 --- a/packages/lua/5.5.1/targets.toml +++ b/packages/lua/5.5.1/targets.toml @@ -1,13 +1,7 @@ version = "5.5.1" license = "MIT license" - -dependencies = [ - -] - -build_dependencies = [ - make, -] +dependencies = [] +build_dependencies = [] [source.unix] url = "https://github.com/lua/lua/releases/tag/v5.5.1.tar.gz" From 4e1a3a1fd4f8fce42742264a451b13953c0cc938 Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:15:54 +0200 Subject: [PATCH 03/10] Shorten url sources Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/5.5.1/targets.toml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/lua/5.5.1/targets.toml b/packages/lua/5.5.1/targets.toml index fe9def6..2aabe46 100644 --- a/packages/lua/5.5.1/targets.toml +++ b/packages/lua/5.5.1/targets.toml @@ -3,16 +3,8 @@ license = "MIT license" dependencies = [] build_dependencies = [] -[source.unix] +[source] url = "https://github.com/lua/lua/releases/tag/v5.5.1.tar.gz" -mirrors = [ -] -checksum = "1c4b4068d67061f2a2231ad2b5422e77acea1487ea9890f6320af614f4373dce" - -[source.windows] -url = "https://github.com/lua/lua/releases/tag/v5.5.1.tar.gz" -mirrors = [ -] checksum = "1c4b4068d67061f2a2231ad2b5422e77acea1487ea9890f6320af614f4373dce" [targets.linux] From a7c166eded7bab17feac1eb307ad1f5a19b85c4f Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:17:24 +0200 Subject: [PATCH 04/10] Update the test failed Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lua/test.bat b/packages/lua/test.bat index de452bc..d57568a 100644 --- a/packages/lua/test.bat +++ b/packages/lua/test.bat @@ -44,7 +44,7 @@ for /f "delims=" %%i in ('"%PACKIT_PACKAGE_PATH%\bin\lua.exe" test.luac') do ( ) if not "%RESULT%"=="%TEST_TEXT%" ( - echo Lua bytecode execution test failed + echo Test failed: Lua bytecode execution test failed del /q test.lua del /q test.luac exit /b 1 From a4625c7242470335382589149662cea4ad1103c2 Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:17:53 +0200 Subject: [PATCH 05/10] single source Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/5.5.1/targets.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/lua/5.5.1/targets.toml b/packages/lua/5.5.1/targets.toml index 2aabe46..7ce1fc3 100644 --- a/packages/lua/5.5.1/targets.toml +++ b/packages/lua/5.5.1/targets.toml @@ -11,7 +11,6 @@ checksum = "1c4b4068d67061f2a2231ad2b5422e77acea1487ea9890f6320af614f4373dce" source = "unix" [targets.mac] -source = "unix" skip_symlinking = true [targets.windows] From 0e1726ea8287f73571f3d4f1266febf35ba0feef Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:18:54 +0200 Subject: [PATCH 06/10] Update packages/lua/test.sh Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/test.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/lua/test.sh b/packages/lua/test.sh index ebfb976..aaff012 100644 --- a/packages/lua/test.sh +++ b/packages/lua/test.sh @@ -43,5 +43,3 @@ fi rm -f test.lua test.luac -exit 0 -``` From b7e153f64065ae922c20c3286a86caa55f469568 Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:19:06 +0200 Subject: [PATCH 07/10] Format standard Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lua/test.bat b/packages/lua/test.bat index d57568a..ba78e09 100644 --- a/packages/lua/test.bat +++ b/packages/lua/test.bat @@ -32,7 +32,7 @@ REM Test Lua compiler "%PACKIT_PACKAGE_PATH%\bin\luac.exe" -o test.luac test.lua if ERRORLEVEL 1 ( - echo Lua compiler test failed + echo Test failed: Lua compiler test failed del /q test.lua exit /b 1 ) From 200debe57d9572ae314eddd130c23befe0369984 Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:19:15 +0200 Subject: [PATCH 08/10] Update packages/lua/test.bat Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lua/test.bat b/packages/lua/test.bat index ba78e09..e9812bf 100644 --- a/packages/lua/test.bat +++ b/packages/lua/test.bat @@ -23,7 +23,7 @@ for /f "delims=" %%i in ('"%PACKIT_PACKAGE_PATH%\bin\lua.exe" test.lua') do ( ) if not "%RESULT%"=="%TEST_TEXT%" ( - echo Lua script execution test failed + echo Test failed: Lua script execution test failed del /q test.lua exit /b 1 ) From 24e7c3f5ee07a9006d7543974d2b5e2442c67325 Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:19:21 +0200 Subject: [PATCH 09/10] Update packages/lua/test.bat Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lua/test.bat b/packages/lua/test.bat index e9812bf..f7e1ec0 100644 --- a/packages/lua/test.bat +++ b/packages/lua/test.bat @@ -9,7 +9,7 @@ for /f "delims=" %%i in ('"%PACKIT_PACKAGE_PATH%\bin\lua.exe" -e "print(""shoot ) if not "%RESULT%"=="%TEST_TEXT%" ( - echo Lua interpreter test failed + echo Test failed: Lua interpreter test failed exit /b 1 ) From 4a0bcb6b695c2eb84370141536b187d349c8a1ed Mon Sep 17 00:00:00 2001 From: "Mr.panda" Date: Sat, 5 Sep 2026 20:19:31 +0200 Subject: [PATCH 10/10] Update packages/lua/5.5.1/targets.toml Co-authored-by: Max <87335212+Max13245@users.noreply.github.com> --- packages/lua/5.5.1/targets.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/lua/5.5.1/targets.toml b/packages/lua/5.5.1/targets.toml index 7ce1fc3..dd30fcc 100644 --- a/packages/lua/5.5.1/targets.toml +++ b/packages/lua/5.5.1/targets.toml @@ -8,7 +8,6 @@ url = "https://github.com/lua/lua/releases/tag/v5.5.1.tar.gz" checksum = "1c4b4068d67061f2a2231ad2b5422e77acea1487ea9890f6320af614f4373dce" [targets.linux] -source = "unix" [targets.mac] skip_symlinking = true