diff options
author | pawel <pawel@FreeBSD.org> | 2013-12-19 23:34:12 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2013-12-19 23:34:12 +0800 |
commit | a8c49f7d4a0f8de45a3dbcc21960b79f06ec8fc5 (patch) | |
tree | 693f265265c61b5594f222b8544d67815b4f503c /irc/minbif | |
parent | 09cd401b847a227e397c4e1ae29d298f8ede4b16 (diff) | |
download | freebsd-ports-gnome-a8c49f7d4a0f8de45a3dbcc21960b79f06ec8fc5.tar.gz freebsd-ports-gnome-a8c49f7d4a0f8de45a3dbcc21960b79f06ec8fc5.tar.zst freebsd-ports-gnome-a8c49f7d4a0f8de45a3dbcc21960b79f06ec8fc5.zip |
- Fix build with clang
- Remove leading article from COMMENT
- Convert to new LIB_DEPENDS format
- Support staging
While I'm here use option helpers where possible.
PR: ports/184816
Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'irc/minbif')
-rw-r--r-- | irc/minbif/Makefile | 93 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__core__minbif.cpp | 21 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__im__account.cpp | 10 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__im__auth_pam.cpp | 10 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__im__request.cpp | 14 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__irc__dcc.cpp | 19 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__server_poll__daemon_fork.cpp | 17 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__server_poll__inetd.cpp | 12 | ||||
-rw-r--r-- | irc/minbif/files/patch-src__sockwrap__sockwrap.cpp | 11 |
9 files changed, 159 insertions, 48 deletions
diff --git a/irc/minbif/Makefile b/irc/minbif/Makefile index 7c38874afe14..23523fea1475 100644 --- a/irc/minbif/Makefile +++ b/irc/minbif/Makefile @@ -8,11 +8,11 @@ CATEGORIES= irc net-im MASTER_SITES= https://symlink.me/attachments/download/148/ MAINTAINER= ports@FreeBSD.org -COMMENT= An IRC to instant messaging gateway +COMMENT= IRC to instant messaging gateway LICENSE= GPLv2 -LIB_DEPENDS= purple:${PORTSDIR}/net-im/libpurple +LIB_DEPENDS= libpurple.so:${PORTSDIR}/net-im/libpurple # right now PLUGINS installs prpl-coincoin and prpl-gayattitude OPTIONS_DEFINE= CACA GNUTLS VIDEO PLUGINS DOCS @@ -22,13 +22,14 @@ VIDEO_DESC= Webcam display using libcaca (depends on CACA) PLUGINS_DESC= Compile additional libpurple-plugins USE_RC_SUBR= minbif + +USES= cmake pkgconfig USE_GNOME= glib20 USE_EFL= imlib2 -USES= cmake pkgconfig CMAKE_ARGS= -DENABLE_IMLIB:BOOL=ON -CFLAGS+= ${PTHREAD_CFLAGS} -DX_DISPLAY_MISSING -LDFLAGS+= ${PTHREAD_LIBS} +CFLAGS+= -DX_DISPLAY_MISSING +LDFLAGS+= -pthread USERS= minbif GROUPS= minbif @@ -36,25 +37,30 @@ GROUPS= minbif SUB_FILES= pkg-message SUB_LIST= USERS="${USERS}" -MAN8= minbif.8 PORTDOCS= * PLIST_FILES= bin/minbif %%ETCDIR%%/minbif.conf-dist \ - %%ETCDIR%%/minbif.motd-dist + %%ETCDIR%%/minbif.motd-dist man/man8/minbif.8.gz PLIST_DIRS= %%ETCDIR%% -NO_STAGE= yes -.include <bsd.port.options.mk> +CACA_LIB_DEPENDS= libcaca.so:${PORTSDIR}/graphics/libcaca +CACA_CMAKE_ON= -DENABLE_CACA:BOOL=ON +CACA_CMAKE_OFF= -DENABLE_CACA:BOOL=OFF -.if ${PORT_OPTIONS:MCACA} -LIB_DEPENDS+= caca:${PORTSDIR}/graphics/libcaca -CMAKE_ARGS+= -DENABLE_CACA:BOOL=ON -.else -CMAKE_ARGS+= -DENABLE_CACA:BOOL=OFF -.endif +GNUTLS_LIB_DEPENDS= libgnutls.so:${PORTSDIR}/security/gnutls +GNUTLS_CMAKE_ON= -DENABLE_TLS:BOOL=ON +GNUTLS_CMAKE_OFF= -DENABLE_TLS:BOOL=OFF + +PLUGINS_USE= GNOME=libxml2 +PLUGINS_CMAKE_ON= -DENABLE_PLUGIN:BOOL=ON +PLUGINS_CMAKE_OFF= -DENABLE_PLUGIN:BOOL=OFF +PLUGINS_PLIST_FILES= lib/purple-2/libcoincoin.so \ + lib/purple-2/libgayattitude.so + +.include <bsd.port.options.mk> .if ${PORT_OPTIONS:MVIDEO} && !empty(PORT_OPTIONS:MCACA) USE_GSTREAMER+= core good -LIB_DEPENDS+= gstfarsight-0.10:${PORTSDIR}/net-im/farsight2 +LIB_DEPENDS+= libgstfarsight-0.10.so:${PORTSDIR}/net-im/farsight2 CMAKE_ARGS+= -DENABLE_VIDEO:BOOL=ON .else CMAKE_ARGS+= -DENABLE_VIDEO:BOOL=OFF @@ -65,46 +71,37 @@ IGNORE= if you want to enable webcam support, you must \ also enable CACA. .endif -.if ${PORT_OPTIONS:MPLUGINS} -USE_GNOME+= libxml2 -CMAKE_ARGS+= -DENABLE_PLUGIN:BOOL=ON -PLIST_FILES+= lib/purple-2/libcoincoin.so \ - lib/purple-2/libgayattitude.so -.else -CMAKE_ARGS+= -DENABLE_PLUGIN:BOOL=OFF -.endif - -.if ${PORT_OPTIONS:MGNUTLS} -LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls -CMAKE_ARGS+= -DENABLE_TLS:BOOL=ON -.else -CMAKE_ARGS+= -DENABLE_TLS:BOOL=OFF -.endif - post-patch: @${REINPLACE_CMD} -e \ 's|"-lpthread -lstdc++"||' ${WRKSRC}/src/CMakeLists.txt @${REINPLACE_CMD} -e \ '/pam_misc.h/d' ${WRKSRC}/src/im/auth_pam.h - @${REINPLACE_CMD} -e 's|glib/.*\.h>|glib.h>|g' \ - ${WRKSRC}/src/server_poll/daemon_fork.cpp \ - ${WRKSRC}/src/server_poll/inetd.cpp + +post-build: + @${LN} -sf minbif.conf ${WRKSRC}/minbif.conf-dist + @${LN} -sf minbif.motd ${WRKSRC}/minbif.motd-dist do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/man/minbif.8 ${MAN8PREFIX}/man/man8 - ${MKDIR} ${ETCDIR} - ${INSTALL_DATA} ${WRKSRC}/minbif.conf ${ETCDIR}/minbif.conf-dist - ${INSTALL_DATA} ${WRKSRC}/minbif.motd ${ETCDIR}/minbif.motd-dist + (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} ${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin) + (cd ${WRKSRC}/man && ${INSTALL_MAN} minbif.8 \ + ${STAGEDIR}${MAN8PREFIX}/man/man8) + @${MKDIR} ${STAGEDIR}${ETCDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} minbif.conf-dist \ + ${STAGEDIR}${ETCDIR}) + (cd ${WRKSRC} && ${INSTALL_DATA} minbif.motd-dist \ + ${STAGEDIR}${ETCDIR}) .if ${PORT_OPTIONS:MPLUGINS} - ${INSTALL_PROGRAM} ${WRKSRC}/plugins/coincoin/libcoincoin.so ${PREFIX}/lib/purple-2 - ${INSTALL_PROGRAM} ${WRKSRC}/plugins/gayattitude/libgayattitude.so ${PREFIX}/lib/purple-2 -.endif -.if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/minbif.xinetd ${DOCSDIR} + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/purple-2 + (cd ${WRKSRC}/plugins/coincoin && ${INSTALL_LIB} libcoincoin.so \ + ${STAGEDIR}${PREFIX}/lib/purple-2) + (cd ${WRKSRC}/plugins/gayattitude && ${INSTALL_LIB} libgayattitude.so \ + ${STAGEDIR}${PREFIX}/lib/purple-2) .endif - @${CAT} ${PKGMESSAGE} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} README \ + ${STAGEDIR}${DOCSDIR}) + (cd ${WRKSRC}/doc && ${INSTALL_DATA} minbif.xinetd \ + ${STAGEDIR}${DOCSDIR}) .include <bsd.port.mk> diff --git a/irc/minbif/files/patch-src__core__minbif.cpp b/irc/minbif/files/patch-src__core__minbif.cpp new file mode 100644 index 000000000000..afd5e84dc9db --- /dev/null +++ b/irc/minbif/files/patch-src__core__minbif.cpp @@ -0,0 +1,21 @@ +--- src/core/minbif.cpp.orig ++++ src/core/minbif.cpp +@@ -17,7 +17,7 @@ + */ + + #include <cerrno> +-#include <stdlib.h> ++#include <cstdlib> + #include <iostream> + #include <fstream> + #include <cstring> +@@ -239,7 +239,9 @@ + } + sighandler.setApplication(this); + ++#if ! GLIB_CHECK_VERSION(2, 32, 0) + g_thread_init(NULL); ++#endif + loop = g_main_new(FALSE); + g_main_run(loop); + diff --git a/irc/minbif/files/patch-src__im__account.cpp b/irc/minbif/files/patch-src__im__account.cpp new file mode 100644 index 000000000000..77c79f62a991 --- /dev/null +++ b/irc/minbif/files/patch-src__im__account.cpp @@ -0,0 +1,10 @@ +--- src/im/account.cpp.orig ++++ src/im/account.cpp +@@ -18,6 +18,7 @@ + + #include <cassert> + #include <cstring> ++#include <unistd.h> + #ifdef HAVE_IMLIB + #include <Imlib2.h> + #endif /* HAVE_IMLIB */ diff --git a/irc/minbif/files/patch-src__im__auth_pam.cpp b/irc/minbif/files/patch-src__im__auth_pam.cpp new file mode 100644 index 000000000000..b57500578951 --- /dev/null +++ b/irc/minbif/files/patch-src__im__auth_pam.cpp @@ -0,0 +1,10 @@ +--- src/im/auth_pam.cpp.orig ++++ src/im/auth_pam.cpp +@@ -19,6 +19,7 @@ + #include <cstring> + #include <cerrno> + #include <sys/types.h> ++#include <unistd.h> + #include <pwd.h> + + #include "auth.h" diff --git a/irc/minbif/files/patch-src__im__request.cpp b/irc/minbif/files/patch-src__im__request.cpp new file mode 100644 index 000000000000..8852d3f82e58 --- /dev/null +++ b/irc/minbif/files/patch-src__im__request.cpp @@ -0,0 +1,14 @@ +--- src/im/request.cpp.orig ++++ src/im/request.cpp +@@ -16,8 +16,9 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +-#include <errno.h> +-#include <string.h> ++#include <cerrno> ++#include <cstring> ++#include <unistd.h> + + #include "request.h" + #include "buddy.h" diff --git a/irc/minbif/files/patch-src__irc__dcc.cpp b/irc/minbif/files/patch-src__irc__dcc.cpp new file mode 100644 index 000000000000..1a6561f6ee5b --- /dev/null +++ b/irc/minbif/files/patch-src__irc__dcc.cpp @@ -0,0 +1,19 @@ +--- src/irc/dcc.cpp.orig ++++ src/irc/dcc.cpp +@@ -17,12 +17,13 @@ + + #include <sys/types.h> + #include <sys/socket.h> ++#include <netinet/in.h> + #include <arpa/inet.h> + #include <fcntl.h> +-#include <errno.h> +-#include <string.h> ++#include <cerrno> ++#include <cstring> + #include <sys/types.h> +-#include <netinet/in.h> ++#include <unistd.h> + + #include "dcc.h" + #include "nick.h" diff --git a/irc/minbif/files/patch-src__server_poll__daemon_fork.cpp b/irc/minbif/files/patch-src__server_poll__daemon_fork.cpp new file mode 100644 index 000000000000..6d2e00c501dd --- /dev/null +++ b/irc/minbif/files/patch-src__server_poll__daemon_fork.cpp @@ -0,0 +1,17 @@ +--- src/server_poll/daemon_fork.cpp.orig ++++ src/server_poll/daemon_fork.cpp +@@ -20,10 +20,12 @@ + #include <cassert> + #include <cstring> + #include <cerrno> +-#include <glib/gmain.h> ++#include <glib.h> ++#include <sys/types.h> + #include <sys/socket.h> +-#include <sys/stat.h> ++#include <netinet/in.h> + #include <arpa/inet.h> ++#include <sys/stat.h> + + #include "daemon_fork.h" + #include "irc/irc.h" diff --git a/irc/minbif/files/patch-src__server_poll__inetd.cpp b/irc/minbif/files/patch-src__server_poll__inetd.cpp new file mode 100644 index 000000000000..e45b14dc2153 --- /dev/null +++ b/irc/minbif/files/patch-src__server_poll__inetd.cpp @@ -0,0 +1,12 @@ +--- src/server_poll/inetd.cpp.orig ++++ src/server_poll/inetd.cpp +@@ -17,7 +17,8 @@ + */ + + #include <cassert> +-#include <glib/gmain.h> ++#include <unistd.h> ++#include <glib.h> + + #include "inetd.h" + #include "irc/irc.h" diff --git a/irc/minbif/files/patch-src__sockwrap__sockwrap.cpp b/irc/minbif/files/patch-src__sockwrap__sockwrap.cpp new file mode 100644 index 000000000000..ff0419629483 --- /dev/null +++ b/irc/minbif/files/patch-src__sockwrap__sockwrap.cpp @@ -0,0 +1,11 @@ +--- src/sockwrap/sockwrap.cpp.orig ++++ src/sockwrap/sockwrap.cpp +@@ -16,6 +16,8 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + ++#include <unistd.h> ++ + #include "sockwrap.h" + #include "sockwrap_plain.h" + #ifdef HAVE_TLS |