aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorvd <vd@FreeBSD.org>2011-03-03 19:54:49 +0800
committervd <vd@FreeBSD.org>2011-03-03 19:54:49 +0800
commitb0aa6039cb790412655afe0f3b1c7fb98e5573e6 (patch)
tree4dc7d910815c5d1713b47f0c55f5dcebb54dd76c /textproc
parentadf0c319f53e3fa382c9c7b86605efd64c450405 (diff)
downloadfreebsd-ports-gnome-b0aa6039cb790412655afe0f3b1c7fb98e5573e6.tar.gz
freebsd-ports-gnome-b0aa6039cb790412655afe0f3b1c7fb98e5573e6.tar.zst
freebsd-ports-gnome-b0aa6039cb790412655afe0f3b1c7fb98e5573e6.zip
Fix textproc/libextractor pkg-plist
Also add OPTIONS whether to install additional dependency libraries in case they are not installed. If they are found during configure time, then libextractor will pick them and will install additional files, thus we need to conditionally enable some entries in pkg-plist. PR: ports/155179 (fixes this PR but with a different patch)
Diffstat (limited to 'textproc')
-rw-r--r--textproc/libextractor/Makefile97
-rw-r--r--textproc/libextractor/pkg-plist31
2 files changed, 104 insertions, 24 deletions
diff --git a/textproc/libextractor/Makefile b/textproc/libextractor/Makefile
index 264b6b3313ac..e7790ac400de 100644
--- a/textproc/libextractor/Makefile
+++ b/textproc/libextractor/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libextractor
PORTVERSION= 0.6.2
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -14,14 +15,12 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= vd@FreeBSD.org
COMMENT= Library for keyword extraction
-LIB_DEPENDS= mpeg2:${PORTSDIR}/multimedia/libmpeg2
-
-USE_GNOME= glib20
+USE_GNOME= glib20 gtk20
USE_PYTHON= yes
USE_AUTOTOOLS= libltdl
GNU_CONFIGURE= yes
USE_LDCONFIG= ${PREFIX}/lib/libextractor
-CONFIGURE_ARGS= --disable-ltdl-install --enable-exiv2
+CONFIGURE_ARGS= --disable-ltdl-install
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
MAKE_JOBS_UNSAFE= yes
@@ -31,6 +30,16 @@ EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude libltdl
MAN1= extract.1
MAN3= libextractor.3
+OPTIONS= EXIV2 "Hook in Exiv2 dependency" on \
+ FLAC "Hook in FLAC dependency" on \
+ MPEG2 "Hook in MPEG2 dependency" on \
+ VORBISFILE "Hook in VORBISFILE dependency" on \
+ GSF "Hook in GSF (OLE2 (MS office) support) dependency" on \
+ POPPLER "Hook in POPPLER (PDF support) dependency" on \
+ RPM "Hook in RPM dependency" on \
+ QT "Hook in QT dependency" on \
+ FFMPEG "Hook in FFMPEG dependency" on
+
post-patch:
@${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
@@ -38,23 +47,87 @@ post-patch:
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g' \
${WRKSRC}/configure
-check: build
+check: build install
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)
-# this thing depends on install
#regression-test: check
.include <bsd.port.pre.mk>
-.if exists(${LOCALBASE}/include/wand/magick-wand.h)
-LIB_DEPENDS+= MagickWand.4:${PORTSDIR}/graphics/ImageMagick
+# 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
+.if !defined(WITHOUT_EXIV2) || exists(${LOCALBASE}/include/exiv2/exif.hpp)
+LIB_DEPENDS+= exiv2:${PORTSDIR}/graphics/exiv2
+PLIST_SUB+= EXIV2=""
+.else
+PLIST_SUB+= EXIV2="@comment "
+.endif
+
+.if !defined(WITHOUT_FLAC) || exists(${LOCALBASE}/include/FLAC/all.h)
+LIB_DEPENDS+= FLAC:${PORTSDIR}/audio/flac
+PLIST_SUB+= FLAC=""
+.else
+PLIST_SUB+= FLAC="@comment "
+.endif
+
+.if !defined(WITHOUT_MPEG2) || exists(${LOCALBASE}/include/mpeg2dec/mpeg2.h)
+LIB_DEPENDS+= mpeg2:${PORTSDIR}/multimedia/libmpeg2
+PLIST_SUB+= MPEG2=""
+.else
+PLIST_SUB+= MPEG2="@comment "
+.endif
+
+.if !defined(WITHOUT_VORBISFILE) || exists(${LOCALBASE}/include/vorbis/vorbisfile.h)
+LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis
+PLIST_SUB+= VORBISFILE=""
+.else
+PLIST_SUB+= VORBISFILE="@comment "
+.endif
+
+.if !defined(WITHOUT_GSF) || exists(${LOCALBASE}/include/libgsf-1/gsf/gsf.h)
+LIB_DEPENDS+= gsf-1:${PORTSDIR}/devel/libgsf
+PLIST_SUB+= GSF=""
+.else
+PLIST_SUB+= GSF="@comment "
+.endif
+
+.if !defined(WITHOUT_POPPLER) || exists(${LOCALBASE}/include/poppler/goo/gmem.h)
+LIB_DEPENDS+= poppler:${PORTSDIR}/graphics/poppler
+PLIST_SUB+= POPPLER=""
+.else
+PLIST_SUB+= POPPLER="@comment "
+.endif
+
+.if !defined(WITHOUT_RPM) || exists(${LOCALBASE}/include/rpm/rpmlib.h)
+LIB_DEPENDS+= rpm.1:${PORTSDIR}/archivers/rpm4
+PLIST_SUB+= RPM=""
+.else
+PLIST_SUB+= RPM="@comment "
+.endif
+
+# QT can be disabled
+.if !defined(WITHOUT_QT)
+LIB_DEPENDS+= QtGui:${PORTSDIR}/x11-toolkits/qt4-gui
+CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib -L${LOCALBASE}/lib/qt4"
+CONFIGURE_ARGS+=--with-qt=${LOCALBASE}
+PLIST_SUB+= QT=""
+.else
+CONFIGURE_ARGS+=--with-qt=no
+PLIST_SUB+= QT="@comment "
.endif
-.if exists(${LOCALBASE}/include/vorbis/vorbisfile.h)
-LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
-PLIST_SUB+= VORBIS=""
+# FFMPEG can be disabled
+.if !defined(WITHOUT_FFMPEG)
+LIB_DEPENDS+= avformat:${PORTSDIR}/multimedia/ffmpeg
+LIB_DEPENDS+= avcodec:${PORTSDIR}/multimedia/ffmpeg
+LIB_DEPENDS+= swscale:${PORTSDIR}/multimedia/ffmpeg
+LIB_DEPENDS+= avutil:${PORTSDIR}/multimedia/ffmpeg
+CONFIGURE_ARGS+=--enable-ffmpeg
+PLIST_SUB+= FFMPEG=""
.else
-PLIST_SUB+= VORBIS="@comment "
+CONFIGURE_ARGS+=--disable-ffmpeg
+PLIST_SUB+= FFMPEG="@comment "
.endif
patch-autotools-libtool::
diff --git a/textproc/libextractor/pkg-plist b/textproc/libextractor/pkg-plist
index 3540a240dd16..14b928780db6 100644
--- a/textproc/libextractor/pkg-plist
+++ b/textproc/libextractor/pkg-plist
@@ -17,10 +17,10 @@ lib/libextractor/libextractor_dvi.la
lib/libextractor/libextractor_dvi.so
lib/libextractor/libextractor_elf.la
lib/libextractor/libextractor_elf.so
-lib/libextractor/libextractor_exiv2.la
-lib/libextractor/libextractor_exiv2.so
-lib/libextractor/libextractor_flac.la
-lib/libextractor/libextractor_flac.so
+%%EXIV2%%lib/libextractor/libextractor_exiv2.la
+%%EXIV2%%lib/libextractor/libextractor_exiv2.so
+%%FLAC%%lib/libextractor/libextractor_flac.la
+%%FLAC%%lib/libextractor/libextractor_flac.so
lib/libextractor/libextractor_flv.la
lib/libextractor/libextractor_flv.so
lib/libextractor/libextractor_gif.la
@@ -45,20 +45,20 @@ lib/libextractor/libextractor_mime.la
lib/libextractor/libextractor_mime.so
lib/libextractor/libextractor_mp3.la
lib/libextractor/libextractor_mp3.so
-lib/libextractor/libextractor_mpeg.la
-lib/libextractor/libextractor_mpeg.so
+%%MPEG2%%lib/libextractor/libextractor_mpeg.la
+%%MPEG2%%lib/libextractor/libextractor_mpeg.so
lib/libextractor/libextractor_nsf.la
lib/libextractor/libextractor_nsf.so
lib/libextractor/libextractor_nsfe.la
lib/libextractor/libextractor_nsfe.so
lib/libextractor/libextractor_odf.la
lib/libextractor/libextractor_odf.so
-%%VORBIS%%lib/libextractor/libextractor_ogg.la
-%%VORBIS%%lib/libextractor/libextractor_ogg.so
-lib/libextractor/libextractor_ole2.la
-lib/libextractor/libextractor_ole2.so
-lib/libextractor/libextractor_pdf.la
-lib/libextractor/libextractor_pdf.so
+%%VORBISFILE%%lib/libextractor/libextractor_ogg.la
+%%VORBISFILE%%lib/libextractor/libextractor_ogg.so
+%%GSF%%lib/libextractor/libextractor_ole2.la
+%%GSF%%lib/libextractor/libextractor_ole2.so
+%%POPPLER%%lib/libextractor/libextractor_pdf.la
+%%POPPLER%%lib/libextractor/libextractor_pdf.so
lib/libextractor/libextractor_png.la
lib/libextractor/libextractor_png.so
lib/libextractor/libextractor_ps.la
@@ -69,14 +69,20 @@ lib/libextractor/libextractor_real.la
lib/libextractor/libextractor_real.so
lib/libextractor/libextractor_riff.la
lib/libextractor/libextractor_riff.so
+%%RPM%%lib/libextractor/libextractor_rpm.la
+%%RPM%%lib/libextractor/libextractor_rpm.so
lib/libextractor/libextractor_s3m.la
lib/libextractor/libextractor_s3m.so
lib/libextractor/libextractor_sid.la
lib/libextractor/libextractor_sid.so
lib/libextractor/libextractor_tar.la
lib/libextractor/libextractor_tar.so
+%%FFMPEG%%lib/libextractor/libextractor_thumbnailffmpeg.la
+%%FFMPEG%%lib/libextractor/libextractor_thumbnailffmpeg.so
lib/libextractor/libextractor_thumbnailgtk.la
lib/libextractor/libextractor_thumbnailgtk.so
+%%QT%%lib/libextractor/libextractor_thumbnailqt.la
+%%QT%%lib/libextractor/libextractor_thumbnailqt.so
lib/libextractor/libextractor_tiff.la
lib/libextractor/libextractor_tiff.so
lib/libextractor/libextractor_wav.la
@@ -88,6 +94,7 @@ lib/libextractor/libextractor_zip.so
lib/pkgconfig/libextractor.pc
share/locale/de/LC_MESSAGES/libextractor.mo
share/locale/ga/LC_MESSAGES/libextractor.mo
+share/locale/fr/LC_MESSAGES/libextractor.mo
share/locale/nl/LC_MESSAGES/libextractor.mo
share/locale/ro/LC_MESSAGES/libextractor.mo
share/locale/rw/LC_MESSAGES/libextractor.mo