Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/astmanproxy/, net-misc/astmanproxy/files/
Date: Mon, 28 Dec 2020 12:43:25
Message-Id: 1609159375.91455eb096bb6f86387e6edceff58354cdb07e98.soap@gentoo
1 commit: 91455eb096bb6f86387e6edceff58354cdb07e98
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Mon Dec 28 12:42:55 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 28 12:42:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91455eb0
7
8 net-misc/astmanproxy: Port to EAPI 7
9
10 Closes: https://bugs.gentoo.org/706896
11 Closes: https://bugs.gentoo.org/727856
12 Package-Manager: Portage-3.0.9, Repoman-3.0.1
13 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
14 Signed-off-by: David Seifert <soap <AT> gentoo.org>
15
16 net-misc/astmanproxy/astmanproxy-1.28.2.ebuild | 32 +++++++++-------------
17 .../files/astmanproxy-1.28.2-fno-common.patch | 11 ++++++++
18 .../files/astmanproxy-1.28.2-gentoo.diff | 32 ++++++++++++++++------
19 3 files changed, 47 insertions(+), 28 deletions(-)
20
21 diff --git a/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild b/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
22 index 2fb64067a9a..b1999a39950 100644
23 --- a/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
24 +++ b/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
25 @@ -1,49 +1,43 @@
26 # Copyright 1999-2020 Gentoo Authors
27 # Distributed under the terms of the GNU General Public License v2
28
29 -EAPI=5
30 +EAPI=7
31
32 -inherit base flag-o-matic multilib toolchain-funcs
33 +inherit toolchain-funcs
34
35 DESCRIPTION="Proxy for the Asterisk manager interface"
36 HOMEPAGE="https://github.com/davies147/astmanproxy/"
37 SRC_URI="https://github.com/davies147/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
38
39 -IUSE=""
40 -
41 -SLOT="0"
42 LICENSE="GPL-2"
43 +SLOT="0"
44 KEYWORDS="~amd64 ~ppc ~x86"
45
46 -DEPEND=""
47 -PATCHES=( "${FILESDIR}/${P}-gentoo.diff" )
48 +PATCHES=(
49 + "${FILESDIR}"/${P}-gentoo.diff
50 + "${FILESDIR}"/${P}-fno-common.patch
51 +)
52
53 src_prepare() {
54 - base_src_prepare
55 + default
56
57 # Fix multilib
58 - sed -i -e "s#/usr/lib/#/usr/$(get_libdir)/#" "${S}/Makefile" \
59 + sed -i -e "s#/usr/lib/#/usr/$(get_libdir)/#" Makefile \
60 || die "multilib sed failed"
61 }
62
63 -src_compile() {
64 - emake CC="$(tc-getCC)" \
65 - LDFLAGS="${LDFLAGS}" \
66 - LD="$(tc-getLD)" \
67 - RAWLDFLAGS="$(raw-ldflags)"
68 +src_configure() {
69 + tc-export CC
70 }
71
72 src_install() {
73 dosbin astmanproxy
74
75 + dodoc -r samples
76 dodoc README VERSIONS
77
78 - docinto samples
79 - dodoc samples/*
80 -
81 insinto /etc/asterisk
82 - doins configs/astmanproxy.conf
83 - doins configs/astmanproxy.users
84 + doins configs/astmanproxy.{conf,users}
85
86 newinitd "${FILESDIR}"/astmanproxy.rc6 astmanproxy
87 }
88
89 diff --git a/net-misc/astmanproxy/files/astmanproxy-1.28.2-fno-common.patch b/net-misc/astmanproxy/files/astmanproxy-1.28.2-fno-common.patch
90 new file mode 100644
91 index 00000000000..a7fb0968770
92 --- /dev/null
93 +++ b/net-misc/astmanproxy/files/astmanproxy-1.28.2-fno-common.patch
94 @@ -0,0 +1,11 @@
95 +--- a/src/include/astmanproxy.h
96 ++++ b/src/include/astmanproxy.h
97 +@@ -154,7 +154,7 @@ struct message {
98 + struct mansession *session;
99 + };
100 +
101 +-struct proxyconfig pc;
102 ++extern struct proxyconfig pc;
103 + extern int debug;
104 +
105 + /* Common Function Prototypes */
106
107 diff --git a/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff b/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
108 index 68534cd6108..c6696fedf4a 100644
109 --- a/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
110 +++ b/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
111 @@ -1,21 +1,23 @@
112 -diff -uNr astmanproxy-1.28.2.ORIG/Makefile astmanproxy-1.28.2/Makefile
113 ---- astmanproxy-1.28.2.ORIG/Makefile 2014-02-10 11:18:06.027132570 +0000
114 -+++ astmanproxy-1.28.2/Makefile 2014-02-10 11:21:07.382135291 +0000
115 -@@ -17,7 +17,7 @@
116 +--- a/Makefile
117 ++++ b/Makefile
118 +@@ -15,9 +15,8 @@
119 + CONFFILE := astmanproxy.conf
120 + PERMFILE := astmanproxy.users
121
122 - CC := gcc
123 +-CC := gcc
124 INCLUDES :=
125 -PREFIX:= /usr/local
126 +PREFIX:= /usr
127 BINDIR := $(DESTDIR)$(PREFIX)/sbin
128
129 # For compilation dependencies
130 -@@ -27,7 +27,7 @@
131 +@@ -27,7 +26,8 @@
132 LIBS := -lssl
133
134 # Add -g below for debug/GDB symbols
135 -CFLAGS:=-Wall -O2 -D_REENTRANT -D_GNU_SOURCE -fPIC -Isrc/include -I/usr/include/openssl
136 -+CFLAGS += -Wall -O2 -D_REENTRANT -D_GNU_SOURCE -fPIC -Isrc/include -I/usr/include/openssl
137 ++CFLAGS += -Wall -fPIC
138 ++CPPFLAGS += -D_REENTRANT -D_GNU_SOURCE -Isrc/include -I/usr/include/openssl
139
140 ifeq (${OSARCH},Darwin)
141 LIBS+=-lresolv
142 @@ -28,7 +30,7 @@ diff -uNr astmanproxy-1.28.2.ORIG/Makefile astmanproxy-1.28.2/Makefile
143
144 CFLAGS += $(DEFINES)
145
146 -@@ -76,7 +76,7 @@
147 +@@ -76,16 +76,16 @@
148 SRCS := $(MODS:%=src/%.c)
149 HDRS := src/include/astmanproxy.h
150
151 @@ -36,4 +38,16 @@ diff -uNr astmanproxy-1.28.2.ORIG/Makefile astmanproxy-1.28.2/Makefile
152 +all: astmanproxy
153
154 astmanproxy: $(OBJS) $(SOBJS)
155 - $(CC) $(CFLAGS) -o $@ $(ASTLINK) $(OBJS) $(LIBS)
156 +- $(CC) $(CFLAGS) -o $@ $(ASTLINK) $(OBJS) $(LIBS)
157 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASTLINK) $(OBJS) $(LIBS)
158 +
159 + $(OBJS): %.o: %.c
160 +- $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
161 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
162 +
163 + $(SOBJS): %.so: %.o
164 +- $(CC) $(SOLINK) $< -o $@
165 ++ $(CC) $(LDFLAGS) $(SOLINK) $< -o $@
166 +
167 + SERIAL=`date "+%Y%m%d%H%M%S"`
168 +