################################################################################
#
# claws-mail.cygclass - functions for building Claws Mail plugins
#
# Part of cygport - Cygwin packaging application
# Copyright (C) 2006-2016 Yaakov Selkowitz
# Provided by the Cygwin Ports project <http://sourceware.org/cygwinports/>
#
# cygport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cygport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cygport.  If not, see <http://www.gnu.org/licenses/>.
#
################################################################################

#****h* Cygclasses/claws-mail.cygclass
#  SYNOPSIS
#  inherit claws-mail
#  DESCRIPTION
#  Claws Mail is an email client for GTK+ which has support for plugins.
#
#  This cygclass sets several variables for building Claws Mail plugin
#  packages.  The build process is handled through gnome2.cygclass.
#  NOTE
#  PN should be set to claws-mail-<plugin_name>.
#  INHERITS
#  gnome2.cygclass
#  REQUIRES
#  claws-mail-devel
#****

inherit gnome2

CLAWS_MAIL_PLUGIN=${PN#claws-mail-}

ORIG_PN=${ORIG_PN:-${CLAWS_MAIL_PLUGIN}}

#****o* claws-mail.cygclass/CATEGORY (claws-mail)
#  DEFINITION
CATEGORY="Mail"
#****
#****o* claws-mail.cygclass/SUMMARY (claws-mail)
#  DEFINITION
SUMMARY="Claws Mail ${CLAWS_MAIL_PLUGIN} plugin"
#****
#****o* claws-mail.cygclass/HOMEPAGE (claws-mail)
#  DEFINITION
HOMEPAGE="http://www.claws-mail.org/plugins.php"
#****

#****o* claws-mail.cygclass/SRC_URI (claws-mail)
#  DEFINITION
SRC_URI="http://www.claws-mail.org/downloads/plugins/${ORIG_PN}-${PV}.tar.gz"
#****

SRC_DIR="${ORIG_PN}-${PV}"

# FIXME: still necessary with improved default gettext diff excludes?
DIFF_EXCLUDES+=" m4 po"

case ${CHOST} in *-cygwin*|*-mingw*)
    LDFLAGS+=" -no-undefined"
    LIBS+=" -lclaws-mail"
esac

KEEP_LA_FILES="none"
