summaryrefslogtreecommitdiff
path: root/dev-libs/libpsl-native
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-16 11:00:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-16 11:00:10 +0100
commit3c490942d0d98701d1c0971e60911fa6bd3ecb76 (patch)
treec7e992463fec552ae6483d7b81848aa185d3559f /dev-libs/libpsl-native
parentc748acf4192a1e08c9feb2d5f0004937a4869639 (diff)
gentoo auto-resync : 16:09:2023 - 11:00:10
Diffstat (limited to 'dev-libs/libpsl-native')
-rw-r--r--dev-libs/libpsl-native/Manifest5
-rw-r--r--dev-libs/libpsl-native/files/libpsl-native-7.3.2-cmake.patch36
-rw-r--r--dev-libs/libpsl-native/files/libpsl-native-7.3.2-test-cmake.patch18
-rw-r--r--dev-libs/libpsl-native/libpsl-native-7.3.2.ebuild39
-rw-r--r--dev-libs/libpsl-native/metadata.xml13
5 files changed, 111 insertions, 0 deletions
diff --git a/dev-libs/libpsl-native/Manifest b/dev-libs/libpsl-native/Manifest
new file mode 100644
index 000000000000..41ff95b5a8ff
--- /dev/null
+++ b/dev-libs/libpsl-native/Manifest
@@ -0,0 +1,5 @@
+AUX libpsl-native-7.3.2-cmake.patch 1134 BLAKE2B d2cd40fef4abfd23c946c211e99317cbb35f00b55e81afd08620a06cbea8ad24a41b97054bae8bd17760d4d0ce552e3dd4709b7e622e695c579898a5520fb18c SHA512 a7a487f4dd5c85b2719a699777bfc03a7db0c8a35ba9554434a93eb79efd9db91036d7c9d41032159353c4fb1f0947e1a579f9fa83d34fdee5469bfc2dafb8d0
+AUX libpsl-native-7.3.2-test-cmake.patch 485 BLAKE2B 4da10739abc354866c1343bc7c0d398cf97c21c2010b3dbeb75da9c0807379582f21689bd99f031d886270abe36897fdc6ffad2fbc3105c6b23beeddebbaea16 SHA512 921ddc3303f3c5ba8e320d893d708f337f7a704b8c716d1ba075514eca6cad737b0c97c62308d51e073ab323aec7f0ab098e20665ff65ad35f994ac4ad89aef6
+DIST libpsl-native-7.3.2.tar.gz 288949 BLAKE2B 9547d0144ec1bd48d4f9272ae7c7237fbc052a852908a535047f2f9a41a7a0f7c36868fe697c77ec37d4705a119ac3f4f6961f7ff8ad7c80f8ec176839e34dd3 SHA512 5ff7c730c000e1d8ccbf48e01a1233889df3ddda3c280cbf37298a1731354dde30f0637b62567a8679dec4ea27a2184d9559026c3a86c793c6c8c12ec629c90d
+EBUILD libpsl-native-7.3.2.ebuild 829 BLAKE2B 99e9964b3ad31b96fe799802907b92c3ea685af72965edf18b606aaf06a462d2f6685b6f350c1962ad7b19673d95497f05857870afa08a3e6db4abb7747ead88 SHA512 bbfa4be3acb427d501ff03bef5a28e51ee1c069414fd0dcc30da72dfffbb9f5ff2d78a4008ba320b937aa27bc5997afb6ad39cec93423dc3946784dc372d7398
+MISC metadata.xml 439 BLAKE2B 72a823c1e144b3a594c8571200dd935dd46010f59f0380bd9b30131124bd71fd102c7f286c7d26670647e77ff111b9d5c043d5e0637be10950a7527b8302f6e7 SHA512 960e66a6fb960bae6053b1dbd05168c6aed69aff14e6b840d77809b82a80ad1ec3edb5ab329c3a6c5a19a413e97d9f651e3e963aa8385d210d5ec1da9b842c2b
diff --git a/dev-libs/libpsl-native/files/libpsl-native-7.3.2-cmake.patch b/dev-libs/libpsl-native/files/libpsl-native-7.3.2-cmake.patch
new file mode 100644
index 000000000000..a8222f074713
--- /dev/null
+++ b/dev-libs/libpsl-native/files/libpsl-native-7.3.2-cmake.patch
@@ -0,0 +1,36 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,9 +1,7 @@
+ cmake_minimum_required(VERSION 2.8.11)
+ project(PSL-NATIVE)
+
+-# Can't use add_compile_options with 2.8.11
+-set(CMAKE_BUILD_TYPE "Release")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -fstack-protector-strong -fpie -DFORTIFY_SOURCE=2 -O2")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro,-z,now")
+@@ -11,15 +9,11 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl")
+ endif()
+
+-set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/../powershell-unix")
++option(TESTING "Enable tests" OFF)
+
+-if (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
+- message(STATUS "Building for ARM, no tests")
+- add_subdirectory(src)
+-else ()
+- # test in BUILD_DIR
+- message(STATUS "Tests enabled")
+- enable_testing()
+- add_subdirectory(src)
+- add_subdirectory(test)
+-endif ()
++add_subdirectory(src)
++
++if(TESTING)
++ enable_testing()
++ add_subdirectory(test)
++endif()
diff --git a/dev-libs/libpsl-native/files/libpsl-native-7.3.2-test-cmake.patch b/dev-libs/libpsl-native/files/libpsl-native-7.3.2-test-cmake.patch
new file mode 100644
index 000000000000..641a4aaf4ee2
--- /dev/null
+++ b/dev-libs/libpsl-native/files/libpsl-native-7.3.2-test-cmake.patch
@@ -0,0 +1,18 @@
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-add_subdirectory(googletest)
++find_package(GTest REQUIRED)
+
+ add_executable(psl-native-test
+ test-getfileowner.cpp
+@@ -19,9 +19,6 @@ add_executable(psl-native-test
+ test-createhardlink.cpp
+ main.cpp)
+
+-# manually include gtest headers
+-target_include_directories(psl-native-test PRIVATE ${gtest_SOURCE_DIR}/include)
+-
+ target_link_libraries(psl-native-test psl-native gtest)
+
+ add_test(NAME psl-native-test
diff --git a/dev-libs/libpsl-native/libpsl-native-7.3.2.ebuild b/dev-libs/libpsl-native/libpsl-native-7.3.2.ebuild
new file mode 100644
index 000000000000..86ff150176a7
--- /dev/null
+++ b/dev-libs/libpsl-native/libpsl-native-7.3.2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="PowerShell-Native"
+
+inherit cmake
+
+DESCRIPTION="Functionality missing from .NET Core via system calls"
+HOMEPAGE="https://github.com/PowerShell/PowerShell-Native/"
+
+if [[ "${PV}" == *9999* ]] ; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/PowerShell/${MY_PN}.git"
+ S="${WORKDIR}/${P}/src/${PN}"
+else
+ SRC_URI="https://github.com/PowerShell/${MY_PN}/archive/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+ S="${WORKDIR}/${MY_PN}-${PV}/src/${PN}"
+
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+RESTRICT="test" # Fails.
+
+PATCHES=(
+ "${FILESDIR}/${PN}-7.3.2-cmake.patch"
+ "${FILESDIR}/${PN}-7.3.2-test-cmake.patch"
+)
+
+src_install() {
+ dolib.so "${BUILD_DIR}/src/${PN}.so"
+
+ einstalldocs
+}
diff --git a/dev-libs/libpsl-native/metadata.xml b/dev-libs/libpsl-native/metadata.xml
new file mode 100644
index 000000000000..f363f77b5905
--- /dev/null
+++ b/dev-libs/libpsl-native/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="project">
+ <email>dotnet@gentoo.org</email>
+ <name>Gentoo Dotnet Project</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/PowerShell/PowerShell-Native/issues/</bugs-to>
+ <remote-id type="github">PowerShell/PowerShell-Native</remote-id>
+ </upstream>
+</pkgmetadata>