diff options
author | Tim Biermann <tbier@posteo.de> | 2022-11-27 17:59:21 +0000 |
---|---|---|
committer | Tim Biermann <tbier@posteo.de> | 2022-11-27 18:02:43 +0000 |
commit | c58eafabd3b3a30a184ef45877ae30e3d895ff80 (patch) | |
tree | 170a00c0f4f3fcd18f466f47b2f5629236f37455 /libluv | |
parent | 5c13b1034b974c71ad3188b04bec8bd0c19cc40d (diff) | |
download | contrib-c58eafabd3b3a30a184ef45877ae30e3d895ff80.tar.gz contrib-c58eafabd3b3a30a184ef45877ae30e3d895ff80.tar.xz |
libluv: initial commit, version 1.44.2-1
Diffstat (limited to 'libluv')
-rw-r--r-- | libluv/.footprint | 13 | ||||
-rw-r--r-- | libluv/.signature | 6 | ||||
-rw-r--r-- | libluv/Pkgfile | 29 | ||||
-rw-r--r-- | libluv/cmake-use-pkgconfig.patch | 130 |
4 files changed, 178 insertions, 0 deletions
diff --git a/libluv/.footprint b/libluv/.footprint new file mode 100644 index 000000000..0c83b34f3 --- /dev/null +++ b/libluv/.footprint @@ -0,0 +1,13 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/include/luv/ +-rw-r--r-- root/root usr/include/luv/lhandle.h +-rw-r--r-- root/root usr/include/luv/lreq.h +-rw-r--r-- root/root usr/include/luv/luv.h +-rw-r--r-- root/root usr/include/luv/util.h +drwxr-xr-x root/root usr/lib/ +lrwxrwxrwx root/root usr/lib/libluv.so -> libluv.so.1 +lrwxrwxrwx root/root usr/lib/libluv.so.1 -> libluv.so.1.44.2 +-rwxr-xr-x root/root usr/lib/libluv.so.1.44.2 +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/libluv.pc diff --git a/libluv/.signature b/libluv/.signature new file mode 100644 index 000000000..f3a92c843 --- /dev/null +++ b/libluv/.signature @@ -0,0 +1,6 @@ +untrusted comment: verify with /etc/ports/contrib.pub +RWSagIOpLGJF32ZssNjKRIVgKfpjZyYhRfTg4nhoRYuBDeogdXaMB054vY5BaiCVCz8881EXsxCGczEau6yIMMrGTRxaRw9cSgs= +SHA256 (Pkgfile) = adf2d4d377d876443bf3b6814b89d4b376c6a95be1d0ceb05e91f3c89fb9266d +SHA256 (.footprint) = 516781efb8efa86d183ffef362071ac5df318d6bec1a8017316e29018962aa3b +SHA256 (luv-1.44.2-1.tar.gz) = 3eb5c7bc44f61fbc4148ea30e3221d410263e0ffa285672851fc19debf9e5c30 +SHA256 (cmake-use-pkgconfig.patch) = 175ca905788bc0d9ab95b24a3356b8e17811f8c6e698f8516da960709fe9acb8 diff --git a/libluv/Pkgfile b/libluv/Pkgfile new file mode 100644 index 000000000..017935624 --- /dev/null +++ b/libluv/Pkgfile @@ -0,0 +1,29 @@ +# Description: Bare libuv bindings for lua +# URL: https://github.com/luvit/luv +# Maintainer: Tim Biermann, tbier at posteo dot de +# Depends on: libuv luajit + +name=libluv +version=1.44.2-1 +release=1 +source=(https://github.com/luvit/luv/releases/download/$version/luv-$version.tar.gz + cmake-use-pkgconfig.patch) + +build() { + patch -Np1 -d luv-$version -i $SRC/cmake-use-pkgconfig.patch + + cmake -S luv-$version -B build-shared -G Ninja \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \ + -D LUA_BUILD_TYPE=System \ + -D WITH_SHARED_LIBUV=ON \ + -D BUILD_SHARED_LIBS=ON \ + -D BUILD_STATIC_LIBS=OFF \ + -D WITH_LUA_ENGINE=LuaJit \ + -D BUILD_MODULE=OFF \ + -Wno-dev + + cmake --build build-shared + DESTDIR=$PKG cmake --install build-shared +} diff --git a/libluv/cmake-use-pkgconfig.patch b/libluv/cmake-use-pkgconfig.patch new file mode 100644 index 000000000..7081ca67f --- /dev/null +++ b/libluv/cmake-use-pkgconfig.patch @@ -0,0 +1,130 @@ +Upstream: Should be +Reason: Use pkgconfig to find luajit + +diff --git a/cmake/Modules/FindLuaJIT.cmake b/cmake/Modules/FindLuaJIT.cmake +index 0d0786e..3ab8602 100644 +--- a/cmake/Modules/FindLuaJIT.cmake ++++ b/cmake/Modules/FindLuaJIT.cmake +@@ -1,55 +1,72 @@ ++# - Try to find LuaJIT ++# Once done this will define ++# ++# LUAJIT_FOUND - system has LuaJIT ++# LUAJIT_INCLUDE_DIR - the LuaJIT include directory ++# LUAJIT_LIBRARIES - Link these to use LuaJIT ++# LUAJIT_DEFINITIONS - Compiler switches required for using LuaJIT ++# + #============================================================================= +-# Copyright 2007-2009 Kitware, Inc. +-# Copyright 2013 Rolf Eike Beer <eike@sf-mail.de> ++# Copyright (c) 2016 Andrea Schneider <asn@cryptomilk.org> + # +-# Distributed under the OSI-approved BSD License (the "License"); +-# see accompanying file Copyright.txt for details. ++# Distributed under the OSI-approved BSD License (the "License"); ++# see accompanying file Copyright.txt for details. + # +-# This software is distributed WITHOUT ANY WARRANTY; without even the +-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +-# See the License for more information. ++# This software is distributed WITHOUT ANY WARRANTY; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++# See the License for more information. + #============================================================================= +-# We use code from the CMake project to detect the Lua version. +- +-# Locate LuaJIT library +-# This module defines +-# LUAJIT_FOUND, if false, do not try to link to Lua JIT +-# LUAJIT_LIBRARIES +-# LUAJIT_INCLUDE_DIR, where to find lua.h + # +-# Additionally it defines the Lua API/ABI version: +-# LUA_VERSION_STRING - the version of Lua found +-# LUA_VERSION_MAJOR - the major version of Lua +-# LUA_VERSION_MINOR - the minor version of Lua +-# LUA_VERSION_PATCH - the patch version of Lua +- +-FIND_PATH(LUAJIT_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0 luajit-2.1) +-FIND_LIBRARY(LUAJIT_LIBRARIES NAMES luajit-5.1 luajit) +- +-if (LUAJIT_INCLUDE_DIR AND EXISTS "${LUAJIT_INCLUDE_DIR}/lua.h") +- # At least 5.[012] have different ways to express the version +- # so all of them need to be tested. Lua 5.2 defines LUA_VERSION +- # and LUA_RELEASE as joined by the C preprocessor, so avoid those. +- file(STRINGS "${LUAJIT_INCLUDE_DIR}/lua.h" lua_version_strings +- REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*") +- +- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};") +- if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$") +- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};") +- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};") +- set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") +- else () +- string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") +- if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$") +- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") +- endif () +- string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}") +- string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}") +- string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}") +- endif () +- +- unset(lua_version_strings) +-endif() +- +-INCLUDE(FindPackageHandleStandardArgs) +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUAJIT DEFAULT_MSG LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR) ++ ++if (UNIX) ++ find_package(PkgConfig) ++ if (PKG_CONFIG_FOUND) ++ pkg_check_modules(_LUAJIT luajit) ++ endif (PKG_CONFIG_FOUND) ++endif (UNIX) ++ ++set(_LUAJIT_ROOT_HINTS ++ ${RSPAMD_SEARCH_PATH} ++ ${LUAJIT_ROOT_DIR} ++ ENV LUAJIT_ROOT_DIR ++) ++ ++find_path(LUAJIT_INCLUDE_DIR ++ NAMES ++ luajit.h ++ PATHS ++ ${_LUAJIT_INCLUDEDIR} ++ HINTS ++ ${_LUAJIT_ROOT_HINTS} ++ PATH_SUFFIXES ++ luajit-5_1-2.0 ++ luajit-5_2-2.0 ++ luajit-5_3-2.0 ++) ++ ++find_library(LUAJIT_LIBRARY ++ NAMES ++ luajit ++ luajit-5.1 ++ luajit-5.2 ++ luajit-5.3 ++ HINTS ++ ${_LUAJIT_ROOT_HINTS} ++ PATHS ++ ${_LUAJIT_LIBDIR} ++) ++ ++if (LUAJIT_LIBRARY) ++ set(LUAJIT_LIBRARIES ++ ${LUAJIT_LIBRARIES} ++ ${LUAJIT_LIBRARY} ++ ) ++endif (LUAJIT_LIBRARY) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(LuaJIT DEFAULT_MSG LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR) ++ ++# show the LUAJIT_INCLUDE_DIR and LUAJIT_LIBRARIES variables only in the advanced view ++mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARIES) ++ ++ |