From 73eabee5220bdce792b25c83391597d84b7e0812 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Tue, 22 Apr 2014 11:08:31 +0200 Subject: [PATCH] Imported Upstream version 1.3.1 --- NEWS | 6 ++++++ configure | 34 ++++++++++++++++++++++++---------- configure.ac | 3 ++- po/fr.gmo | Bin 710 -> 710 bytes po/fr.po | 4 ++-- po/ppastats.pot | 6 +++--- src/lp_ws.c | 7 +++++-- src/ppastats.1 | 2 +- src/ppastats.c | 3 ++- tests/Makefile.am | 6 ++++-- tests/Makefile.in | 17 +++++++++-------- themes/default/templates/footer.tpl | 2 +- 12 files changed, 59 insertions(+), 31 deletions(-) diff --git a/NEWS b/NEWS index c76514a..1b09d49 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +v1.3.1 +------ + +* fixed compilation when cppcheck is not installed. +* fixed line over 80cols. + v1.3.0 ------ diff --git a/configure b/configure index 57b0e6c..160f305 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ppastats 1.3.0. +# Generated by GNU Autoconf 2.69 for ppastats 1.3.1. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ppastats' PACKAGE_TARNAME='ppastats' -PACKAGE_VERSION='1.3.0' -PACKAGE_STRING='ppastats 1.3.0' +PACKAGE_VERSION='1.3.1' +PACKAGE_STRING='ppastats 1.3.1' PACKAGE_BUGREPORT='jeanfi@gmail.com' PACKAGE_URL='http://wpitchoune.net/ppastats' @@ -627,6 +627,8 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +CPPCHECK_FALSE +CPPCHECK_TRUE HAVE_CPPCHECK HELP2MAN JSON_FALSE @@ -1319,7 +1321,7 @@ if test "$ac_init_help" = "long"; then # 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 ppastats 1.3.0 to adapt to many kinds of systems. +\`configure' configures ppastats 1.3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1395,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ppastats 1.3.0:";; + short | recursive ) echo "Configuration of ppastats 1.3.1:";; esac cat <<\_ACEOF @@ -1507,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ppastats configure 1.3.0 +ppastats configure 1.3.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1863,7 +1865,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ppastats $as_me 1.3.0, which was +It was created by ppastats $as_me 1.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2728,7 +2730,7 @@ fi # Define the identity of the package. PACKAGE='ppastats' - VERSION='1.3.0' + VERSION='1.3.1' cat >>confdefs.h <<_ACEOF @@ -7144,6 +7146,14 @@ $as_echo "no" >&6; } fi + if test -n "$HAVE_CPPCHECK"; then + CPPCHECK_TRUE= + CPPCHECK_FALSE='#' +else + CPPCHECK_TRUE='#' + CPPCHECK_FALSE= +fi + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -7282,6 +7292,10 @@ if test -z "${JSON_TRUE}" && test -z "${JSON_FALSE}"; then as_fn_error $? "conditional \"JSON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${CPPCHECK_TRUE}" && test -z "${CPPCHECK_FALSE}"; then + as_fn_error $? "conditional \"CPPCHECK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -7679,7 +7693,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ppastats $as_me 1.3.0, which was +This file was extended by ppastats $as_me 1.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7746,7 +7760,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ppastats config.status 1.3.0 +ppastats config.status 1.3.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 55b1f53..ac991b4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.64]) -AC_INIT([ppastats], [1.3.0],[jeanfi@gmail.com],[ppastats],[http://wpitchoune.net/ppastats]) +AC_INIT([ppastats], [1.3.1],[jeanfi@gmail.com],[ppastats],[http://wpitchoune.net/ppastats]) AM_INIT_AUTOMAKE([-Wall gnu]) @@ -64,5 +64,6 @@ AC_CONFIG_FILES([ po/Makefile.in AC_CHECK_PROGS([HELP2MAN], [help2man]) AC_CHECK_PROG(HAVE_CPPCHECK, cppcheck, yes) +AM_CONDITIONAL(CPPCHECK, test -n "$HAVE_CPPCHECK") AC_OUTPUT diff --git a/po/fr.gmo b/po/fr.gmo index 350516e13aaa4379621eca843d88842fc90961a3..8f4629dd217bb3bcfd60f6d2908edd32d7b5dff0 100644 GIT binary patch delta 18 ZcmX@cdW?00J0q*1ft9JnW*^2XMgTTY1s4DS delta 18 ZcmX@cdW?00J0q)sp_QrmW*^2XMgTTR1r`7R diff --git a/po/fr.po b/po/fr.po index 3caff03..03743ff 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ppastats 0.0.x\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2014-04-22 01:57+0200\n" +"POT-Creation-Date: 2014-04-22 10:58+0200\n" "PO-Revision-Date: 2012-05-05 23:45+0200\n" "Last-Translator: \n" "Language-Team: French\n" @@ -148,7 +148,7 @@ msgstr "" msgid "Failed to retrieve PPA information" msgstr "" -#: src/ppastats.c:373 +#: src/ppastats.c:374 #, c-format msgid "Failed to retrieve download totals for %s" msgstr "" diff --git a/po/ppastats.pot b/po/ppastats.pot index d4f3e61..6bc7dff 100644 --- a/po/ppastats.pot +++ b/po/ppastats.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ppastats 1.3.0\n" +"Project-Id-Version: ppastats 1.3.1\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2014-04-22 01:57+0200\n" +"POT-Creation-Date: 2014-04-22 10:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -138,7 +138,7 @@ msgstr "" msgid "Failed to retrieve PPA information" msgstr "" -#: src/ppastats.c:373 +#: src/ppastats.c:374 #, c-format msgid "Failed to retrieve download totals for %s" msgstr "" diff --git a/src/lp_ws.c b/src/lp_ws.c index 49166f4..f04f169 100644 --- a/src/lp_ws.c +++ b/src/lp_ws.c @@ -409,7 +409,9 @@ static struct daily_download_total **retrieve_ddts(const char *binary_url, ddts = NULL; while (date_since < crt) { - url = create_ddts_query(binary_url, date_since, date_since); + url = create_ddts_query(binary_url, + date_since, + date_since); json = get_json_object(url); free(url); @@ -428,7 +430,8 @@ static struct daily_download_total **retrieve_ddts(const char *binary_url, free(url); if (json) { - tmp = json_object_to_daily_download_totals(json); + tmp = json_object_to_daily_download_totals + (json); json_object_put(json); ddts = ddts_merge(ddts, tmp); free(tmp); diff --git a/src/ppastats.1 b/src/ppastats.1 index c2e63e7..4b17424 100644 --- a/src/ppastats.1 +++ b/src/ppastats.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1. -.TH PPASTATS "1" "April 2014" "ppastats 1.3.0" "User Commands" +.TH PPASTATS "1" "April 2014" "ppastats 1.3.1" "User Commands" .SH NAME ppastats \- PPA Statistics command line tool .SH SYNOPSIS diff --git a/src/ppastats.c b/src/ppastats.c index 0990e0f..39b2d87 100644 --- a/src/ppastats.c +++ b/src/ppastats.c @@ -368,7 +368,8 @@ create_ppa_stats(const char *owner, for (h_cur = history; *h_cur; ++h_cur) { h = *h_cur; - totals = get_daily_download_totals(h->self_link, h->date_created); + totals = get_daily_download_totals(h->self_link, + h->date_created); if (!totals) { log_err(_("Failed to retrieve download totals for %s"), h->self_link); diff --git a/tests/Makefile.am b/tests/Makefile.am index a94900d..e80d69c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,8 +8,7 @@ EXTRA_DIST = \ test_strrep.c \ test_ptime.c -TESTS = test-cppcheck.sh \ - test-strrep \ +TESTS = test-strrep \ test-ptime check_PROGRAMS = test-strrep test-ptime @@ -26,3 +25,6 @@ test_ptime_SOURCES = \ $(top_builddir)/src/ptime.c test_ptime_CFLAGS = -I$(top_srcdir)/src +if CPPCHECK +TESTS += test-cppcheck.sh +endif \ No newline at end of file diff --git a/tests/Makefile.in b/tests/Makefile.in index 35f4969..4d38788 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -77,8 +77,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -TESTS = test-cppcheck.sh test-strrep$(EXEEXT) test-ptime$(EXEEXT) +TESTS = test-strrep$(EXEEXT) test-ptime$(EXEEXT) $(am__append_1) check_PROGRAMS = test-strrep$(EXEEXT) test-ptime$(EXEEXT) +@CPPCHECK_TRUE@am__append_1 = test-cppcheck.sh subdir = tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(top_srcdir)/test-driver @@ -831,13 +832,6 @@ recheck: all $(check_PROGRAMS) am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? -test-cppcheck.sh.log: test-cppcheck.sh - @p='test-cppcheck.sh'; \ - b='test-cppcheck.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) test-strrep.log: test-strrep$(EXEEXT) @p='test-strrep$(EXEEXT)'; \ b='test-strrep'; \ @@ -852,6 +846,13 @@ test-ptime.log: test-ptime$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-cppcheck.sh.log: test-cppcheck.sh + @p='test-cppcheck.sh'; \ + b='test-cppcheck.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ diff --git a/themes/default/templates/footer.tpl b/themes/default/templates/footer.tpl index 901d1db..7041fab 100644 --- a/themes/default/templates/footer.tpl +++ b/themes/default/templates/footer.tpl @@ -1,5 +1,5 @@ -- 2.7.4