pkgsrc/mail/evolution/Makefile
jlam 95fd1f6ec9 Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc.
Several changes are involved since they are all interrelated.  These
changes affect about 1000 files.

The first major change is rewriting bsd.builtin.mk as well as all of
the builtin.mk files to follow the new example in bsd.builtin.mk.
The loop to include all of the builtin.mk files needed by the package
is moved from bsd.builtin.mk and into bsd.buildlink3.mk.  bsd.builtin.mk
is now included by each of the individual builtin.mk files and provides
some common logic for all of the builtin.mk files.  Currently, this
includes the computation for whether the native or pkgsrc version of
the package is preferred.  This causes USE_BUILTIN.* to be correctly
set when one builtin.mk file includes another.

The second major change is teach the builtin.mk files to consider
files under ${LOCALBASE} to be from pkgsrc-controlled packages.  Most
of the builtin.mk files test for the presence of built-in software by
checking for the existence of certain files, e.g. <pthread.h>, and we
now assume that if that file is under ${LOCALBASE}, then it must be
from pkgsrc.  This modification is a nod toward LOCALBASE=/usr.  The
exceptions to this new check are the X11 distribution packages, which
are handled specially as noted below.

The third major change is providing builtin.mk and version.mk files
for each of the X11 distribution packages in pkgsrc.  The builtin.mk
file can detect whether the native X11 distribution is the same as
the one provided by pkgsrc, and the version.mk file computes the
version of the X11 distribution package, whether it's built-in or not.

The fourth major change is that the buildlink3.mk files for X11 packages
that install parts which are part of X11 distribution packages, e.g.
Xpm, Xcursor, etc., now use imake to query the X11 distribution for
whether the software is already provided by the X11 distribution.
This is more accurate than grepping for a symbol name in the imake
config files.  Using imake required sprinkling various builtin-imake.mk
helper files into pkgsrc directories.  These files are used as input
to imake since imake can't use stdin for that purpose.

The fifth major change is in how packages note that they use X11.
Instead of setting USE_X11, package Makefiles should now include
x11.buildlink3.mk instead.  This causes the X11 package buildlink3
and builtin logic to be executed at the correct place for buildlink3.mk
and builtin.mk files that previously set USE_X11, and fixes packages
that relied on buildlink3.mk files to implicitly note that X11 is
needed.  Package buildlink3.mk should also include x11.buildlink3.mk
when linking against the package libraries requires also linking
against the X11 libraries.  Where it was obvious, redundant inclusions
of x11.buildlink3.mk have been removed.
2005-06-01 18:02:37 +00:00

139 lines
4.8 KiB
Makefile

