ipv6calc-0.99.2.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. DESCRIPTION="IPv6 address calculator"
  5. HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
  6. SRC_URI="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/${P}.tar.gz"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
  10. IUSE="geoip libressl test"
  11. RDEPEND="
  12. !libressl? ( dev-libs/openssl:= )
  13. libressl? ( dev-libs/libressl:= )
  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. }