summaryrefslogtreecommitdiff
path: root/user/libptytty
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-05-30 20:08:37 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-07 10:08:18 -0500
commitdd586bef81c5688585a73a270585e2ba500ced9e (patch)
tree8db8073ad11758536a637c949df4dbbd58d16a90 /user/libptytty
parent14c653090b391e04af7e278b0e3da97b5581f1fb (diff)
downloadpackages-dd586bef81c5688585a73a270585e2ba500ced9e.tar.gz
packages-dd586bef81c5688585a73a270585e2ba500ced9e.tar.bz2
packages-dd586bef81c5688585a73a270585e2ba500ced9e.tar.xz
packages-dd586bef81c5688585a73a270585e2ba500ced9e.zip
user/libptytty: New package
This is a dependency of newer releases of user/rxvt-unicode. Closes: #1180
Diffstat (limited to 'user/libptytty')
-rw-r--r--user/libptytty/APKBUILD43
-rw-r--r--user/libptytty/force-utmps.patch12
2 files changed, 55 insertions, 0 deletions
diff --git a/user/libptytty/APKBUILD b/user/libptytty/APKBUILD
new file mode 100644
index 000000000..d12a73c33
--- /dev/null
+++ b/user/libptytty/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=libptytty
+pkgver=2.0
+pkgrel=0
+pkgdesc="OS independent and secure pty/tty and utmp/wtmp/lastlog handling"
+url="http://software.schmorp.de/pkg/libptytty.html"
+arch="all"
+options="!check" # No test suite.
+license="GPL-2.0+"
+depends=""
+makedepends="cmake utmps-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://dist.schmorp.de/libptytty/libptytty-$pkgver.tar.gz
+ force-utmps.patch
+ "
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ export LDFLAGS="$LDFLAGS -Bdynamic"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} \
+ -Bbuild
+ make -C build
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE make -C build test
+}
+
+package() {
+ make DESTDIR="$pkgdir" -C build install
+}
+
+sha512sums="9cca5fddbcc4025c2bbe043e3367ac902d0024a34301258dafcf0de70935c055279d88227168d112d0e4c0dc37f1f49e1ea587bd6bddf0b9d92400657bc7be08 libptytty-2.0.tar.gz
+34155b4c06bb8dc8f78777fd3a9e749b1c3c056bd073fd7a0c85404f1dfe29dae6b2513a1ed8093fd528d0eb30cd463a5896c0d05203f47bb4f9cad8067bec26 force-utmps.patch"
diff --git a/user/libptytty/force-utmps.patch b/user/libptytty/force-utmps.patch
new file mode 100644
index 000000000..ce9c34d6d
--- /dev/null
+++ b/user/libptytty/force-utmps.patch
@@ -0,0 +1,12 @@
+We need to ensure linkage to utmps, or utmpx won't work.
+
+--- libptytty-2.0/CMakeLists.txt.old 2021-08-04 09:07:44.000000000 -0500
++++ libptytty-2.0/CMakeLists.txt 2024-05-30 19:50:40.078963587 -0500
+@@ -318,6 +318,7 @@
+ target_link_libraries(ptytty PRIVATE util)
+ list(APPEND LIBS -lutil)
+ endif()
++target_link_libraries(ptytty PRIVATE :libutmps.so.0.1)
+
+ configure_file(
+ libptytty.pc.in