freebsd-ports/net-im/libpurple/Makefile

318 lines
7.9 KiB
Makefile
Raw Normal View History

2013-06-04 21:04:59 +02:00
# Created by: Jim Mock <jim@FreeBSD.org>
# $FreeBSD$
PORTNAME?= libpurple
PORTVERSION= 2.12.0
PORTREVISION?= 0
CATEGORIES?= net-im
MASTER_SITES= SF/pidgin/Pidgin/${PORTVERSION}
2007-05-27 22:47:25 +02:00
DISTNAME= pidgin-${PORTVERSION}
MAINTAINER?= marcus@FreeBSD.org
COMMENT?= Backend library for the Pidgin multi-protocol messaging client
USES+= cpe gettext gmake libtool pathfix pkgconfig tar:bzip2
USE_GNOME?= gnomeprefix intltool glib20 libxml2
GNU_CONFIGURE= yes
CONFIGURE_ARGS?=--disable-gtkui \
--disable-consoleui \
--with-dynamic-prpls=${PRPL_MODULES:S/,$//} \
--enable-static \
--disable-nm
2014-05-27 23:13:42 +02:00
CPPFLAGS+= -I${LOCALBASE}/include
Support LIBS like LDFLAGS. - Add LIBS="${LIBS}" to MAKE_ENV and CONFIGURE_ENV. - Add an option helper for LIBS. - Adjust all ports that already use LIBS. Also remove references to PTHREAD_CFLAGS and PTHREAD_LIBS while here. - Some ports did not support having a LIBS environment variable and required additional patches. Somewhat simplified a linker command line looks like: ${CC} ${src_LDFLAGS} ${LDFLAGS} ${src_LIBS} ${LIBS} where src_LDFLAGS and src_LIBS are controlled by upstream and LDFLAGS and LIBS can be controlled by us. If possible -L and -l flags need to be added to LIBS to make sure they appear after any -L and -l flags set by upstream. Many ports currently add -L${LOCALBASE}/lib to LDFLAGS but this may appear too early on the command line causing installed libraries to be linked in instead of freshly built ones. Additional changes: benchmarks/netio: Replace WITH_IPV6 with an IPV6 option. comms/gnokii: Replace some patches with USES=pathfix. Also remove -fPIC. graphics/gimageview: USES=libtool and install desktop file in DESKTOPDIR. graphics/visionworkbench: Remove FreeBSD 7 support. multimedia/libmovtar: New LIB_DEPENDS syntax. multimedia/opencinematools: Use standard do-build. net/siproxd: USES=libtool:keepla (port actually needs .la files for plugins) net-mgmt/nagios: Remove -fPIC. net-mgmt/nagios4: Remove -fPIC. print/cups-base: Only add -lssp_nonshared on i386 and OSVERSION < 1000036. security/p11-kit: Replace PTHREAD_LIBS in CONFIGURE_ENV with ac_cv_func_pthread_mutexattr_init=no in CONFIGURE_ARGS. This skips a test in configure that falsely detects pthread_mutexattr_init in our libc. sysutils/dar: Fix iconv detection. x11/rxvt-unicode: Remove -lstdc++ and patch configure to remove a FreeBSD hack and use $CXX as linker as on other platforms. PR: 190592 Exp-run by: antoine Approved by: portmgr (antoine)
2014-06-11 16:49:59 +02:00
LIBS+= -L${LOCALBASE}/lib
2014-05-20 23:12:35 +02:00
INSTALL_TARGET= install-strip
.if !defined(PIDGIN_SLAVE)
# Pidgin slave ports that require the following functionality, must explicitly
# set these macros themselves.
USES+= iconv python
USE_LDCONFIG= yes
WANT_GNOME= yes
.if defined(PACKAGE_BUILDING)
.undef WITHOUT_GNOME
WITH_GNOME= yes
.endif
.endif
PRPL_MODULES=
CPE_VENDOR= pidgin
OPTIONS_DEFINE= BONJOUR DBUS GNUTLS NSS SASL GSTREAMER VV IDN PERL TCLTK
OPTIONS_GROUP= PROTOCOLS
OPTIONS_GROUP_PROTOCOLS=GG SAMETIME SILC IRC JABBER \
NOVELL OSCAR QQ SIMPLE ZEPHYR
OPTIONS_DEFAULT= BONJOUR DBUS NSS GSTREAMER VV IDN GG IRC JABBER \
NOVELL OSCAR QQ SIMPLE ZEPHYR
2013-06-04 21:04:59 +02:00
BONJOUR_DESC= mDNS support
GNUTLS_DESC= Use GNUTLS for encryption support
NSS_DESC= Use Mozilla NSS for encryption support
SASL_DESC= Cyrus SASL support (for jabberd)
GSTREAMER_DESC= Use GStreamer for playing sounds
VV_DESC= Video and voice support
SAMETIME_DESC= The Lotus Sametime chat protocol
SILC_DESC= The Secure Internet Live Conferencing protocol
GG_DESC= The Gadu-Gadu chat protocol
IRC_DESC= The Internet Relay Chat protocol
JABBER_DESC= The Jabber/XMPP/Google Talk protocol
NOVELL_DESC= The Novell GroupWise chat protocol
OSCAR_DESC= The AIM/ICQ/Oscar protocol
QQ_DESC= The Tercent QQ chat protocol
SIMPLE_DESC= The SIMPLE chat protocol
ZEPHYR_DESC= The Zephyr chat protocol
.if defined(WITH_GTKUI)
2013-06-04 21:04:59 +02:00
OPTIONS_DEFINE+= GTKSPELL CAP
OPTIONS_DEFAULT+= GTKSPELL CAP
GTKSPELL_DESC= Spell checking support
CAP_DESC= Contact Availability Prediction plugin
PLIST_SUB+= GTKUI=""
.else
PLIST_SUB+= GTKUI="@comment not installed: "
.endif
.if defined(WITH_CONSOLEUI)
OPTIONS_DEFINE+=NCURSES
NCURSES_DESC= Build with ncurses from ports
PLIST_SUB+= CONSOLEUI=""
.else
PLIST_SUB+= CONSOLEUI="@comment not installed: "
.endif
CONFIGURE_ARGS+=--disable-doxygen
.include <bsd.port.options.mk>
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MTCLTK}
2014-01-17 11:33:08 +01:00
USES+= tk
CFLAGS+= -I${TK_INCLUDEDIR} -I${TCL_INCLUDEDIR}
CONFIGURE_ARGS+= --with-tclconfig=${TCL_LIBDIR} \
--with-tkconfig=${TK_LIBDIR}
PLIST_SUB+= TCL:=""
.else
CONFIGURE_ARGS+= --disable-tcl
PLIST_SUB+= TCL:="@comment not installed: "
.endif
.if ${PORT_OPTIONS:MNCURSES}
USES+= ncurses:port
CONFIGURE_ARGS+=--with-ncurses-headers=${LOCALBASE}/include/ncurses/
.else
USES+= ncurses
.endif
.if ${PORT_OPTIONS:MPERL}
USES+= perl5
CONFIGURE_ARGS+= --with-perl-lib=site
PLIST_SUB+= PERL:=""
.if !defined(PIDGIN_SLAVE) || defined(WITH_GTKUI)
PLIST_SUB+= PERLMAN:=""
.else
PLIST_SUB+= PERLMAN:="@comment not installed: "
.endif
.else
CONFIGURE_ARGS+= --disable-perl
PLIST_SUB+= PERL:="@comment not installed: " \
PERLMAN:="@comment not installed: "
.endif
.if !defined(PIDGIN_SLAVE)
USE_GNOME+= gconf2
GCONF_SCHEMAS= purple.schemas
.endif
#.if defined(WITH_GTKUI) && ${HAVE_GNOME:Mevolutiondataserver}!=""
#USE_GNOME+= evolutiondataserver
#PLIST_SUB+= EVO=""
#CONFIGURE_ARGS+= --enable-gevolution
#.else
CONFIGURE_ARGS+= --disable-gevolution
PLIST_SUB+= EVO="@comment not installed: "
#.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MGSTREAMER}
USE_GSTREAMER1+=core good
.else
CONFIGURE_ARGS+=--disable-gstreamer
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MVV} && ${PORT_OPTIONS:MGSTREAMER}
LIB_DEPENDS+= libfarstream-0.2.so:net-im/farstream
USE_GSTREAMER1+=v4l2
PLIST_SUB+= VV=""
.else
CONFIGURE_ARGS+=--disable-vv
PLIST_SUB+= VV="@comment "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MIDN}
LIB_DEPENDS+= libidn.so:dns/libidn
.else
CONFIGURE_ARGS+=--disable-idn
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MCAP}
LIB_DEPENDS+= libsqlite3.so:databases/sqlite3
CONFIGURE_ARGS+=--enable-cap
PLIST_SUB+= CAP=""
.else
CONFIGURE_ARGS+=--disable-cap
PLIST_SUB+= CAP="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MGNUTLS}
LIB_DEPENDS+= libgnutls.so:security/gnutls
CONFIGURE_ARGS+= --enable-gnutls=yes
PLIST_SUB+= GNUTLS=""
.else
CONFIGURE_ARGS+= --enable-gnutls=no
PLIST_SUB+= GNUTLS="@comment "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MNSS}
LIB_DEPENDS+= libnss3.so:security/nss
CONFIGURE_ARGS+= --enable-nss=yes \
--with-nspr-includes=${LOCALBASE}/include/nspr \
--with-nspr-libs=${LOCALBASE}/lib \
--with-nss-includes=${LOCALBASE}/include/nss/nss \
--with-nss-libs=${LOCALBASE}/lib/nss
PLIST_SUB+= NSS=""
.else
CONFIGURE_ARGS+= --enable-nss=no
PLIST_SUB+= NSS="@comment "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MSASL}
LIB_DEPENDS+= libsasl2.so:security/cyrus-sasl2
CONFIGURE_ARGS+= --enable-cyrus-sasl
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MBONJOUR}
LIB_DEPENDS+= libavahi-client.so:net/avahi-app
PLIST_SUB+= BONJOUR=""
PRPL_MODULES:= bonjour,${PRPL_MODULES}
.else
CONFIGURE_ARGS+=--disable-avahi
PLIST_SUB+= BONJOUR="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MGTKSPELL}
LIB_DEPENDS+= libgtkspell.so:textproc/gtkspell
.else
CONFIGURE_ARGS+= --disable-gtkspell
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MDBUS}
LIB_DEPENDS+= libdbus-glib-1.so:devel/dbus-glib
.if !defined(PIDGIN_SLAVE)
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/dbus/__init__.py:devel/py-dbus
.endif
CONFIGURE_ARGS+= --enable-dbus
PLIST_SUB+= DBUS=""
.else
CONFIGURE_ARGS+= --disable-dbus
PLIST_SUB+= DBUS="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MSAMETIME}
LIB_DEPENDS+= libmeanwhile.so:net-im/meanwhile
PLIST_SUB+= SAMETIME=""
PRPL_MODULES:= sametime,${PRPL_MODULES}
.else
PLIST_SUB+= SAMETIME="@comment not installed: "
CONFIGURE_ARGS+=--disable-meanwhile
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MSILC}
LIB_DEPENDS+= libsilcclient.so:devel/silc-toolkit
CONFIGURE_ARGS+= --with-silc-includes=${LOCALBASE}/include/silc \
--with-silc-libs=${LOCALBASE}/lib
PLIST_SUB+= SILC=""
PRPL_MODULES:= silc,${PRPL_MODULES}
.else
PLIST_SUB+= SILC="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MGG}
PLIST_SUB+= GG=""
PRPL_MODULES:= gg,${PRPL_MODULES}
.else
PLIST_SUB+= GG="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MIRC}
PLIST_SUB+= IRC=""
PRPL_MODULES:= irc,${PRPL_MODULES}
.else
PLIST_SUB+= IRC="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MJABBER}
PLIST_SUB+= JABBER=""
PRPL_MODULES:= jabber,${PRPL_MODULES}
.else
PLIST_SUB+= JABBER="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MNOVELL}
PLIST_SUB+= NOVELL=""
PRPL_MODULES:= novell,${PRPL_MODULES}
.else
PLIST_SUB+= NOVELL="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MOSCAR}
PLIST_SUB+= OSCAR=""
PRPL_MODULES:= oscar,${PRPL_MODULES}
.else
PLIST_SUB+= OSCAR="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
#.if ${PORT_OPTIONS:MQQ}
#PLIST_SUB+= QQ=""
#PRPL_MODULES:= qq,${PRPL_MODULES}
#.else
#PLIST_SUB+= QQ="@comment not installed: "
#.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MSIMPLE}
PLIST_SUB+= SIMPLE=""
PRPL_MODULES:= simple,${PRPL_MODULES}
.else
PLIST_SUB+= SIMPLE="@comment not installed: "
.endif
2013-06-04 21:04:59 +02:00
.if ${PORT_OPTIONS:MZEPHYR}
PLIST_SUB+= ZEPHYR=""
PRPL_MODULES:= zephyr,${PRPL_MODULES}
.else
PLIST_SUB+= ZEPHYR="@comment not installed: "
.endif
pre-everything::
2013-06-04 21:04:59 +02:00
.if ! ${PORT_OPTIONS:MGNUTLS} && ! ${PORT_OPTIONS:MNSS}
@${ECHO_MSG} "WARNING: In order to use MSN, you must enable the GNUTLS and/or NSS options."
.endif
post-patch:
@${REINPLACE_CMD} \
-e 's|-lpthread $$LIBDL|-lpthread ${ICONV_LIB}|' \
${WRKSRC}/configure
.if defined(PIDGIN_SLAVE)
@${FIND} ${BUILD_WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e \
Convert net-im/libpurple (and slave ports net-im/finch and net-im/pidgin) to "USES=libtool tar:bzip2". Bump PORTREVISION on all dependent ports and modernise them as well (USES, LIB_DEPENDS, staging). audio/pidgin-musictracker: - Replace LIBS with LDFLAGS. - Disable static plugin. net/online-desktop: Remove obsolete patches. net-im/mbpurple: - Drop pkgconf dependency. - Replace post-patch with MAKE_ARGS. - Use standard do-build. net-im/pidgin-audacious-remote: Disable static plugin. net-im/pidgin-birthday-reminder: Disable static plugin. net-im/pidgin-fetion: Replace pkg-plist with PLIST_FILES. net-im/pidgin-guifications: - Drop USE_GNOME=gnomeprefix. - Replace LIBS with LDFLAGS. net-im/pidgin-hotkeys: - Drop CFLAGS=-fPIC. - Fix build on systems without gcc. net-im/pidgin-libnotify: - Use option helpers. - Drop references to PTHREAD_CFLAGS and PTHREAD_LIBS. net-im/pidgin-manualsize: Fix build on systems without gcc. net-im/pidgin-privacy-please: - Replace a patch with CPPFLAGS and LDFLAGS. - Don't use USE_LDCONFIG for a plugin. net-im/pidgin-sipe: - Don't use USE_LDCONFIG for a plugin. - Drop PORTDOCS that don't contain useful documentation. - Patch configure with s/LDLAGS/LDFLAGS/ so LDFLAGS can replace LIBS. - Use option helpers and fix Kerberos option. - Remove obsolete CONFIGURE_ENV. security/pidgin-encryption: - Drop references to PTHREAD_CFLAGS and PTHREAD_LIBS. - Disable static plugin. - Use option helpers. security/pidgin-otr: - Drop redundant comment about PORTREVISION. - Add USE_GNOME=gtk20. - Drop references to PTHREAD_CFLAGS and PTHREAD_LIBS. - Port uses stack protector unconditionally so link with -lssp_nonshared when necessary like Mk/bsd.ssp.mk does. Approved by: portmgr (PORTREVISION bump on unstaged port)
2014-05-17 18:57:14 +02:00
's|$$(top_builddir)/libpurple/libpurple.la|-lpurple|'
@${REINPLACE_CMD} -e 's|gconftool-2|gconftool-disabled|g' \
${WRKSRC}/configure
.endif
.if !defined(PIDGIN_SLAVE) && ${PORT_OPTIONS:MPERL}
post-install:
@${SED} -i '' -e 's|^${STAGEDIR}||g' \
${STAGEDIR}${PREFIX}/lib/purple-2/perl/auto/Purple/.packlist
.endif
.include <bsd.port.mk>