diff -Nru libtorrent-rasterbar-1.0.9/aclocal.m4 libtorrent-rasterbar-1.0.11/aclocal.m4 --- libtorrent-rasterbar-1.0.9/aclocal.m4 2016-02-28 07:29:54.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/aclocal.m4 2017-02-04 18:26:54.000000000 +0000 @@ -645,6 +645,42 @@ rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2014 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. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. diff -Nru libtorrent-rasterbar-1.0.9/bindings/Makefile.in libtorrent-rasterbar-1.0.11/bindings/Makefile.in --- libtorrent-rasterbar-1.0.9/bindings/Makefile.in 2016-02-28 07:29:57.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/Makefile.in 2017-02-04 18:26:57.000000000 +0000 @@ -246,6 +246,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -354,7 +355,7 @@ all: all-recursive .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -378,9 +379,9 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff -Nru libtorrent-rasterbar-1.0.9/bindings/python/Makefile.am libtorrent-rasterbar-1.0.11/bindings/python/Makefile.am --- libtorrent-rasterbar-1.0.9/bindings/python/Makefile.am 2016-02-28 07:24:02.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/python/Makefile.am 2017-02-04 18:16:32.000000000 +0000 @@ -33,15 +33,15 @@ if ENABLE_PYTHON_BINDING all-local: - $(PYTHON) setup.py build + $(PYTHON) $(srcdir)/setup.py build install-exec-local: - $(PYTHON) setup.py install @PYTHON_INSTALL_PARAMS@ + $(PYTHON) $(srcdir)/setup.py install @PYTHON_INSTALL_PARAMS@ uninstall-local: rm -rf $(DESTDIR)$(libdir)/python*/*-packages/*libtorrent* clean-local: - $(PYTHON) setup.py clean --all + $(PYTHON) $(srcdir)/setup.py clean --all endif diff -Nru libtorrent-rasterbar-1.0.9/bindings/python/Makefile.in libtorrent-rasterbar-1.0.11/bindings/python/Makefile.in --- libtorrent-rasterbar-1.0.9/bindings/python/Makefile.in 2016-02-28 07:29:57.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/python/Makefile.in 2017-02-04 18:26:57.000000000 +0000 @@ -187,6 +187,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -324,7 +325,7 @@ all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -348,9 +349,9 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): link_flags: $(top_builddir)/config.status $(srcdir)/link_flags.in @@ -435,9 +436,9 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@ENABLE_PYTHON_BINDING_FALSE@install-exec-local: @ENABLE_PYTHON_BINDING_FALSE@uninstall-local: @ENABLE_PYTHON_BINDING_FALSE@clean-local: -@ENABLE_PYTHON_BINDING_FALSE@install-exec-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am @@ -523,16 +524,16 @@ @ENABLE_PYTHON_BINDING_TRUE@all-local: -@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) setup.py build +@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) $(srcdir)/setup.py build @ENABLE_PYTHON_BINDING_TRUE@install-exec-local: -@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) setup.py install @PYTHON_INSTALL_PARAMS@ +@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) $(srcdir)/setup.py install @PYTHON_INSTALL_PARAMS@ @ENABLE_PYTHON_BINDING_TRUE@uninstall-local: @ENABLE_PYTHON_BINDING_TRUE@ rm -rf $(DESTDIR)$(libdir)/python*/*-packages/*libtorrent* @ENABLE_PYTHON_BINDING_TRUE@clean-local: -@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) setup.py clean --all +@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) $(srcdir)/setup.py clean --all # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libtorrent-rasterbar-1.0.9/bindings/python/setup.py libtorrent-rasterbar-1.0.11/bindings/python/setup.py --- libtorrent-rasterbar-1.0.9/bindings/python/setup.py 2016-02-28 07:24:18.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/python/setup.py 2017-02-04 18:20:52.000000000 +0000 @@ -95,7 +95,7 @@ flag for flag in get_config_var('OPT').split() if flag != '-Wstrict-prototypes') source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src")) - source_list = [os.path.join("src", s) for s in source_list if s.endswith(".cpp")] + source_list = [os.path.abspath(os.path.join(os.path.dirname(__file__), "src", s)) for s in source_list if s.endswith(".cpp")] ext = [Extension('libtorrent', sources = source_list, @@ -108,7 +108,7 @@ libraries = ['torrent-rasterbar'] + parse_cmd(extra_cmd, '-l'))] setup(name = 'python-libtorrent', - version = '1.0.9', + version = '1.0.11', author = 'Arvid Norberg', author_email = 'arvid@libtorrent.org', description = 'Python bindings for libtorrent-rasterbar', diff -Nru libtorrent-rasterbar-1.0.9/bindings/python/src/alert.cpp libtorrent-rasterbar-1.0.11/bindings/python/src/alert.cpp --- libtorrent-rasterbar-1.0.9/bindings/python/src/alert.cpp 2016-02-28 07:24:02.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/python/src/alert.cpp 2017-02-04 18:16:32.000000000 +0000 @@ -6,14 +6,15 @@ #include #include #include +#include "bytes.hpp" using namespace boost::python; using namespace libtorrent; -std::string get_buffer(read_piece_alert const& rpa) +bytes get_buffer(read_piece_alert const& rpa) { - return rpa.buffer ? std::string(rpa.buffer.get(), rpa.size) - : std::string(); + return rpa.buffer ? bytes(rpa.buffer.get(), rpa.size) + : bytes(); } tuple endpoint_to_tuple(tcp::endpoint const& ep) @@ -99,7 +100,11 @@ using boost::noncopyable; #if BOOST_VERSION >= 106000 - register_ptr_to_python >(); + if (boost::python::converter::registry::query( + boost::python::type_id >()) == NULL) + { + register_ptr_to_python >(); + } #endif { @@ -530,7 +535,7 @@ ; class_, noncopyable>( "torrent_need_cert_alert", no_init) - .def_readonly("error", &torrent_need_cert_alert::error) + .def_readonly("error", &torrent_need_cert_alert::error) ; class_, noncopyable>( diff -Nru libtorrent-rasterbar-1.0.9/bindings/python/src/bytes.hpp libtorrent-rasterbar-1.0.11/bindings/python/src/bytes.hpp --- libtorrent-rasterbar-1.0.9/bindings/python/src/bytes.hpp 2015-10-16 00:21:22.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/python/src/bytes.hpp 2017-02-04 18:16:32.000000000 +0000 @@ -9,7 +9,14 @@ struct bytes { + bytes(char const* s, int len): arr(s, len) {} bytes(std::string const& s): arr(s) {} +#if __cplusplus >= 201103L + bytes(std::string&& s): arr(std::move(s)) {} + bytes(bytes const&) = default; + bytes(bytes&&) = default; + bytes& operator=(bytes&&) = default; +#endif bytes() {} std::string arr; }; diff -Nru libtorrent-rasterbar-1.0.9/bindings/python/src/torrent_handle.cpp libtorrent-rasterbar-1.0.11/bindings/python/src/torrent_handle.cpp --- libtorrent-rasterbar-1.0.9/bindings/python/src/torrent_handle.cpp 2016-02-28 07:24:02.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/python/src/torrent_handle.cpp 2017-02-04 18:16:33.000000000 +0000 @@ -125,7 +125,11 @@ object iter_obj = object( handle<>( PyObject_GetIter( o.ptr() ) )); while( 1 ) { +#if PY_MAJOR_VERSION >= 3 + object obj = extract( iter_obj.attr( "__next__" )() ); +#else object obj = extract( iter_obj.attr( "next" )() ); +#endif result.push_back(extract( obj )); } } @@ -145,7 +149,11 @@ object iter_obj = object( handle<>( PyObject_GetIter( o.ptr() ) )); while( 1 ) { +#if PY_MAJOR_VERSION >= 3 + object obj = extract( iter_obj.attr( "__next__" )() ); +#else object obj = extract( iter_obj.attr( "next" )() ); +#endif result.push_back(extract( obj )); } } diff -Nru libtorrent-rasterbar-1.0.9/bindings/python/src/torrent_info.cpp libtorrent-rasterbar-1.0.11/bindings/python/src/torrent_info.cpp --- libtorrent-rasterbar-1.0.9/bindings/python/src/torrent_info.cpp 2016-02-28 07:24:02.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/bindings/python/src/torrent_info.cpp 2017-02-04 18:16:33.000000000 +0000 @@ -128,14 +128,13 @@ return result; } - std::string hash_for_piece(torrent_info const& ti, int i) + bytes hash_for_piece(torrent_info const& ti, int i) { - return ti.hash_for_piece(i).to_string(); + return bytes(ti.hash_for_piece(i).to_string()); } - std::string metadata(torrent_info const& ti) { - std::string result(ti.metadata().get(), ti.metadata_size()); - return result; + bytes metadata(torrent_info const& ti) { + return bytes(ti.metadata().get(), ti.metadata_size()); } list map_block(torrent_info& ti, int piece, size_type offset, int size) diff -Nru libtorrent-rasterbar-1.0.9/ChangeLog libtorrent-rasterbar-1.0.11/ChangeLog --- libtorrent-rasterbar-1.0.9/ChangeLog 2016-02-28 07:24:02.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/ChangeLog 2017-02-04 18:21:02.000000000 +0000 @@ -1,3 +1,23 @@ +1.0.11 release + + * updating super seeding would include the torrent in state_update_alert + * finished non-seed torrents can also be in super-seeding mode + * make torrent_info::is_valid() return false if torrent failed to load + * fix torrent_status time_since_upload/download counters for paused torrents + * fix bug in last-seen-complete + * fix DHT announce stall when adding torrent immediately after startup + * fix bug in enumeration of network interfaces on windows + * fix padfile issue + * fix PMTUd bug + * update puff to fix gzip crash + +1.0.10 release + + * fixed inverted priority of incoming piece suggestions + * fixed crash on invalid input in http_parser + * added a new "preformatted" type to bencode entry variant type + * fix division by zero in super-seeding logic + 1.0.9 release * fix issue in checking outgoing interfaces (when that option is enabled) diff -Nru libtorrent-rasterbar-1.0.9/CMakeLists.txt libtorrent-rasterbar-1.0.11/CMakeLists.txt --- libtorrent-rasterbar-1.0.9/CMakeLists.txt 2016-02-28 07:24:18.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/CMakeLists.txt 2017-02-04 18:20:52.000000000 +0000 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(libtorrent) set (SOVERSION "8") -set (VERSION "1.0.9") +set (VERSION "1.0.11") set(sources web_connection_base diff -Nru libtorrent-rasterbar-1.0.9/configure libtorrent-rasterbar-1.0.11/configure --- libtorrent-rasterbar-1.0.9/configure 2016-02-28 07:29:56.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/configure 2017-02-04 18:26:55.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libtorrent-rasterbar 1.0.9. +# Generated by GNU Autoconf 2.69 for libtorrent-rasterbar 1.0.11. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='libtorrent-rasterbar' PACKAGE_TARNAME='libtorrent-rasterbar' -PACKAGE_VERSION='1.0.9' -PACKAGE_STRING='libtorrent-rasterbar 1.0.9' +PACKAGE_VERSION='1.0.11' +PACKAGE_STRING='libtorrent-rasterbar 1.0.11' PACKAGE_BUGREPORT='arvid@libtorrent.org' PACKAGE_URL='http://www.libtorrent.org' @@ -704,6 +704,9 @@ GREP SED LIBTOOL +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE @@ -812,6 +815,7 @@ enable_option_checking enable_silent_rules enable_dependency_tracking +enable_maintainer_mode enable_shared enable_static with_pic @@ -1404,7 +1408,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 libtorrent-rasterbar 1.0.9 to adapt to many kinds of systems. +\`configure' configures libtorrent-rasterbar 1.0.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1476,7 +1480,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libtorrent-rasterbar 1.0.9:";; + short | recursive ) echo "Configuration of libtorrent-rasterbar 1.0.11:";; esac cat <<\_ACEOF @@ -1490,6 +1494,9 @@ do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --disable-maintainer-mode + disable make rules and dependencies not useful (and + sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1651,7 +1658,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libtorrent-rasterbar configure 1.0.9 +libtorrent-rasterbar configure 1.0.11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2141,7 +2148,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libtorrent-rasterbar $as_me 1.0.9, which was +It was created by libtorrent-rasterbar $as_me 1.0.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4764,7 +4771,7 @@ # Define the identity of the package. PACKAGE='libtorrent-rasterbar' - VERSION='1.0.9' + VERSION='1.0.11' cat >>confdefs.h <<_ACEOF @@ -5114,6 +5121,28 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + $as_echo $as_echo "Initializing Libtool:" @@ -17139,14 +17168,14 @@ # Check whether --with-boost-system was given. if test "${with_boost_system+set}" = set; then : withval=$with_boost_system; - if test "x$withval" = "xno"; then + if test "$withval" = "no"; then want_boost="no" - elif test "x$withval" = "xyes"; then + elif test "$withval" = "yes"; then want_boost="yes" ax_boost_user_system_lib="" else want_boost="yes" - ax_boost_user_system_lib="$withval" + ax_boost_user_system_lib="$withval" fi else @@ -17178,6 +17207,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CXXFLAGS_SAVE=$CXXFLAGS + CXXFLAGS= cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17185,7 +17215,7 @@ int main () { -boost::system::system_category +boost::system::error_category *a = 0; ; return 0; } @@ -17211,13 +17241,13 @@ -$as_echo "#define HAVE_BOOST_SYSTEM 1" >>confdefs.h +$as_echo "#define HAVE_BOOST_SYSTEM /**/" >>confdefs.h BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'` LDFLAGS_SAVE=$LDFLAGS if test "x$ax_boost_user_system_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_system*.{so,dylib,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;' -e 's;^lib\(boost_system.*\)\.dylib$;\1;'` ; do + for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do ax_lib=${libextension} as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 @@ -17263,9 +17293,9 @@ link_system="no" fi - done + done if test "x$link_system" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'` ; do + for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do ax_lib=${libextension} as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 @@ -17311,7 +17341,7 @@ link_system="no" fi - done + done fi else @@ -17363,13 +17393,16 @@ done fi + if test "x$ax_lib" = "x"; then + as_fn_error $? "Could not find a version of the library!" "$LINENO" 5 + fi if test "x$link_system" = "xno"; then as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5 fi fi CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" fi if test -z "$BOOST_SYSTEM_LIB"; then : @@ -19176,7 +19209,7 @@ # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 $as_echo_n "checking for the distutils Python package... " >&6; } - ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1 | grep -v '^\[0-9]\{1,\} refs\'` if test -z "$ac_distutils_result"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -19486,7 +19519,7 @@ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'` for ax_lib in $ax_python_lib $ax_boost_python_lib `ls $BOOSTLIBDIR/libboost_python*.so* $BOOSTLIBDIR/libboost_python*.dylib* $BOOSTLIBDIR/libboost_python*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_python.*\)\.so.*$;\1;' -e 's;^lib\(boost_python.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_python.*\)\.a.*$;\1;' ` boost_python boost_python3; do - as_ax_Lib=`$as_echo "ax_cv_lib_$ax_lib''_BOOST_PYTHON_MODULE" | $as_tr_sh` + as_ax_Lib=`$as_echo "ax_cv_lib_$ax_lib''_main" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ax_lib is the correct library" >&5 $as_echo_n "checking whether $ax_lib is the correct library... " >&6; } if eval \${$as_ax_Lib+:} false; then : @@ -19496,8 +19529,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; } + int main () { @@ -20570,10 +20602,10 @@ -# Try to guess real svn revision if any, fallback to hardcoded otherwise -SVN_REVISION=`svn info 2>/dev/null | sed -n -e '/^URL\:.*libtorrent.svn.sourceforge.net/,$!d;s,^Revision\: \([0-9]*\)$,\1,p'` -if test -z "$SVN_REVISION"; then : - SVN_REVISION=`sed -n -e 's/^#define LIBTORRENT_REVISION \"\$Rev\: \([0-9]*\) \$\" $/\1/p' include/libtorrent/version.hpp` +# Try to guess real git revision if any, fallback to hardcoded otherwise +GIT_REVISION=`git log -1 --format=format:%h 2>/dev/null` +if test -z "$GIT_REVISION"; then : + GIT_REVISION=`sed -n -e "s/^#define LIBTORRENT_REVISION \"\([0-9a-z]*\)\"$/\1/p" $(dirname $0)/include/libtorrent/version.hpp` fi @@ -20760,6 +20792,10 @@ am__EXEEXT_FALSE= fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_DHT_TRUE}" && test -z "${ENABLE_DHT_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DHT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -21181,7 +21217,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libtorrent-rasterbar $as_me 1.0.9, which was +This file was extended by libtorrent-rasterbar $as_me 1.0.11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21239,7 +21275,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libtorrent-rasterbar config.status 1.0.9 +libtorrent-rasterbar config.status 1.0.11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -23039,7 +23075,7 @@ Package: name: ${PACKAGE_NAME} version: ${PACKAGE_VERSION} - svn revision: ${SVN_REVISION} + git revision: ${GIT_REVISION} Build environment: build system: ${build} diff -Nru libtorrent-rasterbar-1.0.9/configure.ac libtorrent-rasterbar-1.0.11/configure.ac --- libtorrent-rasterbar-1.0.9/configure.ac 2016-02-28 07:24:18.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/configure.ac 2017-02-04 18:20:52.000000000 +0000 @@ -5,7 +5,7 @@ AC_PREREQ([2.63]) -AC_INIT([libtorrent-rasterbar],[1.0.9],[arvid@libtorrent.org], +AC_INIT([libtorrent-rasterbar],[1.0.11],[arvid@libtorrent.org], [libtorrent-rasterbar],[http://www.libtorrent.org]) AC_CONFIG_SRCDIR([src/torrent.cpp]) AC_CONFIG_AUX_DIR([build-aux]) @@ -79,7 +79,7 @@ AS_ECHO AS_ECHO "Initializing Automake:" AM_INIT_AUTOMAKE([1.11 foreign]) - +AM_MAINTAINER_MODE([enable]) AS_ECHO AS_ECHO "Initializing Libtool:" @@ -686,10 +686,10 @@ AC_SUBST(COMPILETIME_OPTIONS) -# Try to guess real svn revision if any, fallback to hardcoded otherwise -SVN_REVISION=`svn info 2>/dev/null | sed -n -e '/^URL\:.*libtorrent.svn.sourceforge.net/,$!d;s,^Revision\: \([[0-9]]*\)$,\1,p'` -AS_IF([test -z "$SVN_REVISION"], - [SVN_REVISION=`sed -n -e 's/^#define LIBTORRENT_REVISION \"\$Rev\: \([0-9]*\) \$\" $/\1/p' include/libtorrent/version.hpp`]) +# Try to guess real git revision if any, fallback to hardcoded otherwise +GIT_REVISION=`git log -1 --format=format:%h 2>/dev/null` +AS_IF([test -z "$GIT_REVISION"], + [GIT_REVISION=`sed -n -e "s/^#define LIBTORRENT_REVISION \"\([0-9a-z]*\)\"$/\1/p" $(dirname $0)/include/libtorrent/version.hpp`]) ############################################################################### @@ -732,7 +732,7 @@ Package: name: ${PACKAGE_NAME} version: ${PACKAGE_VERSION} - svn revision: ${SVN_REVISION} + git revision: ${GIT_REVISION} Build environment: build system: ${build} @@ -832,7 +832,7 @@ OpenSSL Libs: ${OPENSSL_LIBS} OpenSSL LDFlags: ${OPENSSL_LDFLAGS} OpenSSL Includes: ${OPENSSL_INCLUDES} -END +END ]) cat config.report diff -Nru libtorrent-rasterbar-1.0.9/debian/changelog libtorrent-rasterbar-1.0.11/debian/changelog --- libtorrent-rasterbar-1.0.9/debian/changelog 2016-07-13 10:37:11.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/debian/changelog 2017-02-14 16:22:36.000000000 +0000 @@ -1,9 +1,16 @@ -libtorrent-rasterbar (1.0.9-1~trusty~ppa4) trusty; urgency=low +libtorrent-rasterbar (1.0.11-1~trusty~ppa1) trusty; urgency=low + + * New upstream release + * Remove unneeded patches + + -- Calum Lind Tue, 14 Feb 2017 16:18:15 +0000 + +libtorrent-rasterbar (1.0.9-1~ppa1) unstable; urgency=low * New upstream release 1.0.9 - Add patch to revert ax_python_devel.m4 and ax_boost_python.m4 to 1.0.7 versions. - -- Calum Lind Wed, 13 Jul 2016 11:37:06 +0100 + -- Calum Lind Thu, 21 Jul 2016 13:08:18 +0100 libtorrent-rasterbar (1.0.7-1~ppa1) unstable; urgency=low diff -Nru libtorrent-rasterbar-1.0.9/debian/patches/fix_py_dev_m4.diff libtorrent-rasterbar-1.0.11/debian/patches/fix_py_dev_m4.diff --- libtorrent-rasterbar-1.0.9/debian/patches/fix_py_dev_m4.diff 2016-07-13 09:56:40.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/debian/patches/fix_py_dev_m4.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,426 +0,0 @@ -Index: libtorrent-rasterbar-1.0.9/m4/ax_python_devel.m4 -=================================================================== ---- libtorrent-rasterbar-1.0.9.orig/m4/ax_python_devel.m4 2016-07-13 10:55:35.617573093 +0100 -+++ libtorrent-rasterbar-1.0.9/m4/ax_python_devel.m4 2016-07-13 10:55:50.812976157 +0100 -@@ -1,5 +1,5 @@ - # =========================================================================== --# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html -+# http://www.nongnu.org/autoconf-archive/ax_python_devel.html - # =========================================================================== - # - # SYNOPSIS -@@ -12,9 +12,9 @@ - # in your configure.ac. - # - # This macro checks for Python and tries to get the include path to --# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output --# variables. It also exports $(PYTHON_EXTRA_LIBS) and --# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code. -+# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) -+# output variables. It also exports $(PYTHON_EXTRA_LIBS) -+# for embedding Python in your code. - # - # You can search for some particular version of Python by passing a - # parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please -@@ -34,12 +34,11 @@ - # LICENSE - # - # Copyright (c) 2009 Sebastian Huber --# Copyright (c) 2009 Alan W. Irwin -+# Copyright (c) 2009 Alan W. Irwin - # Copyright (c) 2009 Rafael Laboissiere --# Copyright (c) 2009 Andrew Collier -+# Copyright (c) 2009 Andrew Collier - # Copyright (c) 2009 Matteo Settenvini - # Copyright (c) 2009 Horst Knorr --# Copyright (c) 2013 Daniel Mullner - # - # 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 -@@ -67,8 +66,6 @@ - # modified version of the Autoconf Macro, you may extend this special - # exception to the GPL to apply to your modified version as well. - --#serial 18 -- - AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) - AC_DEFUN([AX_PYTHON_DEVEL],[ - # -@@ -99,8 +96,8 @@ - This version of the AC@&t@_PYTHON_DEVEL macro - doesn't work properly with versions of Python before - 2.1.0. You may need to re-run configure, setting the --variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG, --PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. -+variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, -+PYTHON_EXTRA_LIBS by hand. - Moreover, to disable this check, set PYTHON_NOVERSIONCHECK - to something else than an empty string. - ]) -@@ -120,7 +117,7 @@ - ver = sys.version.split ()[[0]]; \ - print (ver $1)"` - if test "$ac_supports_python_ver" = "True"; then -- AC_MSG_RESULT([yes]) -+ AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([this package requires Python $1. -@@ -136,7 +133,7 @@ - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) -- ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` -+ ac_distutils_result=`$PYTHON -c "import distutils" >/dev/null 2>&1` - if test -z "$ac_distutils_result"; then - AC_MSG_RESULT([yes]) - else -@@ -153,15 +150,9 @@ - AC_MSG_CHECKING([for Python include path]) - if test -z "$PYTHON_CPPFLAGS"; then - python_path=`$PYTHON -c "import distutils.sysconfig; \ -- print (distutils.sysconfig.get_python_inc ());"` -- plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ -- print (distutils.sysconfig.get_python_inc (plat_specific=1));"` -+ print (distutils.sysconfig.get_python_inc ());"` - if test -n "${python_path}"; then -- if test "${plat_python_path}" != "${python_path}"; then -- python_path="-I$python_path -I$plat_python_path" -- else -- python_path="-I$python_path" -- fi -+ python_path="-I$python_path" - fi - PYTHON_CPPFLAGS=$python_path - fi -@@ -172,7 +163,7 @@ - # Check for Python library path - # - AC_MSG_CHECKING([for Python library path]) -- if test -z "$PYTHON_LIBS"; then -+ if test -z "$PYTHON_LDFLAGS"; then - # (makes two attempts to ensure we've got a version number - # from the interpreter) - ac_python_version=`cat< -+# - Require AX_PYTHON_DEVEL to be called before this macro to properly -+# detect python include path, instead of AX_PYTHON. -+# 2009-09-07 Cristian Greco -+# - Prefix BOOST_PYTHON_LIB with a `-l` for consistency with other -+# ax_boost_libname.m4 scripts. - # - # LICENSE - # - # Copyright (c) 2008 Michael Tindal --# Copyright (c) 2013 Daniel M"ullner - # - # 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 -@@ -53,69 +59,45 @@ - # modified version of the Autoconf Macro, you may extend this special - # exception to the GPL to apply to your modified version as well. - --#serial 21 -- - AC_DEFUN([AX_BOOST_PYTHON], - [AC_REQUIRE([AX_PYTHON_DEVEL])dnl --AC_REQUIRE([AX_BOOST_BASE])dnl --AC_LANG_PUSH([C++]) --ax_boost_python_save_CPPFLAGS="$CPPFLAGS" --ax_boost_python_save_LDFLAGS="$LDFLAGS" --ax_boost_python_save_LIBS="$LIBS" --if test "x$PYTHON_CPPFLAGS" != "x"; then -- CPPFLAGS="$PYTHON_CPPFLAGS $CPPFLAGS" --fi -- --# Versions of AX_PYTHON_DEVEL() before serial 18 provided PYTHON_LDFLAGS --# instead of PYTHON_LIBS, so this is just here for compatibility. --if test "x$PYTHON_LDFLAGS" != "x"; then -- LDFLAGS="$PYTHON_LDFLAGS $LDFLAGS" --fi -- --# Note: Only versions of AX_PYTHON_DEVEL() since serial 18 provide PYTHON_LIBS --# instead of PYTHON_LDFLAGS. --if test "x$PYTHON_LIBS" != "x"; then -- LIBS="$PYTHON_LIBS $LIBS" --fi -- --if test "x$BOOST_CPPFLAGS" != "x"; then -- CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" --fi --if test "x$BOOST_LDFLAGS" != "x"; then -- LDFLAGS="$BOOST_LDFLAGS $LDFLAGS" --fi - AC_CACHE_CHECK(whether the Boost::Python library is available, - ac_cv_boost_python, --[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ --#include --BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], [])], -- ac_cv_boost_python=yes, ac_cv_boost_python=no) -+[AC_LANG_SAVE -+ AC_LANG_CPLUSPLUS -+ CPPFLAGS_SAVE=$CPPFLAGS -+ if test "x$PYTHON_CPPFLAGS" != "x"; then -+ CPPFLAGS="$PYTHON_CPPFLAGS $CPPFLAGS" -+ fi -+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ -+ #include -+ using namespace boost::python; -+ BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], -+ [[return 0;]]), -+ ac_cv_boost_python=yes, ac_cv_boost_python=no) -+ AC_LANG_RESTORE -+ CPPFLAGS=$CPPFLAGS_SAVE - ]) --if test "$ac_cv_boost_python" = "yes"; then -- AC_DEFINE(HAVE_BOOST_PYTHON,,[define if the Boost::Python library is available]) -+if test "x$ac_cv_boost_python" = "xyes"; then -+ AC_DEFINE(HAVE_BOOST_PYTHON,[1],[define if the Boost::Python library is available]) -+ dnl -+ LDFLAGS_SAVE=$LDFLAGS -+ if test "x$PYTHON_LDFLAGS" != "x"; then -+ LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS" -+ fi -+ dnl - ax_python_lib=boost_python -- AC_ARG_WITH([boost-python],AS_HELP_STRING([--with-boost-python],[specify yes/no or the boost python library or suffix to use]), -- [if test "x$with_boost_python" != "xno" -a "x$with_boost_python" != "xyes"; then -- ax_python_lib=$with_boost_python -- ax_boost_python_lib=boost_python-$with_boost_python -+ AC_ARG_WITH([boost-python],AS_HELP_STRING([--with-boost-python],[specify the boost python library or suffix to use]), -+ [if test "x$with_boost_python" != "xno"; then -+ ax_python_lib="$with_boost_python" -+ ax_boost_python_lib="boost_python-$with_boost_python" - fi]) -- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` -- for ax_lib in $ax_python_lib $ax_boost_python_lib `ls $BOOSTLIBDIR/libboost_python*.so* $BOOSTLIBDIR/libboost_python*.dylib* $BOOSTLIBDIR/libboost_python*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_python.*\)\.so.*$;\1;' -e 's;^lib\(boost_python.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_python.*\)\.a.*$;\1;' ` boost_python boost_python3; do -- AS_VAR_PUSHDEF([ax_Lib], [ax_cv_lib_$ax_lib''_BOOST_PYTHON_MODULE])dnl -- AC_CACHE_CHECK([whether $ax_lib is the correct library], [ax_Lib], -- [LIBS="-l$ax_lib $ax_boost_python_save_LIBS $PYTHON_LIBS" -- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ --#include --BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], [])], -- [AS_VAR_SET([ax_Lib], [yes])], -- [AS_VAR_SET([ax_Lib], [no])])]) -- AS_VAR_IF([ax_Lib], [yes], [BOOST_PYTHON_LIB=$ax_lib break], []) -- AS_VAR_POPDEF([ax_Lib])dnl -+ for ax_lib in $ax_python_lib $ax_boost_python_lib boost_python; do -+ AC_CHECK_LIB($ax_lib, main, [BOOST_PYTHON_LIB=-l$ax_lib break]) - done -+ dnl -+ LDFLAGS=$LDFLAGS_SAVE -+ dnl - AC_SUBST(BOOST_PYTHON_LIB) - fi --CPPFLAGS="$ax_boost_python_save_CPPFLAGS" --LDFLAGS="$ax_boost_python_save_LDFLAGS" --LIBS="$ax_boost_python_save_LIBS" --AC_LANG_POP([C++]) - ])dnl -Index: libtorrent-rasterbar-1.0.9/configure.ac -=================================================================== ---- libtorrent-rasterbar-1.0.9.orig/configure.ac 2016-02-28 07:24:18.000000000 +0000 -+++ libtorrent-rasterbar-1.0.9/configure.ac 2016-07-13 10:56:33.738552110 +0100 -@@ -564,7 +564,6 @@ - AS_IF([test -z "$BOOST_PYTHON_LIB"], - [AC_MSG_ERROR([Boost.Python library not found. Try using --with-boost-python=lib.])]) - -- BOOST_PYTHON_LIB="-l$BOOST_PYTHON_LIB" - ], - ["no"], [ - AC_MSG_RESULT([no]) -@@ -832,7 +831,7 @@ - OpenSSL Libs: ${OPENSSL_LIBS} - OpenSSL LDFlags: ${OPENSSL_LDFLAGS} - OpenSSL Includes: ${OPENSSL_INCLUDES} --END -+END - ]) - - cat config.report diff -Nru libtorrent-rasterbar-1.0.9/debian/patches/series libtorrent-rasterbar-1.0.11/debian/patches/series --- libtorrent-rasterbar-1.0.9/debian/patches/series 2016-07-12 11:07:43.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/debian/patches/series 2017-02-14 16:15:47.000000000 +0000 @@ -1,2 +1 @@ -fix_py_dev_m4.diff disable_clean_b2.diff diff -Nru libtorrent-rasterbar-1.0.9/debian/rules libtorrent-rasterbar-1.0.11/debian/rules --- libtorrent-rasterbar-1.0.9/debian/rules 2016-07-12 10:32:55.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/debian/rules 2017-02-14 15:59:25.000000000 +0000 @@ -3,7 +3,7 @@ DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk -export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -DNDEBUG PYTHON2=$(shell pyversions -vr) PYTHON3=$(shell py3versions -vr) diff -Nru libtorrent-rasterbar-1.0.9/docs/building.html libtorrent-rasterbar-1.0.11/docs/building.html --- libtorrent-rasterbar-1.0.9/docs/building.html 2016-02-28 07:25:40.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/docs/building.html 2017-02-04 18:21:49.000000000 +0000 @@ -3,7 +3,7 @@ - + libtorrent manual @@ -42,7 +42,7 @@ Author: Arvid Norberg, arvid@libtorrent.org Version: -1.0.9 +1.0.11
diff -Nru libtorrent-rasterbar-1.0.9/docs/building.rst libtorrent-rasterbar-1.0.11/docs/building.rst --- libtorrent-rasterbar-1.0.9/docs/building.rst 2016-02-28 07:24:18.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/docs/building.rst 2017-02-04 18:20:52.000000000 +0000 @@ -3,7 +3,7 @@ ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.0.9 +:Version: 1.0.11 .. contents:: Table of contents :depth: 2 diff -Nru libtorrent-rasterbar-1.0.9/docs/client_test.html libtorrent-rasterbar-1.0.11/docs/client_test.html --- libtorrent-rasterbar-1.0.9/docs/client_test.html 2016-02-28 07:25:40.000000000 +0000 +++ libtorrent-rasterbar-1.0.11/docs/client_test.html 2017-02-04 18:21:46.000000000 +0000 @@ -3,7 +3,7 @@ - + client_test example program