pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/libepoll-shim



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Tue Sep 21 14:44:49 UTC 2021

Modified Files:
        pkgsrc/devel/libepoll-shim: Makefile PLIST distinfo
Added Files:
        pkgsrc/devel/libepoll-shim/patches: patch-src_CMakeLists.txt

Log Message:
libepoll-shim: Support NetBSD with eventfd(2)/timerfd(2)

* Simplify logics in Makefile.
* Exclude eventfd.h for NetBSD with eventfd(2).
* Exclude timerfd.h for NetBSD with timerfd(2).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/libepoll-shim/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/libepoll-shim/PLIST \
    pkgsrc/devel/libepoll-shim/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/libepoll-shim/patches/patch-src_CMakeLists.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/libepoll-shim/Makefile
diff -u pkgsrc/devel/libepoll-shim/Makefile:1.2 pkgsrc/devel/libepoll-shim/Makefile:1.3
--- pkgsrc/devel/libepoll-shim/Makefile:1.2     Mon May  3 17:20:24 2021
+++ pkgsrc/devel/libepoll-shim/Makefile Tue Sep 21 14:44:49 2021
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2021/05/03 17:20:24 jdolecek Exp $
+# $NetBSD: Makefile,v 1.3 2021/09/21 14:44:49 ryoon Exp $
 
 GITHUB_PROJECT=        epoll-shim
-GITHUB_TAG=    refs/tags/v${PKGVERSION_NOREV}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
 DISTNAME=      ${GITHUB_PROJECT}-0.0.20210418
 PKGNAME=       lib${DISTNAME}
-PKGREVISION=   # empty
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=jiixyj/}
 
@@ -21,6 +20,12 @@ USE_LANGUAGES=       c c++
 
 CMAKE_ARGS+=   -DBUILD_TESTING=OFF
 
-WRKSRC=                ${WRKDIR}/${DISTNAME}
+PLIST_VARS+=   eventfd timerfd
+.if exists("/usr/include/sys/eventfd.h")
+PLIST.eventfd= YES
+.endif
+.if exists("/usr/include/sys/timerfd.h")
+PLIST.timerfd= YES
+.endif
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/devel/libepoll-shim/PLIST
diff -u pkgsrc/devel/libepoll-shim/PLIST:1.1 pkgsrc/devel/libepoll-shim/PLIST:1.2
--- pkgsrc/devel/libepoll-shim/PLIST:1.1        Mon May  3 17:17:17 2021
+++ pkgsrc/devel/libepoll-shim/PLIST    Tue Sep 21 14:44:49 2021
@@ -1,12 +1,12 @@
-@comment $NetBSD: PLIST,v 1.1 2021/05/03 17:17:17 jdolecek Exp $
+@comment $NetBSD: PLIST,v 1.2 2021/09/21 14:44:49 ryoon Exp $
 include/libepoll-shim/epoll-shim/detail/common.h
 include/libepoll-shim/epoll-shim/detail/poll.h
 include/libepoll-shim/epoll-shim/detail/read.h
 include/libepoll-shim/epoll-shim/detail/write.h
 include/libepoll-shim/sys/epoll.h
-include/libepoll-shim/sys/eventfd.h
+${PLIST.eventfd}include/libepoll-shim/sys/eventfd.h
 include/libepoll-shim/sys/signalfd.h
-include/libepoll-shim/sys/timerfd.h
+${PLIST.timerfd}include/libepoll-shim/sys/timerfd.h
 lib/cmake/epoll-shim/epoll-shim-config.cmake
 lib/cmake/epoll-shim/epoll-shim-targets-noconfig.cmake
 lib/cmake/epoll-shim/epoll-shim-targets.cmake
