[Asterisk-code-review] install prereq: Add Gentoo Linux. (asterisk[15])
Alexander Traud
asteriskteam at digium.com
Fri Mar 23 09:15:04 CDT 2018
Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/8643
Change subject: install_prereq: Add Gentoo Linux.
......................................................................
install_prereq: Add Gentoo Linux.
ASTERISK-27769
Change-Id: Ieb13293cd67481f3a33f58f6f7c8c3ee1e338e7a
---
M contrib/scripts/install_prereq
1 file changed, 41 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/43/8643/1
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 887c5e2..fe12d96 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -83,6 +83,22 @@
PACKAGES_ARCH="$PACKAGES_ARCH bzip2 patch python2"
# Basic build system:
+PACKAGES_GENTOO="sys-devel/make sys-devel/gcc dev-util/pkgconfig"
+# Asterisk: basic requirements:
+PACKAGES_GENTOO="$PACKAGES_GENTOO dev-libs/libedit dev-libs/jansson sys-libs/e2fsprogs-libs dev-libs/libxml2 dev-db/sqlite"
+# Asterisk: for addons:
+PACKAGES_GENTOO="$PACKAGES_GENTOO media-libs/speex media-libs/speexdsp media-libs/libogg media-libs/libvorbis media-libs/alsa-lib media-libs/portaudio net-misc/curl app-text/xmlstarlet sys-devel/bison sys-devel/flex"
+PACKAGES_GENTOO="$PACKAGES_GENTOO dev-db/postgresql dev-db/unixODBC net-libs/neon dev-libs/gmime dev-lang/lua dev-libs/uriparser dev-libs/libxslt dev-libs/openssl"
+PACKAGES_GENTOO="$PACKAGES_GENTOO virtual/libmysqlclient net-wireless/bluez net-dialup/radiusclient-ng dev-db/freetds app-shells/bash"
+PACKAGES_GENTOO="$PACKAGES_GENTOO net-analyzer/net-snmp dev-libs/iksemel sys-cluster/corosync dev-libs/newt dev-libs/popt dev-libs/libical media-libs/spandsp"
+PACKAGES_GENTOO="$PACKAGES_GENTOO net-libs/c-client sys-devel/binutils net-libs/libsrtp media-sound/gsm media-libs/libilbc app-doc/doxygen sys-libs/zlib net-nds/openldap"
+PACKAGES_GENTOO="$PACKAGES_GENTOO sci-libs/fftw media-libs/libsndfile net-dns/unbound"
+# Asterisk: for the unpackaged below:
+PACKAGES_GENTOO="$PACKAGES_GENTOO net-misc/wget dev-vcs/subversion"
+# Asterisk: for ./configure --with-pjproject-bundled:
+PACKAGES_GENTOO="$PACKAGES_GENTOO app-arch/bzip2 sys-devel/patch dev-lang/python:2.7"
+
+# Basic build system:
PACKAGES_NBSD="gmake pkg-config"
# Asterisk: basic requirements:
PACKAGES_NBSD="$PACKAGES_NBSD editline jansson sqlite3 libuuid libxml2"
@@ -179,6 +195,20 @@
done
}
+check_installed_equery() {
+ for pack in "$@"
+ do
+ # equery --quiet list $pack
+ # is slower and
+ # would require the optional app-portage/gentoolkit
+ # /var/lib/portage/world would be the non-dep list
+ pack_with_version=${pack/:/-} # replace a possible version with '-'
+ if ! ls -d /var/db/pkg/${pack_with_version}* >/dev/null 2>/dev/null
+ then echo $pack
+ fi
+ done
+}
+
check_installed_pacman() {
for pack in "$@"
do
@@ -230,6 +260,13 @@
extra_packs=`check_installed_rpms $PACKAGES_RH`
if [ x"$extra_packs" != "x" ] ; then
$testcmd yum install --skip-broken --assumeyes $extra_packs
+ fi
+}
+
+handle_gentoo() {
+ extra_packs=`check_installed_equery $PACKAGES_GENTOO`
+ if [ x"$extra_packs" != "x" ] ; then
+ $testcmd emerge $extra_packs
fi
}
@@ -340,10 +377,6 @@
exit 1
fi
-if [ -f /etc/gentoo-release ]; then
- unsupported_distro='Gentoo'
-fi
-
if [ -f /etc/mandrake-release ]; then
unsupported_distro='Mandriva'
fi
@@ -370,6 +403,10 @@
handle_arch
elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID_LIKE" = "archlinux" ]; then
handle_arch # $ID=arch
+elif [ -f /etc/gentoo-release ]; then
+ handle_gentoo
+elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "gentoo" ]; then
+ handle_gentoo
elif [ "$OS" = 'NetBSD' ]; then
handle_nbsd
elif [ "$OS" = 'OpenBSD' ]; then
--
To view, visit https://gerrit.asterisk.org/8643
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb13293cd67481f3a33f58f6f7c8c3ee1e338e7a
Gerrit-Change-Number: 8643
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180323/5cd8ce90/attachment-0001.html>
More information about the asterisk-code-review
mailing list