# $NetBSD: Makefile,v 1.83 2005/06/01 18:02:59 jlam Exp $
DISTNAME= evolution-2.2.2
CATEGORIES= mail time gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/evolution/2.2/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= rh@NetBSD.org
HOMEPAGE= http://www.gnome.org/projects/evolution/
COMMENT= GNOME mailer, calendar, contact manager, and communications tool
DEPENDS+= psmisc-[0-9]*:../../sysutils/psmisc
BUILD_USES_MSGFMT= YES
PKG_OPTIONS_VAR= PKG_OPTIONS.evolution
PKG_SUPPORTED_OPTIONS= ipv6 krb4 krb5 ssl
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mssl) && !empty(PKG_OPTIONS:Mkrb[45])
# If Kerberos is enabled, the libcrypto library is linked in, which causes
# function name conflicts with libsoftokn3 provided by Mozilla NSS. These
# cause runtime crashes, so don't allow these options to be specified
# together.
PKG_FAIL_REASON= "Kerberos support conflicts with SSL"
.endif
GNU_CONFIGURE= YES
USE_DIRS+= gnome2-1.5
USE_TOOLS+= bison gmake
USE_LIBTOOL= YES
USE_PKGLOCALEDIR= YES
REPLACE_PERL+= addressbook/tools/csv2vcard
REPLACE_PERL+= addressbook/tools/evolution-addressbook-clean
REPLACE_PERL+= addressbook/tools/evolution-addressbook-clean.in
CPPFLAGS+= -I/usr/include/gssapi
CPPFLAGS+= -I/usr/include/krb5
CONFIGURE_ARGS+= --disable-gtk-doc
CONFIGURE_ARGS+= --with-openldap
CONFIGURE_ARGS+= --without-static-ldap
CONFIGURE_ARGS+= --enable-openssl=no
CONFIGURE_ARGS+= --enable-pilot-conduits=no
CONFIGURE_ARGS+= --with-krb4=/usr
CONFIGURE_ARGS+= --with-krb5=/usr
CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/doc
.if defined(PKGREVISION)
CONFIGURE_ARGS+= --with-sub-version=nb${PKGREVISION}
.endif
.if !empty(PKG_OPTIONS:Mipv6)
CONFIGURE_ARGS+= --enable-ipv6=yes
.else
CONFIGURE_ARGS+= --disable-ipv6
.endif
.if !empty(PKG_OPTIONS:Mkrb4)
CONFIGURE_ARGS+= --with-krb4
.else
CONFIGURE_ARGS+= --without-krb4
.endif
.if !empty(PKG_OPTIONS:Mkrb5)
CONFIGURE_ARGS+= --with-krb5
. include "../../mk/krb5.buildlink3.mk"
.else
CONFIGURE_ARGS+= --without-krb5
.endif
.if !empty(PKG_OPTIONS:Mssl)
CONFIGURE_ARGS+= --enable-nss=yes
PLIST_SUBST+= HAVE_SMIME=
PRINT_PLIST_AWK+= /smime/ { print "$${HAVE_SMIME}" $$0; next; }
# XXX Workaround for the following problem: addressbook/util/libeabutil.la
# is compiled as a static library only which uses the NSS stuff. When other
# parts of the program use this .la archive, they get the right -L flags
# (from the dependency_libs variable) but not the rpaths. buildlink3 should
# add rpath flags to the dependency_libs, but there is an strange comment
# in the wrapper saying that it shouldn't.
LDFLAGS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.nss}/lib/nss
# XXX Change to use devel/nss (but a mozilla-nss.pc file is required).
. include "../../www/mozilla-gtk2/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-nss
PLIST_SUBST+= HAVE_SMIME="@comment "
.endif
PKGCONFIG_OVERRIDE= camel.pc.in
PKGCONFIG_OVERRIDE+= evolution-shell.pc.in
GCONF2_SCHEMAS= apps_evolution_addressbook-2.2.schemas
GCONF2_SCHEMAS+= apps_evolution_calendar-2.2.schemas
GCONF2_SCHEMAS+= apps_evolution_shell-2.2.schemas
GCONF2_SCHEMAS+= evolution-mail-2.2.schemas
BUILDLINK_TRANSFORM+= rm:-DG_DISABLE_DEPRECATED
BUILDLINK_TRANSFORM+= rm:-DGTK_DISABLE_DEPRECATED
BUILDLINK_DEPENDS.evolution-data-server+= evolution-data-server>=1.2.2
BUILDLINK_DEPENDS.gal2+= gal2>=2.4.2
BUILDLINK_DEPENDS.glib2+= glib2>=2.4.0nb2
BUILDLINK_DEPENDS.gtkhtml36+= gtkhtml36>=3.6.2
BUILDLINK_DEPENDS.libsoup-devel+= libsoup-devel>=2.2.1
.if !exists(/usr/include/semaphore.h)
LDFLAGS+= -lsemaphore
.include "../../devel/pthread-sem/buildlink3.mk"
.endif
.include "../../databases/openldap/buildlink3.mk"
.include "../../devel/atk/buildlink3.mk"
.include "../../devel/GConf2/schemas.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/gal2/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/libbonobo/buildlink3.mk"
.include "../../devel/libbonoboui/buildlink3.mk"
.include "../../devel/libglade2/buildlink3.mk"
.include "../../devel/libgnome/buildlink3.mk"
.include "../../devel/libgnomeui/buildlink3.mk"
.include "../../devel/pkgconfig/buildlink3.mk"
.include "../../graphics/gnome-icon-theme/buildlink3.mk"
.include "../../graphics/libgnomecanvas/buildlink3.mk"
.include "../../mail/evolution-data-server/buildlink3.mk"
.include "../../multimedia/gstreamer/buildlink3.mk"
.include "../../net/libsoup-devel/buildlink3.mk"
.include "../../net/ORBit2/buildlink3.mk"
.include "../../print/libgnomeprint/buildlink3.mk"
.include "../../print/libgnomeprintui/buildlink3.mk"
.include "../../sysutils/dbus-glib/buildlink3.mk"
.include "../../sysutils/gnome-vfs2/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../textproc/intltool/buildlink3.mk"
.include "../../textproc/scrollkeeper/omf.mk"
.include "../../www/gtkhtml36/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"