Diff wvstreams-4.6.1_p14-r1 with a wvstreams-99999

/usr/portage/net-libs/wvstreams/wvstreams-99999.ebuild 2021-05-02 14:09:00.000000000 +0300
1 1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
5
inherit autotools flag-o-matic toolchain-funcs
4
EAPI=6
5
AT_NOELIBTOOLIZE=yes
6
inherit autotools flag-o-matic git-r3 multiprocessing toolchain-funcs out-of-source
6 7

  
7 8
DESCRIPTION="A network programming library in C++"
8 9
HOMEPAGE="https://github.com/apenwarr/wvstreams"
9
SRC_URI="
10
	mirror://debian/pool/main/w/${PN}/${PN}_${PV/_p*}.orig.tar.gz
11
	mirror://debian/pool/main/w/${PN}/${PN}_${PV/_p/-}.debian.tar.xz
12
"
10
EGIT_REPO_URI="https://github.com/apenwarr/wvstreams"
13 11

  
14 12
LICENSE="GPL-2"
15
SLOT="0"
16
KEYWORDS="~alpha amd64 ~hppa ppc sparc x86"
17
IUSE="boost +dbus debug doc pam"
18

  
19
#Tests fail if openssl is not compiled with -DPURIFY. Gentoo's isn't. FAIL!
20
RESTRICT="test"
21

  
22
#QA Fail: xplc is compiled as a part of wvstreams.
23
#It'll take a larger patching effort to get it extracted, since upstream integrated it
24
#more tightly this time. Probably for the better since upstream xplc seems dead.
13
SLOT="0/5.0"
14
KEYWORDS=""
15
IUSE="+dbus debug doc pam static-libs +zlib"
25 16

  
26 17
RDEPEND="
27 18
	sys-libs/readline:0=
28 19
	sys-libs/zlib
29 20
	dbus? ( >=sys-apps/dbus-1.4.20 )
30
	>=dev-libs/openssl-1.1:0=
21
	<dev-libs/openssl-1.1:0=
31 22
	pam? ( sys-libs/pam )
32 23
"
33 24
DEPEND="
34 25
	${RDEPEND}
26
	dev-util/redo
35 27
	virtual/pkgconfig
36 28
	doc? ( app-doc/doxygen )
37
	boost? ( >=dev-libs/boost-1.34.1:= )
38 29
"
39
DOCS="ChangeLog README*"
40 30
PATCHES=(
41
	"${FILESDIR}"/${PN}-4.6.1-autoconf.patch
42
	"${FILESDIR}"/${PN}-4.6.1-gcc47.patch
43
	"${FILESDIR}"/${PN}-4.6.1-parallel-make.patch
44
	"${FILESDIR}"/${PN}-4.6.1-_DEFAULT_SOURCE.patch
45
	"${FILESDIR}"/${PN}-4.6.1_p14-xplc-module.patch
46
	"${FILESDIR}"/${PN}-4.6.1_p14-llvm.patch
31
	"${FILESDIR}"/${PN}-99999-openssl-ldflags.patch
32
	"${FILESDIR}"/${PN}-99999-soname.patch
47 33
)
48
S=${WORKDIR}/${P/_p*}
49 34

  
50 35
src_prepare() {
51
	default
36
	sed -i -e 's|-pre||g' config.ac || die
52 37

  
53
	eapply $(awk '{ print "'"${WORKDIR}"'/debian/patches/" $0; }' < "${WORKDIR}"/debian/patches/series)
38
	default
54 39

  
40
	ln -s config.ac configure.ac || die
55 41
	eautoreconf
56 42
}
57 43

  
58
src_configure() {
44
my_src_configure() {
59 45
	append-flags -fno-strict-aliasing
60 46
	append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
61 47

  
62
	tc-export AR CXX
63

  
64
	use boost && export ac_cv_header_tr1_functional=no
48
	tc-export AR CC CXX
65 49

  
66 50
	econf \
67 51
		$(use_enable debug) \
68 52
		$(use_with dbus) \
69 53
		$(use_with pam) \
70
		--cache-file="${T}"/config.cache \
54
		$(use_with zlib) \
55
		--cache-file="${BUILD_DIR}"/config.cache \
71 56
		--disable-optimization \
72 57
		--localstatedir=/var \
73
		--with-openssl \
74
		--with-zlib \
75 58
		--without-qt \
76
		--without-tcl \
77 59
		--without-valgrind
78 60
}
79 61

  
80
src_compile() {
81
	default
62
my_src_compile() {
63
	redo -j$(makeopts_jobs) || die
82 64

  
83 65
	if use doc; then
84
		doxygen || die
66
		doxygen "${S}"/Doxyfile || die
85 67
	fi
86 68
}
87 69

  
88
src_test() {
89
	emake test
70
my_src_test() {
71
	redo -j$(makeopts_jobs) test || die
90 72
}
91 73

  
92
src_install() {
93
	default
74
my_src_install() {
75
	DESTDIR="${D}" redo -j$(makeopts_jobs) install || die
76

  
77
	local lib
78
	for lib in $(find "${BUILD_DIR}" -name '*.so' -type l | grep -v libwvstatic); do
79
		insinto /usr/$(get_libdir)/pkgconfig
80
		doins "${BUILD_DIR}"/pkgconfig/$(basename ${lib/.so}).pc
81
	done
94 82

  
95 83
	if use doc; then
84
		#the list of files is too big for dohtml -r Docs/doxy-html/*
96 85
		docinto html
97 86
		dodoc -r Docs/doxy-html/*
98 87
	fi
88

  
89
	if ! use static-libs; then
90
		find "${D}/usr/$(get_libdir)" -name '*.a' -delete || die
91
	fi
99 92
}
Thank you!