diff -Nru xapian-omega-1.4.9/aclocal.m4 xapian-omega-1.4.10/aclocal.m4 --- xapian-omega-1.4.9/aclocal.m4 2018-11-02 22:07:07.000000000 +0000 +++ xapian-omega-1.4.10/aclocal.m4 2019-02-11 21:28:15.000000000 +0000 @@ -1187,6 +1187,9 @@ ]) # _AM_PROG_TAR m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) +m4_include([m4/iconv.m4]) +m4_include([m4/lib-link.m4]) +m4_include([m4/lib-prefix.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff -Nru xapian-omega-1.4.9/config.guess xapian-omega-1.4.10/config.guess --- xapian-omega-1.4.9/config.guess 2018-11-02 22:07:09.000000000 +0000 +++ xapian-omega-1.4.10/config.guess 2019-02-11 21:28:17.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2018-06-26' +timestamp='2019-01-15' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,38 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -138,7 +140,7 @@ # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -199,7 +201,7 @@ os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -389,7 +391,7 @@ echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" + set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. @@ -482,7 +484,7 @@ echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -579,7 +581,7 @@ exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -660,7 +662,7 @@ esac fi if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -700,7 +702,7 @@ esac if [ "$HP_ARCH" = hppa2.0w ] then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -726,7 +728,7 @@ echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -840,6 +842,17 @@ *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in @@ -881,7 +894,7 @@ echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" @@ -922,7 +935,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -971,7 +984,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1285,7 +1298,7 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1358,6 +1371,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else @@ -1414,6 +1428,9 @@ amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; esac echo "$0: unable to guess system type" >&2 diff -Nru xapian-omega-1.4.9/config.h.in xapian-omega-1.4.10/config.h.in --- xapian-omega-1.4.9/config.h.in 2018-11-02 22:07:08.000000000 +0000 +++ xapian-omega-1.4.10/config.h.in 2019-02-11 21:28:16.000000000 +0000 @@ -36,12 +36,12 @@ /* Define to 1 if you have the `gmtime_r' function. */ #undef HAVE_GMTIME_R +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `iconv' library (-liconv). */ -#undef HAVE_LIBICONV - /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT @@ -102,6 +102,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strptime' function. */ +#undef HAVE_STRPTIME + /* Define to 1 if you have the `sysmp' function. */ #undef HAVE_SYSMP @@ -153,8 +156,8 @@ /* Define to 1 if you have the `_putenv_s' function. */ #undef HAVE__PUTENV_S -/* type of input pointer for iconv */ -#undef ICONV_INPUT_TYPE +/* Define as const if the declaration of iconv() needs const. */ +#undef ICONV_CONST /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -195,9 +198,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define if iconv() should be used for converting character sets. */ -#undef USE_ICONV - /* Version number of package */ #undef VERSION diff -Nru xapian-omega-1.4.9/config.rpath xapian-omega-1.4.10/config.rpath --- xapian-omega-1.4.9/config.rpath 1970-01-01 00:00:00.000000000 +0000 +++ xapian-omega-1.4.10/config.rpath 2019-02-11 21:27:21.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# The AM_ICONV macro requires a stack of macros from gettext which include +# copies of macros and scripts from libtool with the names changed. But we +# already use libtool and it's stupid to be running the same macros and +# scripts twice. +# +# This script is a replacement for gettext's config.rpath which simply +# reuses the existing answers libtool already found. +cat <<'EOF' +acl_cv_wl=$lt_prog_compiler_wl_CXX +acl_cv_libext=$libext +acl_cv_shlibext=$shlibext +acl_cv_libname_spec=$libname_spec +acl_cv_library_names_spec=$library_names_spec +acl_cv_hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec_CXX +acl_cv_hardcode_libdir_separator=$hardcode_libdir_separator_CXX +acl_cv_hardcode_direct=$hardcode_direct_CXX +acl_cv_hardcode_minus_L=$hardcode_minus_L_CXX +EOF diff -Nru xapian-omega-1.4.9/config.sub xapian-omega-1.4.10/config.sub --- xapian-omega-1.4.9/config.sub 2018-11-02 22:07:09.000000000 +0000 +++ xapian-omega-1.4.10/config.sub 2019-02-11 21:28:17.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2018-05-24' +timestamp='2019-01-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -89,7 +89,7 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -111,7 +111,8 @@ esac # Split fields of configuration type -IFS="-" read -r field1 field2 field3 field4 <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64eb | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1362,7 +1345,7 @@ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | knetbsd* | mirbsd* | netbsd* \ | bitrig* | openbsd* | solidbsd* | libertybsd* \ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ @@ -1382,12 +1365,12 @@ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd*) + | midnightbsd* | amdhsa* | unleashed* | emscripten*) # Remember, each alternative MUST END IN *, to match a version number. ;; qnx*) - case $basic_machine in - x86-* | i*86-*) + case $cpu in + x86 | i*86) ;; *) os=nto-$os @@ -1513,7 +1496,7 @@ # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $basic_machine in + case $cpu in arm*) os=eabi ;; @@ -1547,7 +1530,7 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) os=elf ;; @@ -1728,9 +1711,8 @@ # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in riscix*) vendor=acorn @@ -1799,11 +1781,10 @@ vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine-$os" +echo "$cpu-$vendor-$os" exit # Local variables: diff -Nru xapian-omega-1.4.9/configure xapian-omega-1.4.10/configure --- xapian-omega-1.4.9/configure 2018-11-02 22:07:08.000000000 +0000 +++ xapian-omega-1.4.10/configure 2019-02-11 21:28:16.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xapian-omega 1.4.9. +# Generated by GNU Autoconf 2.69 for xapian-omega 1.4.10. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='xapian-omega' PACKAGE_TARNAME='xapian-omega' -PACKAGE_VERSION='1.4.9' -PACKAGE_STRING='xapian-omega 1.4.9' +PACKAGE_VERSION='1.4.10' +PACKAGE_STRING='xapian-omega 1.4.10' PACKAGE_BUGREPORT='https://xapian.org/bugs' PACKAGE_URL='' @@ -645,7 +645,11 @@ RST2HTML HELP2MAN PERL -ICONV_LDFLAGS +INCICONV +LTLIBICONV +LIBICONV +NEED_STRPTIME_FALSE +NEED_STRPTIME_TRUE NEED_MKDTEMP_FALSE NEED_MKDTEMP_TRUE MAGIC_LIBS @@ -803,6 +807,8 @@ enable_largefile enable_documentation with_iconv +enable_rpath +with_libiconv_prefix ' ac_precious_vars='build_alias host_alias @@ -1361,7 +1367,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xapian-omega 1.4.9 to adapt to many kinds of systems. +\`configure' configures xapian-omega 1.4.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1431,7 +1437,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xapian-omega 1.4.9:";; + short | recursive ) echo "Configuration of xapian-omega 1.4.10:";; esac cat <<\_ACEOF @@ -1456,6 +1462,7 @@ --disable-largefile omit support for large files --enable-documentation enable make rules to rebuild documentation [default=maintainer-mode] + --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1469,7 +1476,9 @@ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-iconv force use of iconv (error if not found) - --without-iconv don't use iconv + --without-iconv don't use iconv + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir Some influential environment variables: CC C compiler command @@ -1556,7 +1565,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xapian-omega configure 1.4.9 +xapian-omega configure 1.4.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2240,7 +2249,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xapian-omega $as_me 1.4.9, which was +It was created by xapian-omega $as_me 1.4.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3104,7 +3113,7 @@ # Define the identity of the package. PACKAGE='xapian-omega' - VERSION='1.4.9' + VERSION='1.4.10' cat >>confdefs.h <<_ACEOF @@ -3322,6 +3331,8 @@ + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -17207,6 +17218,26 @@ fi +for ac_func in strptime +do : + ac_fn_cxx_check_func "$LINENO" "strptime" "ac_cv_func_strptime" +if test "x$ac_cv_func_strptime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRPTIME 1 +_ACEOF + +fi +done + + if test yes != "$ac_cv_func_strptime"; then + NEED_STRPTIME_TRUE= + NEED_STRPTIME_FALSE='#' +else + NEED_STRPTIME_TRUE='#' + NEED_STRPTIME_FALSE= +fi + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17412,199 +17443,903 @@ if test no != "$with_iconv" ; then - ICONV_LDFLAGS= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv" >&5 -$as_echo_n "checking for library containing iconv... " >&6; } -if ${ac_cv_search_iconv+:} false; then : + save_CPPFLAGS=$CPPFLAGS + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +$as_echo_n "checking for 64-bit host... " >&6; } +if ${gl_cv_solaris_64bit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#ifdef _LP64 +sixtyfour bits #endif -char iconv (); -int -main () -{ -return iconv (); - ; - return 0; -} + _ACEOF -for ac_lib in '' iconv; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_search_iconv=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_iconv+:} false; then : - break +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sixtyfour bits" >/dev/null 2>&1; then : + gl_cv_solaris_64bit=yes +else + gl_cv_solaris_64bit=no fi -done -if ${ac_cv_search_iconv+:} false; then : +rm -f conftest* + -else - ac_cv_search_iconv=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +$as_echo "$gl_cv_solaris_64bit" >&6; } + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + + + + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv" >&5 -$as_echo "$ac_cv_search_iconv" >&6; } -ac_res=$ac_cv_search_iconv -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + HAVE_LIBICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do - if test -f "/sw/etc/fink.conf" ; then - case $host_os in - darwin*) - ICONV_LDFLAGS=-L/sw/lib - SAVE_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $ICONV_LDFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5 -$as_echo_n "checking for iconv in -liconv... " >&6; } -if ${ac_cv_lib_iconv_iconv+:} false; then : + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-liconv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char iconv (); +#include +#include + int main () { -return iconv (); +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_iconv_iconv=yes -else - ac_cv_lib_iconv_iconv=no + am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5 -$as_echo "$ac_cv_lib_iconv_iconv" >&6; } -if test "x$ac_cv_lib_iconv_iconv" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBICONV 1 + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} _ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi - LIBS="-liconv $LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include - ICONV_LDFLAGS= - with_iconv=bad-$with_iconv +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main () +{ +int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + result |= 16; + return result; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + am_cv_func_iconv_works=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - LDFLAGS=$SAVE_LDFLAGS ;; - esac - else - with_iconv=bad-$with_iconv - fi + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" - case $with_iconv in - bad-yes) - as_fn_error $? "iconv not found, but --with-iconv specified" "$LINENO" 5 ;; - bad-*) - with_iconv=no ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then -fi +$as_echo "#define HAVE_ICONV 1" >>confdefs.h + fi + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi -fi -if test no != "$with_iconv" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of input pointer for iconv" >&5 -$as_echo_n "checking for type of input pointer for iconv... " >&6; } - if ${xo_cv_iconv_input+:} false; then : + + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +$as_echo_n "checking for iconv declaration... " >&6; } + if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else - xo_cv_iconv_input= - for t in 'char*' 'const char *' ; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + +#include #include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + int main () { - char buf[20]; - $t in = const_cast("hello"); - size_t in_len = 5; - char * out = buf; - size_t out_len = 20; - iconv((iconv_t)-1, &in, &in_len, &out, &out_len); - ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - xo_cv_iconv_input=$t - break - +if ac_fn_cxx_try_compile "$LINENO"; then : + am_cv_proto_iconv_arg1="" +else + am_cv_proto_iconv_arg1="const" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - if test -z "$xo_cv_iconv_input"; then - if test yes = "$with_iconv" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "Failed to work out how to call iconv but --with-iconv specified" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found - not using iconv" >&5 -$as_echo "not found - not using iconv" >&6; } - with_iconv=no - fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xo_cv_iconv_input" >&5 -$as_echo "$xo_cv_iconv_input" >&6; } + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: + $am_cv_proto_iconv" >&5 +$as_echo " + $am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF -#define ICONV_INPUT_TYPE $xo_cv_iconv_input +#define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF -fi -if test no != "$with_iconv" ; then + fi -$as_echo "#define USE_ICONV 1" >>confdefs.h + CPPFLAGS=$save_CPPFLAGS + if test yes = "$with_iconv" && test yes != "$am_cv_func_iconv" ; then + as_fn_error $? "iconv not found, but --with-iconv specified" "$LINENO" 5 + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 @@ -18458,6 +19193,10 @@ as_fn_error $? "conditional \"NEED_MKDTEMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${NEED_STRPTIME_TRUE}" && test -z "${NEED_STRPTIME_FALSE}"; then + as_fn_error $? "conditional \"NEED_STRPTIME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" @@ -18856,7 +19595,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xapian-omega $as_me 1.4.9, which was +This file was extended by xapian-omega $as_me 1.4.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18922,7 +19661,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xapian-omega config.status 1.4.9 +xapian-omega config.status 1.4.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru xapian-omega-1.4.9/configure.ac xapian-omega-1.4.10/configure.ac --- xapian-omega-1.4.9/configure.ac 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/configure.ac 2019-02-11 21:27:21.000000000 +0000 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -m4_define([project_version], [1.4.9]) +m4_define([project_version], [1.4.10]) AC_INIT([xapian-omega], project_version, [https://xapian.org/bugs]) AC_PREREQ([2.63]) AM_INIT_AUTOMAKE([1.11 -Wportability subdir-objects tar-ustar no-dist-gzip dist-xz]) @@ -11,6 +11,12 @@ AC_CONFIG_MACRO_DIR([m4]) +dnl The AM_ICONV macro requires a stack of macros including AC_LIB_PROG_LD, +dnl which is just a copy of libtool's LT_PATH_LD with the name changed. +dnl We will already have run LT_PATH_LD, so make AC_LIB_PROG_LD a no-op +dnl as LT_PATH_LD will already have set the with_gnu_ld variable. +AC_DEFUN([AC_LIB_PROG_LD], []) + LT_PREREQ([2.2.6]) LT_INIT @@ -202,6 +208,10 @@ AC_CHECK_FUNCS(mkdtemp) AM_CONDITIONAL(NEED_MKDTEMP, [test yes != "$ac_cv_func_mkdtemp"]) +dnl Add in portable replacement for strptime() on platforms which lack it. +AC_CHECK_FUNCS(strptime) +AM_CONDITIONAL(NEED_STRPTIME, [test yes != "$ac_cv_func_strptime"]) + dnl Need a full link check for posix_fadvise. AC_LINK_IFELSE([ AC_LANG_PROGRAM( @@ -300,82 +310,21 @@ esac AC_ARG_WITH(iconv, - AC_HELP_STRING([--with-iconv], [force use of iconv (error if not found)]) - AC_HELP_STRING([--without-iconv], [don't use iconv]), +[AS_HELP_STRING([--with-iconv], [force use of iconv (error if not found)]) +AS_HELP_STRING([--without-iconv], [don't use iconv])], [with_iconv=$withval], [with_iconv=auto]) if test no != "$with_iconv" ; then - ICONV_LDFLAGS= - AC_SEARCH_LIBS(iconv, iconv, [], [ - if test -f "/sw/etc/fink.conf" ; then - dnl For fink on OS X. - case $host_os in - darwin*) - ICONV_LDFLAGS=-L/sw/lib - SAVE_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $ICONV_LDFLAGS" - AC_CHECK_LIB(iconv, iconv, [], [ - ICONV_LDFLAGS= - with_iconv=bad-$with_iconv - ]) - LDFLAGS=$SAVE_LDFLAGS ;; - esac - else - with_iconv=bad-$with_iconv - fi - - case $with_iconv in - bad-yes) - AC_MSG_ERROR([iconv not found, but --with-iconv specified]) ;; - bad-*) - with_iconv=no ;; - esac - ]) - AC_SUBST(ICONV_LDFLAGS) -fi - -if test no != "$with_iconv" ; then - dnl Check if iconv take "char**" or "const char**" as its input. - dnl Solaris 2.9 has "const char **"; GNU iconv has "char **". - AC_MSG_CHECKING([for type of input pointer for iconv]) - AC_CACHE_VAL([xo_cv_iconv_input], - [ - xo_cv_iconv_input= - for t in 'char*' 'const char *' ; do - dnl Use a link check as just compiling was falsely detecting a - dnl working iconv installation on some platforms. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [[ - char buf[20]; - $t in = const_cast("hello"); - size_t in_len = 5; - char * out = buf; - size_t out_len = 20; - iconv((iconv_t)-1, &in, &in_len, &out, &out_len); - ]])], - [ - xo_cv_iconv_input=$t - break - ]) - done - if test -z "$xo_cv_iconv_input"; then - if test yes = "$with_iconv" ; then - AC_MSG_RESULT([not found]) - AC_MSG_ERROR([Failed to work out how to call iconv but --with-iconv specified]) - fi - AC_MSG_RESULT([not found - not using iconv]) - with_iconv=no - fi - ]) - AC_MSG_RESULT([$xo_cv_iconv_input]) - AC_DEFINE_UNQUOTED(ICONV_INPUT_TYPE, [$xo_cv_iconv_input], - [type of input pointer for iconv]) -fi - -if test no != "$with_iconv" ; then - AC_DEFINE(USE_ICONV, 1, [Define if iconv() should be used for converting character sets.]) + dnl AM_ICONV modifies CPPFLAGS if it succeeds which is undesirable (configure + dnl shouldn't modify user variables like CPPFLAGS) so save and restore + dnl CPPFLAGS around it. We then add INCICONV where needed instead. + save_CPPFLAGS=$CPPFLAGS + AM_ICONV + CPPFLAGS=$save_CPPFLAGS + AC_SUBST([INCICONV]) + if test yes = "$with_iconv" && test yes != "$am_cv_func_iconv" ; then + AC_MSG_ERROR([iconv not found, but --with-iconv specified]) + fi fi dnl Check processor endianness. diff -Nru xapian-omega-1.4.9/debian/changelog xapian-omega-1.4.10/debian/changelog --- xapian-omega-1.4.9/debian/changelog 2018-11-04 20:26:08.000000000 +0000 +++ xapian-omega-1.4.10/debian/changelog 2019-02-12 02:25:59.000000000 +0000 @@ -1,8 +1,15 @@ -xapian-omega (1.4.9-1.999bionic+1) bionic; urgency=medium +xapian-omega (1.4.10-1.999bionic+1) bionic; urgency=medium * Rebuild for bionic backports. - -- Olly Betts Mon, 05 Nov 2018 09:26:08 +1300 + -- Olly Betts Tue, 12 Feb 2019 15:25:59 +1300 + +xapian-omega (1.4.10-1) unstable; urgency=medium + + * New upstream release + * debian/control.in: Specify "Rules-Requires-Root: no" + + -- Olly Betts Tue, 12 Feb 2019 12:59:11 +1300 xapian-omega (1.4.9-1) unstable; urgency=medium diff -Nru xapian-omega-1.4.9/debian/control xapian-omega-1.4.10/debian/control --- xapian-omega-1.4.9/debian/control 2018-11-04 20:26:08.000000000 +0000 +++ xapian-omega-1.4.10/debian/control 2019-02-12 02:25:59.000000000 +0000 @@ -2,12 +2,13 @@ Section: web Priority: optional Maintainer: Olly Betts -Build-Depends: libxapian-dev (>= 1.4.9), libxapian-dev (<< 1.5.0), debhelper (>= 9), autotools-dev, libpcre3-dev, +Build-Depends: libxapian-dev (>= 1.4.10), libxapian-dev (<< 1.5.0), debhelper (>= 9), autotools-dev, libpcre3-dev, dpkg-dev (>= 1.16.1~), libmagic-dev, zlib1g-dev Standards-Version: 4.1.5 Homepage: https://xapian.org/ +Rules-Requires-Root: no Vcs-Browser: https://salsa.debian.org/olly/xapian-omega Vcs-git: https://salsa.debian.org/olly/xapian-omega.git diff -Nru xapian-omega-1.4.9/debian/control.in xapian-omega-1.4.10/debian/control.in --- xapian-omega-1.4.9/debian/control.in 2018-10-28 23:51:26.000000000 +0000 +++ xapian-omega-1.4.10/debian/control.in 2019-02-11 23:59:11.000000000 +0000 @@ -8,6 +8,7 @@ zlib1g-dev Standards-Version: 4.1.5 Homepage: https://xapian.org/ +Rules-Requires-Root: no Vcs-Browser: https://salsa.debian.org/olly/xapian-omega Vcs-git: https://salsa.debian.org/olly/xapian-omega.git diff -Nru xapian-omega-1.4.9/docs/inc/mimetypes.rst xapian-omega-1.4.10/docs/inc/mimetypes.rst --- xapian-omega-1.4.9/docs/inc/mimetypes.rst 2018-11-02 22:09:01.000000000 +0000 +++ xapian-omega-1.4.10/docs/inc/mimetypes.rst 2019-02-11 21:29:59.000000000 +0000 @@ -41,6 +41,8 @@ ai ------------------------------------------------------------------------- -------------- application/vnd.apple.keynote key + kth + apxl ------------------------------------------------------------------------- -------------- application/vnd.apple.numbers numbers ------------------------------------------------------------------------- -------------- diff -Nru xapian-omega-1.4.9/docs/Makefile.in xapian-omega-1.4.10/docs/Makefile.in --- xapian-omega-1.4.9/docs/Makefile.in 2018-11-02 22:07:09.000000000 +0000 +++ xapian-omega-1.4.10/docs/Makefile.in 2019-02-11 21:28:17.000000000 +0000 @@ -91,9 +91,11 @@ subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_doc_DATA_DIST) \ @@ -190,7 +192,7 @@ GREP = @GREP@ HAVE_CXX11 = @HAVE_CXX11@ HELP2MAN = @HELP2MAN@ -ICONV_LDFLAGS = @ICONV_LDFLAGS@ +INCICONV = @INCICONV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -198,11 +200,13 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAGIC_LIBS = @MAGIC_LIBS@ diff -Nru xapian-omega-1.4.9/docs/overview.html xapian-omega-1.4.10/docs/overview.html --- xapian-omega-1.4.9/docs/overview.html 2018-11-02 22:09:16.000000000 +0000 +++ xapian-omega-1.4.10/docs/overview.html 2019-02-11 21:30:12.000000000 +0000 @@ -614,8 +614,8 @@
  • MS Publisher documents (.pub) if pub2xhtml is available (comes with libmspub)
  • MS Visio documents (.vsd, .vss, .vst, .vsw, .vsdx, .vssx, .vstx, .vsdm, .vssm, .vstm) if vsd2xhtml is available (comes with libvisio)
  • -
  • Apple Keynote documents (.key) if key2text is available (comes with -libetonyek)
  • +
  • Apple Keynote documents (.key, .kth, .apxl) if key2text is available (comes +with libetonyek)
  • Apple Numbers documents (.numbers) if numbers2text is available (comes with libetonyek)
  • Apple Pages documents (.pages) if pages2text is available (comes with @@ -715,7 +715,9 @@ ai application/vnd.apple.keynote -key +key +kth +apxl application/vnd.apple.numbers numbers diff -Nru xapian-omega-1.4.9/docs/overview.rst xapian-omega-1.4.10/docs/overview.rst --- xapian-omega-1.4.9/docs/overview.rst 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/docs/overview.rst 2019-02-11 21:27:21.000000000 +0000 @@ -284,8 +284,8 @@ * MS Publisher documents (.pub) if pub2xhtml is available (comes with libmspub) * MS Visio documents (.vsd, .vss, .vst, .vsw, .vsdx, .vssx, .vstx, .vsdm, .vssm, .vstm) if vsd2xhtml is available (comes with libvisio) -* Apple Keynote documents (.key) if key2text is available (comes with - libetonyek) +* Apple Keynote documents (.key, .kth, .apxl) if key2text is available (comes + with libetonyek) * Apple Numbers documents (.numbers) if numbers2text is available (comes with libetonyek) * Apple Pages documents (.pages) if pages2text is available (comes with diff -Nru xapian-omega-1.4.9/docs/scriptindex.html xapian-omega-1.4.10/docs/scriptindex.html --- xapian-omega-1.4.9/docs/scriptindex.html 2018-11-02 22:09:16.000000000 +0000 +++ xapian-omega-1.4.10/docs/scriptindex.html 2019-02-11 21:30:12.000000000 +0000 @@ -434,12 +434,14 @@ don't include positional information in the database - this makes the database smaller, but phrase searching won't work.
    load
    -
    reads the contents of the file using the current text as the filename -and then sets the current text to the contents. If the file can't be -loaded (not found, wrong permissions, etc) then a diagnostic message is -sent to stderr and the current text is set to empty. If the next -action is truncate, then scriptindex is smart enough to know it only -needs to load the start of a large file.
    +

    reads the contents of the file using the current text as the filename +and then sets the current text to the contents. If the current text +is empty, a warning is issued (since Xapian 1.4.10). If the file can't +be loaded (not found, wrong permissions, etc) then an error is issued and +the current text is set to empty.

    +

    If the next action is truncate, then scriptindex is smart enough to +know it only needs to load the start of a large file.

    +
    lower
    lowercase the text (useful for generating boolean terms)
    parsedate=FORMAT
    diff -Nru xapian-omega-1.4.9/docs/scriptindex.rst xapian-omega-1.4.10/docs/scriptindex.rst --- xapian-omega-1.4.9/docs/scriptindex.rst 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/docs/scriptindex.rst 2019-02-11 21:27:21.000000000 +0000 @@ -85,12 +85,14 @@ database smaller, but phrase searching won't work. load - reads the contents of the file using the current text as the filename - and then sets the current text to the contents. If the file can't be - loaded (not found, wrong permissions, etc) then a diagnostic message is - sent to stderr and the current text is set to empty. If the next - action is truncate, then scriptindex is smart enough to know it only - needs to load the start of a large file. + reads the contents of the file using the current text as the filename + and then sets the current text to the contents. If the current text + is empty, a warning is issued (since Xapian 1.4.10). If the file can't + be loaded (not found, wrong permissions, etc) then an error is issued and + the current text is set to empty. + + If the next action is ``truncate``, then scriptindex is smart enough to + know it only needs to load the start of a large file. lower lowercase the text (useful for generating boolean terms) diff -Nru xapian-omega-1.4.9/extra/omegascript.vim xapian-omega-1.4.10/extra/omegascript.vim --- xapian-omega-1.4.9/extra/omegascript.vim 2018-11-02 22:09:01.000000000 +0000 +++ xapian-omega-1.4.10/extra/omegascript.vim 2019-02-11 21:29:59.000000000 +0000 @@ -2,7 +2,7 @@ " Language: OmegaScript " Maintainer: Xapian developers " URL: https://xapian.org/ -" Version: 1.4.9 +" Version: 1.4.10 " To install: place this file in ~/.vim/syntax/omegascript.vim " and then create or add the following lines, without the "'s commenting diff -Nru xapian-omega-1.4.9/gen-namedents xapian-omega-1.4.10/gen-namedents --- xapian-omega-1.4.9/gen-namedents 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/gen-namedents 2019-02-11 21:27:21.000000000 +0000 @@ -30,7 +30,7 @@ my $hdr = Tokeniseise->new('namedents.h', 'Map HTML entity name to Unicode codepoint', $copyright, 'OMEGA_INCLUDED_NAMEDENTS_H', 'named_ent', 2); # Names and values from: "Character entity references in HTML 4" -# http://www.w3.org/TR/html4/sgml/entities.html +# https://www.w3.org/TR/html4/sgml/entities.html $hdr->append('static const unsigned named_ent_codepoint[] = {'); for my $ref ( [ "quot", 34 ], diff -Nru xapian-omega-1.4.9/index_file.cc xapian-omega-1.4.10/index_file.cc --- xapian-omega-1.4.9/index_file.cc 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/index_file.cc 2019-02-11 21:27:21.000000000 +0000 @@ -313,48 +313,67 @@ parse_pdfinfo_field((P), (END), (OUT), FIELD":", CONST_STRLEN(FIELD) + 1) static void -get_pdf_metainfo(const string & file, string &author, string &title, +parse_pdf_metainfo(const string& pdfinfo, string &author, string &title, + string &keywords, string &topic, int& pages) +{ + const char * p = pdfinfo.data(); + const char * end = p + pdfinfo.size(); + while (p != end) { + const char * start = p; + p = static_cast(memchr(p, '\n', end - p)); + const char * eol; + if (p) { + eol = p; + ++p; + } else { + p = eol = end; + } + switch (*start) { + case 'A': + PARSE_PDFINFO_FIELD(start, eol, author, "Author"); + break; + case 'K': + PARSE_PDFINFO_FIELD(start, eol, keywords, "Keywords"); + break; + case 'P': { + string s; + PARSE_PDFINFO_FIELD(start, eol, s, "Pages"); + if (!s.empty()) + pages = atoi(s.c_str()); + break; + } + case 'S': + PARSE_PDFINFO_FIELD(start, eol, topic, "Subject"); + break; + case 'T': + PARSE_PDFINFO_FIELD(start, eol, title, "Title"); + break; + } + } +} + +static void +get_pdf_metainfo(int fd, string &author, string &title, + string &keywords, string &topic, int& pages) +{ + try { + string pdfinfo; + run_filter(fd, "pdfinfo -enc UTF-8 -", false, &pdfinfo); + parse_pdf_metainfo(pdfinfo, author, title, keywords, topic, pages); + } catch (ReadError) { + // It's probably best to index the document even if pdfinfo fails. + } +} + +static void +get_pdf_metainfo(const string& file, string &author, string &title, string &keywords, string &topic, int& pages) { try { string cmd = "pdfinfo -enc UTF-8"; append_filename_argument(cmd, file); - string pdfinfo = stdout_to_string(cmd, false); - - const char * p = pdfinfo.data(); - const char * end = p + pdfinfo.size(); - while (p != end) { - const char * start = p; - p = static_cast(memchr(p, '\n', end - p)); - const char * eol; - if (p) { - eol = p; - ++p; - } else { - p = eol = end; - } - switch (*start) { - case 'A': - PARSE_PDFINFO_FIELD(start, eol, author, "Author"); - break; - case 'K': - PARSE_PDFINFO_FIELD(start, eol, keywords, "Keywords"); - break; - case 'P': { - string s; - PARSE_PDFINFO_FIELD(start, eol, s, "Pages"); - if (!s.empty()) - pages = atoi(s.c_str()); - break; - } - case 'S': - PARSE_PDFINFO_FIELD(start, eol, topic, "Subject"); - break; - case 'T': - PARSE_PDFINFO_FIELD(start, eol, title, "Title"); - break; - } - } + parse_pdf_metainfo(stdout_to_string(cmd, false), + author, title, keywords, topic, pages); } catch (ReadError) { // It's probably best to index the document even if pdfinfo fails. } @@ -570,7 +589,8 @@ if (cmd_it != commands.end()) { // Easy "run a command and read text or HTML from stdout or a // temporary file" cases. - string cmd = cmd_it->second.cmd; + auto& filter = cmd_it->second; + string cmd = filter.cmd; if (cmd.empty()) { skip(urlterm, context, "required filter not installed", d.get_size(), d.get_mtime(), SKIP_VERBOSE_ONLY); @@ -586,7 +606,7 @@ SKIP_VERBOSE_ONLY); return; } - bool use_shell = cmd_it->second.use_shell(); + bool use_shell = filter.use_shell(); bool substituted = false; string tmpout; size_t pcent = 0; @@ -616,9 +636,9 @@ // Use a temporary file with a suitable extension // in case the command cares, and for more helpful // error messages from the command. - if (cmd_it->second.output_type == "text/html") { + if (filter.output_type == "text/html") { tmpout = get_tmpfile("tmp.html"); - } else if (cmd_it->second.output_type == "image/svg+xml") { + } else if (filter.output_type == "image/svg+xml") { tmpout = get_tmpfile("tmp.svg"); } else { tmpout = get_tmpfile("tmp.txt"); @@ -649,7 +669,7 @@ try { if (!tmpout.empty()) { // Output in temporary file. - (void)stdout_to_string(cmd, use_shell); + run_filter(cmd, use_shell); if (!load_file(tmpout, dump, NOCACHE)) { throw ReadError("Couldn't read output file"); } @@ -659,10 +679,10 @@ // filing system. } else { // Output on stdout. - dump = stdout_to_string(cmd, use_shell); + run_filter(cmd, use_shell, &dump); } - const string & charset = cmd_it->second.output_charset; - if (cmd_it->second.output_type == "text/html") { + const string & charset = filter.output_charset; + if (filter.output_type == "text/html") { MyHtmlParser p; p.ignore_metarobots(); p.description_as_sample = description_as_sample; @@ -685,7 +705,7 @@ sample = p.sample; author = p.author; created = p.created; - } else if (cmd_it->second.output_type == "image/svg+xml") { + } else if (filter.output_type == "image/svg+xml") { SvgParser svgparser; svgparser.parse(dump); dump = svgparser.dump; @@ -749,17 +769,15 @@ // FIXME: What charset is the file? Look at contents? } } else if (mimetype == "application/pdf") { - string cmd = "pdftotext -enc UTF-8"; - append_filename_argument(cmd, file); - cmd += " -"; + const char* cmd = "pdftotext -enc UTF-8 - -"; try { - dump = stdout_to_string(cmd, false); + run_filter(d.get_fd(), cmd, false, &dump); } catch (ReadError) { skip_cmd_failed(urlterm, context, cmd, d.get_size(), d.get_mtime()); return; } - get_pdf_metainfo(file, author, title, keywords, topic, pages); + get_pdf_metainfo(d.get_fd(), author, title, keywords, topic, pages); } else if (mimetype == "application/postscript") { // There simply doesn't seem to be a Unicode capable PostScript to // text converter (e.g. pstotext always outputs ISO-8859-1). The @@ -782,11 +800,11 @@ append_filename_argument(cmd, file); append_filename_argument(cmd, tmpfile); try { - (void)stdout_to_string(cmd, false); + run_filter(cmd, false); cmd = "pdftotext -enc UTF-8"; append_filename_argument(cmd, tmpfile); cmd += " -"; - dump = stdout_to_string(cmd, false); + run_filter(cmd, false, &dump); } catch (ReadError) { skip_cmd_failed(urlterm, context, cmd, d.get_size(), d.get_mtime()); @@ -797,7 +815,8 @@ throw; } try { - get_pdf_metainfo(tmpfile, author, title, keywords, topic, pages); + get_pdf_metainfo(tmpfile, author, title, keywords, topic, + pages); } catch (...) { unlink(tmpfile.c_str()); throw; @@ -924,7 +943,7 @@ cmd += " 'Documents/1/Pages/*.fpage'"; try { XpsXmlParser xpsparser; - dump = stdout_to_string(cmd, false); + run_filter(cmd, false, &dump); // Look for Byte-Order Mark (BOM). if (startswith(dump, "\xfe\xff") || startswith(dump, "\xff\xfe")) { // UTF-16 in big-endian/little-endian order - we just @@ -973,10 +992,9 @@ author = svgparser.author; } else if (mimetype == "application/vnd.debian.binary-package" || mimetype == "application/x-debian-package") { - string cmd("dpkg-deb -f"); - append_filename_argument(cmd, file); - cmd += " Description"; - const string & desc = stdout_to_string(cmd, false); + const char* cmd = "dpkg-deb -f - Description"; + string desc; + run_filter(d.get_fd(), cmd, false, &desc); // First line is short description, which we use as the title. string::size_type idx = desc.find('\n'); title.assign(desc, 0, idx); @@ -987,7 +1005,8 @@ mimetype == "application/x-rpm") { string cmd("rpm -q --qf '%{SUMMARY}\\n%{DESCRIPTION}' -p"); append_filename_argument(cmd, file); - const string & desc = stdout_to_string(cmd, false); + string desc; + run_filter(cmd, false, &desc); // First line is summary, which we use as the title. string::size_type idx = desc.find('\n'); title.assign(desc, 0, idx); diff -Nru xapian-omega-1.4.9/INSTALL xapian-omega-1.4.10/INSTALL --- xapian-omega-1.4.9/INSTALL 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/INSTALL 2019-02-11 21:27:21.000000000 +0000 @@ -18,10 +18,10 @@ install these from packages, make sure you install any corresponding -dev or -devel packages as well: - * zlib - * PCRE + * zlib + * PCRE * libmagic (which comes with the file program - ) - on RPM-based package systems, the + ) - on RPM-based package systems, the package with the header in is often named file-devel Quick Installation Guide diff -Nru xapian-omega-1.4.9/m4/iconv.m4 xapian-omega-1.4.10/m4/iconv.m4 --- xapian-omega-1.4.9/m4/iconv.m4 1970-01-01 00:00:00.000000000 +0000 +++ xapian-omega-1.4.10/m4/iconv.m4 2019-02-11 21:27:21.000000000 +0000 @@ -0,0 +1,271 @@ +# iconv.m4 serial 19 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + result |= 16; + return result; +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) +gl_iconv_AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + ]], + [[]])], + [am_cv_proto_iconv_arg1=""], + [am_cv_proto_iconv_arg1="const"]) + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) + fi +]) diff -Nru xapian-omega-1.4.9/m4/lib-link.m4 xapian-omega-1.4.10/m4/lib-link.m4 --- xapian-omega-1.4.9/m4/lib-link.m4 1970-01-01 00:00:00.000000000 +0000 +++ xapian-omega-1.4.10/m4/lib-link.m4 2019-02-11 21:27:21.000000000 +0000 @@ -0,0 +1,777 @@ +# lib-link.m4 serial 26 (gettext-0.18.2) +dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.54]) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[m4_translit([$1],[./+-], [____])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + popdef([NAME]) + popdef([Name]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. The missing-message +dnl defaults to 'no' and may contain additional hints for the user. +dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} +dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[m4_translit([$1],[./+-], [____])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, + dnl because these -l options might require -L options that are present in + dnl LIBS. -l options benefit only from the -L options listed before it. + dnl Otherwise, add it to the front of LIBS, because it may be a static + dnl library that depends on another static library that is present in LIBS. + dnl Static libraries benefit only from the static libraries listed after + dnl it. + case " $LIB[]NAME" in + *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; + *) LIBS="$LIB[]NAME $LIBS" ;; + esac + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[$3]], [[$4]])], + [ac_cv_lib[]Name=yes], + [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + popdef([NAME]) + popdef([Name]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_libname_spec, +dnl acl_library_names_spec, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl Autoconf >= 2.61 supports dots in --with options. + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([P_A_C_K]) + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff -Nru xapian-omega-1.4.9/m4/lib-prefix.m4 xapian-omega-1.4.10/m4/lib-prefix.m4 --- xapian-omega-1.4.9/m4/lib-prefix.m4 1970-01-01 00:00:00.000000000 +0000 +++ xapian-omega-1.4.10/m4/lib-prefix.m4 2019-02-11 21:27:21.000000000 +0000 @@ -0,0 +1,224 @@ +# lib-prefix.m4 serial 7 (gettext-0.18) +dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ +#ifdef _LP64 +sixtyfour bits +#endif + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +]) diff -Nru xapian-omega-1.4.9/Makefile.am xapian-omega-1.4.10/Makefile.am --- xapian-omega-1.4.9/Makefile.am 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/Makefile.am 2019-02-11 21:27:21.000000000 +0000 @@ -50,6 +50,7 @@ common/Tokeniseise.pm \ extra/omegascript.vim \ extra/omegascript.vim.in \ + config.rpath \ gen-mimemap \ gen-myhtmltags \ gen-namedents \ @@ -143,7 +144,7 @@ utf8truncate.h diritor.h runfilter.h freemem.h xpsxmlparse.h transform.h\ weight.h expand.h svgparse.h tmpdir.h urldecode.h urlencode.h unixperm.h atomparse.h\ xlsxparse.h opendocparse.h msxmlparse.h sort.h timegm.h csvescape.h\ - portability/mkdtemp.h + portability/mkdtemp.h portability/strptime.h # headers maintained in xapian-core noinst_HEADERS +=\ @@ -165,18 +166,23 @@ common/str.h\ common/stringutils.h -AM_LDFLAGS = $(NO_UNDEFINED) $(ICONV_LDFLAGS) $(MAGIC_LDFLAGS) +AM_LDFLAGS = $(NO_UNDEFINED) $(MAGIC_LDFLAGS) # We want to compile transform.cc with PCRE_CFLAGS, but if this adds a -I for # a directory with a different version of iconv, then we get problems (this -# has been reported on Mac OS X). So we only add PCRE_CFLAGS when compiling -# transform.cc, using the convenience library technique suggested by the -# automake manual. -noinst_LTLIBRARIES = libtransform.la +# has been reported on macOS). We solve this using a technique suggested by +# the automake manual: compile each of transform.cc and utf8convert.cc into +# its own convenience library so each only gets its own CPPFLAGS. +noinst_LTLIBRARIES = libtransform.la libutf8convert.la + libtransform_la_SOURCES = transform.cc libtransform_la_CPPFLAGS = $(PCRE_CFLAGS) libtransform_la_LIBADD = $(PCRE_LIBS) +libutf8convert_la_SOURCES = utf8convert.cc +libutf8convert_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCICONV) +libutf8convert_la_LIBADD = $(XAPIAN_LIBS) $(LTLIBICONV) + omega_SOURCES = omega.cc query.cc cgiparam.cc utils.cc configfile.cc date.cc\ cdb_init.cc cdb_find.cc cdb_hash.cc cdb_unpack.cc jsonescape.cc loadfile.cc\ datevalue.cc common/str.cc sample.cc sort.cc urlencode.cc weight.cc expand.cc\ @@ -186,7 +192,7 @@ omindex_SOURCES = omindex.cc myhtmlparse.cc htmlparse.cc index_file.cc mime.cc\ common/getopt.cc commonhelp.cc utils.cc hashterm.cc loadfile.cc md5.cc\ - md5wrap.cc xmlparse.cc metaxmlparse.cc utf8convert.cc sample.cc diritor.cc\ + md5wrap.cc xmlparse.cc metaxmlparse.cc sample.cc diritor.cc\ runfilter.cc freemem.cc common/msvc_dirent.cc xpsxmlparse.cc common/str.cc\ pkglibbindir.cc svgparse.cc tmpdir.cc urlencode.cc atomparse.cc xlsxparse.cc\ opendocparse.cc common/keyword.cc msxmlparse.cc common/safe.cc timegm.cc\ @@ -194,30 +200,33 @@ if NEED_MKDTEMP omindex_SOURCES += portability/mkdtemp.cc endif -omindex_LDADD = $(MAGIC_LIBS) $(XAPIAN_LIBS) $(ZLIB_LIBS) +if NEED_STRPTIME +omindex_SOURCES += portability/strptime.cc +endif +omindex_LDADD = $(MAGIC_LIBS) $(XAPIAN_LIBS) $(ZLIB_LIBS) libutf8convert.la scriptindex_SOURCES = scriptindex.cc myhtmlparse.cc htmlparse.cc\ common/getopt.cc common/str.cc commonhelp.cc utils.cc hashterm.cc loadfile.cc\ - utf8convert.cc utf8truncate.cc\ + utf8truncate.cc\ common/keyword.cc timegm.cc datetime.cc -scriptindex_LDADD = $(XAPIAN_LIBS) +scriptindex_LDADD = $(XAPIAN_LIBS) libutf8convert.la omindex_list_SOURCES = common/getopt.cc omindex-list.cc omindex_list_LDADD = $(XAPIAN_LIBS) atomparsetest_SOURCES = atomparsetest.cc atomparse.cc htmlparse.cc\ - myhtmlparse.cc utf8convert.cc common/keyword.cc datetime.cc timegm.cc -atomparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) + myhtmlparse.cc common/keyword.cc datetime.cc timegm.cc +atomparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la htmlparsetest_SOURCES = htmlparsetest.cc myhtmlparse.cc htmlparse.cc\ - utf8convert.cc common/keyword.cc datetime.cc timegm.cc -htmlparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) + common/keyword.cc datetime.cc timegm.cc +htmlparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la md5test_SOURCES = md5test.cc md5wrap.cc md5.cc md5test_LDADD = $(NO_INSTALL) -utf8converttest_SOURCES = utf8converttest.cc utf8convert.cc -utf8converttest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) +utf8converttest_SOURCES = utf8converttest.cc +utf8converttest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la urlenctest_SOURCES = urlenctest.cc urlencode.cc urlenctest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) diff -Nru xapian-omega-1.4.9/Makefile.in xapian-omega-1.4.10/Makefile.in --- xapian-omega-1.4.9/Makefile.in 2018-11-02 22:07:09.000000000 +0000 +++ xapian-omega-1.4.10/Makefile.in 2019-02-11 21:28:17.000000000 +0000 @@ -99,13 +99,16 @@ htmlparsetest$(EXEEXT) jsonesctest$(EXEEXT) md5test$(EXEEXT) \ urlenctest$(EXEEXT) utf8converttest$(EXEEXT) @NEED_MKDTEMP_TRUE@am__append_1 = portability/mkdtemp.cc -@MAINTAINER_NO_DOCS_FALSE@am__append_2 = $(dist_man_MANS) +@NEED_STRPTIME_TRUE@am__append_2 = portability/strptime.cc +@MAINTAINER_NO_DOCS_FALSE@am__append_3 = $(dist_man_MANS) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -129,6 +132,10 @@ am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +libutf8convert_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libutf8convert_la_OBJECTS = libutf8convert_la-utf8convert.lo +libutf8convert_la_OBJECTS = $(am_libutf8convert_la_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibbindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibbindir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(omegadatadir)" \ @@ -137,21 +144,19 @@ am__dirstamp = $(am__leading_dot)dirstamp am_atomparsetest_OBJECTS = atomparsetest.$(OBJEXT) atomparse.$(OBJEXT) \ htmlparse.$(OBJEXT) myhtmlparse.$(OBJEXT) \ - utf8convert.$(OBJEXT) common/keyword.$(OBJEXT) \ - datetime.$(OBJEXT) timegm.$(OBJEXT) + common/keyword.$(OBJEXT) datetime.$(OBJEXT) timegm.$(OBJEXT) atomparsetest_OBJECTS = $(am_atomparsetest_OBJECTS) atomparsetest_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) libutf8convert.la am_csvesctest_OBJECTS = csvesctest.$(OBJEXT) csvescape.$(OBJEXT) csvesctest_OBJECTS = $(am_csvesctest_OBJECTS) csvesctest_DEPENDENCIES = $(am__DEPENDENCIES_1) am_htmlparsetest_OBJECTS = htmlparsetest.$(OBJEXT) \ myhtmlparse.$(OBJEXT) htmlparse.$(OBJEXT) \ - utf8convert.$(OBJEXT) common/keyword.$(OBJEXT) \ - datetime.$(OBJEXT) timegm.$(OBJEXT) + common/keyword.$(OBJEXT) datetime.$(OBJEXT) timegm.$(OBJEXT) htmlparsetest_OBJECTS = $(am_htmlparsetest_OBJECTS) htmlparsetest_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) libutf8convert.la am_jsonesctest_OBJECTS = jsonesctest.$(OBJEXT) jsonescape.$(OBJEXT) jsonesctest_OBJECTS = $(am_jsonesctest_OBJECTS) jsonesctest_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) @@ -170,30 +175,30 @@ am__omindex_SOURCES_DIST = omindex.cc myhtmlparse.cc htmlparse.cc \ index_file.cc mime.cc common/getopt.cc commonhelp.cc utils.cc \ hashterm.cc loadfile.cc md5.cc md5wrap.cc xmlparse.cc \ - metaxmlparse.cc utf8convert.cc sample.cc diritor.cc \ - runfilter.cc freemem.cc common/msvc_dirent.cc xpsxmlparse.cc \ - common/str.cc pkglibbindir.cc svgparse.cc tmpdir.cc \ - urlencode.cc atomparse.cc xlsxparse.cc opendocparse.cc \ - common/keyword.cc msxmlparse.cc common/safe.cc timegm.cc \ - datetime.cc portability/mkdtemp.cc + metaxmlparse.cc sample.cc diritor.cc runfilter.cc freemem.cc \ + common/msvc_dirent.cc xpsxmlparse.cc common/str.cc \ + pkglibbindir.cc svgparse.cc tmpdir.cc urlencode.cc \ + atomparse.cc xlsxparse.cc opendocparse.cc common/keyword.cc \ + msxmlparse.cc common/safe.cc timegm.cc datetime.cc \ + portability/mkdtemp.cc portability/strptime.cc @NEED_MKDTEMP_TRUE@am__objects_1 = portability/mkdtemp.$(OBJEXT) +@NEED_STRPTIME_TRUE@am__objects_2 = portability/strptime.$(OBJEXT) am_omindex_OBJECTS = omindex.$(OBJEXT) myhtmlparse.$(OBJEXT) \ htmlparse.$(OBJEXT) index_file.$(OBJEXT) mime.$(OBJEXT) \ common/getopt.$(OBJEXT) commonhelp.$(OBJEXT) utils.$(OBJEXT) \ hashterm.$(OBJEXT) loadfile.$(OBJEXT) md5.$(OBJEXT) \ md5wrap.$(OBJEXT) xmlparse.$(OBJEXT) metaxmlparse.$(OBJEXT) \ - utf8convert.$(OBJEXT) sample.$(OBJEXT) diritor.$(OBJEXT) \ - runfilter.$(OBJEXT) freemem.$(OBJEXT) \ - common/msvc_dirent.$(OBJEXT) xpsxmlparse.$(OBJEXT) \ - common/str.$(OBJEXT) pkglibbindir.$(OBJEXT) svgparse.$(OBJEXT) \ - tmpdir.$(OBJEXT) urlencode.$(OBJEXT) atomparse.$(OBJEXT) \ - xlsxparse.$(OBJEXT) opendocparse.$(OBJEXT) \ - common/keyword.$(OBJEXT) msxmlparse.$(OBJEXT) \ - common/safe.$(OBJEXT) timegm.$(OBJEXT) datetime.$(OBJEXT) \ - $(am__objects_1) + sample.$(OBJEXT) diritor.$(OBJEXT) runfilter.$(OBJEXT) \ + freemem.$(OBJEXT) common/msvc_dirent.$(OBJEXT) \ + xpsxmlparse.$(OBJEXT) common/str.$(OBJEXT) \ + pkglibbindir.$(OBJEXT) svgparse.$(OBJEXT) tmpdir.$(OBJEXT) \ + urlencode.$(OBJEXT) atomparse.$(OBJEXT) xlsxparse.$(OBJEXT) \ + opendocparse.$(OBJEXT) common/keyword.$(OBJEXT) \ + msxmlparse.$(OBJEXT) common/safe.$(OBJEXT) timegm.$(OBJEXT) \ + datetime.$(OBJEXT) $(am__objects_1) $(am__objects_2) omindex_OBJECTS = $(am_omindex_OBJECTS) omindex_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) libutf8convert.la am_omindex_list_OBJECTS = common/getopt.$(OBJEXT) \ omindex-list.$(OBJEXT) omindex_list_OBJECTS = $(am_omindex_list_OBJECTS) @@ -201,19 +206,17 @@ am_scriptindex_OBJECTS = scriptindex.$(OBJEXT) myhtmlparse.$(OBJEXT) \ htmlparse.$(OBJEXT) common/getopt.$(OBJEXT) \ common/str.$(OBJEXT) commonhelp.$(OBJEXT) utils.$(OBJEXT) \ - hashterm.$(OBJEXT) loadfile.$(OBJEXT) utf8convert.$(OBJEXT) \ - utf8truncate.$(OBJEXT) common/keyword.$(OBJEXT) \ - timegm.$(OBJEXT) datetime.$(OBJEXT) + hashterm.$(OBJEXT) loadfile.$(OBJEXT) utf8truncate.$(OBJEXT) \ + common/keyword.$(OBJEXT) timegm.$(OBJEXT) datetime.$(OBJEXT) scriptindex_OBJECTS = $(am_scriptindex_OBJECTS) -scriptindex_DEPENDENCIES = $(am__DEPENDENCIES_1) +scriptindex_DEPENDENCIES = $(am__DEPENDENCIES_1) libutf8convert.la am_urlenctest_OBJECTS = urlenctest.$(OBJEXT) urlencode.$(OBJEXT) urlenctest_OBJECTS = $(am_urlenctest_OBJECTS) urlenctest_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_utf8converttest_OBJECTS = utf8converttest.$(OBJEXT) \ - utf8convert.$(OBJEXT) +am_utf8converttest_OBJECTS = utf8converttest.$(OBJEXT) utf8converttest_OBJECTS = $(am_utf8converttest_OBJECTS) utf8converttest_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) libutf8convert.la am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -276,15 +279,16 @@ am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -SOURCES = $(libtransform_la_SOURCES) $(atomparsetest_SOURCES) \ - $(csvesctest_SOURCES) $(htmlparsetest_SOURCES) \ - $(jsonesctest_SOURCES) $(md5test_SOURCES) $(omega_SOURCES) \ - $(omindex_SOURCES) $(omindex_list_SOURCES) \ - $(scriptindex_SOURCES) $(urlenctest_SOURCES) \ - $(utf8converttest_SOURCES) -DIST_SOURCES = $(libtransform_la_SOURCES) $(atomparsetest_SOURCES) \ - $(csvesctest_SOURCES) $(htmlparsetest_SOURCES) \ - $(jsonesctest_SOURCES) $(md5test_SOURCES) $(omega_SOURCES) \ +SOURCES = $(libtransform_la_SOURCES) $(libutf8convert_la_SOURCES) \ + $(atomparsetest_SOURCES) $(csvesctest_SOURCES) \ + $(htmlparsetest_SOURCES) $(jsonesctest_SOURCES) \ + $(md5test_SOURCES) $(omega_SOURCES) $(omindex_SOURCES) \ + $(omindex_list_SOURCES) $(scriptindex_SOURCES) \ + $(urlenctest_SOURCES) $(utf8converttest_SOURCES) +DIST_SOURCES = $(libtransform_la_SOURCES) $(libutf8convert_la_SOURCES) \ + $(atomparsetest_SOURCES) $(csvesctest_SOURCES) \ + $(htmlparsetest_SOURCES) $(jsonesctest_SOURCES) \ + $(md5test_SOURCES) $(omega_SOURCES) \ $(am__omindex_SOURCES_DIST) $(omindex_list_SOURCES) \ $(scriptindex_SOURCES) $(urlenctest_SOURCES) \ $(utf8converttest_SOURCES) @@ -517,8 +521,8 @@ $(srcdir)/mhtml2html.in $(srcdir)/outlookmsg2html.in \ $(srcdir)/rfc822tohtml.in $(srcdir)/vcard2text.in \ $(srcdir)/xapian-omega.spec.in AUTHORS COPYING ChangeLog \ - INSTALL NEWS README TODO compile config.guess config.sub \ - depcomp install-sh ltmain.sh missing test-driver + INSTALL NEWS README TODO compile config.guess config.rpath \ + config.sub depcomp install-sh ltmain.sh missing test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -595,7 +599,7 @@ GREP = @GREP@ HAVE_CXX11 = @HAVE_CXX11@ HELP2MAN = @HELP2MAN@ -ICONV_LDFLAGS = @ICONV_LDFLAGS@ +INCICONV = @INCICONV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -603,11 +607,13 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAGIC_LIBS = @MAGIC_LIBS@ @@ -724,11 +730,12 @@ stamp = mimemap.stamp BUILT_SOURCES = extra/omegascript.vim my-html-tok.h mimemap.h namedents.h MAINTAINERCLEANFILES = my-html-tok.h mimemap.h mimemap.stamp \ - namedents.h $(am__append_2) + namedents.h $(am__append_3) EXTRA_DIST = \ common/Tokeniseise.pm \ extra/omegascript.vim \ extra/omegascript.vim.in \ + config.rpath \ gen-mimemap \ gen-myhtmltags \ gen-namedents \ @@ -819,23 +826,27 @@ transform.h weight.h expand.h svgparse.h tmpdir.h urldecode.h \ urlencode.h unixperm.h atomparse.h xlsxparse.h opendocparse.h \ msxmlparse.h sort.h timegm.h csvescape.h portability/mkdtemp.h \ - common/append_filename_arg.h common/gnu_getopt.h \ - common/keyword.h common/msvc_dirent.h common/noreturn.h \ - common/omassert.h common/realtime.h common/safedirent.h \ - common/safefcntl.h common/safesysselect.h common/safesysstat.h \ - common/safesyswait.h common/safeunistd.h common/safewindows.h \ - common/safewinsock2.h common/str.h common/stringutils.h -AM_LDFLAGS = $(NO_UNDEFINED) $(ICONV_LDFLAGS) $(MAGIC_LDFLAGS) + portability/strptime.h common/append_filename_arg.h \ + common/gnu_getopt.h common/keyword.h common/msvc_dirent.h \ + common/noreturn.h common/omassert.h common/realtime.h \ + common/safedirent.h common/safefcntl.h common/safesysselect.h \ + common/safesysstat.h common/safesyswait.h common/safeunistd.h \ + common/safewindows.h common/safewinsock2.h common/str.h \ + common/stringutils.h +AM_LDFLAGS = $(NO_UNDEFINED) $(MAGIC_LDFLAGS) # We want to compile transform.cc with PCRE_CFLAGS, but if this adds a -I for # a directory with a different version of iconv, then we get problems (this -# has been reported on Mac OS X). So we only add PCRE_CFLAGS when compiling -# transform.cc, using the convenience library technique suggested by the -# automake manual. -noinst_LTLIBRARIES = libtransform.la +# has been reported on macOS). We solve this using a technique suggested by +# the automake manual: compile each of transform.cc and utf8convert.cc into +# its own convenience library so each only gets its own CPPFLAGS. +noinst_LTLIBRARIES = libtransform.la libutf8convert.la libtransform_la_SOURCES = transform.cc libtransform_la_CPPFLAGS = $(PCRE_CFLAGS) libtransform_la_LIBADD = $(PCRE_LIBS) +libutf8convert_la_SOURCES = utf8convert.cc +libutf8convert_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCICONV) +libutf8convert_la_LIBADD = $(XAPIAN_LIBS) $(LTLIBICONV) omega_SOURCES = omega.cc query.cc cgiparam.cc utils.cc configfile.cc date.cc\ cdb_init.cc cdb_find.cc cdb_hash.cc cdb_unpack.cc jsonescape.cc loadfile.cc\ datevalue.cc common/str.cc sample.cc sort.cc urlencode.cc weight.cc expand.cc\ @@ -846,33 +857,33 @@ omindex_SOURCES = omindex.cc myhtmlparse.cc htmlparse.cc index_file.cc \ mime.cc common/getopt.cc commonhelp.cc utils.cc hashterm.cc \ loadfile.cc md5.cc md5wrap.cc xmlparse.cc metaxmlparse.cc \ - utf8convert.cc sample.cc diritor.cc runfilter.cc freemem.cc \ + sample.cc diritor.cc runfilter.cc freemem.cc \ common/msvc_dirent.cc xpsxmlparse.cc common/str.cc \ pkglibbindir.cc svgparse.cc tmpdir.cc urlencode.cc \ atomparse.cc xlsxparse.cc opendocparse.cc common/keyword.cc \ msxmlparse.cc common/safe.cc timegm.cc datetime.cc \ - $(am__append_1) -omindex_LDADD = $(MAGIC_LIBS) $(XAPIAN_LIBS) $(ZLIB_LIBS) + $(am__append_1) $(am__append_2) +omindex_LDADD = $(MAGIC_LIBS) $(XAPIAN_LIBS) $(ZLIB_LIBS) libutf8convert.la scriptindex_SOURCES = scriptindex.cc myhtmlparse.cc htmlparse.cc\ common/getopt.cc common/str.cc commonhelp.cc utils.cc hashterm.cc loadfile.cc\ - utf8convert.cc utf8truncate.cc\ + utf8truncate.cc\ common/keyword.cc timegm.cc datetime.cc -scriptindex_LDADD = $(XAPIAN_LIBS) +scriptindex_LDADD = $(XAPIAN_LIBS) libutf8convert.la omindex_list_SOURCES = common/getopt.cc omindex-list.cc omindex_list_LDADD = $(XAPIAN_LIBS) atomparsetest_SOURCES = atomparsetest.cc atomparse.cc htmlparse.cc\ - myhtmlparse.cc utf8convert.cc common/keyword.cc datetime.cc timegm.cc + myhtmlparse.cc common/keyword.cc datetime.cc timegm.cc -atomparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) +atomparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la htmlparsetest_SOURCES = htmlparsetest.cc myhtmlparse.cc htmlparse.cc\ - utf8convert.cc common/keyword.cc datetime.cc timegm.cc + common/keyword.cc datetime.cc timegm.cc -htmlparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) +htmlparsetest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la md5test_SOURCES = md5test.cc md5wrap.cc md5.cc md5test_LDADD = $(NO_INSTALL) -utf8converttest_SOURCES = utf8converttest.cc utf8convert.cc -utf8converttest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) +utf8converttest_SOURCES = utf8converttest.cc +utf8converttest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la urlenctest_SOURCES = urlenctest.cc urlencode.cc urlenctest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) csvesctest_SOURCES = csvesctest.cc csvescape.cc @@ -960,6 +971,9 @@ libtransform.la: $(libtransform_la_OBJECTS) $(libtransform_la_DEPENDENCIES) $(EXTRA_libtransform_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libtransform_la_OBJECTS) $(libtransform_la_LIBADD) $(LIBS) + +libutf8convert.la: $(libutf8convert_la_OBJECTS) $(libutf8convert_la_DEPENDENCIES) $(EXTRA_libutf8convert_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(libutf8convert_la_OBJECTS) $(libutf8convert_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -1115,6 +1129,8 @@ @: > portability/$(DEPDIR)/$(am__dirstamp) portability/mkdtemp.$(OBJEXT): portability/$(am__dirstamp) \ portability/$(DEPDIR)/$(am__dirstamp) +portability/strptime.$(OBJEXT): portability/$(am__dirstamp) \ + portability/$(DEPDIR)/$(am__dirstamp) omindex$(EXEEXT): $(omindex_OBJECTS) $(omindex_DEPENDENCIES) $(EXTRA_omindex_DEPENDENCIES) @rm -f omindex$(EXEEXT) @@ -1238,6 +1254,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jsonescape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jsonesctest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtransform_la-transform.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutf8convert_la-utf8convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5test.Po@am__quote@ @@ -1261,7 +1278,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmpdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urlencode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urlenctest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8convert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8converttest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8truncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ @@ -1275,6 +1291,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/safe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/str.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@portability/$(DEPDIR)/mkdtemp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@portability/$(DEPDIR)/strptime.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -1307,6 +1324,13 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtransform_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtransform_la-transform.lo `test -f 'transform.cc' || echo '$(srcdir)/'`transform.cc +libutf8convert_la-utf8convert.lo: utf8convert.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutf8convert_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libutf8convert_la-utf8convert.lo -MD -MP -MF $(DEPDIR)/libutf8convert_la-utf8convert.Tpo -c -o libutf8convert_la-utf8convert.lo `test -f 'utf8convert.cc' || echo '$(srcdir)/'`utf8convert.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libutf8convert_la-utf8convert.Tpo $(DEPDIR)/libutf8convert_la-utf8convert.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utf8convert.cc' object='libutf8convert_la-utf8convert.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutf8convert_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libutf8convert_la-utf8convert.lo `test -f 'utf8convert.cc' || echo '$(srcdir)/'`utf8convert.cc + mostlyclean-libtool: -rm -f *.lo diff -Nru xapian-omega-1.4.9/mimemap.h xapian-omega-1.4.10/mimemap.h --- xapian-omega-1.4.9/mimemap.h 2018-11-02 22:09:01.000000000 +0000 +++ xapian-omega-1.4.10/mimemap.h 2019-02-11 21:29:59.000000000 +0000 @@ -104,7 +104,7 @@ static const unsigned char tab[] = { 14, - (0&255),(0>>8), (56&255),(56>>8), (269&255),(269>>8), (118&255),(118>>8), (81&255),(81>>8), (5&255),(5>>8), (39&255),(39>>8), (13&255),(13>>8), + (0&255),(0>>8), (56&255),(56>>8), (274&255),(274>>8), (118&255),(118>>8), (81&255),(81>>8), (5&255),(5>>8), (39&255),(39>>8), (13&255),(13>>8), 1,0, 1,0, 1,0, 1,0, 1,0, (23&255),(23>>8), (2 - 1), @@ -142,7 +142,8 @@ TEXT_VCARD, 'v','c','a','r','d', TEXT_HTML, 'x','h','t','m','l', - (30 - 1), + (31 - 1), + APPLICATION_VND_APPLE_KEYNOTE, 'a','p','x','l', APPLICATION_ATOM_XML, 'a','t','o','m', IMAGE_VND_DJVU, 'd','j','v','u', APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT, 'd','o','c','m', @@ -174,7 +175,7 @@ APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TEMPLATE, 'x','l','t','x', APPLICATION_X_ABIWORD_COMPRESSED, 'z','a','b','w', - (86 - 1), + (87 - 1), APPLICATION_X_ABIWORD, 'a','b','w', IGNORE, 'a','d','m', IGNORE, 'b','i','n', @@ -196,6 +197,7 @@ IGNORE, 'i','c','o', IGNORE, 'j','a','r', APPLICATION_VND_APPLE_KEYNOTE, 'k','e','y', + APPLICATION_VND_APPLE_KEYNOTE, 'k','t','h', IGNORE, 'l','i','b', IGNORE, 'l','n','k', APPLICATION_X_MIMEARCHIVE, 'm','h','t', diff -Nru xapian-omega-1.4.9/mimemap.tokens xapian-omega-1.4.10/mimemap.tokens --- xapian-omega-1.4.9/mimemap.tokens 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/mimemap.tokens 2019-02-11 21:27:21.000000000 +0000 @@ -128,6 +128,8 @@ # Apple iWork: key application/vnd.apple.keynote +kth application/vnd.apple.keynote +apxl application/vnd.apple.keynote pages application/vnd.apple.pages numbers application/vnd.apple.numbers diff -Nru xapian-omega-1.4.9/NEWS xapian-omega-1.4.10/NEWS --- xapian-omega-1.4.9/NEWS 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/NEWS 2019-02-11 21:27:21.000000000 +0000 @@ -1,3 +1,70 @@ +Omega 1.4.10 (2019-02-12): + +documentation: + +* Use https for URLs where supported. + +indexers: + +* omindex: + + + Index .apxl and .kth files as Apple Keynote. The .apxl extension is used + for the XML files inside .key bundles/directories which hold the text + content of the presentation, and by handling them we can index .key + directories more usefully. It seems they are also sometimes found by + themselves. Keynote themes have a .kth extension, and key2text can also + handle these. + + + Pipe input to pdftotext, pdfinto and dpkg. These tools all support piping + an input file on stdin, which can be a little more efficient when we + already have the file open (e.g. to determine its type using libmagic, or + to calculate its checksum). + + + An empty string for the start directory is now flagged as an error. + Previously `/` was used instead, which is unlikely to be what is wanted + (and `/` can be explicitly specified if that really is what is wanted). + + + Fix emulation of stderr redirection when the indexer's stderr has been + closed. We try to avoid using the shell when running external filters, and + emulate 2>/dev/null in commands, but if the indexer's stderr was closed + this emulation was buggy and would make give the filter a closed stderr + instead of one redirected to /dev/null. + + + When emulating redirection to /dev/null, we now open /dev/null once and + dup that fd each time which is a little more efficient and simplifies the + code. + +* scriptindex: + + + date=unix is now a no-op for empty input - previously it would unhelpfully + add boolean date terms for 1970-01-01. + + + Warn for empty filename in LOAD action. Previously this gave a slightly + confusing error: "Couldn't load file '': No such file or directory" + + + Unknown command-line options now cause scriptindex to give a non-zero exit + status. + +testsuite: + +* omegatest: Add testcase for SPAN.n on different slots. + +* omegatest: Update expected QueryParser output for the xapian-core change to + produce flatter Query trees. + +build system: + +* Use AM_ICONV to detect iconv() which should handle non-system install of GNU + libiconv properly. Fixes #775, reported by Ryan Schmidt. + +portability: + +* Provide fall-back strptime() implementation for platforms which don't provide + it, using the C++11 std::get_time() function. We use strptime() directly + where it's available as some older C++11 compilers seem to lack + std::get_time() (GCC 4.8 for example). This is used by the parsedate action, + which was added in 1.4.6. + Omega 1.4.9 (2018-11-02): indexers: diff -Nru xapian-omega-1.4.9/omegatest xapian-omega-1.4.10/omegatest --- xapian-omega-1.4.9/omegatest 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/omegatest 2019-02-11 21:27:21.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # omegatest: Test omega CGI # -# Copyright (C) 2015,2016,2017,2018 Olly Betts +# Copyright (C) 2015,2016,2017,2018,2019 Olly Betts # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -248,6 +248,7 @@ # Check multiple .SLOT filters: qtestcase '(VALUE_RANGE 0 201512 2015~ AND VALUE_LE 5 1974~)' START.0=20151201 END.0=20151231 END.5=1974 +qtestcase '(VALUE_RANGE 0 201512 20151207~ AND VALUE_RANGE 5 19740102 1974~)' START.0=20151201 SPAN.0=7 END.5=1974 SPAN.5=364 # Check .SLOT and old-style value date range filter: qtestcase '(VALUE_RANGE 0 201512 2015~ AND VALUE_LE 5 1974~)' START.0=20151201 END.0=20151231 DATEVALUE=5 END=1974 @@ -258,67 +259,67 @@ # Tests of term-based date range filtering: -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999) OR Dlatest)' END=19991231 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989) OR Dlatest)' END=19891231 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974) OR Dlatest)' END=19741231 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR M198701 OR M198702 OR M198703 OR M198704 OR M198705 OR M198706 OR M198707 OR M198708 OR M198709) OR Dlatest)' END=19870930 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR M201511) OR Dlatest)' END=20151130 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR M198401 OR M198402 OR M198403 OR D19840401) OR Dlatest)' END=19840401 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR M198801 OR M198802 OR M198803 OR M198804 OR M198805 OR M198806 OR M198807 OR M198808 OR M198809 OR M198810 OR D19881101 OR D19881102 OR D19881103 OR D19881104 OR D19881105 OR D19881106 OR D19881107 OR D19881108 OR D19881109 OR D19881110 OR D19881111 OR D19881112 OR D19881113 OR D19881114 OR D19881115 OR D19881116 OR D19881117 OR D19881118 OR D19881119 OR D19881120 OR D19881121 OR D19881122 OR D19881123 OR D19881124 OR D19881125 OR D19881126 OR D19881127 OR D19881128) OR Dlatest)' END=19881128 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Dlatest)' END=19991231 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Dlatest)' END=19891231 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Dlatest)' END=19741231 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR M198701 OR M198702 OR M198703 OR M198704 OR M198705 OR M198706 OR M198707 OR M198708 OR M198709 OR Dlatest)' END=19870930 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR M201511 OR Dlatest)' END=20151130 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR M198401 OR M198402 OR M198403 OR D19840401 OR Dlatest)' END=19840401 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR M198801 OR M198802 OR M198803 OR M198804 OR M198805 OR M198806 OR M198807 OR M198808 OR M198809 OR M198810 OR D19881101 OR D19881102 OR D19881103 OR D19881104 OR D19881105 OR D19881106 OR D19881107 OR D19881108 OR D19881109 OR D19881110 OR D19881111 OR D19881112 OR D19881113 OR D19881114 OR D19881115 OR D19881116 OR D19881117 OR D19881118 OR D19881119 OR D19881120 OR D19881121 OR D19881122 OR D19881123 OR D19881124 OR D19881125 OR D19881126 OR D19881127 OR D19881128 OR Dlatest)' END=19881128 # Leap year tests: -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502) OR Dlatest)' END=20150228 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR M198801 OR M198802) OR Dlatest)' END=19880229 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR M198801 OR D19880201 OR D19880202 OR D19880203 OR D19880204 OR D19880205 OR D19880206 OR D19880207 OR D19880208 OR D19880209 OR D19880210 OR D19880211 OR D19880212 OR D19880213 OR D19880214 OR D19880215 OR D19880216 OR D19880217 OR D19880218 OR D19880219 OR D19880220 OR D19880221 OR D19880222 OR D19880223 OR D19880224 OR D19880225 OR D19880226 OR D19880227 OR D19880228) OR Dlatest)' END=19880228 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR M200001 OR M200002) OR Dlatest)' END=20000229 -qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR M200001 OR D20000201 OR D20000202 OR D20000203 OR D20000204 OR D20000205 OR D20000206 OR D20000207 OR D20000208 OR D20000209 OR D20000210 OR D20000211 OR D20000212 OR D20000213 OR D20000214 OR D20000215 OR D20000216 OR D20000217 OR D20000218 OR D20000219 OR D20000220 OR D20000221 OR D20000222 OR D20000223 OR D20000224 OR D20000225 OR D20000226 OR D20000227 OR D20000228) OR Dlatest)' END=20000228 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR Dlatest)' END=20150228 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR M198801 OR M198802 OR Dlatest)' END=19880229 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR M198801 OR D19880201 OR D19880202 OR D19880203 OR D19880204 OR D19880205 OR D19880206 OR D19880207 OR D19880208 OR D19880209 OR D19880210 OR D19880211 OR D19880212 OR D19880213 OR D19880214 OR D19880215 OR D19880216 OR D19880217 OR D19880218 OR D19880219 OR D19880220 OR D19880221 OR D19880222 OR D19880223 OR D19880224 OR D19880225 OR D19880226 OR D19880227 OR D19880228 OR Dlatest)' END=19880228 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR M200001 OR M200002 OR Dlatest)' END=20000229 +qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR M200001 OR D20000201 OR D20000202 OR D20000203 OR D20000204 OR D20000205 OR D20000206 OR D20000207 OR D20000208 OR D20000209 OR D20000210 OR D20000211 OR D20000212 OR D20000213 OR D20000214 OR D20000215 OR D20000216 OR D20000217 OR D20000218 OR D20000219 OR D20000220 OR D20000221 OR D20000222 OR D20000223 OR D20000224 OR D20000225 OR D20000226 OR D20000227 OR D20000228 OR Dlatest)' END=20000228 # FIXME: These two currently require 64-bit time_t: #qtestcase 'Dlatest' END=19000228 # Assumed start is 19700101 -#qtestcase '((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR Y2015 OR Y2016 OR Y2017 OR Y2018 OR Y2019 OR Y2020 OR Y2021 OR Y2022 OR Y2023 OR Y2024 OR Y2025 OR Y2026 OR Y2027 OR Y2028 OR Y2029 OR Y2030 OR Y2031 OR Y2032 OR Y2033 OR Y2034 OR Y2035 OR Y2036 OR Y2037 OR Y2038 OR Y2039 OR Y2040 OR Y2041 OR Y2042 OR Y2043 OR Y2044 OR Y2045 OR Y2046 OR Y2047 OR Y2048 OR Y2049 OR Y2050 OR Y2051 OR Y2052 OR Y2053 OR Y2054 OR Y2055 OR Y2056 OR Y2057 OR Y2058 OR Y2059 OR Y2060 OR Y2061 OR Y2062 OR Y2063 OR Y2064 OR Y2065 OR Y2066 OR Y2067 OR Y2068 OR Y2069 OR Y2070 OR Y2071 OR Y2072 OR Y2073 OR Y2074 OR Y2075 OR Y2076 OR Y2077 OR Y2078 OR Y2079 OR Y2080 OR Y2081 OR Y2082 OR Y2083 OR Y2084 OR Y2085 OR Y2086 OR Y2087 OR Y2088 OR Y2089 OR Y2090 OR Y2091 OR Y2092 OR Y2093 OR Y2094 OR Y2095 OR Y2096 OR Y2097 OR Y2098 OR Y2099 OR M210001 OR M210002) OR Dlatest)' END=21000228 +#qtestcase '(Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR Y2015 OR Y2016 OR Y2017 OR Y2018 OR Y2019 OR Y2020 OR Y2021 OR Y2022 OR Y2023 OR Y2024 OR Y2025 OR Y2026 OR Y2027 OR Y2028 OR Y2029 OR Y2030 OR Y2031 OR Y2032 OR Y2033 OR Y2034 OR Y2035 OR Y2036 OR Y2037 OR Y2038 OR Y2039 OR Y2040 OR Y2041 OR Y2042 OR Y2043 OR Y2044 OR Y2045 OR Y2046 OR Y2047 OR Y2048 OR Y2049 OR Y2050 OR Y2051 OR Y2052 OR Y2053 OR Y2054 OR Y2055 OR Y2056 OR Y2057 OR Y2058 OR Y2059 OR Y2060 OR Y2061 OR Y2062 OR Y2063 OR Y2064 OR Y2065 OR Y2066 OR Y2067 OR Y2068 OR Y2069 OR Y2070 OR Y2071 OR Y2072 OR Y2073 OR Y2074 OR Y2075 OR Y2076 OR Y2077 OR Y2078 OR Y2079 OR Y2080 OR Y2081 OR Y2082 OR Y2083 OR Y2084 OR Y2085 OR Y2086 OR Y2087 OR Y2088 OR Y2089 OR Y2090 OR Y2091 OR Y2092 OR Y2093 OR Y2094 OR Y2095 OR Y2096 OR Y2097 OR Y2098 OR Y2099 OR M210001 OR M210002 OR Dlatest)' END=21000228 # Month starts and ends: qtestcase '(M201501 OR Dlatest)' START=20150101 END=20150131 -qtestcase '((D20150101 OR D20150102 OR D20150103 OR D20150104 OR D20150105 OR D20150106 OR D20150107 OR D20150108 OR D20150109 OR D20150110 OR D20150111 OR D20150112 OR D20150113 OR D20150114 OR D20150115 OR D20150116 OR D20150117 OR D20150118 OR D20150119 OR D20150120 OR D20150121 OR D20150122 OR D20150123 OR D20150124 OR D20150125 OR D20150126 OR D20150127 OR D20150128 OR D20150129 OR D20150130) OR Dlatest)' START=20150101 END=20150130 +qtestcase '(D20150101 OR D20150102 OR D20150103 OR D20150104 OR D20150105 OR D20150106 OR D20150107 OR D20150108 OR D20150109 OR D20150110 OR D20150111 OR D20150112 OR D20150113 OR D20150114 OR D20150115 OR D20150116 OR D20150117 OR D20150118 OR D20150119 OR D20150120 OR D20150121 OR D20150122 OR D20150123 OR D20150124 OR D20150125 OR D20150126 OR D20150127 OR D20150128 OR D20150129 OR D20150130 OR Dlatest)' START=20150101 END=20150130 qtestcase '(M201502 OR Dlatest)' START=20150201 END=20150228 -qtestcase '((D20150201 OR D20150202 OR D20150203 OR D20150204 OR D20150205 OR D20150206 OR D20150207 OR D20150208 OR D20150209 OR D20150210 OR D20150211 OR D20150212 OR D20150213 OR D20150214 OR D20150215 OR D20150216 OR D20150217 OR D20150218 OR D20150219 OR D20150220 OR D20150221 OR D20150222 OR D20150223 OR D20150224 OR D20150225 OR D20150226 OR D20150227) OR Dlatest)' START=20150201 END=20150227 +qtestcase '(D20150201 OR D20150202 OR D20150203 OR D20150204 OR D20150205 OR D20150206 OR D20150207 OR D20150208 OR D20150209 OR D20150210 OR D20150211 OR D20150212 OR D20150213 OR D20150214 OR D20150215 OR D20150216 OR D20150217 OR D20150218 OR D20150219 OR D20150220 OR D20150221 OR D20150222 OR D20150223 OR D20150224 OR D20150225 OR D20150226 OR D20150227 OR Dlatest)' START=20150201 END=20150227 qtestcase '(M201503 OR Dlatest)' START=20150301 END=20150331 -qtestcase '((D20150301 OR D20150302 OR D20150303 OR D20150304 OR D20150305 OR D20150306 OR D20150307 OR D20150308 OR D20150309 OR D20150310 OR D20150311 OR D20150312 OR D20150313 OR D20150314 OR D20150315 OR D20150316 OR D20150317 OR D20150318 OR D20150319 OR D20150320 OR D20150321 OR D20150322 OR D20150323 OR D20150324 OR D20150325 OR D20150326 OR D20150327 OR D20150328 OR D20150329 OR D20150330) OR Dlatest)' START=20150301 END=20150330 +qtestcase '(D20150301 OR D20150302 OR D20150303 OR D20150304 OR D20150305 OR D20150306 OR D20150307 OR D20150308 OR D20150309 OR D20150310 OR D20150311 OR D20150312 OR D20150313 OR D20150314 OR D20150315 OR D20150316 OR D20150317 OR D20150318 OR D20150319 OR D20150320 OR D20150321 OR D20150322 OR D20150323 OR D20150324 OR D20150325 OR D20150326 OR D20150327 OR D20150328 OR D20150329 OR D20150330 OR Dlatest)' START=20150301 END=20150330 qtestcase '(M201504 OR Dlatest)' START=20150401 END=20150430 -qtestcase '((D20150401 OR D20150402 OR D20150403 OR D20150404 OR D20150405 OR D20150406 OR D20150407 OR D20150408 OR D20150409 OR D20150410 OR D20150411 OR D20150412 OR D20150413 OR D20150414 OR D20150415 OR D20150416 OR D20150417 OR D20150418 OR D20150419 OR D20150420 OR D20150421 OR D20150422 OR D20150423 OR D20150424 OR D20150425 OR D20150426 OR D20150427 OR D20150428 OR D20150429) OR Dlatest)' START=20150401 END=20150429 +qtestcase '(D20150401 OR D20150402 OR D20150403 OR D20150404 OR D20150405 OR D20150406 OR D20150407 OR D20150408 OR D20150409 OR D20150410 OR D20150411 OR D20150412 OR D20150413 OR D20150414 OR D20150415 OR D20150416 OR D20150417 OR D20150418 OR D20150419 OR D20150420 OR D20150421 OR D20150422 OR D20150423 OR D20150424 OR D20150425 OR D20150426 OR D20150427 OR D20150428 OR D20150429 OR Dlatest)' START=20150401 END=20150429 qtestcase '(M201505 OR Dlatest)' START=20150501 END=20150531 -qtestcase '((D20150501 OR D20150502 OR D20150503 OR D20150504 OR D20150505 OR D20150506 OR D20150507 OR D20150508 OR D20150509 OR D20150510 OR D20150511 OR D20150512 OR D20150513 OR D20150514 OR D20150515 OR D20150516 OR D20150517 OR D20150518 OR D20150519 OR D20150520 OR D20150521 OR D20150522 OR D20150523 OR D20150524 OR D20150525 OR D20150526 OR D20150527 OR D20150528 OR D20150529 OR D20150530) OR Dlatest)' START=20150501 END=20150530 +qtestcase '(D20150501 OR D20150502 OR D20150503 OR D20150504 OR D20150505 OR D20150506 OR D20150507 OR D20150508 OR D20150509 OR D20150510 OR D20150511 OR D20150512 OR D20150513 OR D20150514 OR D20150515 OR D20150516 OR D20150517 OR D20150518 OR D20150519 OR D20150520 OR D20150521 OR D20150522 OR D20150523 OR D20150524 OR D20150525 OR D20150526 OR D20150527 OR D20150528 OR D20150529 OR D20150530 OR Dlatest)' START=20150501 END=20150530 qtestcase '(M201506 OR Dlatest)' START=20150601 END=20150630 -qtestcase '((D20150601 OR D20150602 OR D20150603 OR D20150604 OR D20150605 OR D20150606 OR D20150607 OR D20150608 OR D20150609 OR D20150610 OR D20150611 OR D20150612 OR D20150613 OR D20150614 OR D20150615 OR D20150616 OR D20150617 OR D20150618 OR D20150619 OR D20150620 OR D20150621 OR D20150622 OR D20150623 OR D20150624 OR D20150625 OR D20150626 OR D20150627 OR D20150628 OR D20150629) OR Dlatest)' START=20150601 END=20150629 +qtestcase '(D20150601 OR D20150602 OR D20150603 OR D20150604 OR D20150605 OR D20150606 OR D20150607 OR D20150608 OR D20150609 OR D20150610 OR D20150611 OR D20150612 OR D20150613 OR D20150614 OR D20150615 OR D20150616 OR D20150617 OR D20150618 OR D20150619 OR D20150620 OR D20150621 OR D20150622 OR D20150623 OR D20150624 OR D20150625 OR D20150626 OR D20150627 OR D20150628 OR D20150629 OR Dlatest)' START=20150601 END=20150629 qtestcase '(M201507 OR Dlatest)' START=20150701 END=20150731 -qtestcase '((D20150701 OR D20150702 OR D20150703 OR D20150704 OR D20150705 OR D20150706 OR D20150707 OR D20150708 OR D20150709 OR D20150710 OR D20150711 OR D20150712 OR D20150713 OR D20150714 OR D20150715 OR D20150716 OR D20150717 OR D20150718 OR D20150719 OR D20150720 OR D20150721 OR D20150722 OR D20150723 OR D20150724 OR D20150725 OR D20150726 OR D20150727 OR D20150728 OR D20150729 OR D20150730) OR Dlatest)' START=20150701 END=20150730 +qtestcase '(D20150701 OR D20150702 OR D20150703 OR D20150704 OR D20150705 OR D20150706 OR D20150707 OR D20150708 OR D20150709 OR D20150710 OR D20150711 OR D20150712 OR D20150713 OR D20150714 OR D20150715 OR D20150716 OR D20150717 OR D20150718 OR D20150719 OR D20150720 OR D20150721 OR D20150722 OR D20150723 OR D20150724 OR D20150725 OR D20150726 OR D20150727 OR D20150728 OR D20150729 OR D20150730 OR Dlatest)' START=20150701 END=20150730 qtestcase '(M201508 OR Dlatest)' START=20150801 END=20150831 -qtestcase '((D20150801 OR D20150802 OR D20150803 OR D20150804 OR D20150805 OR D20150806 OR D20150807 OR D20150808 OR D20150809 OR D20150810 OR D20150811 OR D20150812 OR D20150813 OR D20150814 OR D20150815 OR D20150816 OR D20150817 OR D20150818 OR D20150819 OR D20150820 OR D20150821 OR D20150822 OR D20150823 OR D20150824 OR D20150825 OR D20150826 OR D20150827 OR D20150828 OR D20150829 OR D20150830) OR Dlatest)' START=20150801 END=20150830 +qtestcase '(D20150801 OR D20150802 OR D20150803 OR D20150804 OR D20150805 OR D20150806 OR D20150807 OR D20150808 OR D20150809 OR D20150810 OR D20150811 OR D20150812 OR D20150813 OR D20150814 OR D20150815 OR D20150816 OR D20150817 OR D20150818 OR D20150819 OR D20150820 OR D20150821 OR D20150822 OR D20150823 OR D20150824 OR D20150825 OR D20150826 OR D20150827 OR D20150828 OR D20150829 OR D20150830 OR Dlatest)' START=20150801 END=20150830 qtestcase '(M201509 OR Dlatest)' START=20150901 END=20150930 -qtestcase '((D20150901 OR D20150902 OR D20150903 OR D20150904 OR D20150905 OR D20150906 OR D20150907 OR D20150908 OR D20150909 OR D20150910 OR D20150911 OR D20150912 OR D20150913 OR D20150914 OR D20150915 OR D20150916 OR D20150917 OR D20150918 OR D20150919 OR D20150920 OR D20150921 OR D20150922 OR D20150923 OR D20150924 OR D20150925 OR D20150926 OR D20150927 OR D20150928 OR D20150929) OR Dlatest)' START=20150901 END=20150929 +qtestcase '(D20150901 OR D20150902 OR D20150903 OR D20150904 OR D20150905 OR D20150906 OR D20150907 OR D20150908 OR D20150909 OR D20150910 OR D20150911 OR D20150912 OR D20150913 OR D20150914 OR D20150915 OR D20150916 OR D20150917 OR D20150918 OR D20150919 OR D20150920 OR D20150921 OR D20150922 OR D20150923 OR D20150924 OR D20150925 OR D20150926 OR D20150927 OR D20150928 OR D20150929 OR Dlatest)' START=20150901 END=20150929 qtestcase '(M201510 OR Dlatest)' START=20151001 END=20151031 -qtestcase '((D20151001 OR D20151002 OR D20151003 OR D20151004 OR D20151005 OR D20151006 OR D20151007 OR D20151008 OR D20151009 OR D20151010 OR D20151011 OR D20151012 OR D20151013 OR D20151014 OR D20151015 OR D20151016 OR D20151017 OR D20151018 OR D20151019 OR D20151020 OR D20151021 OR D20151022 OR D20151023 OR D20151024 OR D20151025 OR D20151026 OR D20151027 OR D20151028 OR D20151029 OR D20151030) OR Dlatest)' START=20151001 END=20151030 +qtestcase '(D20151001 OR D20151002 OR D20151003 OR D20151004 OR D20151005 OR D20151006 OR D20151007 OR D20151008 OR D20151009 OR D20151010 OR D20151011 OR D20151012 OR D20151013 OR D20151014 OR D20151015 OR D20151016 OR D20151017 OR D20151018 OR D20151019 OR D20151020 OR D20151021 OR D20151022 OR D20151023 OR D20151024 OR D20151025 OR D20151026 OR D20151027 OR D20151028 OR D20151029 OR D20151030 OR Dlatest)' START=20151001 END=20151030 qtestcase '(M201511 OR Dlatest)' START=20151101 END=20151130 -qtestcase '((D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR D20151129) OR Dlatest)' START=20151101 END=20151129 +qtestcase '(D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR D20151129 OR Dlatest)' START=20151101 END=20151129 qtestcase '(M201512 OR Dlatest)' START=20151201 END=20151231 -qtestcase '((D20151201 OR D20151202 OR D20151203 OR D20151204 OR D20151205 OR D20151206 OR D20151207 OR D20151208 OR D20151209 OR D20151210 OR D20151211 OR D20151212 OR D20151213 OR D20151214 OR D20151215 OR D20151216 OR D20151217 OR D20151218 OR D20151219 OR D20151220 OR D20151221 OR D20151222 OR D20151223 OR D20151224 OR D20151225 OR D20151226 OR D20151227 OR D20151228 OR D20151229 OR D20151230) OR Dlatest)' START=20151201 END=20151230 +qtestcase '(D20151201 OR D20151202 OR D20151203 OR D20151204 OR D20151205 OR D20151206 OR D20151207 OR D20151208 OR D20151209 OR D20151210 OR D20151211 OR D20151212 OR D20151213 OR D20151214 OR D20151215 OR D20151216 OR D20151217 OR D20151218 OR D20151219 OR D20151220 OR D20151221 OR D20151222 OR D20151223 OR D20151224 OR D20151225 OR D20151226 OR D20151227 OR D20151228 OR D20151229 OR D20151230 OR Dlatest)' START=20151201 END=20151230 # Forward spans: -qtestcase '((D20151104 OR D20151105 OR D20151106 OR D20151107) OR Dlatest)' START=20151104 SPAN=3 -qtestcase '((D20141104 OR D20141105 OR D20141106 OR D20141107 OR D20141108 OR D20141109 OR D20141110 OR D20141111 OR D20141112 OR D20141113 OR D20141114 OR D20141115 OR D20141116 OR D20141117 OR D20141118 OR D20141119 OR D20141120 OR D20141121 OR D20141122 OR D20141123 OR D20141124 OR D20141125 OR D20141126 OR D20141127 OR D20141128 OR D20141129 OR D20141130 OR M201412 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104) OR Dlatest)' START=20141104 SPAN=365 +qtestcase '(D20151104 OR D20151105 OR D20151106 OR D20151107 OR Dlatest)' START=20151104 SPAN=3 +qtestcase '(D20141104 OR D20141105 OR D20141106 OR D20141107 OR D20141108 OR D20141109 OR D20141110 OR D20141111 OR D20141112 OR D20141113 OR D20141114 OR D20141115 OR D20141116 OR D20141117 OR D20141118 OR D20141119 OR D20141120 OR D20141121 OR D20141122 OR D20141123 OR D20141124 OR D20141125 OR D20141126 OR D20141127 OR D20141128 OR D20141129 OR D20141130 OR M201412 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR Dlatest)' START=20141104 SPAN=365 # Backward spans: -qtestcase '((D20151103 OR D20151104 OR D20151105 OR D20151106) OR Dlatest)' END=20151106 SPAN=3 -qtestcase '((D20141103 OR D20141104 OR D20141105 OR D20141106 OR D20141107 OR D20141108 OR D20141109 OR D20141110 OR D20141111 OR D20141112 OR D20141113 OR D20141114 OR D20141115 OR D20141116 OR D20141117 OR D20141118 OR D20141119 OR D20141120 OR D20141121 OR D20141122 OR D20141123 OR D20141124 OR D20141125 OR D20141126 OR D20141127 OR D20141128 OR D20141129 OR D20141130 OR M201412 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103) OR Dlatest)' END=20151103 SPAN=365 +qtestcase '(D20151103 OR D20151104 OR D20151105 OR D20151106 OR Dlatest)' END=20151106 SPAN=3 +qtestcase '(D20141103 OR D20141104 OR D20141105 OR D20141106 OR D20141107 OR D20141108 OR D20141109 OR D20141110 OR D20141111 OR D20141112 OR D20141113 OR D20141114 OR D20141115 OR D20141116 OR D20141117 OR D20141118 OR D20141119 OR D20141120 OR D20141121 OR D20141122 OR D20141123 OR D20141124 OR D20141125 OR D20141126 OR D20141127 OR D20141128 OR D20141129 OR D20141130 OR M201412 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR Dlatest)' END=20151103 SPAN=365 # Check that if START, END and SPAN are all passed, START is ignored: -qtestcase '((D20151103 OR D20151104 OR D20151105 OR D20151106) OR Dlatest)' START=19700101 END=20151106 SPAN=3 +qtestcase '(D20151103 OR D20151104 OR D20151105 OR D20151106 OR Dlatest)' START=19700101 END=20151106 SPAN=3 # Check that YYYYMM and YYYY are accepted and handled appropriately: -qtestcase '((Y1980 OR Y1981) OR Dlatest)' START=1980 END=1981 -qtestcase '((M198012 OR M198101 OR M198102) OR Dlatest)' START=198012 END=198102 +qtestcase '(Y1980 OR Y1981 OR Dlatest)' START=1980 END=1981 +qtestcase '(M198012 OR M198101 OR M198102 OR Dlatest)' START=198012 END=198102 # Check .SLOT combined with term based date range filter: -qtestcase '(VALUE_RANGE 0 201512 2015~ AND ((Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974) OR Dlatest))' START.0=20151201 END.0=20151231 END=19741231 +qtestcase '(VALUE_RANGE 0 201512 2015~ AND (Y1970 OR Y1971 OR Y1972 OR Y1973 OR Y1974 OR Dlatest))' START.0=20151201 END.0=20151231 END=19741231 # Check combining of filter terms: qtestcase '(Horg AND Len)' B=Len B=Horg @@ -338,7 +339,7 @@ qtestcase '((Horg OR Hcom) AND (Len AND Lfr))' B=Len B=Lfr B=Horg B=Hcom qtestcase '0 * ((Len AND Lfr) AND (Horg OR Hcom))' P='lang:en lang:fr host:org host:com' qtestcase '((XANDa AND XANDb AND XANDc) AND (Y1998 OR Y2001))' B=Y1998 B=Y2001 B=XANDa B=XANDb B=XANDc -qtestcase '0 * (((XANDa AND XANDb) AND XANDc) AND (Y1998 OR Y2001))' P='year:1998 year:2001 and:a and:b and:c' +qtestcase '0 * ((XANDa AND XANDb AND XANDc) AND (Y1998 OR Y2001))' P='year:1998 year:2001 and:a and:b and:c' # Check combining of filters around CGI parameter 'N': qtestcase '(Ztruth@1 AND_NOT Epdf)' P=truth N=Epdf @@ -361,15 +362,15 @@ qtestcase 'VALUE_RANGE 0 20151127060709 20151128060708' DATEVALUE=0 SPAN=1 # Tests of term-based date range filtering: - qtestcase '((Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128) OR Dlatest)' START=20000101 - qtestcase '((Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128) OR Dlatest)' START=20100101 - qtestcase '((Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128) OR Dlatest)' START=19740101 - qtestcase '((M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128) OR Dlatest)' START=20151001 + qtestcase '(Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR Dlatest)' START=20000101 + qtestcase '(Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR Dlatest)' START=20100101 + qtestcase '(Y1974 OR Y1975 OR Y1976 OR Y1977 OR Y1978 OR Y1979 OR Y1980 OR Y1981 OR Y1982 OR Y1983 OR Y1984 OR Y1985 OR Y1986 OR Y1987 OR Y1988 OR Y1989 OR Y1990 OR Y1991 OR Y1992 OR Y1993 OR Y1994 OR Y1995 OR Y1996 OR Y1997 OR Y1998 OR Y1999 OR Y2000 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR Dlatest)' START=19740101 + qtestcase '(M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR Dlatest)' START=20151001 # Date range with start after end: qtestcase 'Dlatest' START=201512 qtestcase 'Dlatest' START=20151201 - qtestcase '((D20150210 OR D20150211 OR D20150212 OR D20150213 OR D20150214 OR D20150215 OR D20150216 OR D20150217 OR D20150218 OR D20150219 OR D20150220 OR D20150221 OR D20150222 OR D20150223 OR D20150224 OR D20150225 OR D20150226 OR D20150227 OR D20150228 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128) OR Dlatest)' START=20150210 - qtestcase '((D20000220 OR D20000221 OR D20000222 OR D20000223 OR D20000224 OR D20000225 OR D20000226 OR D20000227 OR D20000228 OR D20000229 OR M200003 OR M200004 OR M200005 OR M200006 OR M200007 OR M200008 OR M200009 OR M200010 OR M200011 OR M200012 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128) OR Dlatest)' START=20000220 + qtestcase '(D20150210 OR D20150211 OR D20150212 OR D20150213 OR D20150214 OR D20150215 OR D20150216 OR D20150217 OR D20150218 OR D20150219 OR D20150220 OR D20150221 OR D20150222 OR D20150223 OR D20150224 OR D20150225 OR D20150226 OR D20150227 OR D20150228 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR Dlatest)' START=20150210 + qtestcase '(D20000220 OR D20000221 OR D20000222 OR D20000223 OR D20000224 OR D20000225 OR D20000226 OR D20000227 OR D20000228 OR D20000229 OR M200003 OR M200004 OR M200005 OR M200006 OR M200007 OR M200008 OR M200009 OR M200010 OR M200011 OR M200012 OR Y2001 OR Y2002 OR Y2003 OR Y2004 OR Y2005 OR Y2006 OR Y2007 OR Y2008 OR Y2009 OR Y2010 OR Y2011 OR Y2012 OR Y2013 OR Y2014 OR M201501 OR M201502 OR M201503 OR M201504 OR M201505 OR M201506 OR M201507 OR M201508 OR M201509 OR M201510 OR D20151101 OR D20151102 OR D20151103 OR D20151104 OR D20151105 OR D20151106 OR D20151107 OR D20151108 OR D20151109 OR D20151110 OR D20151111 OR D20151112 OR D20151113 OR D20151114 OR D20151115 OR D20151116 OR D20151117 OR D20151118 OR D20151119 OR D20151120 OR D20151121 OR D20151122 OR D20151123 OR D20151124 OR D20151125 OR D20151126 OR D20151127 OR D20151128 OR Dlatest)' START=20000220 FAKETIME= unset FAKE_NOW else @@ -382,21 +383,21 @@ # Test stem_all and stem_strategy. printf '$if{$cgi{stem_all},$set{stem_all,$cgi{stem_all}}}$if{$cgi{stem_strategy},$set{stem_strategy,$cgi{stem_strategy}}}$querydescription' > "$TEST_TEMPLATE" -qtestcase '((capitalised@1 AND tests@2) AND Zstem@3)' P='Capitalised "tests" stemmed' +qtestcase '(capitalised@1 AND tests@2 AND Zstem@3)' P='Capitalised "tests" stemmed' qtestcase '(nearing@1 NEAR 11 distances@2)' P='nearing NEAR distances' -qtestcase '((capitalis@1 AND test@2) AND stem@3)' P='Capitalised "tests" stemmed' stem_all=true +qtestcase '(capitalis@1 AND test@2 AND stem@3)' P='Capitalised "tests" stemmed' stem_all=true qtestcase '(near@1 NEAR 11 distanc@2)' P='nearing NEAR distances' stem_all=true -qtestcase '((capitalis@1 AND test@2) AND stem@3)' P='Capitalised "tests" stemmed' stem_strategy=all +qtestcase '(capitalis@1 AND test@2 AND stem@3)' P='Capitalised "tests" stemmed' stem_strategy=all qtestcase '(near@1 NEAR 11 distanc@2)' P='nearing NEAR distances' stem_strategy=all -qtestcase '((Zcapitalis@1 AND Ztest@2) AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=all_z +qtestcase '(Zcapitalis@1 AND Ztest@2 AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=all_z qtestcase '(Znear@1 NEAR 11 Zdistanc@2)' P='nearing NEAR distances' stem_strategy=all_z -qtestcase '((capitalised@1 AND tests@2) AND stemmed@3)' P='Capitalised "tests" stemmed' stem_strategy=none +qtestcase '(capitalised@1 AND tests@2 AND stemmed@3)' P='Capitalised "tests" stemmed' stem_strategy=none qtestcase '(nearing@1 NEAR 11 distances@2)' P='nearing NEAR distances' stem_strategy=none -qtestcase '((capitalised@1 AND tests@2) AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=some +qtestcase '(capitalised@1 AND tests@2 AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=some qtestcase '(nearing@1 NEAR 11 distances@2)' P='nearing NEAR distances' stem_strategy=some -qtestcase '((capitalised@1 AND tests@2) AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=some_full_pos +qtestcase '(capitalised@1 AND tests@2 AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=some_full_pos qtestcase '(Znear@1 NEAR 11 Zdistanc@2)' P='nearing NEAR distances' stem_strategy=some_full_pos -qtestcase '((capitalised@1 AND tests@2) AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=some stem_all=true +qtestcase '(capitalised@1 AND tests@2 AND Zstem@3)' P='Capitalised "tests" stemmed' stem_strategy=some stem_all=true qtestcase '(nearing@1 NEAR 11 distances@2)' P='nearing NEAR distances' stem_strategy=some stem_all=true # Feature tests for $contains. @@ -909,6 +910,14 @@ testcase '4071004f3456|@q\u0000O4V|' # Feature tests of scriptindex. + +# Regression test: non-zero exit status for unknown option. +if $SCRIPTINDEX --to-be-or-not-to-be "$TEST_DB" "$TEST_INDEXSCRIPT" > /dev/null < /dev/null 2>&1; then + echo "scriptindex didn't give error for unknown option" + failed=`expr $failed + 1` +fi + +# Regression test: error given for multiple unique actions. printf 'uuid : boolean=Q unique=Q\nguid : boolean=G unique=G' > "$TEST_INDEXSCRIPT" rm -rf "$TEST_DB" if $SCRIPTINDEX "$TEST_DB" "$TEST_INDEXSCRIPT" > /dev/null < /dev/null 2>&1; then @@ -993,6 +1002,19 @@ failed=`expr $failed + 1` fi +# Feature tests for date action. +printf 'd : date=unix\n' > "$TEST_INDEXSCRIPT" +rm -rf "$TEST_DB" +$SCRIPTINDEX "$TEST_DB" "$TEST_INDEXSCRIPT" > /dev/null <<'END' +d= + +d=0 + +d=1541478429 +END +printf '$list{$map{$range{1,3},$list{$allterms{$_}, }},|}' > "$TEST_TEMPLATE" +testcase '|D19700101 M197001 Y1970|D20181106 M201811 Y2018' + # Feature tests for datevalue command scriptindex. printf '%s\n' 'DATE : field parsedate=%Y%m%d valuepacked=13' > "$TEST_INDEXSCRIPT" rm -rf "$TEST_DB" @@ -1011,6 +1033,26 @@ printf '$unpack{$value{13,1}}|$date{$unpack{$value{13,1}}}' > "$TEST_TEMPLATE" testcase '1480680262|2016-12-02' P=text +# Feature tests for load action. +printf '%s\n' 'file : load field' > "$TEST_INDEXSCRIPT" +rm -rf "$TEST_DB" +rc=0 +out=`echo 'file='|$SCRIPTINDEX "$TEST_DB" "$TEST_INDEXSCRIPT" 2>&1 > /dev/null || rc=$?` +if [ $rc -ne 0 ] ; then + echo "scriptindex gave error for empty filename in load action" + printf '%s\n' "$out" + failed=`expr $failed + 1` +else + case $out in + *':1: warning: Empty filename in LOAD action') ;; + *) + echo "scriptindex didn't give expected warning for empty filename in load action" + printf '%s\n' "$out" + failed=`expr $failed + 1` + ;; + esac +fi + # Feature tests for quoted arguments. printf 'DATE : field=" spaces " date="yyyymmdd"\nTEXT: index\n' > "$TEST_INDEXSCRIPT" rm -rf "$TEST_DB" diff -Nru xapian-omega-1.4.9/omindex.1 xapian-omega-1.4.10/omindex.1 --- xapian-omega-1.4.9/omindex.1 2018-11-02 22:09:12.000000000 +0000 +++ xapian-omega-1.4.10/omindex.1 2019-02-11 21:30:09.000000000 +0000 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. -.TH OMINDEX "1" "November 2018" "xapian-omega 1.4.9" "User Commands" +.TH OMINDEX "1" "February 2019" "xapian-omega 1.4.10" "User Commands" .SH NAME omindex \- Index static website data via the filesystem .SH SYNOPSIS diff -Nru xapian-omega-1.4.9/omindex.cc xapian-omega-1.4.10/omindex.cc --- xapian-omega-1.4.9/omindex.cc 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/omindex.cc 2019-02-11 21:27:21.000000000 +0000 @@ -753,6 +753,10 @@ } root = argv[optind]; + if (root.empty()) { + cerr << PROG_NAME": start directory can not be empty." << endl; + return 1; + } if (!endswith(root, '/')) { root += '/'; } diff -Nru xapian-omega-1.4.9/omindex-list.1 xapian-omega-1.4.10/omindex-list.1 --- xapian-omega-1.4.9/omindex-list.1 2018-11-02 22:09:10.000000000 +0000 +++ xapian-omega-1.4.10/omindex-list.1 2019-02-11 21:30:07.000000000 +0000 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. -.TH OMINDEX-LIST "1" "November 2018" "xapian-omega 1.4.9" "User Commands" +.TH OMINDEX-LIST "1" "February 2019" "xapian-omega 1.4.10" "User Commands" .SH NAME omindex-list \- List URLs of documents indexed by omindex .SH SYNOPSIS diff -Nru xapian-omega-1.4.9/portability/strptime.cc xapian-omega-1.4.10/portability/strptime.cc --- xapian-omega-1.4.9/portability/strptime.cc 1970-01-01 00:00:00.000000000 +0000 +++ xapian-omega-1.4.10/portability/strptime.cc 2019-02-11 21:27:21.000000000 +0000 @@ -0,0 +1,35 @@ +/** @file strptime.cc + * @brief Implement strptime() using std::get_time() + */ +/* Copyright 2019 Olly Betts + * + * This program 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 2 of the + * License, or (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include + +#include +#include +#include + +char* +strptime(const char* date_string, const char* format, struct std::tm* tm) +{ + std::istringstream s(date_string); + s >> std::get_time(tm, format); + if (s.fail()) return NULL; + return date_string + s.tellg(); +} diff -Nru xapian-omega-1.4.9/portability/strptime.h xapian-omega-1.4.10/portability/strptime.h --- xapian-omega-1.4.9/portability/strptime.h 1970-01-01 00:00:00.000000000 +0000 +++ xapian-omega-1.4.10/portability/strptime.h 2019-02-11 21:27:21.000000000 +0000 @@ -0,0 +1,29 @@ +/** @file strptime.h + * @brief Implement strptime() using std::get_time() + */ +/* Copyright 2019 Olly Betts + * + * This program 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 2 of the + * License, or (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef OMEGA_INCLUDED_STRPTIME_H +#define OMEGA_INCLUDED_STRPTIME_H + +#include + +char* strptime(const char* date_string, const char* format, struct std::tm* tm); + +#endif diff -Nru xapian-omega-1.4.9/runfilter.cc xapian-omega-1.4.10/runfilter.cc --- xapian-omega-1.4.9/runfilter.cc 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/runfilter.cc 2019-02-11 21:27:21.000000000 +0000 @@ -1,7 +1,7 @@ /** @file runfilter.cc * @brief Run an external filter and capture its output in a std::string. */ -/* Copyright (C) 2003,2006,2007,2009,2010,2011,2013,2015,2017 Olly Betts +/* Copyright (C) 2003,2006,2007,2009,2010,2011,2013,2015,2017,2018 Olly Betts * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,6 +58,8 @@ using namespace std; +static int devnull = -1; + #if defined HAVE_FORK && defined HAVE_SOCKETPAIR bool command_needs_shell(const char * p) @@ -154,8 +156,8 @@ } -void -runfilter_init() +static inline void +runfilter_init_signal_handlers_() { struct sigaction sa; sa.sa_handler = handle_signal; @@ -203,8 +205,8 @@ } -void -runfilter_init() +static inline void +runfilter_init_signal_handlers_() { old_hup_handler = signal(SIGHUP, handle_signal); old_int_handler = signal(SIGINT, handle_signal); @@ -221,16 +223,34 @@ return true; } +static inline void +runfilter_init_signal_handlers_() +{ +} +#endif + void runfilter_init() { + runfilter_init_signal_handlers_(); + devnull = open("/dev/null", O_WRONLY); + if (devnull < 0) { + cerr << "Failed to open /dev/null: " << strerror(errno) << endl; + exit(1); + } + // Ensure that devnull isn't fd 0, 1 or 2 (stdin, stdout or stderr) and + // that we have open fds for stdin, stdout and stderr. This simplifies the + // code after fork() because it doesn't need to worry about such corner + // cases. + while (devnull <= 2) { + devnull = dup(devnull); + } } -#endif -string -stdout_to_string(const string &cmd, bool use_shell, int alt_status) +void +run_filter(int fd_in, const string& cmd, bool use_shell, string* out, + int alt_status) { - string out; #if defined HAVE_FORK && defined HAVE_SOCKETPAIR // We want to be able to get the exit status of the child process. signal(SIGCHLD, SIG_DFL); @@ -255,6 +275,12 @@ // Close the parent's side of the socket pair. close(fds[0]); + if (fd_in != -1) { + // Connect piped input to stdin. + dup2(fd_in, 0); + close(fd_in); + } + // Connect stdout to our side of the socket pair. dup2(fds[1], 1); @@ -333,15 +359,11 @@ if (!quoted) { // Handle simple cases of redirection. if (strcmp(word, ">/dev/null") == 0) { - int fd = open(word + 1, O_WRONLY); - if (fd != -1 && fd != 1) dup2(fd, 1); - close(fd); + dup2(devnull, 1); continue; } if (strcmp(word, "2>/dev/null") == 0) { - int fd = open(word + 2, O_WRONLY); - if (fd != -1 && fd != 2) dup2(fd, 2); - close(fd); + dup2(devnull, 2); continue; } if (strcmp(word, "2>&1") == 0) { @@ -428,7 +450,7 @@ pid_to_kill_on_signal = 0; throw ReadError(status); } - out.append(buf, res); + if (out) out->append(buf, res); } close(fd); @@ -452,7 +474,7 @@ (void)pclose(fh); throw ReadError("fread failed"); } - out.append(buf, len); + if (out) out->append(buf, len); } int status = pclose(fh); #endif @@ -460,7 +482,7 @@ if (WIFEXITED(status)) { int exit_status = WEXITSTATUS(status); if (exit_status == 0 || exit_status == alt_status) - return out; + return; if (exit_status == 127) throw NoSuchFilter(); } diff -Nru xapian-omega-1.4.9/runfilter.h xapian-omega-1.4.10/runfilter.h --- xapian-omega-1.4.9/runfilter.h 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/runfilter.h 2019-02-11 21:27:21.000000000 +0000 @@ -1,6 +1,7 @@ -/* runfilter.h: run an external filter and capture its output in a std::string. - * - * Copyright (C) 2007,2013,2015 Olly Betts +/** @file runfilter.h + * @brief run an external filter and capture its output in a std::string. + */ +/* Copyright (C) 2007,2013,2015 Olly Betts * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,16 +39,20 @@ /** Analyse if a command needs the shell. * * The return value of this function can be passed as the second argument of - * stdout_to_string(). + * run_filter()/stdout_to_string(). */ bool command_needs_shell(const char * p); /// Initialise the runfilter module. void runfilter_init(); -/** Run command @a cmd, capture its stdout, and return it as a std::string. +/** Run command @a cmd, optionally capturing its stdout. * - * @param use_shell If false, try to avoid using a shell to run the command. + * @param fd_in FD for piped input, or -1 for input from file. + * @param cmd The command to run. + * @param use_shell If false, try to avoid using a shell to run the command. + * @param out Pointer to std::string to put stdout in or NULL to + * discard stdout. (default: NULL) * @param alt_status Exit status to treat as success in addition to 0 * (default: Only treat exit status 0 as success). * @@ -71,7 +76,31 @@ * same code path (which may or may not involve some analog of the Unix * shell). */ -std::string stdout_to_string(const std::string &cmd, bool use_shell, - int alt_status = 0); +void run_filter(int fd_in, + const std::string& cmd, + bool use_shell, + std::string* out = nullptr, + int alt_status = 0); + +static inline void +run_filter(const std::string& cmd, + bool use_shell, + std::string* out = nullptr, + int alt_status = 0) +{ + run_filter(-1, cmd, use_shell, out, alt_status); +} + +/** Run command @a cmd, capture its stdout, and return it as a std::string. + * + * This is a simple wrapper around run_filter(). + */ +static inline std::string +stdout_to_string(const std::string& cmd, bool use_shell, int alt_status = 0) +{ + std::string out; + run_filter(cmd, use_shell, &out, alt_status); + return out; +} #endif // OMEGA_INCLUDED_RUNFILTER_H diff -Nru xapian-omega-1.4.9/scriptindex.1 xapian-omega-1.4.10/scriptindex.1 --- xapian-omega-1.4.9/scriptindex.1 2018-11-02 22:09:13.000000000 +0000 +++ xapian-omega-1.4.10/scriptindex.1 2019-02-11 21:30:09.000000000 +0000 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. -.TH SCRIPTINDEX "1" "November 2018" "xapian-omega 1.4.9" "User Commands" +.TH SCRIPTINDEX "1" "February 2019" "xapian-omega 1.4.10" "User Commands" .SH NAME scriptindex \- index arbitrary data as described by an index script .SH SYNOPSIS diff -Nru xapian-omega-1.4.9/scriptindex.cc xapian-omega-1.4.10/scriptindex.cc --- xapian-omega-1.4.9/scriptindex.cc 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/scriptindex.cc 2019-02-11 21:27:21.000000000 +0000 @@ -52,6 +52,10 @@ #include "utils.h" #include "values.h" +#ifndef HAVE_STRPTIME +#include "portability/strptime.h" +#endif + #include "gnu_getopt.h" using namespace std; @@ -754,6 +758,12 @@ value = Xapian::Unicode::tolower(value); break; case Action::LOAD: { + // If there's no input, just issue a warning. + if (value.empty()) { + report_location(DIAG_WARN, fname, line_no); + cerr << "Empty filename in LOAD action" << endl; + break; + } bool truncated = false; string filename = std::move(value); // FIXME: Use NOATIME if we own the file or are root. @@ -967,6 +977,9 @@ break; } case Action::DATE: { + // Do nothing for empty input. + if (value.empty()) break; + const string & type = action.get_string_arg(); string yyyymmdd; if (type == "unix") { @@ -976,9 +989,10 @@ int m = tm->tm_mon + 1; yyyymmdd = date_to_string(y, m, tm->tm_mday); } else if (type == "yyyymmdd") { - if (value.length() == 8) yyyymmdd = value; + if (value.length() != 8) break; + yyyymmdd = value; } - if (yyyymmdd.empty()) break; + // Date (YYYYMMDD) doc.add_boolean_term("D" + yyyymmdd); yyyymmdd.resize(6); @@ -1119,6 +1133,27 @@ database.commit(); } +static void +show_help(int exit_code) +{ + cout << PROG_NAME " - " PROG_DESC "\n" +"Usage: " PROG_NAME " [OPTIONS] DATABASE INDEXER_SCRIPT [INPUT_FILE]...\n" +"\n" +"Creates or updates a Xapian database with the data from the input files listed\n" +"on the command line. If no files are specified, data is read from stdin.\n" +"\n" +"See https://xapian.org/docs/omega/scriptindex.html for documentation of the\n" +"format for INDEXER_SCRIPT.\n" +"\n" +"Options:\n" +" -v, --verbose display additional messages to aid debugging\n" +" --overwrite create the database anew (the default is to update if\n" +" the database already exists)\n"; + print_stemmer_help(""); + print_help_and_version_help(""); + exit(exit_code); +} + int main(int argc, char **argv) try { @@ -1138,16 +1173,15 @@ { 0, 0, NULL, 0 } }; - bool more = true, show_help = false; - while (more) { - switch (gnu_getopt_long(argc, argv, "vs:hV", longopts, NULL)) { - case EOF: - more = false; - break; + int getopt_ret; + while ((getopt_ret = gnu_getopt_long(argc, argv, "vs:hV", + longopts, NULL)) != -1) { + switch (getopt_ret) { default: + show_help(1); + break; case 'h': // --help - show_help = true; - more = false; + show_help(0); break; case 'V': // --version print_package_info(PROG_NAME); @@ -1173,23 +1207,8 @@ argv += optind; argc -= optind; - if (show_help || argc < 2) { - cout << PROG_NAME " - " PROG_DESC "\n" -"Usage: " PROG_NAME " [OPTIONS] DATABASE INDEXER_SCRIPT [INPUT_FILE]...\n" -"\n" -"Creates or updates a Xapian database with the data from the input files listed\n" -"on the command line. If no files are specified, data is read from stdin.\n" -"\n" -"See https://xapian.org/docs/omega/scriptindex.html for documentation of the\n" -"format for INDEXER_SCRIPT.\n" -"\n" -"Options:\n" -" -v, --verbose display additional messages to aid debugging\n" -" --overwrite create the database anew (the default is to update if\n" -" the database already exists)\n"; - print_stemmer_help(""); - print_help_and_version_help(""); - exit(show_help ? 0 : 1); + if (argc < 2) { + show_help(1); } parse_index_script(argv[1]); diff -Nru xapian-omega-1.4.9/utf8convert.cc xapian-omega-1.4.10/utf8convert.cc --- xapian-omega-1.4.9/utf8convert.cc 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/utf8convert.cc 2019-02-11 21:27:21.000000000 +0000 @@ -25,7 +25,7 @@ #include #include -#ifdef USE_ICONV +#ifdef HAVE_ICONV # include #endif #include @@ -191,11 +191,11 @@ if (false) { try_iconv: -#ifdef USE_ICONV +#ifdef HAVE_ICONV iconv_t conv = iconv_open("UTF-8", charset.c_str()); if (conv == reinterpret_cast(-1)) return; - ICONV_INPUT_TYPE in = const_cast(text.c_str()); + ICONV_CONST char* in = const_cast(text.c_str()); size_t in_len = text.size(); while (in_len) { char * out = buf; diff -Nru xapian-omega-1.4.9/utf8converttest.cc xapian-omega-1.4.10/utf8converttest.cc --- xapian-omega-1.4.9/utf8converttest.cc 2018-11-02 22:06:13.000000000 +0000 +++ xapian-omega-1.4.10/utf8converttest.cc 2019-02-11 21:27:21.000000000 +0000 @@ -42,7 +42,7 @@ { "iso-8859-1", "Hello\xa0world", 0, "Hello\xc2\xa0world" }, { "ISO-8859-1", "Hello\xa0world", 0, "Hello\xc2\xa0world" }, { "ISO8859-1", "Hello\xa0world", 0, "Hello\xc2\xa0world" }, -#if !defined USE_ICONV || defined __GNU_LIBRARY__ +#if !defined HAVE_ICONV || defined __GNU_LIBRARY__ // "8859_1" is not understood by Solaris iconv, for example. { "8859_1", "Hello\xa0world", 0, "Hello\xc2\xa0world" }, #endif diff -Nru xapian-omega-1.4.9/xapian-omega.spec xapian-omega-1.4.10/xapian-omega.spec --- xapian-omega-1.4.9/xapian-omega.spec 2018-11-02 22:07:41.000000000 +0000 +++ xapian-omega-1.4.10/xapian-omega.spec 2019-02-11 21:28:49.000000000 +0000 @@ -5,7 +5,7 @@ Summary: A CGI search frontend and indexers built on Xapian Name: xapian-omega -Version: 1.4.9 +Version: 1.4.10 Release: 1 License: GPL Vendor: xapian.org