Hello community, here is the log from the commit of package libltc for openSUSE:Factory checked in at 2018-07-18 22:54:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libltc (Old) and /work/SRC/openSUSE:Factory/.libltc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libltc" Wed Jul 18 22:54:14 2018 rev:3 rq:622448 version:1.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libltc/libltc.changes 2016-02-26 00:35:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libltc.new/libltc.changes 2018-07-18 22:54:59.422751890 +0200 @@ -1,0 +2,11 @@ +Thu Jul 12 11:44:52 UTC 2018 - [email protected] + +- Update to version 1.3.0 + * fix potential offset overflow (user provided relative position) + * add link examples and bindings/wrapper code to documentation + * documentation spelling fixes + * fix endianess detection (gcc-4.4 compat) + * improve realtime safety, don't even print errors +- Drop oxygen buildrequirement and libltc_doxyfile_no_timestamp.patch + +------------------------------------------------------------------- Old: ---- libltc-1.1.4.tar.gz libltc_doxyfile_no_timestamp.patch New: ---- libltc-1.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libltc.spec ++++++ --- /var/tmp/diff_new_pack.6KIX53/_old 2018-07-18 22:54:59.926750219 +0200 +++ /var/tmp/diff_new_pack.6KIX53/_new 2018-07-18 22:54:59.926750219 +0200 @@ -1,7 +1,7 @@ # # spec file for package libltc # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,18 +18,14 @@ %define sover 11 Name: libltc -Version: 1.1.4 +Version: 1.3.0 Release: 0 Summary: Linear/longitudinal timecode library -License: LGPL-3.0+ +License: LGPL-3.0-or-later Group: Development/Libraries/C and C++ -Url: https://github.com/x42/libltc +URL: https://github.com/x42/libltc Source0: https://github.com/x42/libltc/releases/download/v%{version}/%{name}-%{version}.tar.gz -Patch0: libltc_doxyfile_no_timestamp.patch -BuildRequires: doxygen -BuildRequires: fdupes -BuildRequires: pkg-config -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pkgconfig %description Linear (or Longitudinal) Timecode (LTC) is an encoding of SMPTE timecode @@ -66,16 +62,15 @@ %prep %setup -q -%patch0 -p1 %build -%configure --disable-static -make %{?_smp_mflags} all dox +%configure \ + --disable-static +make %{?_smp_mflags} %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install -find %{buildroot} -type f -name '*.la' -delete -print -%fdupes -s doc/ +%make_install +find %{buildroot} -type f -name "*.la" -delete -print %check make %{?_smp_mflags} check @@ -84,16 +79,14 @@ %postun -n %{name}%{sover} -p /sbin/ldconfig %files -n %{name}%{sover} -%defattr(-,root,root) -%doc AUTHORS COPYING ChangeLog README.md +%license COPYING +%doc AUTHORS ChangeLog README.md %{_libdir}/libltc.so.* %files devel -%defattr(-,root,root) -%doc doc/html %{_includedir}/ltc.h %{_libdir}/libltc.so %{_libdir}/pkgconfig/ltc.pc -%{_mandir}/man3/ltc.h.3.gz +%{_mandir}/man3/ltc.h.3%{?ext_man} %changelog ++++++ libltc-1.1.4.tar.gz -> libltc-1.3.0.tar.gz ++++++ ++++ 26899 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/ChangeLog new/libltc-1.3.0/ChangeLog --- old/libltc-1.1.4/ChangeLog 2014-05-16 18:57:51.000000000 +0200 +++ new/libltc-1.3.0/ChangeLog 2016-12-23 04:46:25.000000000 +0100 @@ -1,3 +1,15 @@ +2016-12-23 (v1.3.0) Robin Gareus <[email protected]> +* fix potential offset overflow (user provided relative position) +* further improve MSVC compatibility (-infinity) +* fix self-test for windows (binary file i/o) +* add link examples and bindings/wrapper code to documentation +* documentation spelling fixes + +2015-11-26 (v1.2.0) Robin Gareus <[email protected]> +* support older MSVC without C99 +* fix endianess detection (gcc-4.4 compat) +* improve realtime safety, don't even print errors + 2014-05-16 (v1.1.4) Robin Gareus <[email protected]> * rework endianess detection * fix compile on systems w/o endian.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/compile new/libltc-1.3.0/compile --- old/libltc-1.1.4/compile 2013-11-09 16:18:09.000000000 +0100 +++ new/libltc-1.3.0/compile 2016-12-23 04:46:30.000000000 +0100 @@ -1,10 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-01-04.17; # UTC +scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free -# Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify @@ -79,6 +78,53 @@ esac } +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () @@ -109,43 +155,34 @@ ;; esac ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; -l*) - lib=${1#-l} - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - set x "$@" "$dir/$lib.dll.lib" - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - set x "$@" "$dir/$lib.lib" - break - fi - done - IFS=$save_IFS - - test "$found" != yes && set x "$@" "$lib.lib" + func_cl_dashl "${1#-l}" + set x "$@" "$lib" shift ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; -L*) - func_file_conv "${1#-L}" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" + func_cl_dashL "${1#-L}" ;; -static) shared=false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/doc/mainpage.dox new/libltc-1.3.0/doc/mainpage.dox --- old/libltc-1.1.4/doc/mainpage.dox 2013-11-09 16:13:07.000000000 +0100 +++ new/libltc-1.3.0/doc/mainpage.dox 2016-11-13 22:45:36.000000000 +0100 @@ -42,7 +42,11 @@ The self-test code lends itself as good examples on how to get started. See \ref ltcdecode.c, \ref ltcencode.c and \ref example_encode.c. - Another good starting point is <a href="https://github.com/x42/ltc-tools">ltc-tools</a>. + Other good starting point include + <ul> + <li><a href="https://github.com/x42/ltc-tools">ltc-tools</a> portable commandline-tools with file-i/o via <a href="https://github.com/erikd/libsndfile">libsndfile</a> and audio-i/o via <a hre="http://jackaudio.org/">libjack</a></li> + <li><a href="https://github.com/loupus/LtcWaveAudio">LtcWaveAudio</a>, a MSVC project to generate and play LTC by Hakan Soyalp.</li> + </ul> @section about Q&A @@ -76,9 +80,27 @@ Yes it does. See the documentation for \ref LTCFrameExt </dd> + <dt>Can I use libltc in a proprietary/closed-source project?</dt> + <dd> + Yes, with some care. In a nutshell:<br/> + Create a dynamic library (.dll, ,dylib, .so) of libltc and link your program against it. + Your project remains independent. + You only need to be able to convey means to re-create this library (source-code, build-scripts) to anyone who asks. + The easiest way to do this is to simply not modify libltc and refer to the upstream source (keep a copy just in case).<br/> + If you copy the library code directly into your project and statically link your application against it, + your project will have to be licensed in terms of the LGPL or a compatible license. + See the license text for details and consult with a person with expertise in licensing. + </dd> + + <dt>Is commercial licensing available?</dt> + <dd> + No, libltc is only available in terms of the GNU Lesser General Public License: + <a href="http://www.gnu.org/licenses/lgpl.txt">LGPLv3</a>.<br/> + </dd> + <dt>Is there [free] software is using libltc?</dt> <dd> - yes, <a href="https://github.com/x42/ltc-tools">ltc-tools</a>. + Yes, <a href="https://github.com/x42/ltc-tools">ltc-tools</a>. It comprises <a href="http://jackaudio.org">JACK</a> applications to generate and decode LTC from live sources and includes tools to read or write LTC from/to audio-files. @@ -186,6 +208,7 @@ <li><a href="http://www.barney-wol.net/time/timecode.html">Barney Wol's Timecode page</a></li> <li><a href="http://en.wikipedia.org/wiki/Linear_timecode">Wikipedia Info on Linear Timecode</a></li> <li><a href="http://en.wikipedia.org/wiki/SMPTE_timecode">Wikipedia Page on SMPTE</a></li> + <li><a href="https://github.com/BernsteinA/libltc-jni">Java wrapper around libltc</a></li> </ul> @section license License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/doc/man/man3/ltc.h.3 new/libltc-1.3.0/doc/man/man3/ltc.h.3 --- old/libltc-1.1.4/doc/man/man3/ltc.h.3 2014-05-16 19:00:59.000000000 +0200 +++ new/libltc-1.3.0/doc/man/man3/ltc.h.3 2016-12-23 04:46:33.000000000 +0100 @@ -1,14 +1,17 @@ -.TH "ltc.h" 3 "Fri May 16 2014" "Version 1.1.4" "libltc" \" -*- nroff -*- +.TH "ltc.h" 3 "Fri Dec 23 2016" "Version 1.3.0" "libltc" \" -*- nroff -*- .ad l .nh .SH NAME -ltc.h \- -.PP -libltc - en+decode linear timecode +ltc.h \- libltc - en+decode linear timecode .SH SYNOPSIS .br .PP +\fC#include <endian\&.h>\fP +.br +\fC#include <stddef\&.h>\fP +.br + .SS "Data Structures" .in +1c @@ -26,9 +29,6 @@ .in +1c .ti -1c -.RI "#define \fBLTC_BIG_ENDIAN\fP" -.br -.ti -1c .RI "#define \fBLTC_FRAME_BIT_COUNT\fP 80" .br .in -1c @@ -361,7 +361,7 @@ .PP Extended LTC frame - includes audio-sample position offsets, volume, etc .PP -Note: For TV systems, the sample in the LTC audio data stream where the LTC Frame starts is not neccesarily at the same time as the video-frame which is described by the LTC Frame\&. +Note: For TV systems, the sample in the LTC audio data stream where the LTC Frame starts is not necessarily at the same time as the video-frame which is described by the LTC Frame\&. .PP \fBoff_start\fP denotes the time of the first transition of bit 0 in the LTC frame\&. .PP @@ -377,7 +377,7 @@ .PP \fBData Fields:\fP .RS 4 -float \fIbiphase_tics\fP detailed timing info: phase of the LTC signal; the time between each bit in the LTC-frame in audio-frames\&. Summing all 80 values in the array will yield audio-frames/LTC-frame = (\fBoff_end\fP - \fBoff_start\fP + 1)\&. +float \fIbiphase_tics[\fBLTC_FRAME_BIT_COUNT\fP]\fP detailed timing info: phase of the LTC signal; the time between each bit in the LTC-frame in audio-frames\&. Summing all 80 values in the array will yield audio-frames/LTC-frame = (\fBoff_end\fP - \fBoff_start\fP + 1)\&. .br .PP \fBLTCFrame\fP \fIltc\fP the actual LTC frame\&. see \fBLTCFrame\fP @@ -431,7 +431,7 @@ unsigned char \fIsecs\fP second 0\&.\&.60 .br .PP -char \fItimezone\fP the timezone 6bytes: '+HHMM' textual representation +char \fItimezone[6]\fP the timezone 6bytes: '+HHMM' textual representation .br .PP unsigned char \fIyears\fP LTC-date uses 2-digit year 00\&.99\&. @@ -441,8 +441,6 @@ .PP .SH "Macro Definition Documentation" .PP -.SS "#define LTC_BIG_ENDIAN" - .SS "#define LTC_FRAME_BIT_COUNT 80" .SH "Typedef Documentation" @@ -466,7 +464,7 @@ .SS "enum \fBLTC_BG_FLAGS\fP" encoder and LTCframe <> timecode operation flags .PP -\fBEnumerator: \fP +\fBEnumerator\fP .in +1c .TP \fB\fILTC_USE_DATE \fP\fP @@ -483,7 +481,7 @@ .SS "enum \fBLTC_TV_STANDARD\fP" the standard defines the assignment of the binary-group-flag bits basically only 25fps is different, but other standards defined in the SMPTE spec have been included for completeness\&. .PP -\fBEnumerator: \fP +\fBEnumerator\fP .in +1c .TP \fB\fILTC_TV_525_60 \fP\fP @@ -586,9 +584,7 @@ .br \fIbuf\fP pointer to ltcsnd_sample_t - unsigned 8 bit mono audio data .br -\fIsize\fP number of samples to parse -.br -\fIposinfo\fP (optional, recommended) sample-offset in the audio-stream\&. It is added to \fBoff_start\fP, \fBoff_end\fP in \fBLTCFrameExt\fP and should be monotonic (ie incremented by \fBsize\fP for every call to ltc_decoder_write) +\fIsize\fP .RE .PP @@ -943,7 +939,7 @@ .PP typically LTC is sent at 0dBu ; in EBU callibrated systems that corresponds to \-18dBFS\&. - by default libltc creates \-3dBFS .PP -since libltc generated 8bit audio-data, the minium dBFS is about \-42dB which corresponds to 1 bit\&. +since libltc generated 8bit audio-data, the minimum dBFS is about \-42dB which corresponds to 1 bit\&. .PP 0dB corresponds to a signal range of 127 1\&.\&.255 with 128 at the center\&. .PP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/missing new/libltc-1.3.0/missing --- old/libltc-1.1.4/missing 2014-05-16 19:00:38.000000000 +0200 +++ new/libltc-1.3.0/missing 2016-12-23 04:46:30.000000000 +0100 @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.13; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <[email protected]>, 1996. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard <[email protected]>, 1996. # 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 @@ -26,68 +25,40 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to <[email protected]>." exit $? @@ -99,228 +70,141 @@ ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; +# Run the given program, remember its exit status. +"$@"; st=$? - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; +# If it succeeded, we are done. +test $st -eq 0 && exit 0 - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi -exit 0 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/src/config.h new/libltc-1.3.0/src/config.h --- old/libltc-1.1.4/src/config.h 2014-05-16 19:00:52.000000000 +0200 +++ new/libltc-1.3.0/src/config.h 2016-12-23 04:46:33.000000000 +0100 @@ -37,8 +37,7 @@ /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ @@ -66,4 +65,4 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.1.4" +#define VERSION "1.3.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/src/config.h.in new/libltc-1.3.0/src/config.h.in --- old/libltc-1.1.4/src/config.h.in 2014-02-05 04:51:20.000000000 +0100 +++ new/libltc-1.3.0/src/config.h.in 2016-12-23 04:46:29.000000000 +0100 @@ -36,8 +36,7 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/src/decoder.c new/libltc-1.3.0/src/decoder.c --- old/libltc-1.1.4/src/decoder.c 2012-11-18 04:39:46.000000000 +0100 +++ new/libltc-1.3.0/src/decoder.c 2016-12-08 18:35:29.000000000 +0100 @@ -2,7 +2,7 @@ libltc - en+decode linear timecode Copyright (C) 2005 Maarten de Boer <[email protected]> - Copyright (C) 2006-2012 Robin Gareus <[email protected]> + Copyright (C) 2006-2016 Robin Gareus <[email protected]> Copyright (C) 2008-2009 Jan <[email protected]> Binary constant generator macro for endianess conversion @@ -101,13 +101,24 @@ printf("\n"); \ } +#if (defined _MSC_VER && _MSC_VER <= 1800) +#define inline __inline +#endif + +#if (!defined INFINITY && defined _MSC_VER) +#define INFINITY std::numeric_limits<double>::infinity() +#endif +#if (!defined INFINITY && defined HUGE_VAL) +#define INFINITY HUGE_VAL +#endif + static double calc_volume_db(LTCDecoder *d) { if (d->snd_to_biphase_max <= d->snd_to_biphase_min) return -INFINITY; return (20.0 * log10((d->snd_to_biphase_max - d->snd_to_biphase_min) / 255.0)); } -static void parse_ltc(LTCDecoder *d, unsigned char bit, int offset, ltc_off_t posinfo) { +static void parse_ltc(LTCDecoder *d, unsigned char bit, ltc_off_t offset, ltc_off_t posinfo) { int bit_num, bit_set, byte_num; if (d->bit_cnt == 0) { @@ -248,7 +259,7 @@ } } -static inline void biphase_decode2(LTCDecoder *d, int offset, ltc_off_t pos) { +static inline void biphase_decode2(LTCDecoder *d, ltc_off_t offset, ltc_off_t pos) { d->biphase_tics[d->biphase_tic] = d->snd_to_biphase_period; d->biphase_tic = (d->biphase_tic + 1) % LTC_FRAME_BIT_COUNT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/src/encoder.c new/libltc-1.3.0/src/encoder.c --- old/libltc-1.1.4/src/encoder.c 2012-11-18 04:38:15.000000000 +0100 +++ new/libltc-1.3.0/src/encoder.c 2014-08-17 20:09:33.000000000 +0200 @@ -32,7 +32,9 @@ const ltcsnd_sample_t tgtval = e->state ? e->enc_hi : e->enc_lo; if (e->offset + n >= e->bufsize) { +#if 0 fprintf(stderr, "libltc: buffer overflow: %d/%lu\n", (int) e->offset, (unsigned long) e->bufsize); +#endif return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/src/ltc.c new/libltc-1.3.0/src/ltc.c --- old/libltc-1.1.4/src/ltc.c 2013-07-26 21:09:45.000000000 +0200 +++ new/libltc-1.3.0/src/ltc.c 2016-04-30 20:54:13.000000000 +0200 @@ -1,7 +1,7 @@ /* libltc - en+decode linear timecode - Copyright (C) 2006-2012 Robin Gareus <[email protected]> + Copyright (C) 2006-2015 Robin Gareus <[email protected]> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -27,6 +27,13 @@ #include "decoder.h" #include "encoder.h" +#if (defined _MSC_VER && _MSC_VER < 1800) +static double rint(double v) { + // NB. this is identical to round(), not rint(), but the difference is not relevant here + return floor(v + 0.5); +} +#endif + /* -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * Decoder */ @@ -191,7 +198,7 @@ ltc_frame_set_parity(&e->f, standard); } - if (rint(fps*100) == 2997) + if ((int)rint(fps * 100.0) == 2997) e->f.dfbit = 1; else e->f.dfbit = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/src/ltc.h new/libltc-1.3.0/src/ltc.h --- old/libltc-1.1.4/src/ltc.h 2014-05-16 18:59:10.000000000 +0200 +++ new/libltc-1.3.0/src/ltc.h 2016-12-23 04:46:01.000000000 +0100 @@ -40,6 +40,10 @@ extern "C" { #endif +#if defined _WIN32 && !defined(__LITTLE_ENDIAN__) +#define __LITTLE_ENDIAN__ +#endif + #ifdef __BIG_ENDIAN__ # define LTC_BIG_ENDIAN #elif defined _BIG_ENDIAN @@ -49,27 +53,26 @@ # define LTC_BIG_ENDIAN # endif #elif !defined __LITTLE_ENDIAN__ -# include <endian.h> -# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# include <endian.h> // machine/endian.h +# if (defined __BYTE_ORDER__ && defined __ORDER_BIG_ENDIAN__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) # define LTC_BIG_ENDIAN # endif #endif - #include <stddef.h> /* size_t */ #ifndef DOXYGEN_IGNORE /* libltc version */ -#define LIBLTC_VERSION "1.1.4" +#define LIBLTC_VERSION "1.3.0" #define LIBLTC_VERSION_MAJOR 1 -#define LIBLTC_VERSION_MINOR 1 -#define LIBLTC_VERSION_MICRO 4 +#define LIBLTC_VERSION_MINOR 3 +#define LIBLTC_VERSION_MICRO 0 /* interface revision number * http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html */ #define LIBLTC_CUR 11 -#define LIBLTC_REV 3 +#define LIBLTC_REV 5 #define LIBLTC_AGE 0 #endif /* end DOXYGEN_IGNORE */ @@ -274,7 +277,7 @@ /** * Extended LTC frame - includes audio-sample position offsets, volume, etc * - * Note: For TV systems, the sample in the LTC audio data stream where the LTC Frame starts is not neccesarily at the same time + * Note: For TV systems, the sample in the LTC audio data stream where the LTC Frame starts is not necessarily at the same time * as the video-frame which is described by the LTC Frame. * * \ref off_start denotes the time of the first transition of bit 0 in the LTC frame. @@ -671,7 +674,7 @@ * typically LTC is sent at 0dBu ; in EBU callibrated systems that * corresponds to -18dBFS. - by default libltc creates -3dBFS * - * since libltc generated 8bit audio-data, the minium dBFS + * since libltc generated 8bit audio-data, the minimum dBFS * is about -42dB which corresponds to 1 bit. * * 0dB corresponds to a signal range of 127 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/src/timecode.c new/libltc-1.3.0/src/timecode.c --- old/libltc-1.1.4/src/timecode.c 2013-09-06 12:08:33.000000000 +0200 +++ new/libltc-1.3.0/src/timecode.c 2015-09-08 23:04:01.000000000 +0200 @@ -39,7 +39,7 @@ /** * SMPTE Timezone codes as per http://www.barney-wol.net/time/timecode.html */ -const static struct SMPTETimeZonesStruct smpte_time_zones[] = +static const struct SMPTETimeZonesStruct smpte_time_zones[] = { /* code, timezone (UTC+) //Standard time //Daylight saving */ { 0x00, "+0000" /* Greenwich */ /* - */ }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/tests/example_encode.c new/libltc-1.3.0/tests/example_encode.c --- old/libltc-1.1.4/tests/example_encode.c 2012-11-17 16:07:52.000000000 +0100 +++ new/libltc-1.3.0/tests/example_encode.c 2016-02-09 11:14:36.000000000 +0100 @@ -3,7 +3,7 @@ @file example_encode.c @author Robin Gareus <[email protected]> - Copyright (C) 2006-2012 Robin Gareus <[email protected]> + Copyright (C) 2006-2016 Robin Gareus <[email protected]> Copyright (C) 2008-2009 Jan <[email protected]> This program is free software; you can redistribute it and/or modify @@ -36,6 +36,10 @@ #include <ltc.h> +#ifdef _WIN32 +#include <fcntl.h> // for _fmode +#endif + /* define "USE_LOCAL_BUFFER" to * use a local buffer instead of a pointer to * libltc's internal buffer @@ -91,6 +95,12 @@ return 1; } +#ifdef _WIN32 + // see https://msdn.microsoft.com/en-us/library/ktss1a9b.aspx and + // https://github.com/x42/libltc/issues/18 + _set_fmode(_O_BINARY); +#endif + /* open output file */ file = fopen(filename, "wb"); if (!file) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/tests/ltcdecode.c new/libltc-1.3.0/tests/ltcdecode.c --- old/libltc-1.1.4/tests/ltcdecode.c 2012-11-06 00:17:03.000000000 +0100 +++ new/libltc-1.3.0/tests/ltcdecode.c 2016-02-09 11:16:03.000000000 +0100 @@ -4,7 +4,7 @@ @author Robin Gareus <[email protected]> Copyright (C) 2003 Maarten de Boer <[email protected]> - Copyright (C) 2006-2012 Robin Gareus <[email protected]> + Copyright (C) 2006-2016 Robin Gareus <[email protected]> Copyright (C) 2008-2009 Jan <[email protected]> This program is free software; you can redistribute it and/or modify @@ -26,6 +26,10 @@ #include <math.h> #include <ltc.h> +#ifdef _WIN32 +#include <fcntl.h> // for _fmode +#endif + #define BUFFER_SIZE (1024) /** @@ -42,7 +46,6 @@ LTCDecoder *decoder; LTCFrameExt frame; - // fIXME if (argc > 1) { filename = argv[1]; if (argc > 2) { @@ -53,6 +56,12 @@ return -1; } +#ifdef _WIN32 + // see https://msdn.microsoft.com/en-us/library/ktss1a9b.aspx and + // https://github.com/x42/libltc/issues/18 + _set_fmode(_O_BINARY); +#endif + f = fopen(filename, "r"); if (!f) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libltc-1.1.4/tests/ltcencode.c new/libltc-1.3.0/tests/ltcencode.c --- old/libltc-1.1.4/tests/ltcencode.c 2013-12-30 00:36:10.000000000 +0100 +++ new/libltc-1.3.0/tests/ltcencode.c 2016-02-09 11:15:26.000000000 +0100 @@ -3,7 +3,7 @@ @file ltcencoder.c @author Robin Gareus <[email protected]> - Copyright (C) 2006-2012 Robin Gareus <[email protected]> + Copyright (C) 2006-2016 Robin Gareus <[email protected]> Copyright (C) 2008-2009 Jan <[email protected]> This program is free software; you can redistribute it and/or modify @@ -28,6 +28,10 @@ #include <ltc.h> +#ifdef _WIN32 +#include <fcntl.h> // for _fmode +#endif + int main(int argc, char **argv) { FILE* file; double length = 2; // in seconds @@ -75,6 +79,12 @@ return 1; } +#ifdef _WIN32 + // see https://msdn.microsoft.com/en-us/library/ktss1a9b.aspx and + // https://github.com/x42/libltc/issues/18 + _set_fmode(_O_BINARY); +#endif + file = fopen(filename, "wb"); if (!file) { fprintf(stderr, "Error: can not open file '%s' for writing.\n", filename);
