--- /dev/null
+--- libircclient-1.10/src/Makefile.in
++++ libircclient-1.10/src/Makefile.in
+@@ -1,8 +1,10 @@
+ # $Id: Makefile.in 137 2018-08-27 01:11:08Z gyunaev $
+ CC = @CC@
+-CFLAGS = -Wall -Wno-misleading-indentation -Wno-unused-function -Wno-nonnull -DIN_BUILDING_LIBIRC @CFLAGS@
++CFLAGS = -fPIC -Wall -Wno-misleading-indentation -Wno-unused-function -Wno-nonnull -DIN_BUILDING_LIBIRC @CFLAGS@
+ AR=@AR@ cr
+ RANLIB=@RANLIB@
++INSTALL=install
++LN=ln -sf
+ INCLUDES=-I../include
+ DESTDIR=
+ APIVERSION = 1
+@@ -15,19 +17,24 @@
+ shared: libircclient.so
+ shared_mingw: libircclient.dll
+
+-install:
+- -mkdir -p $(DESTDIR)@prefix@/include
+- -mkdir -p $(DESTDIR)@libdir@
+- cp ../include/libircclient.h $(DESTDIR)@prefix@/include/libircclient.h
+- cp ../include/libirc_errors.h $(DESTDIR)@prefix@/include/libirc_errors.h
+- cp ../include/libirc_events.h $(DESTDIR)@prefix@/include/libirc_events.h
+- cp ../include/libirc_options.h $(DESTDIR)@prefix@/include/libirc_options.h
+- cp ../include/libirc_rfcnumeric.h $(DESTDIR)@prefix@/include/libirc_rfcnumeric.h
+- cp libircclient.so $(DESTDIR)@libdir@/libircclient.so.$(APIVERSION)
+- ln -fs libircclient.so.$(APIVERSION) $(DESTDIR)@libdir@/libircclient.so
++install: install-headers install-static install-shared
++install-headers:
++ $(INSTALL) -d $(DESTDIR)@prefix@/include
++ $(INSTALL) -m0644 ../include/libircclient.h $(DESTDIR)@prefix@/include/libircclient.h
++ $(INSTALL) -m0644 ../include/libirc_errors.h $(DESTDIR)@prefix@/include/libirc_errors.h
++ $(INSTALL) -m0644 ../include/libirc_events.h $(DESTDIR)@prefix@/include/libirc_events.h
++ $(INSTALL) -m0644 ../include/libirc_options.h $(DESTDIR)@prefix@/include/libirc_options.h
++ $(INSTALL) -m0644 ../include/libirc_rfcnumeric.h $(DESTDIR)@prefix@/include/libirc_rfcnumeric.h
++install-shared:
++ $(INSTALL) -d $(DESTDIR)@libdir@
++ $(INSTALL) -m0755 libircclient.so $(DESTDIR)@libdir@/libircclient.so.$(APIVERSION)
++ $(LN) libircclient.so.$(APIVERSION) $(DESTDIR)@libdir@/libircclient.so
++install-static:
++ $(INSTALL) -d $(DESTDIR)@libdir@
++ $(INSTALL) -m0644 libircclient.a $(DESTDIR)@libdir@/libircclient.a
+
+ libircclient.so: libircclient.o
+- $(CC) -shared -s -Wl,-soname,libircclient.so.$(APIVERSION) -o libircclient.so libircclient.o @LDFLAGS@ @LIBS@
++ $(CC) @CFLAGS@ -shared -Wl,-soname,libircclient.so.$(APIVERSION) -o libircclient.so libircclient.o @LDFLAGS@ @LIBS@
+
+ libircclient.dll: libircclient.o
+ $(CC) -shared -s -o libircclient.dll -Wl,-out-implib,libircclient.lib libircclient.o libircclient.def -lkernel32 -lwsock32 @LIBS@
--- /dev/null
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+DESCRIPTION="Small but powerful library implementing the client-server IRC protocol"
+HOMEPAGE="http://www.ulduzsoft.com/libircclient/"
+SRC_URI="mirror://sourceforge/libircclient/${P}.tar.gz"
+
+LICENSE="LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc ipv6 ssl static-libs threads"
+
+DEPEND="ssl? ( dev-libs/openssl:0 )"
+RDEPEND=${DEPEND}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.8-build.patch
+ "${FILESDIR}"/${PN}-1.10-shared.patch
+ "${FILESDIR}"/${PN}-1.8-static.patch
+ "${FILESDIR}"/${PN}-1.8-include.patch
+)
+
+src_prepare() {
+ default
+ mv configure.in configure.ac || die
+ eautoconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable threads)
+ $(use_enable ipv6)
+ $(use_enable ssl openssl)
+ $(use_enable ssl threads)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake -C src $(usex static-libs "shared static" "shared")
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install-shared $(usex static-libs "install-static" "")
+ insinto /usr/include/libircclient
+ doins include/*.h
+
+ dodoc Changelog THANKS
+ doman man/libircclient.1
+}