Index: pkgsrc/devel/libepoll-shim/distinfo
diff -u pkgsrc/devel/libepoll-shim/distinfo:1.1 pkgsrc/devel/libepoll-shim/distinfo:1.2
--- pkgsrc/devel/libepoll-shim/distinfo:1.1     Mon May  3 17:17:17 2021
+++ pkgsrc/devel/libepoll-shim/distinfo Tue Sep 21 14:44:49 2021
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2021/05/03 17:17:17 jdolecek Exp $
+$NetBSD: distinfo,v 1.2 2021/09/21 14:44:49 ryoon Exp $
 
 SHA1 (epoll-shim-0.0.20210418.tar.gz) = 91d34e8a3e07afc1bfbca4575894f31bc7d3aa70
 RMD160 (epoll-shim-0.0.20210418.tar.gz) = 0e8a136b1b3716eaa4f7b1c7b52219d36522b09d
 SHA512 (epoll-shim-0.0.20210418.tar.gz) = 34272a694165bfb47f8a103d18aec304f7a72b36491b83268ff63dd696f5103ab53dc9e32173ed20ddd7baa36b9d7ca2b3ec6236eef8dc2f02a101819b75eb7b
 Size (epoll-shim-0.0.20210418.tar.gz) = 91936 bytes
+SHA1 (patch-src_CMakeLists.txt) = 47f32282b12c79a9b51d8ffc821cd4ffbf19b728

Added files:

Index: pkgsrc/devel/libepoll-shim/patches/patch-src_CMakeLists.txt
diff -u /dev/null pkgsrc/devel/libepoll-shim/patches/patch-src_CMakeLists.txt:1.1
--- /dev/null   Tue Sep 21 14:44:49 2021
+++ pkgsrc/devel/libepoll-shim/patches/patch-src_CMakeLists.txt Tue Sep 21 14:44:49 2021
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_CMakeLists.txt,v 1.1 2021/09/21 14:44:49 ryoon Exp $
+
+* If /usr/include/sys/timerfd.h exists, do not install timerfd.h.
+
+--- src/CMakeLists.txt.orig    2021-04-18 19:28:52.000000000 +0000
++++ src/CMakeLists.txt
+@@ -31,6 +31,7 @@ endmacro()
+ include(CheckSymbolExists)
+ # FreeBSD 13 supports native eventfd descriptors. Prefer them if available.
+ check_symbol_exists(eventfd "sys/eventfd.h" HAVE_EVENTFD)
++check_symbol_exists(timerfd_create "sys/timerfd.h" HAVE_TIMERFD)
+ check_symbol_exists(kqueue1 "sys/event.h" HAVE_KQUEUE1)
+ add_compat_target(kqueue1 "NOT;HAVE_KQUEUE1")
+ check_symbol_exists(sigandset "signal.h" HAVE_SIGANDSET)
+@@ -65,7 +66,6 @@ add_library(
+   epoll.c
+   epollfd_ctx.c
+   kqueue_event.c
+-  timerfd.c
+   timerfd_ctx.c
+   signalfd.c
+   signalfd_ctx.c
+@@ -73,6 +73,9 @@ add_library(
+ if(NOT HAVE_EVENTFD)
+   target_sources(epoll-shim PRIVATE eventfd.c eventfd_ctx.c)
+ endif()
++if(NOT HAVE_TIMERFD)
++  target_sources(epoll-shim PRIVATE timerfd.c)
++endif()
+ include(GenerateExportHeader)
+ generate_export_header(epoll-shim BASE_NAME epoll_shim)
+ target_link_libraries(
+@@ -91,11 +94,13 @@ set(_headers
+     "epoll-shim/detail/read.h"
+     "epoll-shim/detail/write.h"
+     "sys/epoll.h"
+-    "sys/signalfd.h"
+-    "sys/timerfd.h")
++    "sys/signalfd.h")
+ if(NOT HAVE_EVENTFD)
+   list(APPEND _headers "sys/eventfd.h")
+ endif()
++if(NOT HAVE_TIMERFD)
++  list(APPEND _headers "sys/timerfd.h")
++endif()
+ foreach(_header IN LISTS _headers)
+   configure_file("${PROJECT_SOURCE_DIR}/include/${_header}"
+                  "${PROJECT_BINARY_DIR}/install-include/${_header}" COPYONLY)



Home | Main Index | Thread Index | Old Index