summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2020-12-28 13:42:55 +0100
committerDavid Seifert <soap@gentoo.org>2020-12-28 13:42:55 +0100
commit91455eb096bb6f86387e6edceff58354cdb07e98 (patch)
tree431b29af90c1832f03781d4aedf27e6d11593c42
parentmedia-video/frameworks: Port to EAPI 7 (diff)
downloadgentoo-91455eb0.tar.gz
gentoo-91455eb0.tar.bz2
gentoo-91455eb0.zip
net-misc/astmanproxy: Port to EAPI 7
Closes: https://bugs.gentoo.org/706896 Closes: https://bugs.gentoo.org/727856 Package-Manager: Portage-3.0.9, Repoman-3.0.1 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--net-misc/astmanproxy/astmanproxy-1.28.2.ebuild32
-rw-r--r--net-misc/astmanproxy/files/astmanproxy-1.28.2-fno-common.patch11
-rw-r--r--net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff32
3 files changed, 47 insertions, 28 deletions
diff --git a/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild b/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
index 2fb64067a9ab..b1999a399500 100644
--- a/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
+++ b/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
@@ -1,49 +1,43 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit base flag-o-matic multilib toolchain-funcs
+inherit toolchain-funcs
DESCRIPTION="Proxy for the Asterisk manager interface"
HOMEPAGE="https://github.com/davies147/astmanproxy/"
SRC_URI="https://github.com/davies147/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-IUSE=""
-
-SLOT="0"
LICENSE="GPL-2"
+SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
-DEPEND=""
-PATCHES=( "${FILESDIR}/${P}-gentoo.diff" )
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.diff
+ "${FILESDIR}"/${P}-fno-common.patch
+)
src_prepare() {
- base_src_prepare
+ default
# Fix multilib
- sed -i -e "s#/usr/lib/#/usr/$(get_libdir)/#" "${S}/Makefile" \
+ sed -i -e "s#/usr/lib/#/usr/$(get_libdir)/#" Makefile \
|| die "multilib sed failed"
}
-src_compile() {
- emake CC="$(tc-getCC)" \
- LDFLAGS="${LDFLAGS}" \
- LD="$(tc-getLD)" \
- RAWLDFLAGS="$(raw-ldflags)"
+src_configure() {
+ tc-export CC
}
src_install() {
dosbin astmanproxy
+ dodoc -r samples
dodoc README VERSIONS
- docinto samples
- dodoc samples/*
-
insinto /etc/asterisk
- doins configs/astmanproxy.conf
- doins configs/astmanproxy.users
+ doins configs/astmanproxy.{conf,users}
newinitd "${FILESDIR}"/astmanproxy.rc6 astmanproxy
}
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
new file mode 100644
index 000000000000..a7fb09687702
--- /dev/null
+++ b/net-misc/astmanproxy/files/astmanproxy-1.28.2-fno-common.patch
@@ -0,0 +1,11 @@
+--- a/src/include/astmanproxy.h
++++ b/src/include/astmanproxy.h
+@@ -154,7 +154,7 @@ struct message {
+ struct mansession *session;
+ };
+
+-struct proxyconfig pc;
++extern struct proxyconfig pc;
+ extern int debug;
+
+ /* Common Function Prototypes */
diff --git a/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff b/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
index 68534cd61086..c6696fedf4a1 100644
--- a/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
+++ b/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
@@ -1,21 +1,23 @@
-diff -uNr astmanproxy-1.28.2.ORIG/Makefile astmanproxy-1.28.2/Makefile
---- astmanproxy-1.28.2.ORIG/Makefile 2014-02-10 11:18:06.027132570 +0000
-+++ astmanproxy-1.28.2/Makefile 2014-02-10 11:21:07.382135291 +0000
-@@ -17,7 +17,7 @@
+--- a/Makefile
++++ b/Makefile
+@@ -15,9 +15,8 @@
+ CONFFILE := astmanproxy.conf
+ PERMFILE := astmanproxy.users
- CC := gcc
+-CC := gcc
INCLUDES :=
-PREFIX:= /usr/local
+PREFIX:= /usr
BINDIR := $(DESTDIR)$(PREFIX)/sbin
# For compilation dependencies
-@@ -27,7 +27,7 @@
+@@ -27,7 +26,8 @@
LIBS := -lssl
# Add -g below for debug/GDB symbols
-CFLAGS:=-Wall -O2 -D_REENTRANT -D_GNU_SOURCE -fPIC -Isrc/include -I/usr/include/openssl
-+CFLAGS += -Wall -O2 -D_REENTRANT -D_GNU_SOURCE -fPIC -Isrc/include -I/usr/include/openssl
++CFLAGS += -Wall -fPIC
++CPPFLAGS += -D_REENTRANT -D_GNU_SOURCE -Isrc/include -I/usr/include/openssl
ifeq (${OSARCH},Darwin)
LIBS+=-lresolv
@@ -28,7 +30,7 @@ diff -uNr astmanproxy-1.28.2.ORIG/Makefile astmanproxy-1.28.2/Makefile
CFLAGS += $(DEFINES)
-@@ -76,7 +76,7 @@
+@@ -76,16 +76,16 @@
SRCS := $(MODS:%=src/%.c)
HDRS := src/include/astmanproxy.h
@@ -36,4 +38,16 @@ diff -uNr astmanproxy-1.28.2.ORIG/Makefile astmanproxy-1.28.2/Makefile
+all: astmanproxy
astmanproxy: $(OBJS) $(SOBJS)
- $(CC) $(CFLAGS) -o $@ $(ASTLINK) $(OBJS) $(LIBS)
+- $(CC) $(CFLAGS) -o $@ $(ASTLINK) $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASTLINK) $(OBJS) $(LIBS)
+
+ $(OBJS): %.o: %.c
+- $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+
+ $(SOBJS): %.so: %.o
+- $(CC) $(SOLINK) $< -o $@
++ $(CC) $(LDFLAGS) $(SOLINK) $< -o $@
+
+ SERIAL=`date "+%Y%m%d%H%M%S"`
+