ipv6calc-0.99.0.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils
  5. DESCRIPTION="IPv6 address calculator"
  6. HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
  7. SRC_URI="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
  11. IUSE="geoip test"
  12. RDEPEND="
  13. dev-libs/openssl:=
  14. geoip? ( >=dev-libs/geoip-1.4.7 )
  15. "
  16. DEPEND="${RDEPEND}
  17. test? ( dev-perl/Digest-SHA1 )
  18. "
  19. #dev-perl/URI is needed for web interface, that is not installed now
  20. src_configure() {
  21. # These options are broken. You can't disable them. That's
  22. # okay because we want then force enabled.
  23. # --disable-db-as-registry
  24. # --disable-db-cc-registry
  25. if use geoip; then
  26. myconf=$(use_enable geoip)
  27. myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
  28. fi
  29. econf \
  30. --disable-bundled-getopt \
  31. --disable-bundled-md5 \
  32. --enable-shared \
  33. --enable-dynamic-load \
  34. --enable-db-ieee \
  35. --enable-db-ipv4 \
  36. --enable-db-ipv6 \
  37. --disable-dbip \
  38. --disable-external \
  39. --disable-ip2location \
  40. ${myconf}
  41. }
  42. src_compile() {
  43. # Disable default CFLAGS (-O2 and -g)
  44. emake DEFAULT_CFLAGS=""
  45. }
  46. src_test() {
  47. if [[ ${EUID} -eq 0 ]]; then
  48. # Disable tests that fail as root
  49. echo true > ipv6logstats/test_ipv6logstats.sh
  50. fi
  51. default
  52. }
  53. src_install() {
  54. emake DESTDIR="${D}" install
  55. dodoc ChangeLog CREDITS README TODO USAGE
  56. }