Hello community, here is the log from the commit of package libguess for openSUSE:Factory checked in at 2015-02-12 10:21:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libguess (Old) and /work/SRC/openSUSE:Factory/.libguess.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libguess" Changes: -------- --- /work/SRC/openSUSE:Factory/libguess/libguess.changes 2013-07-18 17:32:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libguess.new/libguess.changes 2015-02-12 10:21:16.000000000 +0100 @@ -1,0 +2,18 @@ +Tue Feb 10 13:40:57 UTC 2015 - [email protected] + +- readd deleted Copyright +- fix header + +------------------------------------------------------------------- +Mon Feb 9 13:20:33 UTC 2015 - [email protected] + +- Update to 1.2: + * Remove mowgli dependency, deprecate libguess_init(). + * Remove broken links to jira.atheme.org. + * Expose libguess_init(). + * Define m4 macro directory in configure.ac. + * Switch to libmowgli-2. +- Remove libguess-1.1-libmowgli.h-path.patch: fixed upstream. +- Make description shorter. + +------------------------------------------------------------------- @@ -23 +40,0 @@ - Old: ---- libguess-1.1-libmowgli.h-path.patch libguess-1.1.tar.bz2 New: ---- libguess-1.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libguess.spec ++++++ --- /var/tmp/diff_new_pack.cYH450/_old 2015-02-12 10:21:17.000000000 +0100 +++ /var/tmp/diff_new_pack.cYH450/_new 2015-02-12 10:21:17.000000000 +0100 @@ -1,7 +1,8 @@ # # spec file for package libguess # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 Scorpio IT, Deidesheim, Germany # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,47 +16,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%define libsoname %{name}1 Name: libguess -Version: 1.1 -Release: 0 -License: BSD-3-Clause +%define libsoname %{name}1 + Summary: A high-speed character set detection library -Url: http://www.atheme.org/project/libguess +License: BSD-3-Clause Group: System/Libraries -Source0: %{name}-%{version}.tar.bz2 +Version: 1.2 +Release: 0 +Url: https://github.com/kaniini/libguess +Source: http://rabbit.dereferenced.org/~nenolod/distfiles/%{name}-%{version}.tar.bz2 Source1: baselibs.conf -# PATCH-FIX-UPSTREAM [email protected] - fix libmowgli/mowgli.h path -Patch1: libguess-1.1-libmowgli.h-path.patch -BuildRequires: libmowgli-devel >= 0.7.0 -BuildRequires: pkg-config BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: libmowgli2-devel >= 2.0.0 +BuildRequires: pkg-config %description -A high-speed character set detection library - -libguess has two functions: +libguess employs discrete-finite automata to deduce the character +set of the input buffer. The advantage of this is that all +character sets can be checked in parallel, and quickly. Right now, +libguess passes a byte to each DFA on the same pass, meaning that +the winning character set can be deduced as efficiently as possible. -libguess_determine_encoding(const char *inbuf, int length, const char *region); -This detects a character set. Returns an appropriate charset name that can be -passed to iconv_open(). Region is the name of the language or region that the -data is related to, e.g. 'Baltic' for the Baltic states, or 'Japanese' for -Japan. - -libguess_validate_utf8(const char *inbuf, int length); -This employs libguess's DFA-based character set validation rules to ensure that -a string is pure UTF-8. GLib's UTF-8 validation functions are broken, for -example. - -Just include libguess.h and link to libguess to get these functions in your -program. For your convenience, a pkg-config file is also supplied. -libguess employs discrete-finite automata to deduce the character set of the -input buffer. The advantage of this is that all character sets can be checked -in parallel, and quickly. Right now, libguess passes a byte to each DFA on the -same pass, meaning that the winning character set can be deduced as efficiently -as possible. -libguess is fully reentrant, using only local stack memory for DFA operations. +libguess is fully reentrant, using only local stack memory for DFA +operations. %package -n %{libsoname} Summary: Shared library for libguess @@ -70,7 +55,7 @@ Summary: Development package for libguess Group: Development/Libraries/C and C++ Requires: %{libsoname} = %{version} -Requires: libmowgli-devel +Requires: libmowgli2-devel >= 2.0.0 Requires: pkg-config %description devel @@ -81,7 +66,6 @@ %prep %setup -q -%patch1 -p1 %build %configure @@ -90,10 +74,11 @@ %install %make_install -# fatal error: "autoconf.h": No such file or directory in librcc build -cp -r src/libguess/autoconf.h %{buildroot}%{_includedir}/%{name}/ +# Fatal error: "autoconf.h": No such file or directory in librcc build. +install -Dm 0644 src/%{name}/autoconf.h %{buildroot}%{_includedir}/%{name}/autoconf.h %post -n %{libsoname} -p /sbin/ldconfig + %postun -n %{libsoname} -p /sbin/ldconfig %files -n %{libsoname} @@ -104,9 +89,7 @@ %defattr(-,root,root) %doc COPYING README %{_libdir}/%{name}.so -%dir %{_includedir}/%{name} -%{_includedir}/%{name}/%{name}.h -%{_includedir}/%{name}/autoconf.h +%{_includedir}/%{name}/ %{_libdir}/pkgconfig/%{name}.pc %changelog ++++++ libguess-1.1.tar.bz2 -> libguess-1.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/README new/libguess-1.2/README --- old/libguess-1.1/README 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/README 2014-07-15 02:40:13.000000000 +0200 @@ -38,4 +38,4 @@ I found a bug: -------------- -Please report your bug to http://jira.atheme.org/ against the libguess component. +Please report your bug using GitHub issues. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/aclocal.m4 new/libguess-1.2/aclocal.m4 --- old/libguess-1.1/aclocal.m4 2011-12-01 14:04:47.000000000 +0100 +++ new/libguess-1.2/aclocal.m4 2014-07-18 03:10:45.000000000 +0200 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,5 +11,5 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_include([m4/buildsys.m4]) -m4_include([m4/pkg.m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/configure new/libguess-1.2/configure --- old/libguess-1.1/configure 2011-12-01 14:04:47.000000000 +0100 +++ new/libguess-1.2/configure 2014-07-18 03:10:46.000000000 +0200 @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for libguess 1.1. +# Generated by GNU Autoconf 2.69 for libguess 1.2. # # Report bugs to <[email protected]>. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -214,21 +238,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -331,6 +359,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -452,6 +488,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -486,16 +526,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -507,28 +547,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -560,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='libguess' PACKAGE_TARNAME='libguess' -PACKAGE_VERSION='1.1' -PACKAGE_STRING='libguess 1.1' +PACKAGE_VERSION='1.2' +PACKAGE_STRING='libguess 1.2' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -604,9 +624,6 @@ ac_subst_vars='LTLIBOBJS EXAMPLES_BUILD -MOWGLI_LIBS -MOWGLI_CFLAGS -PKG_CONFIG LIBOBJS EGREP GREP @@ -1156,8 +1173,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1243,7 +1258,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 libguess 1.1 to adapt to many kinds of systems. +\`configure' configures libguess 1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1309,7 +1324,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libguess 1.1:";; + short | recursive ) echo "Configuration of libguess 1.2:";; esac cat <<\_ACEOF @@ -1395,10 +1410,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libguess configure 1.1 -generated by GNU Autoconf 2.68 +libguess configure 1.2 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1474,7 +1489,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1764,8 +1779,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libguess $as_me 1.1, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by libguess $as_me 1.2, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2116,6 +2131,7 @@ ac_config_headers="$ac_config_headers src/libguess/autoconf.h" + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -2279,7 +2295,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2319,7 +2335,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2372,7 +2388,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2413,7 +2429,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2471,7 +2487,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2515,7 +2531,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2961,8 +2977,7 @@ /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3095,7 +3110,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3668,7 +3683,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3734,7 +3749,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3937,11 +3952,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -3958,8 +3973,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -3975,10 +3991,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -4183,106 +4199,6 @@ fi - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmowgli >= 0.9.50" >&5 -$as_echo_n "checking for libmowgli >= 0.9.50... " >&6; } - - if $PKG_CONFIG --exists "libmowgli >= 0.9.50" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOWGLI_CFLAGS" >&5 -$as_echo_n "checking MOWGLI_CFLAGS... " >&6; } - MOWGLI_CFLAGS=`$PKG_CONFIG --cflags "libmowgli >= 0.9.50"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOWGLI_CFLAGS" >&5 -$as_echo "$MOWGLI_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOWGLI_LIBS" >&5 -$as_echo_n "checking MOWGLI_LIBS... " >&6; } - MOWGLI_LIBS=`$PKG_CONFIG --libs "libmowgli >= 0.9.50"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOWGLI_LIBS" >&5 -$as_echo "$MOWGLI_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - MOWGLI_CFLAGS="" - MOWGLI_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOWGLI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libmowgli >= 0.9.50"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : - else - as_fn_error $? "Install Mowgli from http://atheme.org/project/mowgli." "$LINENO" 5 - fi - - # Check for optional features. EXAMPLES_BUILD="" # Check whether --enable-examples was given. @@ -4718,16 +4634,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -4787,28 +4703,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -4829,8 +4733,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libguess $as_me 1.1, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by libguess $as_me 1.2, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -4891,11 +4795,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libguess config.status 1.1 -configured by $0, generated by GNU Autoconf 2.68, +libguess config.status 1.2 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -4984,7 +4888,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/configure.ac new/libguess-1.2/configure.ac --- old/libguess-1.1/configure.ac 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/configure.ac 2014-07-15 02:40:13.000000000 +0200 @@ -2,9 +2,10 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([libguess], [1.1], [[email protected]]) +AC_INIT([libguess], [1.2], [[email protected]]) AC_CONFIG_SRCDIR([src/libguess/guess.c]) AC_CONFIG_HEADER([src/libguess/autoconf.h]) +AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_HOST AC_CANONICAL_TARGET @@ -40,8 +41,6 @@ AC_CHECK_FUNCS([printf sprintf snprintf vsnprintf gettimeofday strndup strlcpy strlcat]) AC_FUNC_STAT -PKG_CHECK_MODULES([MOWGLI], [libmowgli >= 0.9.50], [], [AC_MSG_ERROR([Install Mowgli from http://atheme.org/project/mowgli.])]) - # Check for optional features. EXAMPLES_BUILD="" AC_ARG_ENABLE(examples, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/extra.mk.in new/libguess-1.2/extra.mk.in --- old/libguess-1.1/extra.mk.in 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/extra.mk.in 2014-07-15 02:40:13.000000000 +0200 @@ -10,7 +10,6 @@ CLEAN_LIB ?= @CLEAN_LIB@ htmldir ?= @htmldir@ bindir ?= @bindir@ -MOWGLI_LIBS ?= @MOWGLI_LIBS@ PACKAGE_URL ?= @PACKAGE_URL@ PACKAGE_STRING ?= @PACKAGE_STRING@ dvidir ?= @dvidir@ @@ -70,7 +69,6 @@ PACKAGE_TARNAME ?= @PACKAGE_TARNAME@ INSTALL_DATA ?= @INSTALL_DATA@ datarootdir ?= @datarootdir@ -MOWGLI_CFLAGS ?= @MOWGLI_CFLAGS@ INSTALL_PROGRAM ?= @INSTALL_PROGRAM@ PLUGIN_LDFLAGS ?= @PLUGIN_LDFLAGS@ PATH_SEPARATOR ?= @PATH_SEPARATOR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/scripts/makerelease.sh new/libguess-1.2/scripts/makerelease.sh --- old/libguess-1.1/scripts/makerelease.sh 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/scripts/makerelease.sh 2014-07-15 02:40:13.000000000 +0200 @@ -59,10 +59,10 @@ cd .. -echo "Building $RELEASENAME.tgz from $RELEASENAME/" +echo "Building $RELEASENAME.tar.gz from $RELEASENAME/" tar zcf $RELEASENAME.tar.gz $RELEASENAME/ -echo "Building $RELEASENAME.tbz2 from $RELEASENAME/" +echo "Building $RELEASENAME.tar.bz2 from $RELEASENAME/" tar jcf $RELEASENAME.tar.bz2 $RELEASENAME/ rm $RELEASENAME-working.tar.gz @@ -91,8 +91,8 @@ fi if [ "x$PUBLISH" = "xyes" ]; then - scp $RELEASENAME.tgz distfiles-master.atheme.org:/srv/distfiles - scp $RELEASENAME.tbz2 distfiles-master.atheme.org:/srv/distfiles + scp $RELEASENAME.tar.gz distfiles.atheme.org:/srv/distfiles + scp $RELEASENAME.tar.bz2 distfiles.atheme.org:/srv/distfiles echo echo "The releases have been published, and will be available to the entire" @@ -100,7 +100,6 @@ fi echo -echo "Done. If you have any bugs to report, report them against" -echo "the distfiles.atheme.org component at http://jira.atheme.org" -echo "Thanks!" +echo "Done. If you have any bugs to report, report them using" +echo "https://github.com/atheme/libguess. Thanks!" echo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/src/examples/guessconv/Makefile new/libguess-1.2/src/examples/guessconv/Makefile --- old/libguess-1.1/src/examples/guessconv/Makefile 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/src/examples/guessconv/Makefile 2014-07-15 02:40:13.000000000 +0200 @@ -4,5 +4,5 @@ include ../../../buildsys.mk include ../../../extra.mk -CPPFLAGS += ${MOWGLI_CFLAGS} -I../../libguess -LIBS += ${MOWGLI_LIBS} -L../../libguess -lguess +CPPFLAGS += -I../../libguess +LIBS += -L../../libguess -lguess diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/src/examples/guessconv/guessconv.c new/libguess-1.2/src/examples/guessconv/guessconv.c --- old/libguess-1.1/src/examples/guessconv/guessconv.c 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/src/examples/guessconv/guessconv.c 2014-07-15 02:40:13.000000000 +0200 @@ -47,7 +47,7 @@ printf("Atheme guessconv, version 1.0.\n"); printf("Copyright (c) 2010 William Pitcock <[email protected]>\n"); printf("See COPYING in the libguess source tree for license details.\n"); - printf("\nReport bugs to <http://jira.atheme.org/> against the libguess product.\n"); + printf("\nReport bugs to https://github.com/atheme/libguess\n"); exit(EXIT_SUCCESS); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/src/libguess/Makefile new/libguess-1.2/src/libguess/Makefile --- old/libguess-1.1/src/libguess/Makefile 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/src/libguess/Makefile 2014-07-15 02:40:13.000000000 +0200 @@ -12,6 +12,5 @@ include ../../buildsys.mk include ../../extra.mk -CPPFLAGS += ${LIB_CPPFLAGS} ${MOWGLI_CFLAGS} -I. -I.. -DLIBGUESS_CORE +CPPFLAGS += ${LIB_CPPFLAGS} -I. -I.. -DLIBGUESS_CORE CFLAGS += ${LIB_CFLAGS} -LIBS += ${MOWGLI_LIBS} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/src/libguess/guess.c new/libguess-1.2/src/libguess/guess.c --- old/libguess-1.1/src/libguess/guess.c 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/src/libguess/guess.c 2014-07-15 02:40:13.000000000 +0200 @@ -1,56 +1,50 @@ +#include <strings.h> + #include "libguess.h" -mowgli_patricia_t *guess_impl_list = NULL; +struct guess_impl { + const char *lang; + guess_impl_f impl; +}; -void strcasecanon(char *str) -{ - while (*str) - { - *str = toupper(*str); - str++; - } -} +static const struct guess_impl guess_impl_list[] = { + {GUESS_REGION_JP, guess_jp}, + {GUESS_REGION_TW, guess_tw}, + {GUESS_REGION_CN, guess_cn}, + {GUESS_REGION_KR, guess_kr}, + {GUESS_REGION_RU, guess_ru}, + {GUESS_REGION_AR, guess_ar}, + {GUESS_REGION_TR, guess_tr}, + {GUESS_REGION_GR, guess_gr}, + {GUESS_REGION_HW, guess_hw}, + {GUESS_REGION_PL, guess_pl}, + {GUESS_REGION_BL, guess_bl}, +}; -static void -guess_impl_register(const char *lang, guess_impl_f impl) +static guess_impl_f +guess_find_impl(const char *lang) { - return_if_fail(guess_impl_list != NULL); + int i; - mowgli_patricia_add(guess_impl_list, lang, impl); + for (i = 0; i < sizeof(guess_impl_list) / sizeof(guess_impl_list[0]); i++) { + if (!strcasecmp(guess_impl_list[i].lang, lang)) + return guess_impl_list[i].impl; + } + + return 0; } -static void -guess_init(void) +void +libguess_init(void) { - mowgli_init(); - - /* check if already initialized */ - if (guess_impl_list != NULL) - return; - - guess_impl_list = mowgli_patricia_create(strcasecanon); - - guess_impl_register(GUESS_REGION_JP, guess_jp); - guess_impl_register(GUESS_REGION_TW, guess_tw); - guess_impl_register(GUESS_REGION_CN, guess_cn); - guess_impl_register(GUESS_REGION_KR, guess_kr); - guess_impl_register(GUESS_REGION_RU, guess_ru); - guess_impl_register(GUESS_REGION_AR, guess_ar); - guess_impl_register(GUESS_REGION_TR, guess_tr); - guess_impl_register(GUESS_REGION_GR, guess_gr); - guess_impl_register(GUESS_REGION_HW, guess_hw); - guess_impl_register(GUESS_REGION_PL, guess_pl); - guess_impl_register(GUESS_REGION_BL, guess_bl); + /* provided for API compatibility with older versions */ } const char * libguess_determine_encoding(const char *inbuf, int buflen, const char *lang) { - guess_impl_f impl; - - guess_init(); + guess_impl_f impl = guess_find_impl(lang); - impl = mowgli_patricia_retrieve(guess_impl_list, lang); if (impl != NULL) return impl(inbuf, buflen); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/src/libguess/libguess.h new/libguess-1.2/src/libguess/libguess.h --- old/libguess-1.1/src/libguess/libguess.h 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/src/libguess/libguess.h 2014-07-15 02:40:13.000000000 +0200 @@ -44,8 +44,6 @@ /* prototypes */ #ifdef LIBGUESS_CORE -#include <mowgli.h> - #include "autoconf.h" const char *guess_jp(const char *buf, int buflen); @@ -82,4 +80,9 @@ const char *libguess_determine_encoding(const char *buf, int buflen, const char *langset); +/* This function does nothing. It is provided for API-compatibility with + * libguess 1.2, which required calling this before using it from multiple + * threads. */ +void libguess_init(void); + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libguess-1.1/src/tests/Makefile new/libguess-1.2/src/tests/Makefile --- old/libguess-1.1/src/tests/Makefile 2011-12-01 14:00:59.000000000 +0100 +++ new/libguess-1.2/src/tests/Makefile 2014-07-15 02:40:13.000000000 +0200 @@ -4,5 +4,5 @@ include ../../buildsys.mk include ../../extra.mk -CPPFLAGS += ${MOWGLI_CFLAGS} -I../libguess -LIBS += ${MOWGLI_LIBS} -L../libguess -lguess +CPPFLAGS += -I../libguess +LIBS += -L../libguess -lguess -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
