Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,447 changes: 2,447 additions & 0 deletions autom4te.log

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions index.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ supported_packages = [
"libpng",
"libssh2",
"libtool",
"libuv",
"llhttp",
"lz4",
"m4",
Expand Down
19 changes: 19 additions & 0 deletions packages/libuv/1.51.0/targets.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version = "1.51.0"
license = { all = ["MIT", "BSD-2-Clause", "ISC"] }
dependencies = []
build_dependencies = []
external_test_files = ["test.c"]

[source]
url = "https://dist.libuv.org/dist/v1.51.0/libuv-v1.51.0.tar.gz"
checksum = "5f0557b90b1106de71951a3c3931de5e0430d78da1d9a10287ebc7a3f78ef8eb"
size = 1343638

[targets.mac]
build_dependencies = ["autoconf", "automake", "libtool"]

[targets.linux]
build_dependencies = ["autoconf", "automake", "libtool", "m4"]

[targets.windows]
build_dependencies = ["cmake"]
13 changes: 13 additions & 0 deletions packages/libuv/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cd libuv-%PACKIT_PACKAGE_VERSION%

cmake -S . -B build -DCMAKE_INSTALL_PREFIX="%PACKIT_PACKAGE_PATH%" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

cmake --build build --config Release
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

ctest --verbose -C Release
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

cmake --install build --config Release
if ERRORLEVEL 1 exit /b %ERRORLEVEL%
12 changes: 12 additions & 0 deletions packages/libuv/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
cd "libuv-v$PACKIT_PACKAGE_VERSION"

./autogen.sh

./configure --prefix=$PACKIT_PACKAGE_PATH

make

make check

make install
8 changes: 8 additions & 0 deletions packages/libuv/package.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name = "libuv"
description = "An asynchronous I/O multi-platform support library"
homepage = "https://libuv.org"
versions = ["1.51.0"]

[supported_versions]
unix = "1.51.0"
windows = "1.51.0"
35 changes: 35 additions & 0 deletions packages/libuv/test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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% %PACKIT_OUTPUTS% >&3

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 Call vcvarsall.bat to set MSVC build environment
call "%VCVARSALL%" %ARCH% %PACKIT_OUTPUTS% >&3

cl /I "%PACKIT_PACKAGE_PATH%\include" test.c /Fe:test.exe /link /LIBPATH:"%PACKIT_PACKAGE_PATH%\lib" libuv.lib %PACKIT_OUTPUTS% >&3 2>&3
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

.\test.exe %PACKIT_OUTPUTS% >&3
if ERRORLEVEL 1 exit /b %ERRORLEVEL%
40 changes: 40 additions & 0 deletions packages/libuv/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <uv.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

/* Timer callback */
void on_timer(uv_timer_t* timer) {
timer->data = "Hello everything is completely fine!";

uv_timer_stop(timer);
uv_close((uv_handle_t*)timer, NULL);
}

int main() {
uv_loop_t *loop = uv_default_loop();
if (loop == NULL) {
printf("Failed to create uv loop\n");
return 1;
}

// Create timer
uv_timer_t timer;
uv_timer_init(loop, &timer);

char data[] = "Hello everything is VERY WRONG";
timer.data = &data;

// Only wait for 1ms for quick test
uv_timer_start(&timer, on_timer, 1, 0);
uv_run(loop, UV_RUN_DEFAULT);

if (strcmp(timer.data, "Hello everything is completely fine!")) {
printf("Timer wasn't triggered");
return 1;
}

uv_loop_close(loop);

return 0;
}
5 changes: 5 additions & 0 deletions packages/libuv/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

gcc -L "$PACKIT_PACKAGE_PATH/lib" -I "$PACKIT_PACKAGE_PATH/include" -Wl,-rpath,"$PACKIT_PACKAGE_PATH/lib" test.c -o test -luv

./test