2014-04-04 22:36:47 +02:00
|
|
|
# Created by: Kevin Lo <kevlo@FreeBSD.org>
|
2005-05-25 15:36:28 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= libextractor
|
2011-02-26 20:40:28 +01:00
|
|
|
PORTVERSION= 0.6.2
|
2014-04-04 22:36:47 +02:00
|
|
|
PORTREVISION= 16
|
2005-05-25 15:36:28 +02:00
|
|
|
CATEGORIES= textproc
|
2014-04-04 22:36:47 +02:00
|
|
|
MASTER_SITES= GNU
|
2005-05-25 15:36:28 +02:00
|
|
|
|
2006-03-06 08:52:10 +01:00
|
|
|
MAINTAINER= vd@FreeBSD.org
|
2005-05-25 15:36:28 +02:00
|
|
|
COMMENT= Library for keyword extraction
|
|
|
|
|
2013-04-08 08:11:48 +02:00
|
|
|
USE_GNOME= glib20 gtk20
|
2013-09-05 07:22:06 +02:00
|
|
|
USES= pathfix pkgconfig
|
2005-05-25 15:36:28 +02:00
|
|
|
USE_PYTHON= yes
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= libltdl
|
2006-02-23 11:40:44 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2006-11-14 09:40:53 +01:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/libextractor
|
2011-03-03 12:54:49 +01:00
|
|
|
CONFIGURE_ARGS= --disable-ltdl-install
|
2013-10-08 22:07:58 +02:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include/ffmpeg0 -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib/ffmpeg0 -L${LOCALBASE}/lib
|
2009-11-18 23:39:55 +01:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2005-10-06 08:14:36 +02:00
|
|
|
|
2013-04-29 10:57:12 +02:00
|
|
|
EXTRACT_AFTER_ARGS= --exclude libltdl
|
2005-05-25 15:36:28 +02:00
|
|
|
|
2006-09-07 15:18:36 +02:00
|
|
|
MAN1= extract.1
|
|
|
|
MAN3= libextractor.3
|
2005-05-25 15:36:28 +02:00
|
|
|
|
2013-03-21 01:07:37 +01:00
|
|
|
OPTIONS_DEFINE= EXIV2 FLAC MPEG2 VORBIS GSF POPPLER RPM QT FFMPEG
|
|
|
|
GSF_DESC= GSF (OLE2 (MS office) support)
|
|
|
|
RPM_DESC= RPM support
|
|
|
|
OPTIONS_DEFAULT= EXIV2 FLAC MPEG2 VORBIS GSF POPPLER RPM QT FFMPEG
|
2011-03-03 12:54:49 +01:00
|
|
|
|
2013-09-21 01:17:30 +02:00
|
|
|
NO_STAGE= yes
|
2005-07-20 06:16:30 +02:00
|
|
|
post-patch:
|
2005-10-06 08:14:36 +02:00
|
|
|
@${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f
|
2013-10-08 22:07:58 +02:00
|
|
|
@${REINPLACE_CMD} \
|
|
|
|
-e 's|-lpthread|${PTHREAD_LIBS}|g' \
|
|
|
|
-e 's|-lavcodec|-lavcodec0|g' \
|
|
|
|
-e 's|-lavformat|-lavformat0|g' \
|
|
|
|
-e 's|-lswscale|-lswscale0|g' \
|
|
|
|
-e 's|-lavutil|-lavutil0|g' \
|
2011-02-26 20:40:28 +01:00
|
|
|
${WRKSRC}/src/plugins/Makefile.*
|
2005-10-06 08:14:36 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g' \
|
2013-09-13 18:27:05 +02:00
|
|
|
-e 's|-lstdc++||g' \
|
2005-10-06 08:14:36 +02:00
|
|
|
${WRKSRC}/configure
|
|
|
|
|
2011-03-03 12:54:49 +01:00
|
|
|
check: build install
|
2005-10-31 03:07:46 +01:00
|
|
|
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)
|
|
|
|
|
2007-01-24 09:08:12 +01:00
|
|
|
#regression-test: check
|
|
|
|
|
2005-10-06 08:14:36 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2011-09-15 08:15:51 +02:00
|
|
|
.if ${ARCH} == i386
|
|
|
|
BROKEN= does not package
|
|
|
|
.endif
|
|
|
|
|
2011-03-03 12:54:49 +01:00
|
|
|
# libextractor's configure logic is: if exiv2 is present it will add support
|
|
|
|
# for it, if not present then it will not add support for it, but it cannot
|
|
|
|
# be disabled if present
|
2013-03-21 01:07:37 +01:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MEXIV2}
|
2014-04-05 12:42:18 +02:00
|
|
|
LIB_DEPENDS+= libexiv2.so:${PORTSDIR}/graphics/exiv2
|
2011-03-03 12:54:49 +01:00
|
|
|
PLIST_SUB+= EXIV2=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= EXIV2="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MFLAC}
|
2011-03-03 12:54:49 +01:00
|
|
|
LIB_DEPENDS+= FLAC:${PORTSDIR}/audio/flac
|
|
|
|
PLIST_SUB+= FLAC=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= FLAC="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MMPEG2}
|
2011-03-03 12:54:49 +01:00
|
|
|
LIB_DEPENDS+= mpeg2:${PORTSDIR}/multimedia/libmpeg2
|
|
|
|
PLIST_SUB+= MPEG2=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MPEG2="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MVORBIS}
|
2011-03-03 12:54:49 +01:00
|
|
|
LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis
|
2013-03-21 01:07:37 +01:00
|
|
|
PLIST_SUB+= VORBIS=""
|
2011-03-03 12:54:49 +01:00
|
|
|
.else
|
2013-03-21 01:07:37 +01:00
|
|
|
PLIST_SUB+= VORBIS="@comment "
|
2011-03-03 12:54:49 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MGSF}
|
2011-03-03 12:54:49 +01:00
|
|
|
LIB_DEPENDS+= gsf-1:${PORTSDIR}/devel/libgsf
|
|
|
|
PLIST_SUB+= GSF=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GSF="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MPOPPLER}
|
2013-12-27 17:54:21 +01:00
|
|
|
LIB_DEPENDS+= libpoppler.so:${PORTSDIR}/graphics/poppler
|
2011-03-03 12:54:49 +01:00
|
|
|
PLIST_SUB+= POPPLER=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= POPPLER="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MRPM}
|
2013-03-04 08:42:47 +01:00
|
|
|
LIB_DEPENDS+= rpm:${PORTSDIR}/archivers/rpm4
|
2011-03-03 12:54:49 +01:00
|
|
|
PLIST_SUB+= RPM=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= RPM="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# QT can be disabled
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MQT}
|
2011-03-03 12:54:49 +01:00
|
|
|
LIB_DEPENDS+= QtGui:${PORTSDIR}/x11-toolkits/qt4-gui
|
2011-09-24 00:26:39 +02:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib -L${LOCALBASE}/lib/qt4
|
2011-03-03 12:54:49 +01:00
|
|
|
CONFIGURE_ARGS+=--with-qt=${LOCALBASE}
|
|
|
|
PLIST_SUB+= QT=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--with-qt=no
|
|
|
|
PLIST_SUB+= QT="@comment "
|
2005-10-06 08:14:36 +02:00
|
|
|
.endif
|
|
|
|
|
2011-03-03 12:54:49 +01:00
|
|
|
# FFMPEG can be disabled
|
2013-03-21 01:07:37 +01:00
|
|
|
.if ${PORT_OPTIONS:MFFMPEG}
|
2013-10-08 22:07:58 +02:00
|
|
|
LIB_DEPENDS+= libavformat0.so:${PORTSDIR}/multimedia/ffmpeg0
|
|
|
|
LIB_DEPENDS+= libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0
|
|
|
|
LIB_DEPENDS+= libswscale0.so:${PORTSDIR}/multimedia/ffmpeg0
|
|
|
|
LIB_DEPENDS+= libavutil0.so:${PORTSDIR}/multimedia/ffmpeg0
|
2011-03-03 12:54:49 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-ffmpeg
|
|
|
|
PLIST_SUB+= FFMPEG=""
|
2005-10-06 08:14:36 +02:00
|
|
|
.else
|
2011-03-03 12:54:49 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-ffmpeg
|
|
|
|
PLIST_SUB+= FFMPEG="@comment "
|
2005-10-06 08:14:36 +02:00
|
|
|
.endif
|
2005-07-20 06:16:30 +02:00
|
|
|
|
2010-12-04 08:34:27 +01:00
|
|
|
patch-autotools-libtool::
|
2006-02-09 15:59:10 +01:00
|
|
|
@(cd ${PATCH_WRKSRC}; \
|
2011-03-03 09:47:55 +01:00
|
|
|
for f in ${LIBTOOLFILES}; do \
|
|
|
|
${CP} $$f $$f.tmp; \
|
2006-02-09 15:59:10 +01:00
|
|
|
${SED} -e "/^ltmain=/s^\$$ac_aux_dir/ltmain.sh^${LTMAIN}^g" \
|
2011-03-03 09:47:55 +01:00
|
|
|
$$f.tmp > $$f; \
|
|
|
|
${RM} $$f.tmp; \
|
2006-02-09 15:59:10 +01:00
|
|
|
done);
|
|
|
|
|
2005-10-06 08:14:36 +02:00
|
|
|
.include <bsd.port.post.mk>
|