Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/olsrd/, net-misc/olsrd/files/
Date: Fri, 23 Nov 2018 17:19:39
Message-Id: 1542993567.28d66bf7c10aa06b920a15612965ba3695e460f4.jer@gentoo
1 commit: 28d66bf7c10aa06b920a15612965ba3695e460f4
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 23 17:19:15 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 23 17:19:27 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28d66bf7
7
8 net-misc/olsrd: Fix configuration warning in init script
9
10 While there, decompress manual pages, too.
11
12 Fixes: https://bugs.gentoo.org/642108
13 Package-Manager: Portage-2.3.52, Repoman-2.3.12
14 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
15
16 net-misc/olsrd/files/olsrd | 4 +-
17 net-misc/olsrd/olsrd-0.9.6.1-r1.ebuild | 101 +++++++++++++++++++++++++++++++++
18 2 files changed, 103 insertions(+), 2 deletions(-)
19
20 diff --git a/net-misc/olsrd/files/olsrd b/net-misc/olsrd/files/olsrd
21 index aca79b9d428..34c410e9944 100644
22 --- a/net-misc/olsrd/files/olsrd
23 +++ b/net-misc/olsrd/files/olsrd
24 @@ -5,8 +5,8 @@ depend() {
25 }
26
27 checkconfig() {
28 - if [ ! -e /etc/olsrd.conf ]; then
29 - eerror "You need a /etc/olsrd.conf file to run olsrd"
30 + if [ ! -e /etc/olsrd/olsrd.conf ]; then
31 + eerror "You need a /etc/olsrd/olsrd.conf file to run olsrd"
32 eerror "There is sample file in /usr/share/doc/olsrd-version/"
33 return 1
34 fi
35
36 diff --git a/net-misc/olsrd/olsrd-0.9.6.1-r1.ebuild b/net-misc/olsrd/olsrd-0.9.6.1-r1.ebuild
37 new file mode 100644
38 index 00000000000..32a6685bd66
39 --- /dev/null
40 +++ b/net-misc/olsrd/olsrd-0.9.6.1-r1.ebuild
41 @@ -0,0 +1,101 @@
42 +# Copyright 1999-2018 Gentoo Authors
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +EAPI=6
46 +inherit eutils multilib toolchain-funcs versionator
47 +
48 +DESCRIPTION="An implementation of the Optimized Link State Routing protocol"
49 +HOMEPAGE="http://www.olsr.org/"
50 +SRC_URI="http://www.olsr.org/releases/$(get_version_component_range 1-2)/${P}.tar.bz2"
51 +
52 +SLOT="0"
53 +LICENSE="BSD LGPL-2.1"
54 +KEYWORDS="~amd64 ~x86"
55 +IUSE="gtk pud"
56 +DEPEND="
57 + gtk? (
58 + dev-libs/glib:2
59 + x11-libs/gdk-pixbuf:2
60 + x11-libs/gtk+:2
61 + )
62 + pud? ( sci-geosciences/gpsd )
63 +"
64 +RDEPEND="
65 + ${DEPEND}
66 +"
67 +PATCHES=(
68 + "${FILESDIR}"/${PN}-0.9.0.2-gtk.patch
69 + "${FILESDIR}"/${PN}-0.9.6-gpsd.patch
70 +)
71 +src_prepare() {
72 + default
73 +
74 + # fix parallel make
75 + # respect AR
76 + # verbose build
77 + # fix default prefix, bug #453440
78 + sed -i \
79 + -e '/@echo "\[/d' \
80 + -e 's|$(MAKECMD)|$(MAKE)|g' \
81 + -e 's|@$(CC)|$(CC)|g' \
82 + -e 's|@ar |$(AR) |g' \
83 + -e '/^prefix/s:/usr/local:/usr:' \
84 + $( find -name 'Makefile*' ) || die
85 +
86 + # respect LDFLAGS
87 + sed -i \
88 + -e 's|$(CC)|& $(OLSRD_LDFLAGS)|g' \
89 + lib/pud/nmealib/Makefile lib/pud/wireformat/Makefile || die
90 +}
91 +
92 +src_configure() {
93 + if ! use pud; then
94 + sed -i -e '/^SUBDIRS/ s|pud||g' Makefile || die
95 + fi
96 +}
97 +
98 +src_compile() {
99 + tc-export PKG_CONFIG
100 + emake \
101 + CC="$(tc-getCC)" \
102 + VERBOSE=1 \
103 + LIBDIR="/usr/$(get_libdir)/${PN}" \
104 + OLSRD_LDFLAGS="${LDFLAGS}" \
105 + OS=linux \
106 + build_all
107 + if use gtk; then
108 + emake -C gui/linux-gtk LIBDIR="/usr/$(get_libdir)/${PN}" CC="$(tc-getCC)"
109 + fi
110 +}
111 +
112 +src_install() {
113 + emake OS=linux LIBDIR="${D}/usr/$(get_libdir)/${PN}" \
114 + DESTDIR="${D}" STRIP=true install_all
115 + if use gtk; then
116 + emake -C gui/linux-gtk \
117 + LIBDIR="${D}/usr/$(get_libdir)/${PN}" DESTDIR="${D}" install
118 + fi
119 +
120 + doinitd "${FILESDIR}"/${PN}
121 +
122 + gzip -d \
123 + "${ED%/}"/usr/share/man/man5/olsrd.conf.5.gz \
124 + "${ED%/}"/usr/share/man/man8/olsrd.8.gz
125 +
126 + dodoc CHANGELOG \
127 + valgrind-howto.txt files/olsrd.conf.default.rfc \
128 + files/olsrd.conf.default.lq \
129 + lib/arprefresh/README_ARPREFRESH \
130 + lib/bmf/README_BMF \
131 + lib/dot_draw/README_DOT_DRAW \
132 + lib/dyn_gw/README_DYN_GW \
133 + lib/dyn_gw_plain/README_DYN_GW_PLAIN \
134 + lib/httpinfo/README_HTTPINFO \
135 + lib/mini/README_MINI \
136 + lib/nameservice/README_NAMESERVICE \
137 + lib/pgraph/README_PGRAPH \
138 + lib/quagga/README_QUAGGA \
139 + lib/secure/README_SECURE \
140 + lib/txtinfo/README_TXTINFO \
141 + lib/watchdog/README_WATCHDOG
142 +}