1 |
commit: bb26804cff30acc6cf036cf686b366fc9efa81c8 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 6 16:17:46 2020 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 6 16:25:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb26804c |
7 |
|
8 |
dev-libs/libclsync: fix underlinking |
9 |
|
10 |
libclsync must be linked with pthreadex.o, since it uses error.c |
11 |
which uses pthreadex.c. |
12 |
|
13 |
Package-Manager: Portage-2.3.82, Repoman-2.3.20 |
14 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
15 |
|
16 |
dev-libs/libclsync/files/libclsync-pthreads.patch | 13 ++++ |
17 |
dev-libs/libclsync/libclsync-0.4.4-r1.ebuild | 75 +++++++++++++++++++++++ |
18 |
2 files changed, 88 insertions(+) |
19 |
|
20 |
diff --git a/dev-libs/libclsync/files/libclsync-pthreads.patch b/dev-libs/libclsync/files/libclsync-pthreads.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..28a9fd8cd96 |
23 |
--- /dev/null |
24 |
+++ b/dev-libs/libclsync/files/libclsync-pthreads.patch |
25 |
@@ -0,0 +1,13 @@ |
26 |
+diff --git a/Makefile.am b/Makefile.am |
27 |
+index 246908d..8bea3a9 100644 |
28 |
+--- a/Makefile.am |
29 |
++++ b/Makefile.am |
30 |
+@@ -98,7 +98,7 @@ EXTRA_DIST = .doxygen .travis.sh .travis.yml NOTES SHORTHANDS freebsd debian gen |
31 |
+ |
32 |
+ if LIBCLSYNC |
33 |
+ lib_LTLIBRARIES = libclsync.la |
34 |
+-libclsync_la_SOURCES = malloc.c libclsync.c socket.c error.c |
35 |
++libclsync_la_SOURCES = malloc.c libclsync.c socket.c error.c pthreadex.c |
36 |
+ libclsync_la_LDFLAGS = -version-info 0:0:0 |
37 |
+ endif |
38 |
+ |
39 |
|
40 |
diff --git a/dev-libs/libclsync/libclsync-0.4.4-r1.ebuild b/dev-libs/libclsync/libclsync-0.4.4-r1.ebuild |
41 |
new file mode 100644 |
42 |
index 00000000000..6d491e0caf8 |
43 |
--- /dev/null |
44 |
+++ b/dev-libs/libclsync/libclsync-0.4.4-r1.ebuild |
45 |
@@ -0,0 +1,75 @@ |
46 |
+# Copyright 1999-2020 Gentoo Authors |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+ |
49 |
+EAPI=7 |
50 |
+ |
51 |
+MY_PN=${PN#lib} |
52 |
+MY_P="${MY_PN}-${PV}" |
53 |
+ |
54 |
+inherit autotools |
55 |
+ |
56 |
+DESCRIPTION="Control and monitoring library for clsync" |
57 |
+HOMEPAGE="http://ut.mephi.ru/oss/clsync https://github.com/clsync/clsync" |
58 |
+SRC_URI="https://github.com/clsync/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz" |
59 |
+LICENSE="GPL-3+" |
60 |
+SLOT="0" |
61 |
+KEYWORDS="~amd64 ~x86" |
62 |
+IUSE="debug extra-debug extra-hardened hardened static-libs" |
63 |
+S="${WORKDIR}/${MY_P}" |
64 |
+ |
65 |
+REQUIRED_USE=" |
66 |
+ extra-debug? ( debug ) |
67 |
+ extra-hardened? ( hardened ) |
68 |
+" |
69 |
+ |
70 |
+BDEPEND="virtual/pkgconfig" |
71 |
+RDEPEND="~app-doc/clsync-docs-${PV}" |
72 |
+ |
73 |
+PATCHES=( "${FILESDIR}/${PN}-pthreads.patch" ) |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ eapply_user |
77 |
+ eautoreconf |
78 |
+} |
79 |
+ |
80 |
+src_configure() { |
81 |
+ local harden_level=0 |
82 |
+ use hardened && harden_level=1 |
83 |
+ use extra-hardened && harden_level=2 |
84 |
+ |
85 |
+ local debug_level=0 |
86 |
+ use debug && debug_level=1 |
87 |
+ use extra-debug && debug_level=2 |
88 |
+ |
89 |
+ econf \ |
90 |
+ --enable-socket-library \ |
91 |
+ --disable-clsync \ |
92 |
+ --enable-debug=${debug_level} \ |
93 |
+ --enable-paranoid=${harden_level} \ |
94 |
+ --without-bsm \ |
95 |
+ --without-kqueue \ |
96 |
+ --disable-capabilities \ |
97 |
+ --disable-cluster \ |
98 |
+ --enable-socket \ |
99 |
+ --disable-highload-locks \ |
100 |
+ --disable-unshare \ |
101 |
+ --disable-seccomp \ |
102 |
+ --without-libcgroup \ |
103 |
+ --without-gio \ |
104 |
+ --with-inotify=native \ |
105 |
+ --without-mhash |
106 |
+} |
107 |
+ |
108 |
+src_install() { |
109 |
+ emake DESTDIR="${D}" install |
110 |
+ find "${ED}" -name "*.la" -delete |
111 |
+ use static-libs || find "${ED}" -name "*.a" -delete || die "failed to remove static libs" |
112 |
+ |
113 |
+ # docs go into clsync-docs |
114 |
+ rm -rf "${ED}/usr/share/doc" || die |
115 |
+} |
116 |
+ |
117 |
+pkg_postinst() { |
118 |
+ einfo "clsync instances you are going to use _must_ be compiled" |
119 |
+ einfo "with control-socket support" |
120 |
+} |