# $MidnightBSD: trunk/editors/gedit/Makefile 17640 2014-09-28 22:48:26Z laffer1 $
# $FreeBSD: ports/editors/gedit/Makefile,v 1.66 2007/12/12 04:36:21 marcus Exp $

PORTNAME=	gedit
PORTVERSION=	2.30.4
PORTREVISION=	3
CATEGORIES=	editors gnome
MASTER_SITES=	GNOME
DIST_SUBDIR=	gnome2

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	Small but powerful text editor for GNOME 2 Desktop Environment

LICENSE=	gpl2

BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/iso-codes.pc:${PORTSDIR}/misc/iso-codes
LIB_DEPENDS=	libenchant.so:${PORTSDIR}/textproc/enchant \
		libsoup-2.4.so:${PORTSDIR}/devel/libsoup
RUN_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/iso-codes.pc:${PORTSDIR}/misc/iso-codes

USES=		desktop-file-utils gettext gmake libtool:keepla  pathfix \
		pkgconfig tar:bzip2
USE_XORG=	ice sm
INSTALLS_OMF=	yes
INSTALL_TARGET=	install-strip
USE_LDCONFIG=	yes
USE_GNOME=	gnomeprefix intlhack gconf2 gtksourceview2 gnomedocutils
GNU_CONFIGURE=	yes
GNOME_DESKTOP_VERSION=2
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
PLIST_SUB=	VERSION="2.20"

GCONF_SCHEMAS=	gedit.schemas gedit-file-browser.schemas

OPTIONS_DEFINE=	PYTHON
OPTIONS_SUB=	yes

PYTHON_CONFIGURE_ENABLE=python
PYTHON_USE=		GNOME=pygtksourceview

post-patch:
	@${REINPLACE_CMD} '/^libgedit_la_LIBADD =/s/=/= -lgmodule-2.0/' \
		${WRKSRC}/gedit/Makefile.in
	@${REINPLACE_CMD} '/EGG_SMCLIENT_LIBS =/s/$$/ -lICE/' \
		${WRKSRC}/gedit/smclient/Makefile.in

.include <bsd.port.mk>
