Gentoo Archives: gentoo-dev

From: Joshua Kinard <kumba@g.o>
To: Gentoo-dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
Date: Sun, 06 Apr 2014 00:23:55
Message-Id: 53409E77.90707@gentoo.org
1 So I opened Bug #506046 last week to enable support of DTLS over SCTP
2 (Stream Control Transmission Protocol) in OpenSSL via a configure flag. But
3 this means in the ebuild, I have to check for the right userland SCTP
4 library to depend against:
5
6 # Have the sub-libs in RDEPEND with [static-libs] since, logically,
7 # our libssl.a depends on libz.a/etc... at runtime.
8 LIB_DEPEND="gmp? ( dev-libs/gmp[static-libs(+)] )
9 + sctp? (
10 + kernel_linux? ( net-misc/lksctp-tools[static-libs(+)] )
11 + kernel_FreeBSD? ( sys-freebsd/freebsd-lib )
12 + )
13
14 Right now, this check is rather limited, but down the road, if SCTP usage
15 increases, we'd have to duplicate this specific check more often. Doubly so
16 if Gentoo/OpenBSD or NetBSD support gets off the ground and a package exists
17 that supports SCTP, but needs the appropriate userland-lib to link against.
18
19 I think the best way to future proof against this is to add a virtual/sctp
20 package that picks between the appropriate userland library for SCTP
21 support, depending on the kernel_* USE flags. kernel_linux pulls in
22 net-misc/lksctp-tools and kernel_FreeBSD will simply depend on
23 sys-freebsd/freebsd-lib (FBSD is actually the reference implementation of SCTP).
24
25 I've attached a first draft of virtual/sctp/sctp-0.ebuild, which passes
26 repoman checks, but I think it needs to be made multilib-aware.
27 Additionally, that means lksctp-tools probably needs some multilib-magic
28 applied. I am not finding a solid guide on properly upgrading an ebuild to
29 become multilib-aware. Can one of the multilib experts check things and let
30 me know what is needed if people agree this is a good way to go down?
31
32 Otherwise, I'll commit the change to OpenSSL above and resolve that bug.
33
34 Thanks!,
35
36 --
37 Joshua Kinard
38 Gentoo/MIPS
39 kumba@g.o
40 4096R/D25D95E3 2011-03-28
41
42 "The past tempts us, the present confuses us, the future frightens us. And
43 our lives slip away, moment by moment, lost in that vast, terrible in-between."
44
45 --Emperor Turhan, Centauri Republic

Attachments

File name MIME type
sctp-0.ebuild text/plain

Replies