| 1 | # Note: this package should go away (become an alias for libc-devel)
|
|---|
| 2 | # once http://trac.netlabs.org/libc/ticket/353 is resolved.
|
|---|
| 3 |
|
|---|
| 4 | Summary: System V poll system call emulation.
|
|---|
| 5 | Name: libpoll-devel
|
|---|
| 6 | Version: 1.5.1
|
|---|
| 7 | Release: 4%{?dist}
|
|---|
| 8 | License: BSD
|
|---|
| 9 | Vendor: bww bitwise works GmbH
|
|---|
| 10 | URL: http://software.clapper.org/poll/
|
|---|
| 11 |
|
|---|
| 12 | Group: Development/Libraries
|
|---|
| 13 |
|
|---|
| 14 | # https://github.com/bmc/poll/archive/release-1.5.1.zip
|
|---|
| 15 | Source: poll-release-1.5.1.zip
|
|---|
| 16 |
|
|---|
| 17 | BuildRequires: gcc
|
|---|
| 18 |
|
|---|
| 19 | Requires: libc-devel
|
|---|
| 20 |
|
|---|
| 21 | %description
|
|---|
| 22 | This package implements the System V poll(2) system call for Unix-like systems
|
|---|
| 23 | that do not support poll. For instance, the following Unix-like operating
|
|---|
| 24 | systems do not support poll:
|
|---|
| 25 |
|
|---|
| 26 | NetBSD, prior to version 1.3
|
|---|
| 27 | FreeBSD, prior to version 3.0
|
|---|
| 28 | OpenBSD, prior to version 2.0
|
|---|
| 29 | BSD/OS. (See the BSD/OS man pages.)
|
|---|
| 30 | Apple's Mac OS X (prior to OS X 10.3)
|
|---|
| 31 | QNX version 6
|
|---|
| 32 | 4.4 BSD Lite 2 (not generally used by production systems)
|
|---|
| 33 | 386BSD (pretty much obsolete these days)
|
|---|
| 34 | OS/2 (and derivatives)
|
|---|
| 35 |
|
|---|
| 36 | poll provides a method for multiplexing input and output on multiple open file
|
|---|
| 37 | descriptors; in traditional BSD systems, that capability is provided by
|
|---|
| 38 | select(2). While the semantics of select differ from those of poll, poll can
|
|---|
| 39 | be readily emulated in terms of select, which is exactly what this small piece
|
|---|
| 40 | of software does.
|
|---|
| 41 |
|
|---|
| 42 | %prep
|
|---|
| 43 | %setup -q -n poll-release-%{version}
|
|---|
| 44 |
|
|---|
| 45 | # Add extra POLL constants used by some sources.
|
|---|
| 46 | # @todo We can't use patch directly because of EOLs (forced --binary on OS/2).
|
|---|
| 47 | tr -d '\r' > poll.diff <<"EOF"
|
|---|
| 48 | --- poll.h.b
|
|---|
| 49 | +++ poll.h
|
|---|
| 50 | @@ -78,6 +78,11 @@
|
|---|
| 51 | #define POLLHUP 0x10
|
|---|
| 52 | #define POLLNVAL 0x20
|
|---|
| 53 |
|
|---|
| 54 | +#define POLLRDNORM 0x0040
|
|---|
| 55 | +#define POLLRDBAND 0x0080
|
|---|
| 56 | +#define POLLWRNORM 0x0100
|
|---|
| 57 | +#define POLLWRBAND 0x0200
|
|---|
| 58 | +
|
|---|
| 59 | struct pollfd
|
|---|
| 60 | {
|
|---|
| 61 | int fd;
|
|---|
| 62 | EOF
|
|---|
| 63 | patch < poll.diff
|
|---|
| 64 |
|
|---|
| 65 | %build
|
|---|
| 66 | gcc %{optflags} -c poll.c -o poll.o
|
|---|
| 67 | ar rv poll_s.a poll.o
|
|---|
| 68 | emxomf poll_s.a -o poll_s.lib
|
|---|
| 69 |
|
|---|
| 70 | # Add support for #include <poll.h>
|
|---|
| 71 | echo "#include <sys/poll.h>" > nosys_poll.h
|
|---|
| 72 |
|
|---|
| 73 | %install
|
|---|
| 74 | rm -rf %{buildroot}
|
|---|
| 75 | mkdir -p %{buildroot}%{_includedir}
|
|---|
| 76 | install -m 644 nosys_poll.h %{buildroot}%{_includedir}/poll.h
|
|---|
| 77 | mkdir -p %{buildroot}%{_includedir}/sys
|
|---|
| 78 | install -m 644 poll.h %{buildroot}%{_includedir}/sys
|
|---|
| 79 | mkdir -p %{buildroot}%{_libdir}
|
|---|
| 80 | install -m 755 poll_s.a poll_s.lib %{buildroot}%{_libdir}
|
|---|
| 81 |
|
|---|
| 82 | %clean
|
|---|
| 83 | rm -rf %{buildroot}
|
|---|
| 84 |
|
|---|
| 85 | %files
|
|---|
| 86 | %defattr(-,root,root)
|
|---|
| 87 | %doc CHANGELOG.md INSTALL README.md LICENSE
|
|---|
| 88 | %{_includedir}/poll.h
|
|---|
| 89 | %{_includedir}/sys/poll.h
|
|---|
| 90 | %{_libdir}/poll_s.a
|
|---|
| 91 | %{_libdir}/poll_s.lib
|
|---|
| 92 |
|
|---|
| 93 | %changelog
|
|---|
| 94 | * Mon Feb 1 2016 Dmitriy Kuminov <coding@dmik.org> 1.5.1-4
|
|---|
| 95 | - Correct package description.
|
|---|
| 96 | - Add vendor tag.
|
|---|
| 97 |
|
|---|
| 98 | * Wed Jan 27 2016 Dmitriy Kuminov <coding@dmik.org> 1.5.1-3
|
|---|
| 99 | - Add poll_s.a (for use with ld, e.g. in non-Zomf mode).
|
|---|
| 100 |
|
|---|
| 101 | * Wed Dec 22 2015 Dmitriy Kuminov <coding@dmik.org> 1.5.1-2
|
|---|
| 102 | - Add POLLRD* and POLLWR* constants.
|
|---|
| 103 |
|
|---|
| 104 | * Tue Dec 22 2015 Dmitriy Kuminov <coding@dmik.org> 1.5.1-1
|
|---|
| 105 | - Initial package for version 1.5.1.
|
|---|