diff --git a/shells/Makefile b/shells/Makefile index 6edba1d03e3c..e33fa0798946 100644 --- a/shells/Makefile +++ b/shells/Makefile @@ -30,6 +30,7 @@ SUBDIR += ksh SUBDIR += ksh-devel SUBDIR += ksh93 + SUBDIR += libpowershell-native SUBDIR += mksh SUBDIR += modernish SUBDIR += murex diff --git a/shells/libpowershell-native/Makefile b/shells/libpowershell-native/Makefile new file mode 100644 index 000000000000..07432e36282c --- /dev/null +++ b/shells/libpowershell-native/Makefile @@ -0,0 +1,28 @@ +PORTNAME= libpowershell-native +DISTVERSIONPREFIX=v +DISTVERSION= 7.4.0 +CATEGORIES= shells devel + +MAINTAINER= arrowd@FreeBSD.org +COMMENT= Support library for PowerShell +WWW= https://microsoft.com/PowerShell + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +USES= cmake + +USE_GITHUB= yes +GH_ACCOUNT= PowerShell +GH_PROJECT= PowerShell-Native + +CMAKE_SOURCE_PATH= ${WRKSRC}/src/libpsl-native + +PLIST_FILES= lib/powershell/libpsl-native.so + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/powershell + ${INSTALL_LIB} ${WRKSRC}/src/powershell-unix/libpsl-native.so \ + ${STAGEDIR}${PREFIX}/lib/powershell + +.include diff --git a/shells/libpowershell-native/distinfo b/shells/libpowershell-native/distinfo new file mode 100644 index 000000000000..1e45252ee401 --- /dev/null +++ b/shells/libpowershell-native/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1739806036 +SHA256 (PowerShell-PowerShell-Native-v7.4.0_GH0.tar.gz) = 5220f99755442720486e20682269fecdabbbabff9e082c1a51250b66465f40cf +SIZE (PowerShell-PowerShell-Native-v7.4.0_GH0.tar.gz) = 288919 diff --git a/shells/libpowershell-native/files/patch-src_libpsl-native_CMakeLists.txt b/shells/libpowershell-native/files/patch-src_libpsl-native_CMakeLists.txt new file mode 100644 index 000000000000..1874389f1e70 --- /dev/null +++ b/shells/libpowershell-native/files/patch-src_libpsl-native_CMakeLists.txt @@ -0,0 +1,11 @@ +--- src/libpsl-native/CMakeLists.txt.orig 2023-10-31 22:12:48 UTC ++++ src/libpsl-native/CMakeLists.txt +@@ -18,8 +18,5 @@ else () + add_subdirectory(src) + else () + # test in BUILD_DIR +- message(STATUS "Tests enabled") +- enable_testing() + add_subdirectory(src) +- add_subdirectory(test) + endif () diff --git a/shells/libpowershell-native/files/patch-src_libpsl-native_src_getuserfrompid.cpp b/shells/libpowershell-native/files/patch-src_libpsl-native_src_getuserfrompid.cpp new file mode 100644 index 000000000000..407ef42ce812 --- /dev/null +++ b/shells/libpowershell-native/files/patch-src_libpsl-native_src_getuserfrompid.cpp @@ -0,0 +1,11 @@ +--- src/libpsl-native/src/getuserfrompid.cpp.orig 2025-02-17 15:44:35 UTC ++++ src/libpsl-native/src/getuserfrompid.cpp +@@ -13,8 +13,6 @@ + + #if __APPLE__ + #include +-#elif HAVE_SYSCONF +-// do nothing + #elif HAVE_SYS_SYSCTL_H + #include + #endif diff --git a/shells/libpowershell-native/pkg-descr b/shells/libpowershell-native/pkg-descr new file mode 100644 index 000000000000..07fe05ab253d --- /dev/null +++ b/shells/libpowershell-native/pkg-descr @@ -0,0 +1,5 @@ +PowerShell is a modern command shell that includes the best features of other +popular shells. Unlike most shells that only accept and return text, +PowerShell accepts and returns .NET objects. + +This package provides platform-dependent bits of PowerShell implementation.