summaryrefslogtreecommitdiff
path: root/net-irc/epic5
diff options
context:
space:
mode:
Diffstat (limited to 'net-irc/epic5')
-rw-r--r--net-irc/epic5/Manifest11
-rw-r--r--net-irc/epic5/epic5-1.1.10-r1.ebuild86
-rw-r--r--net-irc/epic5/files/epic5-1.1.10-ruby-automagic-as-needed.patch134
-rw-r--r--net-irc/epic5/files/epic5-1.1.10-socks5-libsocks.patch37
-rw-r--r--net-irc/epic5/files/epic5-1.1.10-tcl-automagic-as-needed.patch116
-rw-r--r--net-irc/epic5/files/epic5-1.1.10-without-localdir.patch66
-rw-r--r--net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch53
-rw-r--r--net-irc/epic5/files/epic5-1.1.2-perl-automagic-as-needed.patch114
-rw-r--r--net-irc/epic5/metadata.xml9
9 files changed, 626 insertions, 0 deletions
diff --git a/net-irc/epic5/Manifest b/net-irc/epic5/Manifest
new file mode 100644
index 000000000000..851ed076be5c
--- /dev/null
+++ b/net-irc/epic5/Manifest
@@ -0,0 +1,11 @@
+AUX epic5-1.1.10-ruby-automagic-as-needed.patch 4139 SHA256 d16b22cb98e5129f15ebdeea746716673af349a5ab0805b6c89c6359f384d44c SHA512 2aa7122a4192849eb3c99c567cc0ad3fb914c4ef17555aecdffeee2b3792f511c3cd43ba069163889705e7a64d04e0636aa0b77934f9605eacfa1ed8d53afa9d WHIRLPOOL f90fe7dbb92fe773f1362af5c1f0328ebfac2e862761f80c32ae54e938b1d05b0f67cc22d1b4a08f0b4956e99da196c9d9d25c437c60d9d892cde994f5a5cbd1
+AUX epic5-1.1.10-socks5-libsocks.patch 1191 SHA256 9358fee981a228211def2f8d236dec8ed5e3cab4f0b996260acaaecfae3bdccf SHA512 bc0a441ef90d454441789fb1a11c3183776544a675acdc33158357ebad6bbc2a89c8689dad89cefe69b59ff7b6de4e97add32d84a500e83d3469634253ef6b3f WHIRLPOOL 40c4d0e914d7123efd0f66de61a07673e1ae2f8146d17a7c8879f754ec04618f63f81956679ef5e5c414444084bedabe3506e04d76664154d2bd51d17c199094
+AUX epic5-1.1.10-tcl-automagic-as-needed.patch 3453 SHA256 60e469a150c04cd720e0eac23e5a589fc548e6b926434796a259cd4801fde7dc SHA512 845e2e2ff40ab0c5351bc995457060b19781b07285e7115013cf5dea7ba333f28b9c248dd66369fda8a6038ad4de4fb71fb1d77c5b51568667a491efaebd72df WHIRLPOOL bdd17f1d236c3ae170186a48af417dbe4639842132aa04aaf7e462b307de4895cd54b65f28cf0436207f610fb5731fbcb76371c18c699a28a425100e8e7b0d27
+AUX epic5-1.1.10-without-localdir.patch 1780 SHA256 487a5614ac4099264e7ef7568858a5d83568cebc8a64d490ecd0597455e99a35 SHA512 788683fe1448793a2d8a5e50dda3dfb0aef86c44cbec11ed0a92444967a1775050bdd3ac40c44989b6fce16a6e7db154aa26d4f4c6692538eca2e661d32af7a6 WHIRLPOOL f95418fde4ae9cc8585b49f8b314d958410dc13287ffa12fffd6720d8d76dd9febceba4ed3dc8ba123884b2f1da21db88d204df75ef8f89c93680241a60614b3
+AUX epic5-1.1.2-libarchive-automagic.patch 1707 SHA256 c04768c6c2fb5dbb5c879d1025cdd6a7d02e7fd3cfc25b081e58e301c2e58439 SHA512 6f438cc70982538e09d9a0eef7e2c42c331aa73c279157d4bd44b48c6aea26b08b9433927a51fef025acf22bfeec330c4c99946538eae5dca50360963e5f828c WHIRLPOOL eb60683cc0424e3948bed3227467c8d39f13d6bc1a8e19f907c59595f2620282343b1649301ce35c4a86c8b68170043846d742ccc69eff3a2378fa1d6bc7928d
+AUX epic5-1.1.2-perl-automagic-as-needed.patch 3123 SHA256 2bdb85285e83a2ab1f68eb9b43313e9e0695f7de045312dfae4ec7dcdbabd10a SHA512 bd58fa5b49b0b9c900612d1183d696e6683113420f79702df0706a3bd3885bc6215a178a11ca9dff8c9337314cf72488b85217d731b162dea95f4c8e22d50a6c WHIRLPOOL 34091febf2784d7cd4ef5deb6485fb17bf32bcedda17e6f899e29da876204d57a6492b8250d2a1631e46aaf1c9c2438b452c7cf3bac005cdb29931f7e70873b4
+DIST epic5-1.1.10.tar.bz2 851439 SHA256 a4f19214e8eb9a7aceaed62d924d96d8c9359b186ff230c01daff398dd62cdb5 SHA512 d0215570962253a0d5c60dacec86db1094575b0765db039247cf16b5957ba721576618ff73588610ba528782f4460fd4bbe5a1869e60e2c10d832d41ea3c6048 WHIRLPOOL 906b919e99a4bfed78bab153aae3964850be17de958382859547fc34ded75a546714c57c4b1857597fec210359f93a1f6da3b5375a689ac435be381b101ec64a
+EBUILD epic5-1.1.10-r1.ebuild 2218 SHA256 7eedefbdb33dd7249d724c4f46995f89479441c7139b4e257d1aec533cc8e17e SHA512 2e16408ba7ee0246f7b6ad7389675208cd6d25ff94dfb8454a467e6572e57c5e17a78c27d5b07cb174423ddc4253106e223b06f6a257060f119f4dc2c00a26f3 WHIRLPOOL 9ca7d7dce3a30b2c1f4cfe1e41c022782c8389b5d13acc8810099599e8010f57519b1f237566fa8b8ae68cb44bdffdb43909be3e8f80a25d7cb0b1da6fe28726
+MISC ChangeLog 3341 SHA256 a91ea9a8df0acdf0bccbab2ce89616902ca1e4d289d834c736357b0d01d3f12a SHA512 a9b4fd058e7ec3174ce18b43a403ac33bb2f9ef5911fad21a96844398610956765ecad0810932a415a01b31ba3d28082a1ddd37a76d3c4b36cd745d479392744 WHIRLPOOL 9fcabbbeffe20aae3c74b3fd3178615507226d0c2526a8d1d674026bde75accaebd9555eefc6e75b07ada6d77aa9a5a0eff8a2ceeb1976abfaa90da932df7c87
+MISC ChangeLog-2015 4923 SHA256 18ba4c6536ac45ec578e1e9a24c99d6fd1760f9442570d26242f8db20073f246 SHA512 81e4257df675ffb4259e015e7787113e37fa9b8d12372d5e8111e74c4a998bd40a7e2c4eb9e7d2c1ca09c2675781931c7cdddc8d92e05ffcf5b3273e6e1b9b55 WHIRLPOOL 30d9f7f8b70a11dcf14806577ef7b0234380322cbf07fb295e7f12efe7f20178042596acaeb6641e316f89fb29102b986100b99c0efad18b35d2abb4191deac6
+MISC metadata.xml 447 SHA256 399695aa12c4af43e1cf7f628ef4006ad50c65dcff5d71e6dff3d0e6c1f2df7e SHA512 a3f99db42705f69febe961e85d76a3c4686918e253fc1c979941daa135ae65d920ad5127a4ea6ad9a8628df405ef937731168eb47b7a69fb92131d4ce703947a WHIRLPOOL 1d23dab8c79720943244120973d7ba619ea0559bb131462cb94e8e056f24800af6607d36d7b8f5dc40260b0bee8fa647be76cab55583ccce9fac1e8de725bac7
diff --git a/net-irc/epic5/epic5-1.1.10-r1.ebuild b/net-irc/epic5/epic5-1.1.10-r1.ebuild
new file mode 100644
index 000000000000..b10edb0ea041
--- /dev/null
+++ b/net-irc/epic5/epic5-1.1.10-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+USE_RUBY="ruby20 ruby21 ruby22"
+RUBY_OPTIONAL=yes
+inherit autotools eutils multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Epic5 IRC Client"
+SRC_URI="ftp://ftp.epicsol.org/pub/epic/EPIC5-PRODUCTION/${P}.tar.bz2"
+HOMEPAGE="http://epicsol.org/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="archive ipv6 perl tcl ruby socks5 valgrind"
+
+RDEPEND="
+ >=dev-libs/openssl-0.9.8e-r3:0
+ >=sys-libs/ncurses-5.6-r2
+ virtual/libiconv
+ archive? ( app-arch/libarchive )
+ perl? ( >=dev-lang/perl-5.8.8-r2 )
+ tcl? ( dev-lang/tcl:0 )
+ socks5? ( net-proxy/dante )
+ ruby? ( $(ruby_implementations_depend) )"
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )"
+REQUIRED_USE="ruby? ( ^^ ( $(ruby_get_use_targets) ) )
+ $(for t in $(ruby_get_use_targets); do echo "${t}? ( ruby )"; done)"
+
+S=${WORKDIR}/${P}
+
+pkg_setup() {
+ # bug #489608, bug #497080
+ use ruby && ruby-ng_pkg_setup
+}
+
+# Don't use ruby-ng's separated sources support:
+src_unpack() {
+ default
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.1.2-libarchive-automagic.patch \
+ "${FILESDIR}"/${P}-ruby-automagic-as-needed.patch \
+ "${FILESDIR}"/${P}-tcl-automagic-as-needed.patch \
+ "${FILESDIR}"/${PN}-1.1.2-perl-automagic-as-needed.patch \
+ "${FILESDIR}"/${P}-without-localdir.patch \
+ "${FILESDIR}"/${P}-socks5-libsocks.patch
+ eautoconf
+}
+
+src_configure() {
+ # Because of our REQUIRED_USE constraints above, we know that
+ # ruby_get_use_implementations will only ever return one ruby
+ # implementation.
+ econf \
+ --libexecdir="${EPREFIX}"/usr/lib/misc \
+ $(use_with archive libarchive) \
+ $(use_with ipv6) \
+ $(use_with perl) \
+ $(use_with ruby ruby "$(ruby_implementation_command $(ruby_get_use_implementations))") \
+ $(use_with socks5) \
+ $(use_with tcl tcl "${EPREFIX}"/usr/$(get_libdir)/tclConfig.sh) \
+ $(use_with valgrind valgrind)
+}
+
+src_compile() {
+ # parallel build failure
+ emake -j1
+}
+
+src_install () {
+ default
+
+ dodoc BUG_FORM COPYRIGHT EPIC4-USERS-README README KNOWNBUGS VOTES
+
+ cd "${S}"/doc || die
+ docinto doc
+ dodoc \
+ *.txt colors EPIC* IRCII_VERSIONS missing \
+ nicknames outputhelp README.SSL SILLINESS TS4
+}
diff --git a/net-irc/epic5/files/epic5-1.1.10-ruby-automagic-as-needed.patch b/net-irc/epic5/files/epic5-1.1.10-ruby-automagic-as-needed.patch
new file mode 100644
index 000000000000..ba277ca8f60b
--- /dev/null
+++ b/net-irc/epic5/files/epic5-1.1.10-ruby-automagic-as-needed.patch
@@ -0,0 +1,134 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Fix up linking against libruby when using
+ LDFLAGS=-Wl,--as-needed. Also allow ruby to be a non-automagic
+ dependency.
+
+--- a/configure.in Tue Mar 25 07:39:34 2014 +0000
++++ b/configure.in Tue Mar 25 07:55:14 2014 +0000
+@@ -1168,34 +1168,28 @@
+ dnl
+ dnl Ruby support?
+ dnl
+-AC_ARG_WITH(ruby,
+-[ --with-ruby[=PATH_TO_RUBY_EXE] Compile with ruby support.],
+-[
+- rubyexe=$withval
+-],
+- rubyexe=yes
+-)
+-
+-if test "x$rubyexe" = "xyes"; then
+- for i in ruby ruby20 ruby19 ruby18 ruby2.0 ruby1.9.1 ruby1.9 ruby1.8; do
+- $i -h 2>&1 >/dev/null && rubyexe=$i && break
+- done
+- if test "x$rubyexe" = "xyes"; then
+- rubyexe=no
+- fi
+-fi
++AC_ARG_WITH([ruby],
++ [AS_HELP_STRING([--with-ruby[=PATH_TO_RUBY_EXE]], [Compile with ruby support.])],
++ [], [with_ruby=maybe])
+
+-if test "x$rubyexe" = "xno"; then
++with_ruby_errormsg="--with-ruby was specified but I could not locate ruby. Please try specifying --with-ruby=/path/to/ruby or --without-ruby."
++AC_MSG_CHECKING([whether to support Ruby])
++if test "x$with_ruby" = "xno" ; then
+ AC_MSG_CHECKING(whether to support Ruby)
+ AC_MSG_RESULT(no)
+ else
+- AC_CHECK_PROG(RUBYPROG, $rubyexe, "yes", "no")
+- AC_MSG_CHECKING(whether to support Ruby)
+- if test $RUBYPROG != "yes" ; then
+- AC_MSG_RESULT(no)
++ AC_MSG_RESULT(yes)
++ AS_IF([test "x$with_ruby" = "xyes" -o "x$with_ruby" = "xmaybe"],
++ [rubyexe=ruby],
++ [rubyexe="$with_ruby"])
++ dnl Support --with-ruby being passed a full path instead of just an executable name.
++ AS_IF([test -x "$rubyexe"],
++ [RUBYPROG=yes],
++ [AC_CHECK_PROG([RUBYPROG], [$rubyexe], [yes], [no])])
++ if test "x$RUBYPROG" = xno ; then
++ AS_IF([test "x$with_ruby" != "xmaybe"],
++ [AC_MSG_ERROR([$with_ruby_errormsg])])
+ else
+- AC_MSG_RESULT(yes)
+-
+ dnl ----
+ dnl Look first for Ruby 1.9
+ incdir=`$rubyexe -rrbconfig -e 'puts RbConfig::CONFIG[["rubyhdrdir"]]'`
+@@ -1208,15 +1205,15 @@
+
+ rubylibs=`$rubyexe -rrbconfig -e 'puts RbConfig::CONFIG[["LIBRUBYARG"]]'`
+ extralibs=`$rubyexe -rrbconfig -e 'puts RbConfig::CONFIG[["LIBS"]]'`
+- RUBYLDFLAGS="$rubylibs $extralibs"
++ RUBYLIBS="$rubylibs $extralibs"
+ RUBYDOTOH="ruby.o"
+
+ AC_MSG_CHECKING(whether embedded ruby works the way I expect)
+ have_embedded_ruby="no"
+ old_CFLAGS="$CFLAGS"
+- old_LDFLAGS="$LDFLAGS"
++ old_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $RUBYCFLAGS"
+- LDFLAGS="$LDFLAGS $RUBYLDFLAGS"
++ LIBS="$LIBS $RUBYLIBS"
+ AC_TRY_LINK([
+ #include <ruby.h>
+ VALUE epic_echo (VALUE module, VALUE string)
+@@ -1241,9 +1238,9 @@
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(whether ruby requires -pthread to link)
+ RUBYCFLAGS="$RUBYCFLAGS -pthread"
+- RUBYLDFLAGS="$RUBYLDFLAGS -pthread"
+- CFLAGS="$CFLAGS $RUBYCFLAGS"
+- LDFLAGS="$LDFLAGS $RUBYLDFLAGS"
++ RUBYLIBS="$RUBYLIBS -pthread"
++ CFLAGS="$old_CFLAGS $RUBYCFLAGS"
++ LIBS="$old_LIBS $RUBYLIBS"
+
+ AC_TRY_LINK([
+ #include <ruby.h>
+@@ -1268,17 +1265,19 @@
+ fi
+
+ CFLAGS="$old_CFLAGS"
+- LDFLAGS="$old_LDFLAGS"
++ LIBS="$old_LIBS"
+ if test $have_embedded_ruby = "yes" ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_RUBY)
+ AC_DEFINE(RUBYCFLAGS)
+- AC_DEFINE(RUBYLDFLAGS)
++ AC_DEFINE(RUBYLIBS)
+ else
++ AS_IF([test "x$with_ruby" != "xmaybe"],
++ [AC_MSG_ERROR([$with_ruby_errormsg])])
+ RUBYDOTOH=""
+ HAVE_RUBY=""
+ RUBYCFLAGS=""
+- RUBYLDFLAGS=""
++ RUBYLIBS=""
+ AC_MSG_RESULT(no, sorry)
+ fi
+ fi
+@@ -1376,7 +1375,7 @@
+ AC_SUBST(LDFLAGS)
+ AC_SUBST(RUBYDOTOH)
+ AC_SUBST(RUBYCFLAGS)
+-AC_SUBST(RUBYLDFLAGS)
++AC_SUBST(RUBYLIBS)
+ AC_SUBST(TCLDOTOH)
+ AC_SUBST(TCLCFLAGS)
+ AC_SUBST(TCLLDFLAGS)
+--- a/source/Makefile.in Tue Mar 25 07:39:34 2014 +0000
++++ b/source/Makefile.in Tue Mar 25 07:55:14 2014 +0000
+@@ -38,7 +38,7 @@
+ epic5: $(OBJECTS)
+ sh info.c.sh
+ $(CC) $(CFLAGS) $(INCLUDES) -c info.c
+- $(CC) $(CFLAGS) $(LDFLAGS) -o epic5 $(OBJECTS) info.o @PERLLDFLAGS@ @TCLLDFLAGS@ @RUBYLDFLAGS@ $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o epic5 $(OBJECTS) info.o @PERLLDFLAGS@ @TCLLDFLAGS@ @RUBYLIBS@ $(LIBS)
+ $(RM) info.c info.o
+ clean::
+ $(RM) epic5 $(OBJECTS)
diff --git a/net-irc/epic5/files/epic5-1.1.10-socks5-libsocks.patch b/net-irc/epic5/files/epic5-1.1.10-socks5-libsocks.patch
new file mode 100644
index 000000000000..c2555c059e79
--- /dev/null
+++ b/net-irc/epic5/files/epic5-1.1.10-socks5-libsocks.patch
@@ -0,0 +1,37 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Use -lsocks instead of -lsocks5 for `./configure --with-socks5`.
+
+Index: configure.in
+===================================================================
+RCS file: /home/cvs/repository/epic5/configure.in,v
+retrieving revision 1.101
+diff -u -b -B -u -r1.101 configure.in
+--- configure.in 9 Apr 2014 17:51:06 -0000 1.101
++++ configure.in 4 Sep 2014 00:18:00 -0000
+@@ -861,7 +861,7 @@
+
+ AC_MSG_CHECKING(whether to support SOCKS)
+ AC_ARG_WITH(socks,
+-[ --with-socks[=PATH] Compile with SOCKS firewall traversal support.],
++[ --with-socks[=PATH] Compile with SOCKS (libsocks without socks.h) firewall traversal support.],
+ [ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+@@ -887,7 +887,7 @@
+
+ AC_MSG_CHECKING(whether to support SOCKS5)
+ AC_ARG_WITH(socks5,
+-[ --with-socks5[=PATH] Compile with SOCKS5 firewall traversal support.],
++[ --with-socks5[=PATH] Compile with SOCKS5 (libsocks with socks.h) firewall traversal support.],
+ [ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+@@ -899,7 +899,7 @@
+ fi
+
+ AC_MSG_RESULT(yes)
+- LIBS="$LIBS -lsocks5"
++ LIBS="$LIBS -lsocks"
+ AC_DEFINE(SOCKS)
+ AC_DEFINE(USE_SOCKS5)
+ ;;
diff --git a/net-irc/epic5/files/epic5-1.1.10-tcl-automagic-as-needed.patch b/net-irc/epic5/files/epic5-1.1.10-tcl-automagic-as-needed.patch
new file mode 100644
index 000000000000..5b5b932b06bc
--- /dev/null
+++ b/net-irc/epic5/files/epic5-1.1.10-tcl-automagic-as-needed.patch
@@ -0,0 +1,116 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Make dependence on TCL not be automagic (so that --with-tcl
+ errors out if TCL can't be found and not specifying --with-tcl
+ does the normal automagic behavior). Support
+ LDFLAGS=-Wl,--as-needed by using LIBS instead of LDFLAGS for
+ -ltcl as appropriate.
+
+--- a/configure.in
++++ b/configure.in
+@@ -1122,43 +1122,41 @@
+ dnl
+ dnl Tcl support?
+ dnl
+-AC_ARG_WITH(tcl,
+-[ --with-tcl[=PATH_TO_tclConfig.sh] Compile with tcl support.],
+-[
+- tclconfig=$withval
+-],
+- tclconfig="yes"
+-)
+-
+-if test "x$tclconfig" = "xyes" ; then
+- for i in /usr/lib $localdir/lib $localdir/lib/tcl8.4 ; do
+- if test -r $i/tclConfig.sh ; then
+- tclconfig=$i/tclConfig.sh
+- break;
+- fi
+- done
+-fi
++AC_ARG_WITH([tcl], [AS_HELP_STRING([--with-tcl[=PATH_TO_tclConfig.sh]], [Compile with tcl support.])],
++ [], [with_tcl=maybe])
+
+ AC_MSG_CHECKING(whether to support TCL)
+-if test "x$tclconfig" = "xno"; then
++if test "x$with_tcl" = "xno"; then
+ AC_MSG_RESULT(no)
+ else
+- if test ! -r $tclconfig ; then
++ with_tcl_errormsg="You specified --with-tcl=$with_tcl but I could not find TCL. Please specify --with-tcl=/path/to/tclConfig.sh or remove --with-tcl from ./configure's commandline."
++ if test "x$with_tcl" = "xmaybe" -o "x$with_tcl" = "xyes"; then
++ for i in /usr/lib /usr/local/lib /usr/local/lib/tcl8.4 ; do
++ if test -r "$i"/tclConfig.sh ; then
++ tclconfig="$i"/tclConfig.sh
++ break;
++ fi
++ done
++ else
++ tclconfig="$with_tcl"
++ fi
++ if test ! -r "$tclconfig" ; then
++ dnl Avoid being automagic unless if the user wants us to be.
++ AS_IF([test "x$with_tcl" != "xmaybe"],
++ [AC_MSG_ERROR([$with_tcl_errormsg])])
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+- TCLCFLAGS=`(. $tclconfig && echo $TCL_INCLUDE_SPEC)`
+- TCLLDFLAGS1=`(. $tclconfig && echo $TCL_LIB_SPEC)`
+- TCLLDFLAGS2=`(. $tclconfig && echo $TCL_LIBS)`
+- TCLLDFLAGS=$(eval echo "$TCLLDFLAGS1 $TCLLDFLAGS2")
++ TCLCFLAGS=`(. "$tclconfig" && echo $TCL_INCLUDE_SPEC)`
++ TCLLIBS=`(. "$tclconfig" && echo $TCL_LIB_SPEC $TCL_LIBS)`
+ TCLDOTOH="tcl.o"
+
+ AC_MSG_CHECKING(whether embedded tcl works the way I expect)
+ have_embedded_tcl="no"
+ old_CFLAGS="$CFLAGS"
+- old_LDFLAGS="$LDFLAGS"
++ old_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $TCLCFLAGS"
+- LDFLAGS="$LDFLAGS $TCLLDFLAGS"
++ LIBS="$LIBS $TCLLIBS"
+ AC_TRY_LINK([
+ #include <tcl.h>
+ Tcl_Interp *my_tcl;
+@@ -1175,14 +1173,16 @@
+ ], have_embedded_tcl="yes")
+
+ CFLAGS="$old_CFLAGS"
+- LDFLAGS="$old_LDFLAGS"
++ LIBS="$old_LIBS"
+ if test $have_embedded_tcl = "yes" ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TCL)
+ AC_DEFINE(TCLCFLAGS)
+- AC_DEFINE(TCLLDFLAGS)
++ AC_DEFINE(TCLLIBS)
+ else
+- AC_MSG_RESULT(no, sorry)
++ AS_IF([test "$with_tcl" != "xmaybe"],
++ [AC_MSG_ERROR([$with_tcl_errormsg])])
++ AC_MSG_RESULT(no, sorry)
+ fi
+ fi
+ fi
+@@ -1383,7 +1383,7 @@
+ AC_SUBST(RUBYLIBS)
+ AC_SUBST(TCLDOTOH)
+ AC_SUBST(TCLCFLAGS)
+-AC_SUBST(TCLLDFLAGS)
++AC_SUBST(TCLLIBS)
+ AC_SUBST(PERLDOTOH)
+ AC_SUBST(PERLCFLAGS)
+ AC_SUBST(PERLLDFLAGS)
+
+--- a/source/Makefile.in
++++ b/source/Makefile.in
+@@ -38,7 +38,7 @@
+ epic5: $(OBJECTS)
+ sh info.c.sh
+ $(CC) $(CFLAGS) $(INCLUDES) -c info.c
+- $(CC) $(CFLAGS) $(LDFLAGS) -o epic5 $(OBJECTS) info.o @PERLLDFLAGS@ @TCLLDFLAGS@ @RUBYLIBS@ $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o epic5 $(OBJECTS) info.o @PERLLDFLAGS@ @TCLLIBS@ @RUBYLIBS@ $(LIBS)
+ $(RM) info.c info.o
+ clean::
+ $(RM) epic5 $(OBJECTS)
diff --git a/net-irc/epic5/files/epic5-1.1.10-without-localdir.patch b/net-irc/epic5/files/epic5-1.1.10-without-localdir.patch
new file mode 100644
index 000000000000..4caccad764a8
--- /dev/null
+++ b/net-irc/epic5/files/epic5-1.1.10-without-localdir.patch
@@ -0,0 +1,66 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Drop some automatic probing of /usr/local and /opt and etc., Gentoo users know to use CPPFLAGS/CFLAGS/LDFLAGS.
+Date: 2014-08-30
+
+--- a/configure.in
++++ b/configure.in
+@@ -33,58 +33,6 @@
+ AC_AIX
+
+ dnl ----------------------------------------------------------
+-AC_MSG_CHECKING([for an extra library directory])
+-AC_ARG_WITH([localdir],
+-[ --with-localdir=/usr/local An extra directory to look for stuff.],[
+- if test "x$withval" = "x" ; then
+- if test -d /usr/local/lib ; then
+- withval="/usr/local"
+- elif test -d /usr/pkg/lib ; then
+- withval="/usr/pkg"
+- elif test -d /opt/lib ; then
+- withval="/opt"
+- else
+- with_extra_libdir="no"
+- fi
+- elif test -d "$withval" ; then
+- with_extra_libdir="yes"
+- else
+- with_extra_libdir="no"
+- fi
+-
+- if test "x$withval" != "x" ; then
+- LIBS="-L$withval/lib $LIBS"
+- CFLAGS="-I$withval/include/ $CFLAGS"
+- localdir=$withdir
+- with_extra_libdir="yes"
+- else
+- with_extra_libdir="no"
+- fi
+-],[
+- if test "x$withval" = "x" ; then
+- if test -d /usr/local/lib ; then
+- withval="/usr/local"
+- elif test -d /usr/pkg/lib ; then
+- withval="/usr/pkg"
+- elif test -d /opt/lib ; then
+- withval="/opt"
+- else
+- with_extra_libdir="no"
+- fi
+- fi
+-
+- if test "x$withval" != "x" ; then
+- LIBS="-L$withval/lib $LIBS"
+- CFLAGS="-I$withval/include/ $CFLAGS"
+- localdir=$withdir
+- with_extra_libdir="yes"
+- else
+- with_extra_libdir="no"
+- fi
+-])
+-AC_MSG_RESULT([$with_extra_libdir, $withval])
+-
+-dnl ----------------------------------------------------------
+ dnl ----------------------------------------------------------
+ dnl
+ dnl System specific checks
+
diff --git a/net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch b/net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch
new file mode 100644
index 000000000000..522610f9fb57
--- /dev/null
+++ b/net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch
@@ -0,0 +1,53 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Prevent libarchive check from being automagic.
+
+--- a/configure.in
++++ b/configure.in
+@@ -231,22 +231,28 @@
+ dnl XXX I don't understand why this is even necessary.
+-have_libarchive=""
+-orig_LIBS="$LIBS"
+-AC_CHECK_LIB(archive, archive_read_new, [LIBS="$LIBS -larchive"])
+-AC_MSG_CHECKING(whether libarchive works the way I expect)
+-AC_TRY_LINK([#include <archive.h>], [
+- struct archive *x;
+- const char *s = "bogus.zip";
+- x = archive_read_new();
+- archive_read_support_format_all(x);
+- archive_read_open_file(x, s, 10240);
+-], have_libarchive="yes")
+-if test "x$have_libarchive" = "x"; then
+- LIBS="$orig_LIBS"
+- AC_MSG_RESULT(no)
+-else
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_LIBARCHIVE)
+-fi
++AC_ARG_WITH([libarchive], [AS_HELP_STRING([--without-libarchive], [Disable libarchive support.])],
++ [], [with_libarchive=maybe])
++AS_IF([test "x$with_libarchive" != "xno"],
++ [
++ have_libarchive=""
++ orig_LIBS="$LIBS"
++ AC_CHECK_LIB(archive, archive_read_new, [LIBS="$LIBS -larchive"])
++ AC_MSG_CHECKING(whether libarchive works the way I expect)
++ AC_TRY_LINK([#include <archive.h>], [
++ struct archive *x;
++ const char *s = "bogus.zip";
++ x = archive_read_new();
++ archive_read_support_format_all(x);
++ archive_read_open_file(x, s, 10240);
++ ], have_libarchive="yes")
++ if test "x$have_libarchive" = "x"; then
++ LIBS="$orig_LIBS"
++ AC_MSG_RESULT(no)
++ AS_IF([test "x$with_libarchive" = "xyes"],
++ [AC_MSG_ERROR([--with-libarchive was specified but libarchive could not be found. Please do not specify --with-libarchive or install libarchive.])])
++ else
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_LIBARCHIVE)
++ fi])
+
+ dnl -----
+ AC_ARG_WITH(ssl,
+
diff --git a/net-irc/epic5/files/epic5-1.1.2-perl-automagic-as-needed.patch b/net-irc/epic5/files/epic5-1.1.2-perl-automagic-as-needed.patch
new file mode 100644
index 000000000000..e211fa14b275
--- /dev/null
+++ b/net-irc/epic5/files/epic5-1.1.2-perl-automagic-as-needed.patch
@@ -0,0 +1,114 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Fix perl being automagic and to be safe with
+ LDFLAGS=-Wl,--as-needed.
+
+--- a/configure.in
++++ b/configure.in
+@@ -1033,37 +1033,38 @@
+ dnl
+ dnl Perl support?
+ dnl
+-AC_ARG_WITH(perl,
+-[ --with-perl[=PATH_TO_PERL_EXE] Compile with perl support.],
+-[
+- perlexe=$withval
+-],
+- perlexe=yes
+-)
+-
+-if test "x$perlexe" = "xyes"; then
+- perlexe=perl
+-fi
+-
+-if test "x$perlexe" = "xno"; then
++AC_ARG_WITH([perl], [AS_HELP_STRING([--with-perl=[PATH_TO_PERL_EXE]], [Compile with perl support.])],
++ [], [with_perl=maybe])
++AS_IF([test "x$with_perl" = "xno"],
++ [
+ AC_MSG_CHECKING(whether to support Perl)
+ AC_MSG_RESULT(no)
+-else
+- AC_CHECK_PROG(PERLPROG, $perlexe, "yes", "no")
+- AC_MSG_CHECKING(whether to support Perl)
+- if test $PERLPROG != "yes" ; then
++ ],
++ [
++ with_perl_errormsg="You specified --with-perl=$with_perl but I could not find a working perl. Please run ./configure with --without-perl or specify a path to a working perl executable."
++ AS_IF([test "x$with_perl" = "xyes" -o "x$with_perl" = "xmaybe"],
++ [perlexe=perl],
++ [perlexe="$with_perl"])
++ dnl Allow a full path to be specified in --with-perl
++ AS_IF([test -x "$perlexe"],
++ [PERLPROG=yes],
++ [AC_CHECK_PROG(PERLPROG, $perlexe, "yes", "no")])
++ AC_MSG_CHECKING([whether to support Perl])
++ if test $PERLPROG != "yes" ; then
++ AS_IF([test "x$with_perl" != "xmaybe"],
++ [AC_MSG_ERROR([$with_perl_errormsg])])
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ PERLCFLAGS=`$perlexe -MExtUtils::Embed -e ccopts`
+- PERLLDFLAGS=`$perlexe -MExtUtils::Embed -e ldopts`
++ PERLLIBS=`$perlexe -MExtUtils::Embed -e ldopts`
+
+ AC_MSG_CHECKING(whether embedded perl works the way I expect)
+ have_embedded_perl="no"
+ old_CFLAGS="$CFLAGS"
+- old_LDFLAGS="$LDFLAGS"
++ old_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PERLCFLAGS"
+- LDFLAGS="$LDFLAGS $PERLLDFLAGS"
++ LIBS="$LIBS $PERLLIBS"
+ AC_TRY_RUN([
+ #include <EXTERN.h>
+ #include <perl.h>
+@@ -1101,20 +1102,22 @@
+ have_embedded_perl="no",:)
+
+ CFLAGS="$old_CFLAGS"
+- LDFLAGS="$old_LDFLAGS"
++ LIBS="$old_LIBS"
+ if test $have_embedded_perl = "yes" ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PERL)
+ AC_DEFINE(PERLCFLAGS)
+- AC_DEFINE(PERLLDFLAGS)
++ AC_DEFINE(PERLLIBS)
+ PERLDOTOH="perl.o"
+ else
++ AS_IF([test "x$with_perl" != "xmaybe"],
++ [AC_MSG_ERROR([$with_perl_errormsg])])
+ PERLCFLAGS=""
+- PERLLDFLAGS=""
++ PERLLIBS=""
+ AC_MSG_RESULT(no, sorry)
+ PERLCFLAGS=""
+- PERLLDFLAGS=""
++ PERLLIBS=""
+ fi
+ fi
+-fi
++ ])
+
+@@ -1392,7 +1395,7 @@
+ AC_SUBST(TCLLIBS)
+ AC_SUBST(PERLDOTOH)
+ AC_SUBST(PERLCFLAGS)
+-AC_SUBST(PERLLDFLAGS)
++AC_SUBST(PERLLIBS)
+ AC_SUBST(WSERV_BIN)
+ AC_SUBST(WSERV_INSTALL)
+ AC_SUBST(bindir)
+
+--- a/source/Makefile.in
++++ b/source/Makefile.in
+@@ -38,7 +38,7 @@
+ epic5: $(OBJECTS)
+ sh info.c.sh
+ $(CC) $(CFLAGS) $(INCLUDES) -c info.c
+- $(CC) $(CFLAGS) $(LDFLAGS) -o epic5 $(OBJECTS) info.o @PERLLDFLAGS@ @TCLLIBS@ @RUBYLIBS@ $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o epic5 $(OBJECTS) info.o @PERLLIBS@ @TCLLIBS@ @RUBYLIBS@ $(LIBS)
+ $(RM) info.c info.o
+ clean::
+ $(RM) epic5 $(OBJECTS)
diff --git a/net-irc/epic5/metadata.xml b/net-irc/epic5/metadata.xml
new file mode 100644
index 000000000000..45acb5c4092f
--- /dev/null
+++ b/net-irc/epic5/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="archive">Use <pkg>app-arch/libarchive</pkg> to use zip and tar archives from scripts.</flag>
+ <flag name="valgrind">Compile against <pkg>dev-util/valgrind</pkg> headers to improve memory-leak checking when running epic5 under valgrind.</flag>
+ </use>
+</pkgmetadata>