diff options
author | mezz <mezz@FreeBSD.org> | 2005-10-06 06:14:36 +0000 |
---|---|---|
committer | mezz <mezz@FreeBSD.org> | 2005-10-06 06:14:36 +0000 |
commit | 6e6124bfdcfdab778adba5d798eb8afe01759b34 (patch) | |
tree | 2cd734fcf02c5e03d4affa4419bde56ed019f4f4 /textproc | |
parent | 40cc8e15b1ea5cde0079f0218f400314a5f7ace3 (diff) | |
download | FreeBSD-ports-6e6124bfdcfdab778adba5d798eb8afe01759b34.zip FreeBSD-ports-6e6124bfdcfdab778adba5d798eb8afe01759b34.tar.gz |
- USE_LIBLTDL and GNU_CONFIGURE -> USE_AUTOTOOLS=libtool:15 libltdl
- Add CONFIGURE_ENV stuff or it will not working if it's install in
the different prefix.
- Do not extract libltdl to ensure that it will using system one.
- Kill, kill, kill the ^M.
- Respect more on ${PTHREAD_LIBS} (ie: kill the hardcore of -lc_r)
- Add autocheck on ImageMagick and libvorbis, which its configure
will doing the autochecks then enable the plugins by automatic.
It fixes the plist and dependency.
- Add strnlen() function, a non-standard, that is not exist in
FreeBSD libc, which is need for the libextractor_png.so. Without
it, evidence will complaining like this:
/libexec/ld-elf.so.1: /usr/local/lib/libextractor/libextractor_png.so:
Undefined symbol "strnlen"
- Bump the PORTREVISION.
Reported by: tmclaugh (strnlen function stuff)
Reviewed by: jylefort
Approved by: kevlo (maintainer)
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/libextractor/Makefile | 39 | ||||
-rw-r--r-- | textproc/libextractor/files/patch-Makefile.in | 11 | ||||
-rw-r--r-- | textproc/libextractor/files/patch-src::include::plibc.h | 84 | ||||
-rw-r--r-- | textproc/libextractor/files/patch-src_plugins_pngextractor.c | 16 | ||||
-rw-r--r-- | textproc/libextractor/pkg-plist | 80 |
5 files changed, 104 insertions, 126 deletions
diff --git a/textproc/libextractor/Makefile b/textproc/libextractor/Makefile index a8e205f..00c0294 100644 --- a/textproc/libextractor/Makefile +++ b/textproc/libextractor/Makefile @@ -7,6 +7,7 @@ PORTNAME= libextractor PORTVERSION= 0.5.0 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://gnunet.org/libextractor/download/ @@ -16,17 +17,43 @@ COMMENT= Library for keyword extraction USE_BZIP2= yes USE_GNOME= glib20 USE_PYTHON= yes -USE_LIBLTDL= yes USE_REINPLACE= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --disable-ltdl-install +USE_AUTOTOOLS= libtool:15 libltdl INSTALLS_SHLIB= yes +CONFIGURE_ARGS= --disable-ltdl-install +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" + +EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude libltdl MAN1= extract.1 MAN3= libextractor.3 +post-extract: + @${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} ${REINPLACE_CMD} -e \ + 's|
$$||g' + post-patch: - @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/src/plugins/Makefile.in - @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/src/plugins/Makefile.am + @${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \ + ${WRKSRC}/src/plugins/Makefile.* + @${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g' \ + ${WRKSRC}/configure + +.include <bsd.port.pre.mk> + +.if exists(${LOCALBASE}/include/wand/magick-wand.h) +LIB_DEPENDS+= Magick.8:${PORTSDIR}/graphics/ImageMagick +PLIST_SUB+= IMAGEMAGICK:="" +.else +PLIST_SUB+= IMAGEMAGICK:="@comment " +.endif + +.if exists(${LOCALBASE}/include/vorbis/vorbisfile.h) +LIB_DEPENDS+= vorbis.3:${PORTSDIR}/audio/libvorbis +PLIST_SUB+= VORBIS:="" +.else +PLIST_SUB+= VORBIS:="@comment " +.endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/textproc/libextractor/files/patch-Makefile.in b/textproc/libextractor/files/patch-Makefile.in new file mode 100644 index 0000000..a9a00e1 --- /dev/null +++ b/textproc/libextractor/files/patch-Makefile.in @@ -0,0 +1,11 @@ +--- Makefile.in.orig Tue Oct 4 21:26:35 2005 ++++ Makefile.in Tue Oct 4 21:26:52 2005 +@@ -229,7 +229,7 @@ + subdirs = @subdirs@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-SUBDIRS = m4 po libltdl src doc . ++SUBDIRS = m4 po src doc . + EXTRA_DIST = config.rpath \ + ABOUT-NLS \ + PLATFORMS \ diff --git a/textproc/libextractor/files/patch-src::include::plibc.h b/textproc/libextractor/files/patch-src::include::plibc.h index 3cf1cc5..2c28ede 100644 --- a/textproc/libextractor/files/patch-src::include::plibc.h +++ b/textproc/libextractor/files/patch-src::include::plibc.h @@ -1,58 +1,58 @@ ---- src/include/plibc.h.orig Fri May 20 03:27:06 2005 -+++ src/include/plibc.h Wed Jul 20 11:51:53 2005 +--- src/include/plibc.h.orig Tue Oct 4 23:37:40 2005 ++++ src/include/plibc.h Tue Oct 4 23:41:22 2005 @@ -451,20 +451,20 @@ - #define STRERROR(i) strerror(i)
- #define READLINK(p, b, s) readlink(p, b, s)
- #define LSTAT(p, b) lstat(p, b)
-- #define PRINTF(f, ...) printf(f , __VA_ARGS__)
-- #define FPRINTF(fil, fmt, ...) fprintf(fil, fmt, __VA_ARGS__)
+ #define STRERROR(i) strerror(i) + #define READLINK(p, b, s) readlink(p, b, s) + #define LSTAT(p, b) lstat(p, b) +- #define PRINTF(f, ...) printf(f , __VA_ARGS__) +- #define FPRINTF(fil, fmt, ...) fprintf(fil, fmt, __VA_ARGS__) + #define PRINTF(f, ARGS...) printf(f , ##ARGS) + #define FPRINTF(fil, fmt, ARGS...) fprintf(fil, fmt, ##ARGS) - #define VPRINTF(f, a) vprintf(f, a)
- #define VFPRINTF(s, f, a) vfprintf(s, f, a)
- #define VSPRINTF(d, f, a) vsprintf(d, f, a)
- #define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a)
-- #define _REAL_SNPRINTF(str, size, fmt, ...) snprintf(str, size, fmt, __VA_ARGS__)
-- #define SPRINTF(d, f, ...) sprintf(d, f, __VA_ARGS__)
+ #define VPRINTF(f, a) vprintf(f, a) + #define VFPRINTF(s, f, a) vfprintf(s, f, a) + #define VSPRINTF(d, f, a) vsprintf(d, f, a) + #define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a) +- #define _REAL_SNPRINTF(str, size, fmt, ...) snprintf(str, size, fmt, __VA_ARGS__) +- #define SPRINTF(d, f, ...) sprintf(d, f, __VA_ARGS__) + #define _REAL_SNPRINTF(str, size, fmt, ARGS...) snprintf(str, size, fmt, ##ARGS) + #define SPRINTF(d, f, ARGS...) sprintf(d, f, ##ARGS) - #define VSSCANF(s, f, a) vsscanf(s, f, a)
-- #define SSCANF(s, f, ...) sscanf(s, f, __VA_ARGS__)
+ #define VSSCANF(s, f, a) vsscanf(s, f, a) +- #define SSCANF(s, f, ...) sscanf(s, f, __VA_ARGS__) + #define SSCANF(s, f, ARGS...) sscanf(s, f, ##ARGS) - #define VFSCANF(s, f, a) vfscanf(s, f, a)
- #define VSCANF(f, a) vscanf(f, a)
-- #define SCANF(f, ...) scanf(f, __VA_ARGS__)
-- #define FSCANF(s, f, ...) fscanf(s, f, __VA_ARGS__)
+ #define VFSCANF(s, f, a) vfscanf(s, f, a) + #define VSCANF(f, a) vscanf(f, a) +- #define SCANF(f, ...) scanf(f, __VA_ARGS__) +- #define FSCANF(s, f, ...) fscanf(s, f, __VA_ARGS__) + #define SCANF(f, ARGS...) scanf(f, ##ARGS) + #define FSCANF(s, f, ARGS...) fscanf(s, f, ##ARGS) - #define ACCEPT(s, a, l) accept(s, a, l)
- #define BIND(s, n, l) bind(s, n, l)
- #define CONNECT(s, n, l) connect(s, n, l)
+ #define ACCEPT(s, a, l) accept(s, a, l) + #define BIND(s, n, l) bind(s, n, l) + #define CONNECT(s, n, l) connect(s, n, l) @@ -515,20 +515,20 @@ - #define STRERROR(i) _win_strerror(i)
- #define READLINK(p, b, s) _win_readlink(p, b, s)
- #define LSTAT(p, b) _win_lstat(p, b)
-- #define PRINTF(f, ...) _win_printf(f , __VA_ARGS__)
-- #define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__)
+ #define STRERROR(i) _win_strerror(i) + #define READLINK(p, b, s) _win_readlink(p, b, s) + #define LSTAT(p, b) _win_lstat(p, b) +- #define PRINTF(f, ...) _win_printf(f , __VA_ARGS__) +- #define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__) + #define PRINTF(f, ARGS...) _win_printf(f , ##ARGS) + #define FPRINTF(fil, fmt, ARGS...) _win_fprintf(fil, fmt, ##ARGS) - #define VPRINTF(f, a) _win_vprintf(f, a)
- #define VFPRINTF(s, f, a) _win_vfprintf(s, f, a)
- #define VSPRINTF(d, f, a) _win_vsprintf(d, f, a)
- #define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a)
-- #define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt, __VA_ARGS__)
-- #define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__)
+ #define VPRINTF(f, a) _win_vprintf(f, a) + #define VFPRINTF(s, f, a) _win_vfprintf(s, f, a) + #define VSPRINTF(d, f, a) _win_vsprintf(d, f, a) + #define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a) +- #define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt, __VA_ARGS__) +- #define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__) + #define _REAL_SNPRINTF(str, size, fmt, ARGS...) _win_snprintf(str, size, fmt, ##ARGS) + #define SPRINTF(d, f, ARGS...) _win_sprintf(d, f, ##ARGS) - #define VSSCANF(s, f, a) _win_vsscanf(s, f, a)
-- #define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__)
+ #define VSSCANF(s, f, a) _win_vsscanf(s, f, a) +- #define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__) + #define SSCANF(s, f, ARGS...) _win_sscanf(s, f, ##ARGS) - #define VFSCANF(s, f, a) _win_vfscanf(s, f, a)
- #define VSCANF(f, a) _win_vscanf(f, a)
-- #define SCANF(f, ...) _win_scanf(f, __VA_ARGS__)
-- #define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__)
+ #define VFSCANF(s, f, a) _win_vfscanf(s, f, a) + #define VSCANF(f, a) _win_vscanf(f, a) +- #define SCANF(f, ...) _win_scanf(f, __VA_ARGS__) +- #define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__) + #define SCANF(f, ARGS...) _win_scanf(f, ##ARGS) + #define FSCANF(s, f, ARGS...) _win_fscanf(s, f, ##ARGS) - #define ACCEPT(s, a, l) _win_accept(s, a, l)
- #define BIND(s, n, l) _win_bind(s, n, l)
- #define CONNECT(s, n, l) _win_connect(s, n, l)
+ #define ACCEPT(s, a, l) _win_accept(s, a, l) + #define BIND(s, n, l) _win_bind(s, n, l) + #define CONNECT(s, n, l) _win_connect(s, n, l) diff --git a/textproc/libextractor/files/patch-src_plugins_pngextractor.c b/textproc/libextractor/files/patch-src_plugins_pngextractor.c new file mode 100644 index 0000000..4109d81 --- /dev/null +++ b/textproc/libextractor/files/patch-src_plugins_pngextractor.c @@ -0,0 +1,16 @@ +--- src/plugins/pngextractor.c.orig Tue Oct 4 22:36:11 2005 ++++ src/plugins/pngextractor.c Tue Oct 4 22:36:40 2005 +@@ -23,6 +23,13 @@ + #include <zlib.h> + #include "convert.h" + ++size_t ++strnlen (const char *string, size_t maxlen) ++{ ++ const char *end = memchr (string, '\0', maxlen); ++ return end ? (size_t) (end - string) : maxlen; ++} ++ + static char * stndup(const char * str, + size_t n) { + char * tmp; diff --git a/textproc/libextractor/pkg-plist b/textproc/libextractor/pkg-plist index 89f0e35..2b09760 100644 --- a/textproc/libextractor/pkg-plist +++ b/textproc/libextractor/pkg-plist @@ -1,125 +1,49 @@ bin/extract include/extractor.h lib/libextractor.a -lib/libextractor.la lib/libextractor.so lib/libextractor.so.1 -lib/libextractor/libextractor_asf.a -lib/libextractor/libextractor_asf.la lib/libextractor/libextractor_asf.so -lib/libextractor/libextractor_deb.a -lib/libextractor/libextractor_deb.la lib/libextractor/libextractor_deb.so -lib/libextractor/libextractor_dvi.a -lib/libextractor/libextractor_dvi.la lib/libextractor/libextractor_dvi.so -lib/libextractor/libextractor_elf.a -lib/libextractor/libextractor_elf.la lib/libextractor/libextractor_elf.so -lib/libextractor/libextractor_filename.a -lib/libextractor/libextractor_filename.la lib/libextractor/libextractor_filename.so -lib/libextractor/libextractor_gif.a -lib/libextractor/libextractor_gif.la lib/libextractor/libextractor_gif.so -lib/libextractor/libextractor_hash_md5.a -lib/libextractor/libextractor_hash_md5.la lib/libextractor/libextractor_hash_md5.so -lib/libextractor/libextractor_hash_rmd160.a -lib/libextractor/libextractor_hash_rmd160.la lib/libextractor/libextractor_hash_rmd160.so -lib/libextractor/libextractor_hash_sha1.a -lib/libextractor/libextractor_hash_sha1.la lib/libextractor/libextractor_hash_sha1.so -lib/libextractor/libextractor_html.a -lib/libextractor/libextractor_html.la lib/libextractor/libextractor_html.so -lib/libextractor/libextractor_id3v2.a -lib/libextractor/libextractor_id3v2.la lib/libextractor/libextractor_id3v2.so -lib/libextractor/libextractor_id3v23.a -lib/libextractor/libextractor_id3v23.la lib/libextractor/libextractor_id3v23.so -lib/libextractor/libextractor_id3v24.a -lib/libextractor/libextractor_id3v24.la lib/libextractor/libextractor_id3v24.so -lib/libextractor/libextractor_jpeg.a -lib/libextractor/libextractor_jpeg.la lib/libextractor/libextractor_jpeg.so -lib/libextractor/libextractor_lower.a -lib/libextractor/libextractor_lower.la lib/libextractor/libextractor_lower.so -lib/libextractor/libextractor_man.a -lib/libextractor/libextractor_man.la lib/libextractor/libextractor_man.so -lib/libextractor/libextractor_mime.a -lib/libextractor/libextractor_mime.la lib/libextractor/libextractor_mime.so -lib/libextractor/libextractor_mp3.a -lib/libextractor/libextractor_mp3.la lib/libextractor/libextractor_mp3.so -lib/libextractor/libextractor_mpeg.a -lib/libextractor/libextractor_mpeg.la lib/libextractor/libextractor_mpeg.so -lib/libextractor/libextractor_oo.a -lib/libextractor/libextractor_oo.la +%%VORBIS:%%lib/libextractor/libextractor_ogg.so lib/libextractor/libextractor_oo.so lib/libextractor/libextractor_pdf.a -lib/libextractor/libextractor_pdf.la lib/libextractor/libextractor_pdf.so -lib/libextractor/libextractor_png.a -lib/libextractor/libextractor_png.la lib/libextractor/libextractor_png.so -lib/libextractor/libextractor_printable_da.a -lib/libextractor/libextractor_printable_da.la lib/libextractor/libextractor_printable_da.so -lib/libextractor/libextractor_printable_de.a -lib/libextractor/libextractor_printable_de.la lib/libextractor/libextractor_printable_de.so -lib/libextractor/libextractor_printable_en.a -lib/libextractor/libextractor_printable_en.la lib/libextractor/libextractor_printable_en.so -lib/libextractor/libextractor_printable_es.a -lib/libextractor/libextractor_printable_es.la lib/libextractor/libextractor_printable_es.so -lib/libextractor/libextractor_printable_it.a -lib/libextractor/libextractor_printable_it.la lib/libextractor/libextractor_printable_it.so -lib/libextractor/libextractor_printable_no.a -lib/libextractor/libextractor_printable_no.la lib/libextractor/libextractor_printable_no.so -lib/libextractor/libextractor_ps.a -lib/libextractor/libextractor_ps.la lib/libextractor/libextractor_ps.so -lib/libextractor/libextractor_qt.a -lib/libextractor/libextractor_qt.la lib/libextractor/libextractor_qt.so -lib/libextractor/libextractor_real.a -lib/libextractor/libextractor_real.la lib/libextractor/libextractor_real.so -lib/libextractor/libextractor_riff.a -lib/libextractor/libextractor_riff.la lib/libextractor/libextractor_riff.so -lib/libextractor/libextractor_rpm.a -lib/libextractor/libextractor_rpm.la lib/libextractor/libextractor_rpm.so -lib/libextractor/libextractor_split.a -lib/libextractor/libextractor_split.la lib/libextractor/libextractor_split.so -lib/libextractor/libextractor_tar.a -lib/libextractor/libextractor_tar.la lib/libextractor/libextractor_tar.so -lib/libextractor/libextractor_tiff.a -lib/libextractor/libextractor_tiff.la +%%IMAGEMAGICK:%%lib/libextractor/libextractor_thumbnail.so lib/libextractor/libextractor_tiff.so -lib/libextractor/libextractor_translit.a -lib/libextractor/libextractor_translit.la lib/libextractor/libextractor_translit.so -lib/libextractor/libextractor_wav.a -lib/libextractor/libextractor_wav.la lib/libextractor/libextractor_wav.so -lib/libextractor/libextractor_zip.a -lib/libextractor/libextractor_zip.la lib/libextractor/libextractor_zip.so share/locale/de/LC_MESSAGES/libextractor.mo share/locale/ro/LC_MESSAGES/libextractor.mo |