| 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: 3%{?dist}
|
|---|
| 8 | License: BSD
|
|---|
| 9 | URL: http://software.clapper.org/poll/
|
|---|
| 10 |
|
|---|
| 11 | Group: Development/Libraries
|
|---|
| 12 |
|
|---|
| 13 | # https://github.com/bmc/poll/archive/release-1.5.1.zip
|
|---|
| 14 | Source: poll-release-1.5.1.zip
|
|---|
| 15 |
|
|---|
| 16 | BuildRequires: gcc
|
|---|
| 17 |
|
|---|
| 18 | Requires: libc-devel
|
|---|
| 19 |
|
|---|
| 20 | %description
|
|---|
| 21 | This package implements the System V poll(2) system call for Unix-like systems
|
|---|
| 22 | that do not support poll. For instance, the following Unix-like operating
|
|---|
| 23 | systems do not support poll: poll provides a method for multiplexing input and
|
|---|
| 24 | output on multiple open file descriptors; in traditional BSD systems, that
|
|---|
| 25 | capability is provided by select(2). While the semantics of select differ from
|
|---|
| 26 | those of poll, poll can be readily emulated in terms of select, which is exactly
|
|---|
| 27 | what this small piece of software does.
|
|---|
| 28 |
|
|---|
| 29 | %prep
|
|---|
| 30 | %setup -q -n poll-release-%{version}
|
|---|
| 31 |
|
|---|
| 32 | # Add extra POLL constants used by some sources.
|
|---|
| 33 | # @todo We can't use patch directly because of EOLs (forced --binary on OS/2).
|
|---|
| 34 | tr -d '\r' > poll.diff <<"EOF"
|
|---|
| 35 | --- poll.h.b
|
|---|
| 36 | +++ poll.h
|
|---|
| 37 | @@ -78,6 +78,11 @@
|
|---|
| 38 | #define POLLHUP 0x10
|
|---|
| 39 | #define POLLNVAL 0x20
|
|---|
| 40 |
|
|---|
| 41 | +#define POLLRDNORM 0x0040
|
|---|
| 42 | +#define POLLRDBAND 0x0080
|
|---|
| 43 | +#define POLLWRNORM 0x0100
|
|---|
| 44 | +#define POLLWRBAND 0x0200
|
|---|
| 45 | +
|
|---|
| 46 | struct pollfd
|
|---|
| 47 | {
|
|---|
| 48 | int fd;
|
|---|
| 49 | EOF
|
|---|
| 50 | patch < poll.diff
|
|---|
| 51 |
|
|---|
| 52 | %build
|
|---|
| 53 | gcc %{optflags} -c poll.c -o poll.o
|
|---|
| 54 | ar rv poll_s.a poll.o
|
|---|
| 55 | emxomf poll_s.a -o poll_s.lib
|
|---|
| 56 |
|
|---|
| 57 | # Add support for #include <poll.h>
|
|---|
| 58 | echo "#include <sys/poll.h>" > nosys_poll.h
|
|---|
| 59 |
|
|---|
| 60 | %install
|
|---|
| 61 | rm -rf %{buildroot}
|
|---|
| 62 | mkdir -p %{buildroot}%{_includedir}
|
|---|
| 63 | install -m 644 nosys_poll.h %{buildroot}%{_includedir}/poll.h
|
|---|
| 64 | mkdir -p %{buildroot}%{_includedir}/sys
|
|---|
| 65 | install -m 644 poll.h %{buildroot}%{_includedir}/sys
|
|---|
| 66 | mkdir -p %{buildroot}%{_libdir}
|
|---|
| 67 | install -m 755 poll_s.a poll_s.lib %{buildroot}%{_libdir}
|
|---|
| 68 |
|
|---|
| 69 | %clean
|
|---|
| 70 | rm -rf %{buildroot}
|
|---|
| 71 |
|
|---|
| 72 | %files
|
|---|
| 73 | %defattr(-,root,root)
|
|---|
| 74 | %doc CHANGELOG.md INSTALL README.md LICENSE
|
|---|
| 75 | %{_includedir}/poll.h
|
|---|
| 76 | %{_includedir}/sys/poll.h
|
|---|
| 77 | %{_libdir}/poll_s.a
|
|---|
| 78 | %{_libdir}/poll_s.lib
|
|---|
| 79 |
|
|---|
| 80 | %changelog
|
|---|
| 81 | * Wed Jan 27 2016 Dmitriy Kuminov <coding@dmik.org> 1.5.1-3
|
|---|
| 82 | - Add poll_s.a (for use with ld, e.g. in non-Zomf mode).
|
|---|
| 83 |
|
|---|
| 84 | * Wed Dec 22 2015 Dmitriy Kuminov <coding@dmik.org> 1.5.1-2
|
|---|
| 85 | - Add POLLRD* and POLLWR* constants.
|
|---|
| 86 |
|
|---|
| 87 | * Tue Dec 22 2015 Dmitriy Kuminov <coding@dmik.org> 1.5.1-1
|
|---|
| 88 | - Initial package for version 1.5.1.
|
|---|