Projects
Multimedia
cclive
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
cclive.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue Nov 29 22:08:37 UTC 2011 - reddwarf@opensuse.org + +- update to 0.7.8 + +------------------------------------------------------------------- Sun Mar 13 12:55:01 UTC 2011 - pascal.bleser@opensuse.org - update to 0.7.3 (no user-visible changes)
View file
cclive.spec
Changed
@@ -1,25 +1,20 @@ # vim: set ts=4 sw=4 et: Name: cclive -Version: 0.7.3 -Release: 1 +Version: 0.7.8 +Release: 0 Summary: Command Line Video Extraction Utility -Source: http://prdownloads.sourceforge.net/cclive/cclive-%{version}.tar.gz +Source: http://sourceforge.net/projects/cclive/files/0.7/cclive-%{version}.tar.bz2 URL: http://cclive.sourceforge.net/ Group: Productivity/Networking/Other License: GNU General Public License version 3 (GPL v3) BuildRoot: %{_tmppath}/build-%{name}-%{version} -%if %suse_version >= 1030 BuildRequires: libcurl-devel >= 7.20 -%else -BuildRequires: curl-devel >= 7.20 -%endif BuildRequires: boost-devel BuildRequires: pcre-devel >= 8.02 BuildRequires: libquvi-devel >= 0.2.0 Requires: libquvi0 >= 0.2.0 BuildRequires: gcc-c++ make glibc-devel pkg-config autoconf automake libtool -BuildRequires: cmake %description cclive is a command line video extraction utility similar to clive but focuses @@ -34,25 +29,12 @@ %setup -q %build -mkdir build -pushd build -CFLAGS="%{optflags}" \ -CXXFLAGS="%{optflags}" \ -cmake \ - -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ - -DCMAKE_SKIP_RPATH=TRUE \ - -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \ - -DCMAKE_VERBOSE_MAKEFILE=TRUE \ - -DCMAKE_STRIP=/usr/bin/touch \ - .. +%configure -%__make %{?jobs:-j%{jobs}} V=1 -popd #build +make %{?_smp_mflags} V=1 %install -pushd build %makeinstall -popd #build %clean %{?buildroot:%__rm -rf "%{buildroot}"}
View file
cclive-0.7.3.tar.gz/.gitignore
Deleted
@@ -1,3 +0,0 @@ -patches/ -TODO* -tmp/
View file
cclive-0.7.3.tar.gz/CMakeLists.txt
Deleted
@@ -1,228 +0,0 @@ - -cmake_minimum_required (VERSION 2.8.0) - -project (cclive) - -add_definitions (-Wall) -#add_definitions (-Werror) - -# Version. - -set (VERSION "0.7.3") -set (VERSION_LONG "${VERSION}") -set (BRANCH "master") - -if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") - find_program (GIT_PROG "git") - if (GIT_PROG) - execute_process ( - COMMAND ${GIT_PROG} "describe" "${BRANCH}" - OUTPUT_VARIABLE DESCR - OUTPUT_STRIP_TRAILING_WHITESPACE) - if (DESCR) - set (VERSION_LONG "${DESCR}") - endif () - endif () -endif () - -find_program (DATE_PROG "date") -if (DATE_PROG) - execute_process ( - COMMAND ${DATE_PROG} "+%Y-%m-%d" - OUTPUT_VARIABLE DATE - OUTPUT_STRIP_TRAILING_WHITESPACE) - if (DATE) - set (VERSION_LONG "${VERSION_LONG} built on ${DATE}") - endif () -endif () - -set (HOST_SETUP "${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR}") -set (VERSION_LONG "${VERSION_LONG} for ${HOST_SETUP}") - -# gzip. - -find_program (GZIP_PROG "gzip") - -# pod2man. - -find_program (POD2MAN_PROG "pod2man") -if (POD2MAN_PROG) - add_custom_target (pod2man - "${POD2MAN_PROG}" -c "cclive manual" -n cclive -s 1 -r ${VERSION} - ${CMAKE_CURRENT_SOURCE_DIR}/man1/cclive.1.pod - ${CMAKE_CURRENT_BINARY_DIR}/man1/cclive.1 - ) -endif () - -# Set build type default. - -if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE "debug") -endif () - -# Set verbose makefile default. - -if (NOT CMAKE_VERBOSE_MAKEFILE) - set (CMAKE_VERBOSE_MAKEFILE false) -endif () - -# Set WITHOUT_DOC default. - -if (NOT WITHOUT_DOC) - set (WITHOUT_DOC false) -endif () - -# Include dir. - -include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include) - -# Prerequisites. - -include (FindPkgConfig) - -pkg_check_modules (quvi libquvi>=0.2.0 REQUIRED QUIET) -include_directories (AFTER ${quvi_INCLUDE_DIRS}) -link_directories (${quvi_LIBRARY_DIRS}) - -if (quvi_VERSION VERSION_GREATER 0.2.7) - set (HAVE_QUVIOPT_NOSHORTENED true) -endif () - -if (quvi_VERSION VERSION_GREATER 0.2.11) - set (HAVE_QUVIOPT_CATEGORY true) -endif () - -pkg_check_modules (curl libcurl>=7.20 REQUIRED QUIET) -include_directories (AFTER ${curl_INCLUDE_DIRS}) -link_directories (${curl_LIBRARY_DIRS}) - -pkg_check_modules (pcre libpcre>=8.02 REQUIRED QUIET) -include_directories (AFTER ${pcre_INCLUDE_DIRS}) -link_directories (${pcre_LIBRARY_DIRS}) - -pkg_check_modules (pcrecpp libpcrecpp>=8.02 REQUIRED QUIET) -include_directories (AFTER ${pcrecpp_INCLUDE_DIRS}) -link_directories (${pcrecpp_LIBRARY_DIRS}) - -# Prerequisites: Boost - -set (boost_LIBS - program_options - iostreams - filesystem - system -# foreach -- this is a header-only library -# format -- ditto -# date_time -- ... -# random -- ... -) - -set (Boost_USE_STATIC_LIBS OFF) -set (Boost_USE_MULTITHREADED OFF) -set (Boost_FIND_QUIETLY ON) - -find_package (Boost 1.42.0 COMPONENTS ${boost_LIBS} REQUIRED) - -include_directories (AFTER ${Boost_INCLUDE_DIR}) -link_directories (${Boost_LIBRARY_DIRS}) - -set (boost_VERSION - "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") - -# Version 3 is a major revision with many new and improved features. It -# may, however, break some user code written for Version 2. -# -# To ease the transition, Boost releases 1.44 through 1.47 will supply -# both V2 and V3. Version 2 is the default version for Boost release 1.44 -# and 1.45. Version 3 will be the default starting with release 1.46. -# <http://www.boost.org/libs/filesystem/index.html> - -if (boost_VERSION VERSION_GREATER 1.43.0) - set (HAVE_BOOST_FILESYSTEM_VERSION_3 true) -endif () - -# Check for headers. - -include (CheckIncludeFile) -check_include_file (unistd.h HAVE_UNISTD_H) -check_include_file (sys/types.h HAVE_SYS_TYPES_H) -check_include_file (sys/ioctl.h HAVE_SYS_IOCTL_H) -check_include_file (sys/stat.h HAVE_SYS_STAT_H) -check_include_file (signal.h HAVE_SIGNAL_H) - -# Check for functions - -include (CheckFunctionExists) -check_function_exists (strerror_r HAVE_STRERROR_R) -check_function_exists (strerror HAVE_STRERROR) -check_function_exists (fork HAVE_FORK) -check_function_exists (getcwd HAVE_GETCWD) -check_function_exists (getpid HAVE_GETPID) -check_function_exists (signal HAVE_SIGNAL) - -# Subdirs. - -subdirs (src man1) - -# Status. - -message (STATUS) -message (STATUS "Configured:") -message (STATUS " cclive ${VERSION_LONG}") -message (STATUS) -message (STATUS "Found:") -message (STATUS " Compiler: ${CMAKE_CXX_COMPILER}") -message (STATUS " Linker : ${CMAKE_LINKER}") -message (STATUS " Make : ${CMAKE_MAKE_PROGRAM}") -message (STATUS " Host : ${HOST_SETUP}") -message (STATUS " quvi : ${quvi_VERSION}") -message (STATUS " curl : ${curl_VERSION}") -message (STATUS " pcre : ${pcre_VERSION}") -message (STATUS " pcrecpp : ${pcrecpp_VERSION}") -message (STATUS " boost : ${boost_VERSION}") -message (STATUS) -message (STATUS "Options:") -message (STATUS " Install prefix: ${CMAKE_INSTALL_PREFIX}") -message (STATUS " Verbose make : ${CMAKE_VERBOSE_MAKEFILE}") -message (STATUS " Without doc : ${WITHOUT_DOC}") -message (STATUS " Build type : ${CMAKE_BUILD_TYPE}") -message (STATUS " (debug, release, relwithdebinfo, minsizerel)") -message (STATUS) - -# Force these variables to be written to cache. - -set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH - "Install destination for ${PROJECT_NAME}" FORCE) - -set (CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING - "Type of build: none, debug, release, relwithdebinfo minsizerel" FORCE) -
View file
cclive-0.7.3.tar.gz/ChangeLog.pre-gitlog
Deleted
@@ -1,637 +0,0 @@ - -Version 0.6.6 - -Changes: - * Bump autoconf prereq to 2.68 - -Bugfixes: - * Incorrect documentation for --retry=0 - - -Version 0.6.5 -August 12, 2010 - -Changes: - * Add --license option - * Add --regexp default "/(\w|\s|\pL)/g" (issue #43) - * Add --enable-tests (configure, disabled by default) - - -Version 0.6.4 -July 25, 2010 - -Changes: - * Disable tests/multi-segment.pl (libquvi: cctv support broken) - * Remove tests/noformat-eval.pl - * Bump autoconf prereq to 2.66 - * New default --format value (`flv' -> `default'). - * Warn if --format, --format-map use invalid values - * Handle QUVI_LUA - * Use CURLOPT_RESUME_FROM_LARGE instead - * Bump PKG_CHECK_MODULES(libquvi) to 0.2.0 - -Bugfixes: - * --format-map (#36) - - -Version 0.6.3 -May 6, 2010 - -Changes: - * Update to use libquvi's quvi_next_supported_website function - * Add AM_SILENT_RULES([yes]) - - -Version 0.6.2 -(February 23, 2010) - -Changes: - * tests/multi-segment.pl now checks for locale - -Bugfixes: - * -f best, accepted again (closes issue #24) - - -Version 0.6.1 -(Feburary 13, 2010) - -Changes: - * Updated manual to reflect the dailymotion format id changes - * Remove the hardcoded --format values - # Use libquvi provided values instead - * Add tests/noformat-eval.pl - * Cleanup notice message (configure) - * Add tests/pod-check.pl (replaces "make checkpod") - -Bugfixes: - * tests/Makefile.am: Missing separator (Makefile:450, rep. FreeBSD) - - -Version 0.6.0 -(February 2, 2010) - - User-visible changes: - * Multi-segment support (e.g. some cctv videos) - * Remove "Features" from --version output - * Rewrite of retrying transfers - * --version now prints libquvi version (instead of libcurl) - - Developer-visible changes: - * Add dependency for libquvi (see NEWS and INSTALL files) - * Remove libiconv dependency (ditto) - - General changes: - * Tidy up project description (e.g. README) - - -Version 0.5.9 -(January 26, 2010) - - User-visible changes: - * --stream-exec, --stream-pass - # Add support for the %f specifier - # Thanks to webmaster.foto-schaal.de for the patch - # Closes issue #22 - * Add spyfilms support - # Thanks to Hanno Böck for initial patch and data - - -Version 0.5.8 -(January 14, 2010) - - User-visible changes: - * Fix "-f unavailable_format" for dailymotion - # Use first found link instead of croaking with an error - * Fix "-f best" for dailymotion - # Use proper sorting method - # Thanks to Markus Doppelbauer for reporting the issue - * Fix tube8 support - - Developer-visible changes: - * configure: dump build configuration - * tests/sevenload.cpp: remove dead test link (closes issue #19) - - -Version 0.5.7 -(December 18, 2009) - - User-visible changes: - * Do not replace dashes with underscores in IDs - * --substitute: support multiple regexps (re-closes issue #17) - # Read manual page for updated details - # See also NEWS file - * Fix tube8 support - - Developer-visible changes: - * tests: support MULTI_TEST env.var. (see INSTALL) - * Remove redtube remains from the src tree - - -Version 0.5.6 -(December 2, 2009) - - User-visible changes: - * Add --background, --logfile, --logfile-interval - * Add --substitute (closes issue #17) - * Tweak static error strings (e.g. "system call failed" -> "system") - * Croak if file open fails prior to video download (related to issue #17) - * Sort --hosts output alphabetically (Thanks to Bram Neijt for the patch) - * Decode properly predefined (X)HTML numeric character references - * Changes to --regexp - # Support Perl-like regexps (see NEWS file, updated manual for more) - # Add support for Perl-like /i - # Remove --find-all (use /g with --regexp instead) - * Fix random sevenload http/401 errors (closes issue #14) - # Caused by use of predefined HTML entities in video links - * Fix CURLE_RANGE_ERROR handling for file transfers - # Caused infinite loop of "Requested range was not delivered by the server" - # Stop after --retry specified limit has been reached - - Developer-visible changes: - * Bump AC_PREREQ to 2.65 - - -Version 0.5.5 -(November 14, 2009) - - User-visible changes: - * Add predefined HTML character entity (e.g. ") conversion - * Add support for tube8.com - # Thanks to anonymous contributor for the patch - * Allow dailymotion.* - * Fix sevenload title parsing - # Use config title instead - - Developer-visible changes: - * Clear up project description ("mission statement") - * docs/AddingSupport: add checklist and 0.6.0 note - - -Version 0.5.4 -(October 29, 2009) - - User-visible changes: - * Fix: youtube -f best (error: parse failed: no match: (?i)"fmt_map": "(\d+)) - # Failed if fmt_map was an empty string - # Closes issue #7 - * Add support for: - # youjizz.com (closes issue #11) - # xvideos.com (closes issues #12) - # Both contributed by i.am.a.real.coward - - -Version 0.5.3 -(October 15, 2009) - - User-visible changes: - * Fix: google title parsing (closes issue #6) - # Use <title> instead - - Developer-visible changes: - * Remove: AC_PROG_CPP (deprecated) - * Fix: AM_ICONV failed to detect iconv (mingw, freebsd, ...) - # Use a proper config.rpath file - * Remove: use of tmpfile(3) (queryFileLength) - # Read into memory instead when querying file length - - -Version 0.5.2 -(September 29, 2009)
View file
cclive-0.7.3.tar.gz/config.h.cmake.in
Deleted
@@ -1,40 +0,0 @@ - -#ifndef config_h -#define config_h - -#define VERSION "${VERSION}" -#define VERSION_LONG "${VERSION_LONG}" - -// System. - -#cmakedefine HAVE_UNISTD_H -#cmakedefine HAVE_SYS_TYPES_H -#cmakedefine HAVE_SYS_IOCTL_H -#cmakedefine HAVE_SYS_STAT_H -#cmakedefine HAVE_SIGNAL_H - -#cmakedefine HAVE_STRERROR_R -#cmakedefine HAVE_STRERROR -#cmakedefine HAVE_FORK -#cmakedefine HAVE_GETCWD -#cmakedefine HAVE_GETPID -#cmakedefine HAVE_SIGNAL - -// quvi. - -#cmakedefine HAVE_QUVIOPT_NOSHORTENED -#cmakedefine HAVE_QUVIOPT_CATEGORY - -// Boost. See also CMakeLists.txt for notes. - -#define BOOST_FILESYSTEM_NO_DEPRECATED - -#cmakedefine HAVE_BOOST_FILESYSTEM_VERSION_3 // 1.44.0+ - -#ifdef HAVE_BOOST_FILESYSTEM_VERSION_3 - #ifndef BOOST_FILESYSTEM_VERSION - #define BOOST_FILESYSTEM_VERSION 3 // Default in 1.46.0 - #endif -#endif - -#endif
View file
cclive-0.7.3.tar.gz/examples
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/examples/config
Deleted
@@ -1,11 +0,0 @@ -# Default location is $HOME/.ccliverc, you can use the --config-file -# option to override this. -# -# You can specify the configurable program options in this file, e.g.: - -agent = foo/0.1.0 -proxy = http://foo:1234 -throttle = 50 -connect-timeout = 120 - -
View file
cclive-0.7.3.tar.gz/include
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/include/cclive
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/include/cclive/application.h
Deleted
@@ -1,46 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_application_h -#define cclive_application_h - -#include "cclive/options.h" - -#include "quvicpp/quvicpp.h" - -namespace cclive -{ - -class application -{ -public: - typedef enum { ok=0, invalid_option, system } exit_status; -public: - exit_status exec (int,char **); -private: - void _read_stdin (std::vector<std::string>&); - void _tweak_curl_opts (const quvicpp::query&, - const boost::program_options::variables_map&); -private: - cclive::options _opts; -}; - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/background.h
Deleted
@@ -1,31 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_background_h -#define cclive_background_h - -namespace cclive -{ - -void -go_background (const std::string&, bool&); - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/error.h
Deleted
@@ -1,30 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_error_h - -namespace cclive -{ - -std::string -perror (const std::string& p=""); - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/exec.h
Deleted
@@ -1,31 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_exec_h -#define cclive_exec_h - -namespace cclive -{ - -void -exec (const file&, const quvicpp::link&, const options& opts); - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/file.h
Deleted
@@ -1,56 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_file_h -#define cclive_file_h - -namespace cclive -{ - -class file -{ -public: - file (); - file (const quvicpp::video&, const quvicpp::link&, - const int, const options&); - file (const file&); - file& operator=(const file&); -public: - bool write (const quvicpp::query&, const quvicpp::link&, - const options&) const; -public: - double initial_length () const; - const std::string& path () const; - std::string to_s (const quvicpp::link&) const; -public: - static double exists (const std::string&); -private: - void _swap (const file&); - void _init (const quvicpp::video&, const quvicpp::link&, - const int, const options&); - bool _should_continue () const; -private: - double _initial_length; - std::string _name; - std::string _path; -}; - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/get.h
Deleted
@@ -1,33 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_get_h -#define cclive_get_h - -#include "cclive/file.h" - -namespace cclive -{ - -void -get (const quvicpp::query&, quvicpp::video&, const options&); - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/log.h
Deleted
@@ -1,87 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_log_h -#define cclive_log_h - -#include <iostream> -#include <fstream> - -#include <boost/iostreams/filtering_stream.hpp> - -namespace cclive -{ - -extern boost::iostreams::filtering_ostream log; - -struct omit_sink : public boost::iostreams::sink -{ - - explicit omit_sink (bool b=false); - - std::streamsize write (const char *s, std::streamsize n); - -private: - bool _omit; -}; - -struct flushable_file_sink -{ - - typedef char char_type; - - struct category : - boost::iostreams::output_seekable, - boost::iostreams::device_tag, - boost::iostreams::closable_tag, - boost::iostreams::flushable_tag {}; - - flushable_file_sink ( - const std::string&, - const std::ios_base::openmode mode = std::ios::trunc|std::ios::out); - - flushable_file_sink (const flushable_file_sink&); - - flushable_file_sink& operator=(const flushable_file_sink&); - - bool is_open () const; - - std::streamsize write (const char *, std::streamsize); - - std::streamsize read (char_type *, std::streamsize); - - std::streampos seek (std::streamoff, std::ios_base::seekdir); - - bool flush (); - - void close (); - -private: - void _open (); - void _swap (const flushable_file_sink&); - -private: - std::ios_base::openmode _mode; - mutable std::fstream _f; - std::string _fpath; -}; - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/options.h
Deleted
@@ -1,44 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_options_h -#define cclive_options_h - -#include <boost/program_options.hpp> - -namespace cclive -{ - -class options -{ - friend std::ostream& operator<<(std::ostream&, const options&); -public: - void exec (int argc, char **argv); - const boost::program_options::variables_map& map() const; -private: - void _verify (); -private: - boost::program_options::options_description _visible; - boost::program_options::variables_map _map; - std::string _config_file; -}; - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/progressbar.h
Deleted
@@ -1,74 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_progressbar_h -#define cclive_progressbar_h - -#include "cclive/file.h" - -namespace cclive -{ - -class progressbar -{ - enum { default_term_width=80 }; -public: - enum mode { normal = 0, dotline }; -public: - progressbar (const file&, const quvicpp::link&, const options&); - void update (double); - void finish (); -private: - void _normal ( - const std::stringstream& size_s, - const std::stringstream& rate_s, - const std::stringstream& eta_s, - const int percent, - const std::stringstream& percent_s, - const std::string& fname); - - void _dotline ( - const std::stringstream& size_s, - const std::stringstream& rate_s, - const std::stringstream& eta_s, - const std::stringstream& percent_s, - const std::string& fname); - - void _render_meter( - std::stringstream& bar, - const int percent, - const size_t space_left); -private: - int _update_interval; - double _expected_bytes; - double _initial_bytes; - time_t _time_started; - time_t _last_update; - size_t _term_width; - int _dot_count; - double _count; - size_t _width; - file _file; - bool _done; - mode _mode; -}; - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/re.h
Deleted
@@ -1,40 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_re_h -#define cclive_re_h - -namespace cclive -{ -namespace re -{ - -bool -subst (const std::string& re, std::string& src); - -bool -match (const std::string& re, std::string& src); - -void -trim (std::string&); - -} -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/cclive/wait.h
Deleted
@@ -1,31 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef cclive_wait_h -#define cclive_wait_h - -namespace cclive -{ - -void -wait (const int); - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/include/quvicpp
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/include/quvicpp/quvicpp.h
Deleted
@@ -1,179 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef quvicpp_h -#define quvicpp_h - -#include <string> -#include <vector> -#include <map> - -#include <quvi/quvi.h> - -namespace quvicpp -{ - -class options; -class query; -class video; -class link; -class error; - -typedef std::string url; - -// Version. - -std::string version (); -std::string version_long (); - -// To string. - -std::string support_to_s (const std::map<std::string,std::string>&); - -// Options. - -class options -{ - friend class query; - friend class error; -public: - options(); - options(const options&); - options& operator=(const options&); - virtual ~options(); -public: - void format (const std::string&); - void verify (const bool); - void shortened (const bool); - void statusfunc (quvi_callback_status); - void writefunc (quvi_callback_write); -private: - void _swap (const options&); -private: - quvi_callback_status _statusfunc; - quvi_callback_write _writefunc; - std::string _format; - bool _verify; - bool _shortened; -}; - -// Query. - -class query -{ -public: - query(); - query(const query&); - query& operator=(const query&); - virtual ~query(); -public: - video parse (const url&, const options&) const; - std::map<std::string,std::string> support () const; - void* curlHandle () const; -private: - void _init (); - void _close(); -private: - quvi_t _quvi; - void* _curl; -}; - -// Link. - -class link -{ -public: - link(); - link(quvi_video_t); - link(const link&); - link& operator=(const link&); - virtual ~link(); -public: - const std::string& content_type () const; - const std::string& suffix () const; - const std::string& url () const; - double length () const; - bool ok () const; -private: - void _swap (const link&); -private: - std::string _contentType; - std::string _suffix; - std::string _url; - double _length; -}; - -// Video. - -class video -{ - friend std::ostream& operator<<(std::ostream&, const video&); -public: - video(); - video(quvi_video_t); - video(const video&); - video& operator=(const video&); - virtual ~video(); -public: - const std::string& title () const; - const std::string& host () const; - const std::string& url () const; - const std::string& id () const; - const std::string& format () const; - long http_code () const; - link next_link(); - std::string to_s (); - void print (std::ostream&); -private: - void _swap (const video&); -private: - std::vector<link>::const_iterator _current_link; - std::vector<link> _links; - std::string _format; - std::string _title; - std::string _host; - std::string _url; - std::string _id; - long _http_code; -}; - -// Error. - -class error -{ -public: - error (quvi_t, QUVIcode); - error (const error&); - error& operator=(const error&); - virtual ~error(); -public: - const std::string& what() const; - long response_code () const; - QUVIcode quvi_code () const; -private: - void _swap (const error&); -private: - QUVIcode _quvi_code; - std::string _what; - long _resp_code; -}; - -} // End namespace. - -#endif - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/man1
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/man1/CMakeLists.txt
Deleted
@@ -1,33 +0,0 @@ - -# Install. - -if (NOT WITHOUT_DOC) - - set (man_1 "cclive.1") - set (man_src "${CMAKE_CURRENT_SOURCE_DIR}/${man_1}") - - if (GZIP_PROG) - - set (man_gz "${CMAKE_CURRENT_BINARY_DIR}/${man_1}.gz") - - execute_process ( - COMMAND - "${GZIP_PROG}" - "${man_src}" - "-c" - OUTPUT_FILE "${man_gz}" - RESULT_VARIABLE gzip_rc) - - if (gzip_rc EQUAL 0) - set (man_inst "${man_gz}") - endif () - - else () # no gzip - set (man_inst "${man_src}") - endif () - - install (FILES "${man_inst}" DESTINATION share/man/man1) - -endif () # not WITHOUT_DOC - -
View file
cclive-0.7.3.tar.gz/man1/cclive.1
Deleted
@@ -1,427 +0,0 @@ -.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX -.. -.\} -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "cclive 1" -.TH cclive 1 "2011-02-03" "0.7.3" "cclive manual" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -cclive \- video download tool -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -cclive [options] [url...] -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -cclive is a command line tool for downloading videos from Youtube and other -similar video websites that require Adobe Flash to view the video content. -It has low memory footprint compared to other similar tools. It is a rewrite -of the clive software in \*(C+. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-version\fR" 4 -.IX Item "--version" -Print version and exit. -.IP "\fB\-\-help\fR" 4 -.IX Item "--help" -Print help and exit. -.IP "\fB\-\-license\fR" 4 -.IX Item "--license" -Print license and exit. -.IP "\fB\-\-support\fR" 4 -.IX Item "--support" -Print supported websites, formats and exit. -.IP "\fB\-\-verbose\-libcurl\fR" 4 -.IX Item "--verbose-libcurl" -Turn on libcurl verbose output. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Turn off all output to stdout and stderr. -.IP "\fB\-b, \-\-background\fR" 4 -.IX Item "-b, --background" -Go to background after startup. Output will be written to -the file specified with \f(CW\*(C`\-\-log\-file\*(C'\fR. -.IP "\fB\-f, \-\-format\fR \fIarg\fR" 4 -.IX Item "-f, --format arg" -Download \fIarg\fR format of the video. \fIarg\fR can also be \f(CW\*(C`help\*(C'\fR. -.IP "\fB\-c, \-\-continue\fR" 4 -.IX Item "-c, --continue" -Resume partially downloaded video. -.IP "\fB\-W, \-\-overwrite\fR" 4 -.IX Item "-W, --overwrite" -Overwrite existing video. -.IP "\fB\-O, \-\-output\-file\fR \fIarg\fR" 4 -.IX Item "-O, --output-file arg" -Write video to \fIarg\fR. Overrides \f(CW\*(C`\-\-filename\-format\*(C'\fR. -.IP "\fB\-n, \-\-no\-download\fR" 4 -.IX Item "-n, --no-download" -Do not download the video, display video details only. -.IP "\fB\-s, \-\-no\-shortened\fR" 4 -.IX Item "-s, --no-shortened" -Do not \*(L"decompress\*(R" shortened URLs before using them. Available only -with quvi 0.2.8 and later. -.IP "\fB\-\-no\-proxy\fR" 4 -.IX Item "--no-proxy" -Disable use of \s-1HTTP\s0 proxy. Overrides both \f(CW\*(C`\-\-proxy\*(C'\fR and http_proxy environment -settings. -.IP "\fB\-\-log\-file\fR \fIarg\fR" 4 -.IX Item "--log-file arg" -Write log data to \fIarg\fR file. Ignored unless \f(CW\*(C`\-\-background\*(C'\fR is used. -Overwrites the existing file. Default is \*(L"cclive_log\*(R". See also -\&\f(CW\*(C`\-\-background\*(C'\fR and \f(CW\*(C`\-\-update\-interval\*(C'\fR. -.IP "\fB\-\-update\-interval\fR \fIarg\fR" 4 -.IX Item "--update-interval arg" -Specify \fIarg\fR progressbar update interval. Default is 1 second. -You can use double type values, e.g. 0.2 or 1.99. -.IP "\fB\-\-config\-file\fR \fIarg\fR" 4
View file
cclive-0.7.3.tar.gz/man1/cclive.1.pod
Deleted
@@ -1,343 +0,0 @@ -=pod - -=head1 NAME - -cclive - video download tool - -=head1 SYNOPSIS - -cclive [options] [url...] - -=head1 DESCRIPTION - -cclive is a command line tool for downloading videos from Youtube and other -similar video websites that require Adobe Flash to view the video content. -It has low memory footprint compared to other similar tools. It is a rewrite -of the clive software in C++. - -=head1 OPTIONS - -=over 4 - -=item B<--version> - -Print version and exit. - -=item B<--help> - -Print help and exit. - -=item B<--license> - -Print license and exit. - -=item B<--support> - -Print supported websites, formats and exit. - -=item B<--verbose-libcurl> - -Turn on libcurl verbose output. - -=item B<-q, --quiet> - -Turn off all output to stdout and stderr. - -=item B<-b, --background> - -Go to background after startup. Output will be written to -the file specified with C<--log-file>. - -=item B<-f, --format> I<arg> - -Download I<arg> format of the video. I<arg> can also be C<help>. - -=item B<-c, --continue> - -Resume partially downloaded video. - -=item B<-W, --overwrite> - -Overwrite existing video. - -=item B<-O, --output-file> I<arg> - -Write video to I<arg>. Overrides C<--filename-format>. - -=item B<-n, --no-download> - -Do not download the video, display video details only. - -=item B<-s, --no-shortened> - -Do not "decompress" shortened URLs before using them. Available only -with quvi 0.2.8 and later. - -=item B<--no-proxy> - -Disable use of HTTP proxy. Overrides both C<--proxy> and http_proxy environment -settings. - -=item B<--log-file> I<arg> - -Write log data to I<arg> file. Ignored unless C<--background> is used. -Overwrites the existing file. Default is "cclive_log". See also -C<--background> and C<--update-interval>. - -=item B<--update-interval> I<arg> - -Specify I<arg> progressbar update interval. Default is 1 second. -You can use double type values, e.g. 0.2 or 1.99. - -=item B<--config-file> I<arg> - -Path to a file to read cclive arguments from. The default is "~/.ccliverc". - -=back - -=head1 OPTIONS - CONFIGURATION - -In addition to the command line, the configurable options may also be read -from the configuration file. See L</FILES>. - -=over 4 - -=item B<--filename-format> I<arg> - -Use I<arg> to specify the video output filename format. The default -is "%t.%s". The following specifiers can be used in the I<arg>: - - %t .. Video title - %i .. Video ID - %h .. Video host ID (e.g. "vimeo") - %s .. Video file suffix (e.g. "flv") - -Note that I<all> occurences of the specifier will be replaced. See also -C<--output-file>. - -=item B<--output-dir> I<arg> - -Write downloaded videos to I<arg> directory. - -=item B< --regexp> I<arg> - -Use regular expression I<arg> to clean up the video title before it -is used in the output filename. The default is "/(\w|\s)/g". - -Note that the syntax supports both "i" (case-insensitive) and "g" -(global or find all). - -=item B<-s, --subst> I<arg> ... - -Use I<arg> substitution regular expression to replace the matched -occurences in the title before it is used in the filename. More than -one expression can be specified in I<arg> if each is separated by a -whitespace. Supports "i" (case-insensitive) and "g" (global, find all). - -You can use the following delimiters: - - <> {} () / - -Please note: - - s/old/new/ .. Invalid - s/old//new/ .. OK - -=item B<--exec> I<arg> - -Invoke I<arg> when download has finished. The following specifiers can -be used in the I<arg>: - - %f .. Full path to the downloaded video file - -Note that I<all> occurences of the specifier will be replaced. - -=item B<--agent> I<arg> - -Identify as I<arg> to the HTTP servers. - -=item B<--proxy> I<arg> - -Use I<arg> for HTTP proxy, e.g. "http://foo:1234". Overrides the http_proxy -environment setting. - -=item B<--throttle> I<arg> - -Limit download transfer rate to I<arg> KB/s. Default is 0 (disabled). - -=item B<--connect-timeout> I<arg> - -This option essentially wraps the CURLOPT_CONNECTTIMEOUT of libcurl. -Default is 30. - - "Pass a long. It should contain the maximum time in seconds that - you allow the connection to the server to take. - - This only limits the connection phase, once it has connected, - this option is of no more use. Set to zero to disable connection - timeout (it will then only timeout on the system's internal - timeouts). See also the CURLOPT_TIMEOUT option." - -- C<curl_easy_setopt(3)> - -=item B<--transfer-timeout> I<arg> - -This option essentially wraps the CURLOPT_TIMEOUT of libcurl. -Default is 0 (disabled). - - "Pass a long as parameter containing the maximum time in seconds - that you allow the libcurl transfer operation to take. - - Normally, name lookups can take a considerable time and limiting - operations to less than a few minutes risk aborting perfectly - normal operations. This option will cause curl to use the - SIGALRM to enable time-outing system calls." - -- C<curl_easy_setopt(3)> - -=item B<--dns-cache-timeout> I<arg> - -This option essentially wraps the CURLOPT_DNS_CACHE_TIMEOUT of -libcurl. Default is 60.
View file
cclive-0.7.3.tar.gz/scripts
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/scripts/astyle_cpp.sh
Deleted
@@ -1,6 +0,0 @@ -#!/bin/sh - -# Applies our project-wide indentation rules to C++ source code. - -astyle --style=gnu -r -n -c "*.cpp" "*.h" -exit $?
View file
cclive-0.7.3.tar.gz/scripts/makedist.sh
Deleted
@@ -1,29 +0,0 @@ -#!/bin/sh - -# This script will commit ChangeLog temporarily so that git-archive -# picks the updated ChangeLog to the tarball. - -project=cclive -branch=master -after="Thu Aug 12 15:54:58 2010" - -echo "WARNING! - -Please note that this script will call git-reset (--hard) during -this process so be sure to commit your changes before you run this -script. - -Last chance to bail out (CTRL-C) before we call 'git reset --hard'." -read -s -n1 - -descr=`git describe $branch` -basename="$project-$descr" -tarball="$basename.tar.gz" - -echo ":: Generate $tarball" - -# TODO: Elegant way. -git log --stat --after="$after" >ChangeLog && \ -git commit -q ChangeLog -m "Generate $tarball" && \ -git archive $branch --prefix="$basename/" | gzip >$tarball && \ -git reset -q --hard HEAD~1
View file
cclive-0.7.3.tar.gz/src/CMakeLists.txt
Deleted
@@ -1,45 +0,0 @@ - -set (cclive_SRC - cclive/application.cpp - cclive/background.cpp - cclive/error.cpp - cclive/exec.cpp - cclive/file.cpp - cclive/get.cpp - cclive/license.cpp - cclive/log.cpp - cclive/main.cpp - cclive/options.cpp - cclive/progressbar.cpp - cclive/re.cpp - cclive/wait.cpp -) - -set (quvicpp_SRC - quvicpp/error.cpp - quvicpp/link.cpp - quvicpp/misc.cpp - quvicpp/options.cpp - quvicpp/query.cpp - quvicpp/video.cpp -) - -add_executable (cclive ${quvicpp_SRC} ${cclive_SRC}) - -include_directories( - BEFORE - ${CMAKE_BINARY_DIR} -) - -target_link_libraries (cclive - ${quvi_LIBRARIES} - ${curl_LIBRARIES} - ${pcrecpp_LIBRARIES} - ${Boost_LIBRARIES} -) - -# Install. - -install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cclive DESTINATION bin) - -
View file
cclive-0.7.3.tar.gz/src/cclive
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/src/cclive/application.cpp
Deleted
@@ -1,469 +0,0 @@ -/* -* Copyright (C) 2010,2011 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#include <ctime> - -#include <boost/foreach.hpp> -#include <boost/random.hpp> - -#include <curl/curl.h> - -#ifndef foreach -#define foreach BOOST_FOREACH -#endif - -#include "cclive/application.h" -#include "cclive/get.h" -#include "cclive/error.h" -#include "cclive/log.h" -#include "cclive/wait.h" -#include "cclive/background.h" - -namespace cclive -{ - -static boost::mt19937 _rng; - -static void -rand_decor () -{ - boost::uniform_int<> r(2,5); - - boost::variate_generator<boost::mt19937&, boost::uniform_int<> > v(_rng,r); - - const int n = v(); - - for (int i=0; i<n; ++i) cclive::log << "."; -} - -static void -handle_fetch (const quvi_word type, void*) -{ - rand_decor(); - if (type == QUVISTATUSTYPE_DONE) - cclive::log << " "; -} - -static void -handle_verify (const quvi_word type) -{ - rand_decor(); - if (type == QUVISTATUSTYPE_DONE) - cclive::log << "done.\n"; -} - -static int -status_callback (long param, void *ptr) -{ - const quvi_word status = quvi_loword(param); - const quvi_word type = quvi_hiword(param); - - switch (status) - { - case QUVISTATUS_FETCH : - handle_fetch (type,ptr); - break; - case QUVISTATUS_VERIFY: - handle_verify(type); - break; - } - - cclive::log << std::flush; - - return QUVI_OK; -} - -template<class Iterator> -static Iterator -make_unique (Iterator first, Iterator last) -{ - while (first != last) - { - Iterator next (first); - last = std::remove (++next, last, *first); - first = next; - } - return last; -} - -static void -print_retrying ( - const int retry, - const int max_retries, - const int retry_wait) -{ - if (retry > 0) - { - - cclive::log - << "Retrying " - << retry - << " of " - << max_retries - << " ... " - << std::flush; - - cclive::wait (retry_wait); - } -} - -static void -print_checking (const int i, const int n) -{ - if (n > 1) cclive::log << "(" << i << " of " << n << ") "; - cclive::log << "Checking ... " << std::flush; -} - -static void -print_quvi_error (const quvicpp::error& e) -{ - cclive::log << "libquvi: error: " << e.what() << std::endl; -} - -static void -check_quvi_error (const quvicpp::error& e) -{ - const long resp_code = e.response_code (); - - if (resp_code >= 400 && resp_code <= 500) - throw e; - - else - { - - switch (e.quvi_code ()) - { - - case QUVI_CURL: - print_quvi_error (e); - break; // Retry. - - default: - throw e; - } - - } - -} - -static const char format_usage[] = - "Usage:\n" - " --format arg get format arg\n" - " --format list list websites and supported formats\n" - " --format list arg match arg to websites, list formats\n" - "Examples:\n" - " --format mp4_360p get format mp4_360p (youtube)\n" - " --format list youtube list youtube formats\n" - " --format list dailym list dailym(otion) formats"; - -static application::exit_status -print_format_help () -{ - std::cout << format_usage << std::endl; - return application::ok; -} - -typedef std::map<std::string,std::string> map_ss; - -static void -print_host (const map_ss::value_type& t) -{ - std::cout - << t.first - << ":\n " - << t.second - << "\n" - << std::endl; -} - -static application::exit_status -handle_format_list ( - const boost::program_options::variables_map& map, - const quvicpp::query& query) -{
View file
cclive-0.7.3.tar.gz/src/cclive/background.cpp
Deleted
@@ -1,94 +0,0 @@ -/* -* Copyright (C) 2010,2011 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif - -#include <boost/iostreams/tee.hpp> - -#include "cclive/error.h" -#include "cclive/log.h" -#include "cclive/application.h" -#include "cclive/background.h" - -namespace cclive -{ - -namespace io = boost::iostreams; - -void -go_background (const std::string& log_file, bool& omit) -{ - -#ifdef HAVE_FORK - const pid_t pid = fork(); - - if (pid < 0) - { - - cclive::perror ("fork"); - - exit (application::system); - } - else if (pid != 0) - { - - // Parent: exit. - - std::clog - << "Run in background (pid: " - << static_cast<long>(pid) - << "). Redirect output to \"" - << log_file - << "\"." - << std::endl; - - exit (0); - } - - // Child: continue, become the session leader. - - setsid (); - - // Clear file mode creation mask. - - umask (0); - - // Close unneeded file descriptors/streams. - - freopen ("/dev/null", "w", stdout); - freopen ("/dev/null", "w", stderr); - freopen ("/dev/null", "r", stdin); - - // Redirect output to log file. - - cclive::log.push (io::tee (cclive::flushable_file_sink (log_file))); - - omit = true; -#endif // HAVE_FORK -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/error.cpp
Deleted
@@ -1,51 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#include <cerrno> -#include <climits> -#include <cstring> -#include <iostream> - -#include "cclive/error.h" - -namespace cclive -{ - -std::string -perror (const std::string& p/*=""*/) -{ - -#if defined (HAVE_STRERROR) || defined (HAVE_STRERROR_R) - std::string s; -#ifdef HAVE_STRERROR_R - char buf[256]; - s = strerror_r (errno, buf, sizeof(buf)); -#else - s = strerror (errno); -#endif - return s; -#else // No strerror or strerror_r. - perror (p.c_str ()); -#endif - -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/exec.cpp
Deleted
@@ -1,69 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <boost/format.hpp> - -#include "quvicpp/quvicpp.h" - -#include "cclive/options.h" -#include "cclive/file.h" -#include "cclive/re.h" -#include "cclive/exec.h" - -namespace cclive -{ - -namespace po = boost::program_options; - -void -exec (const file& file, const quvicpp::link& link, const options& opts) -{ - - const po::variables_map map = opts.map(); - - std::string arg = map["exec"].as<std::string>(); - - boost::format fmt; - - fmt = boost::format("s{%%f}{\"%1%\"}g") % file.path(); - cclive::re::subst (fmt.str(), arg); - - const int rc = system ( arg.c_str() ); - - std::stringstream b; - - switch (rc) - { - case 0: - break; - case -1: - b << "failed to execute: `" << arg << "'"; - break; - default: - b << "child exited with: " << (rc >> 8); - break; - } - - const std::string s = b.str(); - - if ( !s.empty() ) - throw std::runtime_error (s); -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/file.cpp
Deleted
@@ -1,498 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#include <fstream> -#include <stdexcept> -#include <sstream> -#include <iomanip> - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#ifdef HAVE_SIGNAL_H -#include <signal.h> -#endif - -#if defined (HAVE_SIGNAL_H) && defined (HAVE_SIGNAL) -#define WITH_SIGNAL -#endif - -#include <boost/format.hpp> -#include <boost/foreach.hpp> -#include <boost/filesystem.hpp> - -#ifndef foreach -#define foreach BOOST_FOREACH -#endif - -#include <curl/curl.h> - -#include "quvicpp/quvicpp.h" - -#include "cclive/options.h" -#include "cclive/progressbar.h" -#include "cclive/re.h" -#include "cclive/error.h" -#include "cclive/log.h" -#include "cclive/file.h" - -namespace cclive -{ - -file::file () - : _initial_length(0) -{ } - -file::file ( - const quvicpp::video& video, - const quvicpp::link& link, - const int n, - const options& opts) - : _initial_length(0) -{ - _init (video, link, n, opts); -} - -file::file (const file& f) - : _initial_length(0) -{ - _swap(f); -} - -file& -file::operator=(const file& f) -{ - if (this != &f) _swap(f); - return *this; -} - -void -file::_swap (const file& f) -{ - _name = f._name; - _path = f._path; - _initial_length = f._initial_length; -} - -#define E "server response code %ld, expected 200 or 206 (conn_code=%ld)" - -static std::string -format_unexpected_http_error (const long resp_code, const long conn_code) -{ - return (boost::format (E) % resp_code % conn_code).str (); -} - -#undef E - -#define E "%s (curl_code=%ld, resp_code=%ld, conn_code=%ld)" - -static std::string -format_error ( - const CURLcode curl_code, - const long resp_code, - const long conn_code) -{ - const std::string e = curl_easy_strerror (curl_code); - return (boost::format (E) % e % curl_code % resp_code % conn_code).str (); -} - -#undef E - -static size_t -write_cb (void *data, size_t size, size_t nmemb, void *ptr) -{ - std::ofstream *o = reinterpret_cast<std::ofstream*>(ptr); - const size_t rsize = size*nmemb; - o->write (static_cast<char*>(data), rsize); - o->flush (); - return rsize; -} - -#ifdef WITH_SIGNAL -static volatile sig_atomic_t recv_usr1; - -static void -handle_usr1 (int s) -{ - if (s == SIGUSR1) - recv_usr1 = 1; -} -#endif - -static int -progress_cb (void *ptr, double, double now, double, double) -{ -#ifdef WITH_SIGNAL - if (recv_usr1) - { - recv_usr1 = 0; - return 1; // Return a non-zero value to abort this transfer. - } -#endif - reinterpret_cast<progressbar*>(ptr)->update (now); - return 0; -} - -namespace po = boost::program_options; - -bool -file::write ( - const quvicpp::query& q, - const quvicpp::link& l, - const options& opts) const -{ - CURL *curl = q.curlHandle(); - - curl_easy_setopt (curl, CURLOPT_URL, l.url().c_str()); - curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_cb); - - const po::variables_map map = opts.map(); - std::ios_base::openmode mode = std::ofstream::binary; - - if ( map.count ("overwrite") ) - mode |= std::ofstream::trunc; - else - { - if ( _should_continue() ) - mode |= std::ofstream::app; - } - - std::ofstream out( _path.c_str(), mode ); - - if ( out.fail() ) - { - std::string s = _path + ": "; - - if (errno) - s += cclive::perror (); - else - s += "unknown file open error"; - - throw std::runtime_error (s); - } - - curl_easy_setopt (curl, CURLOPT_WRITEDATA, &out); - - curl_easy_setopt (curl, CURLOPT_ENCODING, "identity"); - curl_easy_setopt (curl, CURLOPT_HEADER, 0L); - - progressbar pb (*this, l, opts); - curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, &pb); - curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0L); - curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, progress_cb);
View file
cclive-0.7.3.tar.gz/src/cclive/get.cpp
Deleted
@@ -1,95 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <iostream> - -#include "quvicpp/quvicpp.h" - -#include "cclive/log.h" -#include "cclive/options.h" -#include "cclive/file.h" -#include "cclive/exec.h" -#include "cclive/wait.h" -#include "cclive/get.h" - -namespace cclive -{ - -namespace po = boost::program_options; - -void -get ( - const quvicpp::query& query, - quvicpp::video& video, - const options& opts) -{ - const po::variables_map map = opts.map (); - - const bool no_download = map.count ("no-download"); - const bool exec = map.count ("exec"); - - const int max_retries = map["max-retries"].as<int>(); - const int retry_wait = map["retry-wait"].as<int>(); - - int n = 0; - - quvicpp::link link; - - while ( (link = video.next_link ()).ok ()) - { - ++n; - - int retry = 0; - - while (retry <= max_retries) - { - cclive::file file (video, link, n, opts); - - if (retry > 0) - { - cclive::log - << "Retrying " - << retry - << " of " - << max_retries - << " ... " - << std::flush; - - cclive::wait (retry_wait); - } - - ++retry; - - cclive::log << file.to_s (link) << std::endl; - - if (!no_download) - { - if (!file.write (query, link, opts)) - continue; // Retry. - - if (exec) - cclive::exec (file, link, opts); - } - - break; // Stop retrying. - } - } -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/license.cpp
Deleted
@@ -1,41 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -namespace cclive -{ - -char LICENSE[] = - "/*\n" - "* Copyright (C) 2010 Toni Gundogdu.\n" - "*\n" - "* This program is free software: you can redistribute it and/or modify\n" - "* it under the terms of the GNU General Public License as published by\n" - "* the Free Software Foundation, either version 3 of the License, or\n" - "* (at your option) any later version.\n" - "*\n" - "* This program is distributed in the hope that it will be useful,\n" - "* but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "* GNU General Public License for more details.\n" - "*\n" - "* You should have received a copy of the GNU General Public License\n" - "* along with this program. If not, see <http://www.gnu.org/licenses/>.\n" - "*/"; - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/log.cpp
Deleted
@@ -1,145 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <stdexcept> -#include <cerrno> - -#include <boost/filesystem.hpp> - -#include "cclive/error.h" -#include "cclive/log.h" - -namespace cclive -{ - -namespace io = boost::iostreams; - -io::filtering_ostream log; - -omit_sink::omit_sink (bool b/*=false*/) : _omit (b) { } - -std::streamsize -omit_sink::write (const char *s, std::streamsize n) -{ - if (!_omit) std::clog.write (s,n); - return n; -} - -// Constructor. - -flushable_file_sink::flushable_file_sink ( - const std::string& fpath, - const std::ios_base::openmode mode/*=std::ios::trunc|std::ios::out*/) - : _mode (mode), _fpath (fpath) -{ - _open (); -} - -// Copy constructor. - -flushable_file_sink::flushable_file_sink (const flushable_file_sink& f) -{ - _swap (f); -} - -// Copy assignment operator. - -flushable_file_sink& -flushable_file_sink::operator=(const flushable_file_sink& f) -{ - if (this != &f) _swap (f); - return *this; -} - -void -flushable_file_sink::_swap (const flushable_file_sink& f) -{ - close (); - _fpath = f._fpath; - _mode = f._mode; - _open (); -} - -bool -flushable_file_sink::is_open () const -{ - return _f.is_open (); -} - -std::streamsize -flushable_file_sink::write (const char *s, std::streamsize n) -{ - _f.write (s,n); - return n; -} - -std::streampos -flushable_file_sink::seek (std::streamoff o, std::ios_base::seekdir d) -{ - _f.seekp (o,d); - _f.seekg (o,d); - return o; -} - -std::streamsize -flushable_file_sink::read (char_type *t, std::streamsize n) -{ - _f.read (t,n); - return n; -} - -bool -flushable_file_sink::flush () -{ - _f.flush (); - return true; -} - -void -flushable_file_sink::close () -{ - flush(); - _f.close(); -} - -namespace fs = boost::filesystem; - -void -flushable_file_sink::_open () -{ - - _fpath = fs::system_complete (fs::path (_fpath)).string (); - - _f.open (_fpath.c_str (), _mode); - - if (_f.fail () ) - { - - std::string s = _fpath + ": "; - - if (errno) - s += cclive::perror (); - else - s += "unknown file open error"; - - throw std::runtime_error (s); - } -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/main.cpp
Deleted
@@ -1,49 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <iostream> - -#include "cclive/application.h" - -int -main (int argc, char *argv[]) -{ - - cclive::application app; - int rc = 0; // OK. - - try - { - rc = app.exec(argc,argv); - } - - // Thrown by quvicpp::query constructor (e.g. quvi_init failure). - catch (const quvicpp::error& e) - { - std::clog << "libquvi: error: " << e.what() << std::endl; - } - - // Thrown by boost (e.g. cclive::go_background failure). - catch (const std::runtime_error& e) - { - std::clog << "error: " << e.what() << std::endl; - } - - return rc; -} - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/options.cpp
Deleted
@@ -1,263 +0,0 @@ -/* -* Copyright (C) 2010,2011 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#include <fstream> -#include <cstring> - -#include <boost/filesystem.hpp> -#include <boost/foreach.hpp> - -#ifndef foreach -#define foreach BOOST_FOREACH -#endif - -#include "cclive/re.h" -#include "cclive/options.h" - -namespace cclive -{ - -namespace opts = boost::program_options; -namespace fs = boost::filesystem; - -void -options::exec (int argc, char **argv) -{ - // Path to ccliverc. - -#ifdef HAVE_BOOST_FILESYSTEM_VERSION_3 - fs::path config_path(fs::current_path()); -#else - fs::path config_path(fs::current_path<fs::path>()); -#endif - - const char *home = getenv ("HOME"); - - if (home && strlen (home) > 0) - config_path = fs::system_complete (fs::path (home)); - - config_path /= -#ifndef _WIN32 - std::string (".") + -#endif - std::string ("ccliverc"); - - // Construct options. - - opts::options_description generic; - - generic.add_options() - ("version", - "Print version and exit") - ("help", - "Print help and exit") - ("license", - "Print license and exit") - ("support", - "Print supported websites and exit") - ("verbose-libcurl", - "Turn on libcurl verbose output") - ("quiet,q", - "Turn off all output, excl. errors") -#ifdef HAVE_FORK - ("background,b", - "Go to background") -#endif - ("format,f", - opts::value<std::string>()->default_value("default"), - "Download video format") - ("continue,c", - "Resume partially downloaded video") - ("overwrite,W", - "Overwrite existing video") - ("output-file,O", - opts::value<std::string>(), - "Write downloaded video to file") - ("no-download,n", - "Do not download video, print info only") -#ifdef HAVE_QUVIOPT_NOSHORTENED - ("no-shortened,s", - "Do not decompress shortened URLs") -#endif - ("no-proxy", - "Disable use of http proxy") - ("log-file", - opts::value<std::string>()->default_value("cclive_log"), - "Write log output to arg") - ("update-interval", - opts::value<double>()->default_value(1.0), - "Update interval of progressbar") - ("config-file", - opts::value<std::string>(&_config_file) - ->default_value(config_path.string()), - "File to read cclive arguments from") - ; - - // Config. - - opts::options_description config ("Configuration"); - - config.add_options () - ("filename-format", - opts::value<std::string>()->default_value("%t.%s"), - "Output video filename format") - ("output-dir", - opts::value<std::string>(), - "Output directory for downloaded videos") - ("regexp", - opts::value<std::string>()->default_value("/(\\w|\\pL|\\s)/g"), - "Regexp to clean up video title") - ("subst", opts::value<std::string>(), - "Replace matched occurences in filename") - ("exec", opts::value<std::string>(), - "Invoke arg after download finishes") - ("agent", - opts::value<std::string>()->default_value("Mozilla/5.0"), - "Identify as arg to http servers") - ("proxy", opts::value<std::string>(), - "Use proxy for http connections") - ("throttle", opts::value<int>()->default_value(0), - "Limit download transfer rate to KB/s") - ("connect-timeout", opts::value<int>()->default_value(30), - "Seconds connecting allowed to take") - ("transfer-timeout", opts::value<int>()->default_value(0), - "Seconds transfer allowed to take") - ("dns-cache-timeout", opts::value<int>()->default_value(60), - "Seconds dns resolves kept in memory") - ("max-retries", opts::value<int>()->default_value(5), - "Max download attempts before giving up") - ("retry-wait", opts::value<int>()->default_value(5), - "Time to wait before retrying") - ; - - // Hidden. - - opts::options_description hidden; - - hidden.add_options () - ("url", opts::value< std::vector<std::string> >(), - "url") - ; - - // Visible. - - _visible.add (generic).add (config); - - // Command line options. - - opts::options_description cmdline_options; - - cmdline_options.add (generic).add (config).add (hidden); - - // Config file options. - - opts::options_description config_file_options; - - config_file_options.add (config); - - // Positional. - - opts::positional_options_description p; - p.add ("url", -1); - - // Parse. - - store(opts::command_line_parser (argc,argv) - .options (cmdline_options).positional (p).run (), _map); - - notify (_map); - - // Read config. - - std::ifstream ifs (_config_file.c_str ()); - - if (ifs) - { - store (parse_config_file (ifs, config_file_options), _map); - notify (_map); - } - - _verify (); -} - -const opts::variables_map& options::map () const
View file
cclive-0.7.3.tar.gz/src/cclive/progressbar.cpp
Deleted
@@ -1,418 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#include <iomanip> -#include <cstdio> -#include <ctime> - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif - -#ifdef HAVE_SIGNAL_H -#include <signal.h> -#endif - -#ifdef HAVE_SYS_IOCTL_H -#include <sys/ioctl.h> -#endif - -#include <boost/filesystem.hpp> -#include <boost/date_time/posix_time/posix_time.hpp> - -#include "quvicpp/quvicpp.h" - -#include "cclive/options.h" -#include "cclive/file.h" -#include "cclive/log.h" -#include "cclive/progressbar.h" - -#if defined(SIGWINCH) && defined(TIOCGWINSZ) -#define WITH_RESIZE -#endif - -namespace cclive -{ -#ifdef WITH_RESIZE -static volatile sig_atomic_t recv_sigwinch; - -static void handle_sigwinch (int s) -{ - recv_sigwinch = 1; -} - -static size_t get_term_width () -{ - const int fd = fileno (stderr); - - winsize wsz; - - if (ioctl (fd, TIOCGWINSZ, &wsz) < 0) - return 0; - - return wsz.ws_col; -} -#endif // WITH_RESIZE - -namespace po = boost::program_options; - -progressbar::progressbar ( - const file& f, - const quvicpp::link& l, - const options& opts) - : _update_interval (.2), - _expected_bytes (l.length ()), - _initial_bytes (f.initial_length ()), - _time_started (0), - _last_update (0), - _term_width (0), - _dot_count (0), - _count (0), - _width (0), - _file (f), - _done (false), - _mode (normal) -{ - if (_initial_bytes > _expected_bytes) - _expected_bytes = _initial_bytes; - -#ifdef WITH_RESIZE - signal (SIGWINCH, handle_sigwinch); - - if (!_term_width || recv_sigwinch) - { - _term_width = get_term_width (); - - if (!_term_width) - _term_width = default_term_width; - } -#else - _term_width = default_term_width; -#endif - - _width = _term_width; - - time (&_time_started); - - const po::variables_map map = opts.map (); - - if (map.count ("background")) - _mode = dotline; - - _update_interval = map["update-interval"].as<double>(); -} - -static double to_mb (const double bytes) -{ - return bytes/(1024*1024); -} - -namespace pt = boost::posix_time; - -static std::string to_s (const int secs) -{ - pt::time_duration td = pt::seconds (secs); - return pt::to_simple_string (td); -} - -static std::string to_unit (double& rate) -{ - std::string units = "K/s"; - if (rate >= 1024.0*1024.0*1024.0) - { - rate /= 1024.0*1024.0*1024.0; - units = "G/s"; - } - else if (rate >= 1024.0*1024.0) - { - rate /= 1024.0*1024.0; - units = "M/s"; - } - else - rate /= 1024.0; - return units; -} - -namespace fs = boost::filesystem; - -void -progressbar::update (double now) -{ - time_t tnow; - - time (&tnow); - - const time_t elapsed = tnow - _time_started; - - bool force_update = false; - -#ifdef WITH_RESIZE - if (recv_sigwinch && _mode == normal) - { - const size_t old_term_width = _term_width; - - _term_width = get_term_width (); - - if (!_term_width) - _term_width = default_term_width; - - if (_term_width != old_term_width) - { - _width = _term_width; - force_update = true; - } - - recv_sigwinch = 0; - } -#endif // WITH_RESIZE - - const bool inactive = now == 0; - - if (!_done) - { - if ((elapsed - _last_update) < _update_interval - && !force_update) - { - return; - } - } - else
View file
cclive-0.7.3.tar.gz/src/cclive/re.cpp
Deleted
@@ -1,128 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <pcrecpp.h> - -#include <boost/format.hpp> - -#include "cclive/re.h" - -namespace cclive -{ -namespace re -{ - -static pcrecpp::RE_Options -_init_re_opts (const std::string& flags) -{ - - pcrecpp::RE_Options opts; - - opts.set_caseless (strstr (flags.c_str (), "i") != 0); - opts.set_utf8 (true); - - return opts; -} - -bool -subst (const std::string& re, std::string& src) -{ - - std::string pat, sub, flags; - - static const char delims_b[] = "\\{\\<\\[\\(\\/"; - static const char delims_c[] = "\\}\\>\\]\\)\\/"; - - boost::format fmt = - boost::format ("^s[%1%](.*)[%2%][%3%](.*)[%4%](.*)$") - % delims_b % delims_c % delims_b % delims_c; - - pcrecpp::RE rx (fmt.str (), pcrecpp::UTF8 ()); - - if ( rx.PartialMatch (re, &pat, &sub, &flags) ) - { - - if (src.empty()) // Verify regexp only. - return true; - - pcrecpp::RE_Options opts = _init_re_opts (flags); - - pcrecpp::RE subs (pat, opts); - - (strstr (flags.c_str (), "g")) - ? subs.GlobalReplace (sub, &src) - : subs.Replace (sub, &src); - - return true; - } - return false; -} - -bool -match (const std::string& re, std::string& src) -{ - - std::string pat, flags; - - pcrecpp::RE rx ("^\\/(.*)\\/(.*)$", pcrecpp::UTF8 ()); - - if (rx.PartialMatch (re, &pat, &flags)) - { - - if (src.empty ()) // Verify regexp only. - return true; - - pcrecpp::RE_Options opts = _init_re_opts (flags); - - if (strstr (flags.c_str (), "g") != 0) - { - - pcrecpp::StringPiece sp (src); - pcrecpp::RE re (pat, opts); - - src.clear (); - - std::string s; - - while (re.FindAndConsume (&sp, &s)) - src += s; - } - - else - { - std::string tmp = src; - src.clear (); - pcrecpp::RE (pat, opts).PartialMatch (tmp, &src); - } - - return true; - } - return false; -} - -void -trim (std::string& src) -{ - subst ("s{^[\\s]+}//", src); - subst ("s{\\s+$}//", src); - subst ("s{\\s\\s+}/ /g", src); -} - -} -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/cclive/wait.cpp
Deleted
@@ -1,59 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#include <iostream> - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#ifdef _WIN32 -#include <windows.h> -#define sleep(n) Sleep(n*1000) -#endif - -#include "cclive/log.h" -#include "cclive/wait.h" - -namespace cclive -{ - -void -wait (const int retry_wait) -{ - - for (int i=1; i<=retry_wait; ++i) - { - - if (i % 5 == 0) - cclive::log << i; - else - cclive::log << "."; - - cclive::log << std::flush; - - sleep(1); - } - - cclive::log << std::endl; -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/quvicpp
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/src/quvicpp/error.cpp
Deleted
@@ -1,86 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <quvicpp/quvicpp.h> - -namespace quvicpp -{ - -// Constructor. - -error::error (quvi_t q, QUVIcode c) - : _quvi_code (QUVI_OK), _resp_code (0) -{ - // Friend of quvicpp::error class -> clean API. - _what = quvi_strerror (q, c); - quvi_getinfo (q, QUVIINFO_HTTPCODE, &_resp_code); -} - -// Copy constructor. - -error::error (const error& e) - : _quvi_code (QUVI_OK), _resp_code (0) -{ - _swap(e); -} - -// Copy assignment operator. - -error& -error::operator=(const error& e) -{ - if (this != &e) - _swap(e); - return *this; -} - -// Destructor. -error::~error () { } - -// Swap. - -void -error::_swap (const error& e) -{ - _quvi_code = e._quvi_code; - _resp_code = e._resp_code; - _what = e._what; -} - -// Get. - -const std::string& -error::what () const -{ - return _what; -} - -long -error::response_code () const -{ - return _resp_code; -} - -QUVIcode -error::quvi_code () const -{ - return _quvi_code; -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/quvicpp/link.cpp
Deleted
@@ -1,112 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <quvicpp/quvicpp.h> - -namespace quvicpp -{ - -// Constructors. - -link::link () - : _length(-1) -{ } - -link::link (quvi_video_t qv) - : _length(-1) -{ -#define _wrap(id,dst,type) \ - do { \ - type tmp; \ - quvi_getprop(qv,id,&tmp); \ - dst = tmp; \ - } while (0) - _wrap(QUVIPROP_VIDEOURL, _url, char*); - _wrap(QUVIPROP_VIDEOFILECONTENTTYPE, _contentType, char*); - _wrap(QUVIPROP_VIDEOFILESUFFIX, _suffix, char*); - _wrap(QUVIPROP_VIDEOFILELENGTH, _length, double); -#undef _wrap -} - -// Copy constructor. - -link::link (const link& l) - : _length(-1) -{ - _swap(l); -} - -// Copy assignment operator. - -link& -link::operator=(const link& l) -{ - if (this != &l) - _swap(l); - return *this; -} - -// Destructor. - -link::~link () { } - -// Swap. - -void -link::_swap (const link& l) -{ - _contentType = l._contentType; - _suffix = l._suffix; - _url = l._url; - _length = l._length; -} - -// Get. - -const std::string& -link::content_type () const -{ - return _contentType; -} - -const std::string& -link::suffix () const -{ - return _suffix; -} - -const std::string& -link::url () const -{ - return _url; -} - -double -link::length () const -{ - return _length; -} - -bool -link::ok () const -{ - return _length > -1; -} - -} // End namespace - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/quvicpp/misc.cpp
Deleted
@@ -1,53 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <sstream> - -#include <quvicpp/quvicpp.h> - -namespace quvicpp -{ - -// Version. - -std::string version () -{ - return quvi_version(QUVI_VERSION); -} -std::string version_long () -{ - return quvi_version(QUVI_VERSION_LONG); -} - -// To string. Mimic quvi(1) behaviour. - -std::string -support_to_s (const std::map<std::string,std::string>& map) -{ - - std::map<std::string,std::string>::const_iterator iter; - std::stringstream b; - - for (iter = map.begin(); iter != map.end(); ++iter) - b << (*iter).first << "\t" << (*iter).second << "\n"; - - return b.str(); -} - -} // End namespace - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/quvicpp/options.cpp
Deleted
@@ -1,101 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <cassert> -#include <iostream> - -#include <quvicpp/quvicpp.h> - -namespace quvicpp -{ - -options::options () - : _statusfunc(NULL), - _writefunc(NULL), - _format("default"), - _verify(true), - _shortened(true) -{ } - -// Copy constructor. - -options::options (const options& opts) - : _statusfunc(NULL), - _writefunc(NULL), - _format("default"), - _verify(true), - _shortened(true) -{ - _swap(opts); -} - -// Copy assignment operator. - -options& -options::operator=(const options& qo) -{ - if (this != &qo) - _swap(qo); - return *this; -} - -// Destructor. - -options::~options () -{ - _statusfunc = NULL; - _writefunc = NULL; -} - -// Swap. - -void -options::_swap (const options& qo) -{ - _format = qo._format; - _verify = qo._verify; - _shortened = qo._shortened; - _statusfunc = qo._statusfunc; - _writefunc = qo._writefunc; -} - -// Set. - -void options::format (const std::string& fmt) -{ - _format = fmt; -} -void options::verify (const bool b) -{ - _verify = b; -} -void options::shortened (const bool b) -{ - _shortened = b; -} -void options::statusfunc (quvi_callback_status cb) -{ - _statusfunc = cb; -} -void options::writefunc (quvi_callback_write cb) -{ - _writefunc = cb; -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/quvicpp/query.cpp
Deleted
@@ -1,161 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "config.h" - -#include <cassert> - -#include <quvicpp/quvicpp.h> - -namespace quvicpp -{ - -// Constructor. - -query::query () - : _quvi(NULL), _curl(NULL) -{ - _init(); -} - -// Copy constructor. - -query::query (const query& q) - : _quvi(NULL), _curl(NULL) -{ - _init(); -} - -// Copy assignment operator. - -query& -query::operator=(const query& q) -{ - if (this != &q) - { - _close(); - _init(); - } - return *this; -} - -// Destructor. - -query::~query () -{ - _close(); -} - -// Init. - -void -query::_init () -{ - - const QUVIcode rc = quvi_init(&_quvi); - - if (rc != QUVI_OK) - throw error(_quvi,rc); - - assert (_quvi != NULL); - - quvi_getinfo(_quvi, QUVIINFO_CURL, &_curl); - assert (_curl != NULL); -} - -// Close. - -void -query::_close () -{ - if (_quvi) - quvi_close (&_quvi); // Resets to NULL. - assert (_quvi == NULL); - _curl = NULL; -} - -// Parse. - -video -query::parse (const url& pageURL, const options& opts) const -{ - - // Friend of quvicpp::options class -> clean API. - - if (!opts._format.empty()) - quvi_setopt(_quvi, QUVIOPT_FORMAT, opts._format.c_str()); - - quvi_setopt(_quvi, QUVIOPT_STATUSFUNCTION, opts._statusfunc); - quvi_setopt(_quvi, QUVIOPT_WRITEFUNCTION, opts._writefunc); -#ifdef _0 - quvi_setopt(_quvi, QUVIOPT_NOVERIFY, opts._verify ? 1L:0L); -#endif -#ifdef HAVE_QUVIOPT_NOSHORTENED - quvi_setopt(_quvi, QUVIOPT_NOSHORTENED, opts._shortened ? 1L:0L); -#endif -#ifdef HAVE_QUVIOPT_CATEGORY - quvi_setopt(_quvi, QUVIOPT_CATEGORY, QUVIPROTO_HTTP); -#endif - - quvi_video_t qv; - - QUVIcode rc = - quvi_parse(_quvi, const_cast<char*>(pageURL.c_str()), &qv); - - if (rc != QUVI_OK) - throw error(_quvi,rc); - - assert (qv != NULL); - - video v(qv); - quvi_parse_close(&qv); - - return v; -} - -// Get. - -void* -query::curlHandle () const -{ - return _curl; -} - -// Support. - -std::map<std::string,std::string> -query::support () const -{ - - std::map<std::string,std::string> map; - char *d=NULL, *f=NULL; - - while (quvi_next_supported_website(_quvi, &d, &f) == QUVI_OK) - { - map[d] = f; - quvi_free(d); - d = NULL; - quvi_free(f); - f = NULL; - } - - return map; -} - -} // End namespace - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/src/quvicpp/video.cpp
Deleted
@@ -1,189 +0,0 @@ -/* -* Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com> -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <sstream> -#include <iomanip> - -#include <quvicpp/quvicpp.h> - -namespace quvicpp -{ - -// Constructors. - -video::video () - : _current_link( _links.begin() ), _http_code(-1) -{ } - -video::video (quvi_video_t qv) - : _current_link( _links.begin() ), _http_code(-1) -{ -#define _wrap(id,dst,type) \ - do { \ - type tmp; \ - quvi_getprop(qv,id,&tmp); \ - dst = tmp; \ - } while (0) - _wrap(QUVIPROP_HOSTID, _host, char*); - _wrap(QUVIPROP_PAGEURL, _url, char*); - _wrap(QUVIPROP_PAGETITLE, _title, char*); - _wrap(QUVIPROP_VIDEOID, _id, char*); - _wrap(QUVIPROP_VIDEOFORMAT, _format, char*); - _wrap(QUVIPROP_HTTPCODE, _http_code, long); -#undef _wrap - - do - { - _links.push_back( link(qv) ); - } - while (quvi_next_videolink(qv) == QUVI_OK); - - _current_link = _links.begin(); -} - -// Copy constructor. - -video::video (const video& v) - : _current_link( _links.begin() ), _http_code(-1) -{ - _swap(v); -} - -// Copy assignment operator. - -video& -video::operator=(const video& v) -{ - if (this != &v) - _swap(v); - return *this; -} - -// Destructor. - -video::~video () { } - -// Swap. - -void -video::_swap (const video& v) -{ - _links = v._links; - _title = v._title; - _host = v._host; - _url = v._url; - _id = v._id; - _format = v._format; - _http_code = v._http_code; - _current_link = _links.begin(); -} - -// Get. - -const std::string& video::title () const -{ - return _title; -} -const std::string& video::host () const -{ - return _host; -} -const std::string& video::url () const -{ - return _url; -} -const std::string& video::id () const -{ - return _id; -} -const std::string& video::format() const -{ - return _format; -} -long video::http_code () const -{ - return _http_code; -} - -// Next link. - -link -video::next_link () -{ - if (_current_link == _links.end()) - { - _current_link = _links.begin(); - return link(); - } - return *(_current_link)++; -} - -// To string. Mimic quvi(1) behaviour. - -std::string -video::to_s () -{ - - std::stringstream b; - - b.setf(std::ios::fixed); - - b << "title\t: " << _title << "\n" - << "host\t: " << _host << "\n" - << "url\t: " << _url << "\n" - << "id\t: " << _id << "\n" - << "format\t: " << _format << "\n" - << "httpcode: " << _http_code << "\n"; - - for (int i=0;; ++i) - { - - const link l = next_link(); - - if (!l.ok()) break; - - b << "link #" - << i - << "\t: " - << l.url() - << "\n:: length\t: " - << std::setprecision(0) - << l.length() - << "\n:: content-type\t: " - << l.content_type() - << "\n:: suffix\t: " - << l.suffix() - << "\n"; - } - - return b.str(); -} - -std::ostream& operator<<(std::ostream& os, video& v) -{ - return os << v.to_s(); -} - -void -video::print (std::ostream& os) -{ - os << to_s(); -} - -} // End namespace. - -// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.3.tar.gz/toolchains
Deleted
-(directory)
View file
cclive-0.7.3.tar.gz/toolchains/mingw32.cmake
Deleted
@@ -1,19 +0,0 @@ - -# Tested: Arch Linux (mingw32-gcc 4.5). - -set (CMAKE_SYSTEM_NAME Windows) - -set (CMAKE_C_COMPILER i486-mingw32-gcc) -set (CMAKE_CXX_COMPILER i486-mingw32-g++) - -#add_definitions (-static-libgcc -static-libstdc++) - -set (ENV{PKG_CONFIG_PATH} /opt/mingw32/lib/pkgconfig) - -set (CMAKE_FIND_ROOT_PATH /opt/mingw32) - -set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -
View file
cclive-0.7.3.tar.gz/uninstall.cmake.in
Deleted
@@ -1,21 +0,0 @@ -IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") -ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - -FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -STRING(REGEX REPLACE "\n" ";" files "${files}") -FOREACH(file ${files}) - MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") - IF(EXISTS "$ENV{DESTDIR}${file}") - EXEC_PROGRAM( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - IF(NOT "${rm_retval}" STREQUAL 0) - MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") - ENDIF(NOT "${rm_retval}" STREQUAL 0) - ELSE(EXISTS "$ENV{DESTDIR}${file}") - MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") - ENDIF(EXISTS "$ENV{DESTDIR}${file}") -ENDFOREACH(file)
View file
cclive-0.7.3.tar.gz/ChangeLog -> cclive-0.7.8.tar.bz2/ChangeLog
Changed
@@ -1,24 +1,1461 @@ -commit b1d8a68abb7bb046c6b11bb94094fb70906cfa4d +commit b555a5e +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-26 + + Update news for 0.7.8 + +NEWS + +commit 8e11804 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-26 + + Bump version to 0.7.8 + +m4/version.m4 + +commit 69e716f +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-26 + + Revise manual + + * Use =head2 tag instead of =item + * Add DEPRECATED section + +doc/man1/cclive.1.pod + +commit 9d0cde2 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-26 + + Revise --query-format, --format descriptions + +doc/man1/cclive.1.pod + +commit 5095fa8 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-22 + + Revise --exec in manual + + * Make a note of multi occurences being accepted + * Add %t + +doc/man1/cclive.1.pod + +commit ef7727f +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-22 + + Add %t support to --exec + +src/cc/exec.cpp +src/cc/file.cpp +src/cc/file.h + +commit c98398a +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-22 + + Allow multiple occurences of --exec + +src/cc/exec.cpp +src/cc/options.cpp +src/cc/util.h + +commit 5d672a4 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-21 + + Revise --update-interval description in manual + +doc/man1/cclive.1.pod + +commit 6311dfb +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-21 + + Revise --exec in manual + + * Add example + * Fix typos + +doc/man1/cclive.1.pod + +commit 7749585 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-21 + + Make --exec work with "nothing todo" + +src/cc/exec.cpp +src/cc/file.cpp +src/cc/file.h +src/cc/get.cpp +src/cc/util.h + +commit 3661079 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-21 + + Add %n support to --exec + +src/cc/exec.cpp +src/cc/file.cpp +src/cc/file.h + +commit 2fc7514 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-21 + + Do not quote %f (filepath) with --exec + + Example: ccl "URL" --exec "echo %f.mp3" + Result: foo .mp3 + + This patch addresses this by removing the 'auto-quotation' of %f. + Make --exec accept ' in addition to ". + + Result: foo.mp3 + +src/cc/exec.cpp + +commit 1beec0c +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-21 + + Eliminate extra std::string + +src/cc/exec.cpp + +commit 04b0362 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-16 + + Do not parse URL scheme unnecessarily + + Rewrite is_url so that it does not parse the URL scheme. + cclive does not have any use for the parsed string. + +src/cc/application.cpp + +commit 8fcc5d3 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-16 + + Bump version to 0.7.7 + +m4/version.m4 + +commit a654628 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-16 + + Update NEWS for 0.7.7 + +NEWS + +commit a1a9e01 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-08 + + BUGFIX #13: -O option evaluated incorrectly + + "When an absolute pathname is given as the argument (arg) of the -O + or --output-file option the output filename considered by cclive is + incorrect." + + Example: + cd /foo ; cclive -O /bar/baz.flv URL (...) + error: /foo/bar/baz.flv: No such file or directory + + Fix: + Do not use getcwd(3) at all + + WWW: + <http://sourceforge.net/apps/trac/cclive/ticket/13> + +src/cc/file.cpp + +commit 76b8932 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-08 + + Remove getpwd check + +configure.ac + +commit 5027922 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-09-26 + + Add youtube fmt note + +doc/man1/cclive.1.pod + +commit 881d2b4 +Author: Toni Gundogdu <legatvs@gmail.com>
View file
cclive-0.7.3.tar.gz/INSTALL -> cclive-0.7.8.tar.bz2/INSTALL
Changed
@@ -1,67 +1,38 @@ - Prerequisites +Prerequisites +------------- -* libquvi (0.2.0+) -* libboost (1.42.0+) -* libpcrecpp (8.02+) -* libcurl (7.20.0+) - --- Additionally for building - -* gcc/++ (4.5.0+, 4.2 should be OK) -* cmake (2.8.2+, looks for 2.8, see top-level CMakeLists.txt) +* libquvi (0.2.16.1+) +* libboost (1.42.0+) +* libpcre(cpp) (8.02+) +* libcurl (7.20.0+) Note that cclive may or may not compile with earlier versions. The above versions are the ones that I've tested. - Installation - -% mkdir tmp; cd tmp -% cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/usr .. -% make install -... -% make uninstall - - - Installation: Variables - -These are some of the frequently used ones. - - * CMAKE_INSTALL_PREFIX=(...PATH...) - Install destination for cclive, default may vary. - - * CMAKE_BUILD_TYPE=(none|debug|release|relwithdebinfo|minsizerel) - Type of build, default is debug. - - * CMAKE_VERBOSE_MAKEFILE=(true,false) - Build with verbose makefiles, default is false. - - * WITHOUT_DOC=(true|false) - Install without documentation (e.g. man/cclive.1), default is false. - -Example: - % mkdir tmp; cd tmp - % cmake -DWITHOUT_DOC=true -DCMAKE_INSTALL_PREFIX=/usr/local .. - % make install - -Take a look at the CMakeLists.txt files found in the source tree, -if you need to dig deeper. The cmake (2.8) documentation can be -found at: - <http://www.cmake.org/cmake/help/cmake-2-8-docs.html> +Installation from source +------------------------ -Note that you could also run cmake with -i (wizard mode). +"./configure && make install", typically. See also "./configure --help". +If you are compiling cclive from the development code from the git +repository, see "Installation from development code", instead. + --enable-ccl Make a symbolic link from 'cclive' (binary) to 'ccl' + --without-manual Do not install manual page(s) - Notes for porters and packagers -Please ask the platform specific questions from those familiar with your -platform. I develop cclive on Linux for Linux, and test it occasionally on -FreeBSD. +Installation from development code +---------------------------------- -If you need an additional check for, e.g. a symbol or a function, see -the top-level CMakeLists.txt and config.h.in files. We can add those -at the upstream if that makes the porting easier. +If you are compiling cclive from the development code, run "autogen.sh", +first. This generates the configuration files that are not in the git +repository. You will need: + * Perl (with pod2man) + * GNU autoconf + * GNU automake +Once the files have been generated, follow the instructions in "Installation +from source" above.
View file
cclive-0.7.8.tar.bz2/Makefile.am
Added
@@ -0,0 +1,22 @@ +ACLOCAL_AMFLAGS=-I m4 +EXTRA_DIST= gen-ver.sh VERSION + +SUBDIRS= src +if WITH_MANUAL +SUBDIRS+= doc +endif + +.PHONY: ChangeLog VERSION + +VERSION: + @if test -d "$(top_srcdir)/.git" -o -f "$(top_srcdir)/.git"; then \ + "$(top_srcdir)/gen-ver.sh" "$(top_srcdir)" > $@; \ + fi + +ChangeLog: + @if test -d "$(top_srcdir)/.git" -o -f "$(top_srcdir)/.git"; then \ + git log --stat --name-only --date=short --abbrev-commit \ + --after="Thu Aug 12 15:54:58 2010" > $@; \ + fi + +dist-hook: ChangeLog VERSION
View file
cclive-0.7.8.tar.bz2/Makefile.in
Added
@@ -0,0 +1,789 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@WITH_MANUAL_TRUE@am__append_1 = doc +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS \ + config.aux/config.guess config.aux/config.sub \ + config.aux/depcomp config.aux/install-sh config.aux/ltmain.sh \ + config.aux/missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/boost.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/version.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = src doc +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ +BOOST_DATE_TIME_LDFLAGS = @BOOST_DATE_TIME_LDFLAGS@ +BOOST_DATE_TIME_LDPATH = @BOOST_DATE_TIME_LDPATH@ +BOOST_DATE_TIME_LIBS = @BOOST_DATE_TIME_LIBS@ +BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@ +BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@ +BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@ +BOOST_IOSTREAMS_LDFLAGS = @BOOST_IOSTREAMS_LDFLAGS@ +BOOST_IOSTREAMS_LDPATH = @BOOST_IOSTREAMS_LDPATH@ +BOOST_IOSTREAMS_LIBS = @BOOST_IOSTREAMS_LIBS@ +BOOST_LDPATH = @BOOST_LDPATH@ +BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@ +BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@ +BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@ +BOOST_ROOT = @BOOST_ROOT@ +BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ +BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ +BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
View file
cclive-0.7.3.tar.gz/NEWS -> cclive-0.7.8.tar.bz2/NEWS
Changed
@@ -1,4 +1,71 @@ +0.7.8 Sat Nov 26 2011 Toni Gundogdu +Changes: + - Improvements to --exec + - Invoke --exec with "nothing todo" + - Additional specifiers %n and %t + - Allow multiple occurences + - Argument handling + + +0.7.7 Sun Oct 16 2011 Toni Gundogdu +Bugfixes: + - Do not create doc dir unnecessarily with "make install" + - Option -O evaluated incorrectly (#13) +Changes: + - Use QUVI_VERSION_SCRIPTS when available + - Add YouTube fmtNN ref. URL to manual + + +0.7.6 Mon Sep 12 2011 Toni Gundogdu +Changes: + - Add --tr (depr. --regexp, --subst) + - Add --prefer-format + - Revise manual + + +0.7.5.1 Thu Aug 18 2011 Toni Gundogdu +Changes: + - Lower quvi prerequisite to 0.2.16.1 + + +0.7.5 Sat Aug 13 2011 Toni Gundogdu + +Changes: + - Make --update-interval a "configurable" option + - Implement 'simple' progressbar + - Add --progressbar +Fixes: + - --update-interval (with negative) values doesn't work as intended (#11) + + +0.7.4.1 Thu Jun 23 2011 Toni Gundogdu + +Fixes: dist + - make: rm: cannot remove `cclive': Is a directory (#9) + + +0.7.4 Sat Jun 18 2011 Toni Gundogdu + +Changes: + - Add --no-resolve (replaces --no-shortened) + - Rewrite to use quvi "media interface" + - Add support for reading from files + - Deprecate "--format list" + - Remove --no-shortened + - Add --query-format + +Changes: dist + - configure: Rename --with-man -> --with-manual + - Bump quvi prerequisite to 0.2.17 + - Revert back to GNU Autotools + + +0.7.3.1 Tue Mar 15 2011 Toni Gundogdu +Bugfixes: + - CMake Error at src/CMakeLists.txt:43 (#7) + + 0.7.3 Sat Mar 12 2011 Toni Gundogdu Changes: - Add QUVIOPT_CATEGORY check
View file
cclive-0.7.3.tar.gz/README -> cclive-0.7.8.tar.bz2/README
Changed
@@ -1,11 +1,7 @@ -cclive -============ +cclive is a tool for downloading media from YouTube and similar +websites. It has a low memory footprint compared to other existing +tools. -cclive is a command line tool for downloading videos from Youtube and other -similar video websites that require Adobe Flash to view the video content. -It has low memory footprint compared to other similar tools. It is a rewrite -of the clive software in C++. - -WWW: <http://cclive.sourceforge.net/> -GIT: <git://repo.or.cz/w/cclive.git> +Home : http://cclive.sourceforge.net/ +gitweb: http://repo.or.cz/w/cclive.git
View file
cclive-0.7.8.tar.bz2/VERSION
Added
@@ -0,0 +1,1 @@ +v0.7.8
View file
cclive-0.7.8.tar.bz2/aclocal.m4
Added
@@ -0,0 +1,1144 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +])
View file
cclive-0.7.8.tar.bz2/config.aux
Added
+(directory)
View file
cclive-0.7.8.tar.bz2/config.aux/config.guess
Added
@@ -0,0 +1,1501 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to <config-patches@gnu.org> and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
View file
cclive-0.7.8.tar.bz2/config.aux/config.sub
Added
@@ -0,0 +1,1705 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*)
View file
cclive-0.7.8.tar.bz2/config.aux/depcomp
Added
@@ -0,0 +1,630 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \
View file
cclive-0.7.8.tar.bz2/config.aux/install-sh
Added
@@ -0,0 +1,520 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0
View file
cclive-0.7.8.tar.bz2/config.aux/ltmain.sh
Added
@@ -0,0 +1,9655 @@ + +# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to <bug-libtool@gnu.org>. +# GNU libtool home page: <http://www.gnu.org/software/libtool/>. +# General help using GNU software: <http://www.gnu.org/gethelp/>. + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.2 +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
View file
cclive-0.7.8.tar.bz2/config.aux/missing
Added
@@ -0,0 +1,376 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# 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" + 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 + +msg="missing on your system" + +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 + ;; + + -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. + +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 + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to <bug-automake@gnu.org>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + 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. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + 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 + ;; + + 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 "\
View file
cclive-0.7.8.tar.bz2/config.h.in
Added
@@ -0,0 +1,188 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* ... */ +#undef CANONICAL_HOST + +/* ... */ +#undef CANONICAL_TARGET + +/* Defined if the requested minimum BOOST version is satisfied */ +#undef HAVE_BOOST + +/* Define to 1 if you have <boost/date_time/posix_time/posix_time.hpp> */ +#undef HAVE_BOOST_DATE_TIME_POSIX_TIME_POSIX_TIME_HPP + +/* Define to 1 if you have <boost/filesystem/path.hpp> */ +#undef HAVE_BOOST_FILESYSTEM_PATH_HPP + +/* Define to 1 if you have <boost/foreach.hpp> */ +#undef HAVE_BOOST_FOREACH_HPP + +/* Define to 1 if you have <boost/format.hpp> */ +#undef HAVE_BOOST_FORMAT_HPP + +/* Define to 1 if you have <boost/iostreams/device/file_descriptor.hpp> */ +#undef HAVE_BOOST_IOSTREAMS_DEVICE_FILE_DESCRIPTOR_HPP + +/* Define to 1 if you have <boost/program_options.hpp> */ +#undef HAVE_BOOST_PROGRAM_OPTIONS_HPP + +/* Define to 1 if you have <boost/system/error_code.hpp> */ +#undef HAVE_BOOST_SYSTEM_ERROR_CODE_HPP + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#undef HAVE_DECL_STRERROR_R + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the `getpid' function. */ +#undef HAVE_GETPID + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* We have libquvi 0.4.0+ */ +#undef HAVE_LIBQUVI_0_4_0 + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `signal' function. */ +#undef HAVE_SIGNAL + +/* Define to 1 if you have the <signal.h> header file. */ +#undef HAVE_SIGNAL_H + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the `strerror_r' function. */ +#undef HAVE_STRERROR_R + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the <vfork.h> header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if strerror_r returns char *. */ +#undef STRERROR_R_CHAR_P + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Version number of package */ +#undef VERSION + +/* We have version number from gen-ver.sh */ +#undef VN + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to `int' if <sys/types.h> does not define. */ +#undef pid_t + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +#undef size_t + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork
View file
cclive-0.7.8.tar.bz2/configure
Added
@@ -0,0 +1,21596 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for cclive 0.7.8. +# +# Report bugs to <http://sourceforge.net/apps/trac/cclive>. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +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 + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || 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'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=.
View file
cclive-0.7.8.tar.bz2/configure.ac
Added
@@ -0,0 +1,103 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.68]) + +m4_include([m4/version.m4]) + +AC_INIT([cclive], [_CCLIVE_VERSION], + [http://sourceforge.net/apps/trac/cclive], [], + [http://cclive.sourceforge.net/]) + +AC_CONFIG_SRCDIR([src/cc/application.cpp]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_AUX_DIR([config.aux]) +AC_CONFIG_MACRO_DIR([m4]) + +AC_CANONICAL_SYSTEM +AC_GNU_SOURCE + +AC_DEFINE_UNQUOTED([CANONICAL_TARGET], "$target", [...]) +AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [...]) + +AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2 dist-xz]) +AM_SILENT_RULES([yes]) + +LT_INIT() +LT_PREREQ([2.2]) + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_CPP + +# Checks for libraries. + +PKG_CHECK_MODULES([libquvi], [libquvi >= 0.4.0], + [AC_DEFINE([HAVE_LIBQUVI_0_4_0], [1], [We have libquvi 0.4.0+])], + [PKG_CHECK_MODULES([libquvi], [libquvi >= 0.2.16.1])]) +PKG_CHECK_MODULES([libcurl], [libcurl >= 7.18.0]) +PKG_CHECK_MODULES([libpcre], [libpcre >= 8.02]) +PKG_CHECK_MODULES([libpcrecpp], [libpcrecpp >= 8.02]) + +BOOST_REQUIRE([1.42.0]) +# Boost: Header-only libs +BOOST_FOREACH +BOOST_FORMAT +# Boost: Libs requiring linking +BOOST_DATE_TIME +BOOST_PROGRAM_OPTIONS +BOOST_IOSTREAMS +BOOST_FILESYSTEM +BOOST_SYSTEM + +# Checks for header files. +AC_CHECK_HEADERS([sys/ioctl.h unistd.h sys/types.h sys/stat.h signal.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_TYPE_SIZE_T +AC_TYPE_PID_T + +# Checks for library functions. +AC_CHECK_FUNCS([strerror strstr getpid signal]) +AC_FUNC_ERROR_AT_LINE +AC_FUNC_STRERROR_R +AC_FUNC_FORK + +# Version. +VN=`$srcdir/gen-ver.sh $srcdir` +AC_DEFINE_UNQUOTED([VN],["$VN"], [We have version number from gen-ver.sh]) + +# --with-manual +AC_ARG_WITH([manual], + [AS_HELP_STRING([--with-manual], + [Install manual page(s) @<:@default=yes@:>@])], + [], + [with_manual=yes]) +AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"]) + +# --enable-ccl +AC_ARG_ENABLE([ccl], + [AS_HELP_STRING([--enable-ccl], + [Make a symbolic link from 'cclive' to 'ccl' @<:@default=no@:>@])], + [], + [enable_ccl=no]) +AM_CONDITIONAL([ENABLE_CCL], [test x"$enable_ccl" != "xno"]) + +AC_CONFIG_FILES([ + Makefile + doc/Makefile + doc/man1/Makefile + src/Makefile +]) + +AC_OUTPUT + +AC_MSG_NOTICE([ + cclive version: ${VERSION} (${VN}) + host setup: ${host} + prefix: ${prefix} + install manual: ${with_manual}]) + +# vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/doc
Added
+(directory)
View file
cclive-0.7.8.tar.bz2/doc/Makefile.am
Added
@@ -0,0 +1,1 @@ +SUBDIRS= man1
View file
cclive-0.7.8.tar.bz2/doc/Makefile.in
Added
@@ -0,0 +1,603 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/boost.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/version.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ +BOOST_DATE_TIME_LDFLAGS = @BOOST_DATE_TIME_LDFLAGS@ +BOOST_DATE_TIME_LDPATH = @BOOST_DATE_TIME_LDPATH@ +BOOST_DATE_TIME_LIBS = @BOOST_DATE_TIME_LIBS@ +BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@ +BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@ +BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@ +BOOST_IOSTREAMS_LDFLAGS = @BOOST_IOSTREAMS_LDFLAGS@ +BOOST_IOSTREAMS_LDPATH = @BOOST_IOSTREAMS_LDPATH@ +BOOST_IOSTREAMS_LIBS = @BOOST_IOSTREAMS_LIBS@ +BOOST_LDPATH = @BOOST_LDPATH@ +BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@ +BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@ +BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@ +BOOST_ROOT = @BOOST_ROOT@ +BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ +BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ +BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@
View file
cclive-0.7.8.tar.bz2/doc/man1
Added
+(directory)
View file
cclive-0.7.8.tar.bz2/doc/man1/Makefile.am
Added
@@ -0,0 +1,2 @@ +EXTRA_DIST= cclive.1.pod +dist_man_MANS= cclive.1
View file
cclive-0.7.8.tar.bz2/doc/man1/Makefile.in
Added
@@ -0,0 +1,485 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = doc/man1 +DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/boost.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/version.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +NROFF = nroff +MANS = $(dist_man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ +BOOST_DATE_TIME_LDFLAGS = @BOOST_DATE_TIME_LDFLAGS@ +BOOST_DATE_TIME_LDPATH = @BOOST_DATE_TIME_LDPATH@ +BOOST_DATE_TIME_LIBS = @BOOST_DATE_TIME_LIBS@ +BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@ +BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@ +BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@ +BOOST_IOSTREAMS_LDFLAGS = @BOOST_IOSTREAMS_LDFLAGS@ +BOOST_IOSTREAMS_LDPATH = @BOOST_IOSTREAMS_LDPATH@ +BOOST_IOSTREAMS_LIBS = @BOOST_IOSTREAMS_LIBS@ +BOOST_LDPATH = @BOOST_LDPATH@ +BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@ +BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@ +BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@ +BOOST_ROOT = @BOOST_ROOT@ +BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ +BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ +BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@
View file
cclive-0.7.8.tar.bz2/doc/man1/cclive.1
Added
@@ -0,0 +1,485 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "cclive 1" +.TH cclive 1 "2011-11-26" "0.7.8" "cclive manual" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +cclive \- media download tool +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +cclive [options] [url | file...] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +cclive is a tool for downloading media from YouTube and similar +websites. It has a low memory footprint compared to other existing +tools. +.SH "OPTIONS" +.IX Header "OPTIONS" +Unless an arg is specified in the command line, cclive reads from the +stdin. The command line args may be either URLs or files to read. +If cclive reads from either stdin or files, it expects each \s-1URL\s0 to be +separated by a newline or whitespace character. +.SS "\-\-version" +.IX Subsection "--version" +Print version and exit. +.SS "\-\-help" +.IX Subsection "--help" +Print help and exit. +.SS "\-\-license" +.IX Subsection "--license" +Print license and exit. +.SS "\-\-support" +.IX Subsection "--support" +Print supported hosts and exit. +.SS "\-\-verbose\-libcurl" +.IX Subsection "--verbose-libcurl" +Turn on libcurl verbose output. +.SS "\-q, \-\-quiet" +.IX Subsection "-q, --quiet" +Turn off all output to stdout and stderr with the exception of +\&\f(CW\*(C`\-\-verbose\-libcurl\*(C'\fR, if enabled, libcurl will continue to print +messages to stderr. +.SS "\-b, \-\-background" +.IX Subsection "-b, --background" +Go to background after startup. Output will be written to +the file specified with \f(CW\*(C`\-\-log\-file\*(C'\fR. +.SS "\-F, \-\-query\-formats" +.IX Subsection "-F, --query-formats" +Query available formats to the \s-1URL\s0. The returned array is created +from the data returned by the server. You can use the +\&\fIformat strings\fR in this array with \f(CW\*(C`\-\-format\*(C'\fR. +.PP +The available formats are determined by the \fIlibquvi script\fR +responsible for parsing the media details. +.PP +See also \*(L"\s-1EXAMPLES\s0\*(R", \f(CW\*(C`\-\-format\*(C'\fR and \f(CW\*(C`\-\-prefer\-format\*(C'\fR. +.SS "\-f, \-\-format \fIarg\fP (=default)" +.IX Subsection "-f, --format arg (=default)" +Download the format \fIarg\fR of the media. The \fIarg\fR may also be \f(CW\*(C`default\*(C'\fR, +\&\f(CW\*(C`best\*(C'\fR, \f(CW\*(C`help\*(C'\fR or \f(CW\*(C`list\*(C'\fR. Note, however, that the \f(CW\*(C`list\*(C'\fR and the \f(CW\*(C`help\*(C'\fR +are \fIdeprecated\fR and will be removed in the later versions of cclive. +The \fIarg\fR value is used with \fBall\fR of the URLs fed to cclive. +.PP +If the \fIarg\fR is \f(CW\*(C`best\*(C'\fR, the \fIlibquvi script\fR responsible for parsing +the media details will determine the \f(CW\*(C`best\*(C'\fR format available to an \s-1URL\s0. +.PP +If the \fIarg\fR is \f(CW\*(C`default\*(C'\fR the \fIlibquvi script\fR attempts to return an +\&\s-1URL\s0 to whatever it deemed to be the \f(CW\*(C`default\*(C'\fR format for the \s-1URL\s0. +.PP +The \fIlibquvi script\fR will return the \f(CW\*(C`default\*(C'\fR format if the \fIarg\fR +was unrecognized or the requested format was not available. +.PP +You can find more information about the YouTube specific \*(L"fmt\*(R" IDs at: + <http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs>
View file
cclive-0.7.8.tar.bz2/doc/man1/cclive.1.pod
Added
@@ -0,0 +1,388 @@ +=pod + +=head1 NAME + +cclive - media download tool + +=head1 SYNOPSIS + +cclive [options] [url | file...] + +=head1 DESCRIPTION + +cclive is a tool for downloading media from YouTube and similar +websites. It has a low memory footprint compared to other existing +tools. + +=head1 OPTIONS + +Unless an arg is specified in the command line, cclive reads from the +stdin. The command line args may be either URLs or files to read. +If cclive reads from either stdin or files, it expects each URL to be +separated by a newline or whitespace character. + +=head2 --version + +Print version and exit. + +=head2 --help + +Print help and exit. + +=head2 --license + +Print license and exit. + +=head2 --support + +Print supported hosts and exit. + +=head2 --verbose-libcurl + +Turn on libcurl verbose output. + +=head2 -q, --quiet + +Turn off all output to stdout and stderr with the exception of +C<--verbose-libcurl>, if enabled, libcurl will continue to print +messages to stderr. + +=head2 -b, --background + +Go to background after startup. Output will be written to +the file specified with C<--log-file>. + +=head2 -F, --query-formats + +Query available formats to the URL. The returned array is created +from the data returned by the server. You can use the +I<format strings> in this array with C<--format>. + +The available formats are determined by the I<libquvi script> +responsible for parsing the media details. + +See also L</EXAMPLES>, C<--format> and C<--prefer-format>. + +=head2 -f, --format I<arg> (=default) + +Download the format I<arg> of the media. The I<arg> may also be C<default>, +C<best>, C<help> or C<list>. Note, however, that the C<list> and the C<help> +are I<deprecated> and will be removed in the later versions of cclive. +The I<arg> value is used with B<all> of the URLs fed to cclive. + +If the I<arg> is C<best>, the I<libquvi script> responsible for parsing +the media details will determine the C<best> format available to an URL. + +If the I<arg> is C<default> the I<libquvi script> attempts to return an +URL to whatever it deemed to be the C<default> format for the URL. + +The I<libquvi script> will return the C<default> format if the I<arg> +was unrecognized or the requested format was not available. + +You can find more information about the YouTube specific "fmt" IDs at: + <http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs> + +See also L</EXAMPLES>, C<--query-formats> and C<--prefer-format>. + +=head2 -c, --continue + +Resume partially downloaded media. + +=head2 -W, --overwrite + +Overwrite existing media. + +=head2 -O, --output-file I<arg> + +Write media to I<arg>. Overrides C<--filename-format>. + +=head2 -n, --no-download + +Do not download the media, print details only. + +=head2 -r, --no-resolve + +Do not resolve URL redirections. If enabled, breaks the compatibility +with most "shortened" URLs. + +=head2 --no-proxy + +Disable use of HTTP proxy. Overrides both C<--proxy> and http_proxy environment +settings. + +=head2 --log-file I<arg> (=cclive_log) + +Write log output to I<arg>. Ignored unless used with C<--background>. +Overwrites the existing I<arg> file (if any). See also C<--background> +and C<--update-interval>. + +=head2 --config-file I<arg> (=~/.ccliverc) + +Path to a file to read cclive arguments from. + +=head1 OPTIONS - CONFIGURATION + +In addition to the command line, the configurable options may also be read +from the configuration file. See L</FILES>. + +=head2 -p, --prefer-format I<arg> + +Download the I<specified> format of the media when the pattern matches +to the media page URL. + +I<arg> is a B<string pair> of I<pattern> (regular expression) and +I<format>. The character ':' is expected to separate these two +strings, e.g. C<pattern:format>. + +C<--format> overrides C<--prefer-format>. cclive accepts multiple +occurrences of C<--prefer-format>. + +See also L</EXAMPLES>, C<--query-formats> and C<--format>. + +=head2 --progressbar I<arg> (=normal) + +Use the progressbar of type I<arg>. Ignored with C<--background> which +will always use the C<dotline> type. Possible values: + + normal (default) + dotline (implied by --background) + simple (basic) + +=head2 --update-interval I<arg> (=1) + +Specify I<arg> progressbar update interval in seconds. Use of decimal +fractions, e.g. "0.2" or "1.99", is acceptable. + +=head2 --filename-format I<arg> (="%t.%s") + +How the downloaded media file should be named. Each occurence of the +following specifiers will be replaced in the I<arg>: + + %t .. Media title + %i .. Media ID + %h .. Media host ID (e.g. "vimeo") + %s .. Media file suffix (e.g. "flv") + +See also C<--tr>. + +=head2 --output-dir I<arg> + +Write downloaded media to I<arg> directory. + +=head2 -t, --tr I<arg> + +Where I<arg> is a pattern (regular expression). C<--tr> can be used to +translate the characters in the media titles before they are used in +the filenames of the downloaded media. Default is C</(\w|\s)/g>. + +cclive accepts multiple occurrences of C<--tr>. See also L</EXAMPLES>. + +=head2 --exec I<arg> + +Invoke I<arg> after each successfully finished download. Each occurence +of the following specifiers will be replaced in the I<arg>: + + %f .. Full path to the downloaded media file + %n .. Name of the downloaded media file + %t .. Media title (unfiltered) + +The I<arg> is also invoked if the media is fully retrieved already. +cclive accepts multiple occurrences of C<--exec>. See also L</EXAMPLES>. + +=head2 --agent I<arg> (="Mozilla/5.0") + +Identify cclive as I<arg> to the HTTP servers. + +=head2 --proxy I<arg> + +Use I<arg> for HTTP proxy, e.g. "http://foo:1234". Overrides +http_proxy environment setting.
View file
cclive-0.7.8.tar.bz2/gen-ver.sh
Added
@@ -0,0 +1,53 @@ +#!/bin/sh +# gen-ver.sh for cclive. + +from_file() +{ + VN=`cat $1 2>/dev/null` + if test -n "$VN"; then + echo $VN + exit 0 + fi +} + +gen_version() # $1=path to top source dir +{ + path=$1 ; [ -z $path ] && path=. + + # First check if the version file exists and use its value + versionfn="$path/VERSION" + [ -f "$versionfn" ] && from_file "$versionfn" + + # If that file is not found, or fails (e.g. empty), parse from m4/version.m4 + m4="$path/m4/version.m4" + VN=`perl -ne'/(\d+)\.(\d+)\.(\d+)/ && print "$1.$2.$3"' < "$m4"` + [ -z $VN ] && exit $? + + # Use the "git describe" instead, if .git is present + if test -d "$path/.git" -o -f "$path/.git" ; then + _VN=`git describe --match "v[0-9]*" --abbrev=4 HEAD 2>/dev/null` + [ -n "$_VN" ] && VN=$_VN + fi + + echo $VN +} + +help() +{ + echo "Usage: $0 [-h] [top_srcdir] +-h Show this help and exit +Run without options to print version. Define top_srcdir if run outside +the top source directory." + exit 0 +} + +while [ $# -gt 0 ] +do + case "$1" in + -h) help;; + *) break;; + esac + shift +done + +gen_version $1
View file
cclive-0.7.8.tar.bz2/m4
Added
+(directory)
View file
cclive-0.7.8.tar.bz2/m4/boost.m4
Added
@@ -0,0 +1,1133 @@ +# boost.m4: Locate Boost headers and libraries for autoconf-based projects. +# Copyright (C) 2007, 2008, 2009, 2010, 2011 Benoit Sigoure <tsuna@lrde.epita.fr> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Additional permission under section 7 of the GNU General Public +# License, version 3 ("GPLv3"): +# +# If you convey this file as part of a work that contains a +# configuration script generated by Autoconf, you may do so under +# terms of your choice. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +m4_define([_BOOST_SERIAL], [m4_translit([ +# serial 16 +], [# +], [])]) + +# Original sources can be found at http://github.com/tsuna/boost.m4 +# You can fetch the latest version of the script by doing: +# wget http://github.com/tsuna/boost.m4/raw/master/build-aux/boost.m4 + +# ------ # +# README # +# ------ # + +# This file provides several macros to use the various Boost libraries. +# The first macro is BOOST_REQUIRE. It will simply check if it's possible to +# find the Boost headers of a given (optional) minimum version and it will +# define BOOST_CPPFLAGS accordingly. It will add an option --with-boost to +# your configure so that users can specify non standard locations. +# If the user's environment contains BOOST_ROOT and --with-boost was not +# specified, --with-boost=$BOOST_ROOT is implicitly used. +# For more README and documentation, go to http://github.com/tsuna/boost.m4 +# Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry, +# simply read the README, it will show you what to do step by step. + +m4_pattern_forbid([^_?(BOOST|Boost)_]) + + +# _BOOST_SED_CPP(SED-PROGRAM, PROGRAM, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# -------------------------------------------------------- +# Same as AC_EGREP_CPP, but leave the result in conftest.i. +# +# SED-PROGRAM is *not* overquoted, as in AC_EGREP_CPP. It is expanded +# in double-quotes, so escape your double quotes. +# +# It could be useful to turn this into a macro which extracts the +# value of any macro. +m4_define([_BOOST_SED_CPP], +[AC_LANG_PREPROC_REQUIRE()dnl +AC_REQUIRE([AC_PROG_SED])dnl +AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) +AS_IF([dnl eval is necessary to expand ac_cpp. +dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. +dnl Beware of Windows end-of-lines, for instance if we are running +dnl some Windows programs under Wine. In that case, boost/version.hpp +dnl is certainly using "\r\n", but the regular Unix shell will only +dnl strip `\n' with backquotes, not the `\r'. This results in +dnl boost_cv_lib_version='1_37\r' for instance, which breaks +dnl everything else. +dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK +(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | + tr -d '\r' | + $SED -n -e "$1" >conftest.i 2>&1], + [$3], + [$4]) +rm -rf conftest* +])# AC_EGREP_CPP + + + +# BOOST_REQUIRE([VERSION], [ACTION-IF-NOT-FOUND]) +# ----------------------------------------------- +# Look for Boost. If version is given, it must either be a literal of the form +# "X.Y.Z" where X, Y and Z are integers (the ".Z" part being optional) or a +# variable "$var". +# Defines the value BOOST_CPPFLAGS. This macro only checks for headers with +# the required version, it does not check for any of the Boost libraries. +# On # success, defines HAVE_BOOST. On failure, calls the optional +# ACTION-IF-NOT-FOUND action if one was supplied. +# Otherwise aborts with an error message. +AC_DEFUN([BOOST_REQUIRE], +[AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_GREP])dnl +echo "$as_me: this is boost.m4[]_BOOST_SERIAL" >&AS_MESSAGE_LOG_FD +boost_save_IFS=$IFS +boost_version_req=$1 +IFS=. +set x $boost_version_req 0 0 0 +IFS=$boost_save_IFS +shift +boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"` +boost_version_req_string=$[1].$[2].$[3] +AC_ARG_WITH([boost], + [AS_HELP_STRING([--with-boost=DIR], + [prefix of Boost $1 @<:@guess@:>@])])dnl +AC_ARG_VAR([BOOST_ROOT],[Location of Boost installation])dnl +# If BOOST_ROOT is set and the user has not provided a value to +# --with-boost, then treat BOOST_ROOT as if it the user supplied it. +if test x"$BOOST_ROOT" != x; then + if test x"$with_boost" = x; then + AC_MSG_NOTICE([Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT]) + with_boost=$BOOST_ROOT + else + AC_MSG_NOTICE([Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost]) + fi +fi +AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], + ["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"])dnl +boost_save_CPPFLAGS=$CPPFLAGS + AC_CACHE_CHECK([for Boost headers version >= $boost_version_req_string], + [boost_cv_inc_path], + [boost_cv_inc_path=no +AC_LANG_PUSH([C++])dnl +m4_pattern_allow([^BOOST_VERSION$])dnl + AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include <boost/version.hpp> +#if !defined BOOST_VERSION +# error BOOST_VERSION is not defined +#elif BOOST_VERSION < $boost_version_req +# error Boost headers version < $boost_version_req +#endif +]])]) + # If the user provided a value to --with-boost, use it and only it. + case $with_boost in #( + ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ + /usr/include C:/Boost/include;; #( + *) set x "$with_boost/include" "$with_boost";; + esac + shift + for boost_dir + do + # Without --layout=system, Boost (or at least some versions) installs + # itself in <prefix>/include/boost-<version>. This inner loop helps to + # find headers in such directories. + # + # Any ${boost_dir}/boost-x_xx directories are searched in reverse version + # order followed by ${boost_dir}. The final '.' is a sentinel for + # searching $boost_dir" itself. Entries are whitespace separated. + # + # I didn't indent this loop on purpose (to avoid over-indented code) + boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \ + && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \ + && echo .` + for boost_inc in $boost_layout_system_search_list + do + if test x"$boost_inc" != x.; then + boost_inc="$boost_dir/$boost_inc" + else + boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list + fi + if test x"$boost_inc" != x; then + # We are going to check whether the version of Boost installed + # in $boost_inc is usable by running a compilation that + # #includes it. But if we pass a -I/some/path in which Boost + # is not installed, the compiler will just skip this -I and + # use other locations (either from CPPFLAGS, or from its list + # of system include directories). As a result we would use + # header installed on the machine instead of the /some/path + # specified by the user. So in that precise case (trying + # $boost_inc), make sure the version.hpp exists. + # + # Use test -e as there can be symlinks. + test -e "$boost_inc/boost/version.hpp" || continue + CPPFLAGS="$CPPFLAGS -I$boost_inc" + fi + AC_COMPILE_IFELSE([], [boost_cv_inc_path=yes], [boost_cv_version=no]) + if test x"$boost_cv_inc_path" = xyes; then + if test x"$boost_inc" != x; then + boost_cv_inc_path=$boost_inc + fi + break 2 + fi + done + done +AC_LANG_POP([C++])dnl + ]) + case $boost_cv_inc_path in #( + no) + boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" + m4_if([$2], [], [AC_MSG_ERROR([$boost_errmsg])], + [AC_MSG_NOTICE([$boost_errmsg])]) + $2 + ;;#( + yes) + BOOST_CPPFLAGS= + ;;#( + *)
View file
cclive-0.7.8.tar.bz2/m4/libtool.m4
Added
@@ -0,0 +1,7982 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# 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. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems
View file
cclive-0.7.8.tar.bz2/m4/ltoptions.m4
Added
@@ -0,0 +1,384 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# 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. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED],
View file
cclive-0.7.8.tar.bz2/m4/ltsugar.m4
Added
@@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# 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. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +])
View file
cclive-0.7.8.tar.bz2/m4/ltversion.m4
Added
@@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# 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. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +])
View file
cclive-0.7.8.tar.bz2/m4/lt~obsolete.m4
Added
@@ -0,0 +1,98 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# 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. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
View file
cclive-0.7.8.tar.bz2/m4/version.m4
Added
@@ -0,0 +1,1 @@ +m4_define([_CCLIVE_VERSION], [0.7.8])
View file
cclive-0.7.8.tar.bz2/src/Makefile.am
Added
@@ -0,0 +1,79 @@ + +src= \ + cc/error.cpp \ + cc/main.cpp \ + cc/log.cpp \ + cc/background.cpp \ + cc/exec.cpp \ + cc/file.cpp \ + cc/license.cpp \ + cc/wait.cpp \ + cc/progressbar.cpp \ + cc/options.cpp \ + cc/re.cpp \ + cc/get.cpp \ + cc/application.cpp \ + quvi/err.cpp \ + quvi/query.cpp \ + quvi/misc.cpp \ + quvi/url.cpp \ + quvi/opts.cpp \ + quvi/media.cpp + +hdr= \ + ccoptions \ + ccinternal \ + ccapplication \ + ccquvi \ + ccprogressbar \ + cclog \ + ccutil \ + ccfile \ + ccre \ + cc/progressbar.h \ + cc/options.h \ + cc/application.h \ + cc/file.h \ + cc/util.h \ + cc/internal.h \ + cc/log.h \ + cc/re.h \ + quvi/ccquvi.h + +bin_PROGRAMS= cclive +cclive_SOURCES= $(src) $(hdr) + +AM_CPPFLAGS= -I$(top_srcdir)/src +AM_CPPFLAGS+= $(libquvi_CFLAGS) +AM_CPPFLAGS+= $(libcurl_CFLAGS) +AM_CPPFLAGS+= $(libpcre_CFLAGS) +AM_CPPFLAGS+= $(libpcrepp_CFLAGS) +AM_CPPFLAGS+= $(BOOST_CPPFLAGS) + +cclive_LDFLAGS= $(BOOST_DATE_TIME_LDFLAGS) +cclive_LDFLAGS+=$(BOOST_PROGRAM_OPTIONS_LDFLAGS) +cclive_LDFLAGS+=$(BOOST_IOSTREAMS_LDFLAGS) +cclive_LDFLAGS+=$(BOOST_FILESYSTEM_LDFLAGS) +cclive_LDFLAGS+=$(BOOST_SYSTEM_LDFLAGS) + +cclive_LDADD= $(libquvi_LIBS) +cclive_LDADD+= $(libcurl_LIBS) +cclive_LDADD+= $(libpcre_LIBS) +cclive_LDADD+= $(libpcrecpp_LIBS) +cclive_LDADD+= $(BOOST_DATE_TIME_LIBS) +cclive_LDADD+= $(BOOST_PROGRAM_OPTIONS_LIBS) +cclive_LDADD+= $(BOOST_IOSTREAMS_LIBS) +cclive_LDADD+= $(BOOST_FILESYSTEM_LIBS) +cclive_LDADD+= $(BOOST_SYSTEM_LIBS) + +install-exec-hook: +if ENABLE_CCL + cd $(DESTDIR)$(bindir) && \ + $(LN_S) cclive$(EXEEXT) ccl$(EXEEXT) +endif + +uninstall-hook: +if ENABLE_CCL + cd $(DESTDIR)$(bindir) && \ + rm -f ccl$(EXEEXT) +endif
View file
cclive-0.7.8.tar.bz2/src/Makefile.in
Added
@@ -0,0 +1,981 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = cclive$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/boost.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/version.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__objects_1 = error.$(OBJEXT) main.$(OBJEXT) log.$(OBJEXT) \ + background.$(OBJEXT) exec.$(OBJEXT) file.$(OBJEXT) \ + license.$(OBJEXT) wait.$(OBJEXT) progressbar.$(OBJEXT) \ + options.$(OBJEXT) re.$(OBJEXT) get.$(OBJEXT) \ + application.$(OBJEXT) err.$(OBJEXT) query.$(OBJEXT) \ + misc.$(OBJEXT) url.$(OBJEXT) opts.$(OBJEXT) media.$(OBJEXT) +am__objects_2 = +am_cclive_OBJECTS = $(am__objects_1) $(am__objects_2) +cclive_OBJECTS = $(am_cclive_OBJECTS) +am__DEPENDENCIES_1 = +cclive_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +cclive_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(cclive_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config.aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(cclive_SOURCES) +DIST_SOURCES = $(cclive_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ +BOOST_DATE_TIME_LDFLAGS = @BOOST_DATE_TIME_LDFLAGS@ +BOOST_DATE_TIME_LDPATH = @BOOST_DATE_TIME_LDPATH@ +BOOST_DATE_TIME_LIBS = @BOOST_DATE_TIME_LIBS@ +BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@ +BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@ +BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@ +BOOST_IOSTREAMS_LDFLAGS = @BOOST_IOSTREAMS_LDFLAGS@ +BOOST_IOSTREAMS_LDPATH = @BOOST_IOSTREAMS_LDPATH@ +BOOST_IOSTREAMS_LIBS = @BOOST_IOSTREAMS_LIBS@ +BOOST_LDPATH = @BOOST_LDPATH@ +BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@ +BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@ +BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@ +BOOST_ROOT = @BOOST_ROOT@ +BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ +BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ +BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@
View file
cclive-0.7.8.tar.bz2/src/cc
Added
+(directory)
View file
cclive-0.7.8.tar.bz2/src/cc/application.cpp
Added
@@ -0,0 +1,586 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccinternal> + +#include <iomanip> +#include <vector> +#include <ctime> + +#include <boost/algorithm/string/classification.hpp> // is_any_of +#include <boost/algorithm/string/split.hpp> +#include <boost/foreach.hpp> +#include <boost/random.hpp> + +#include <curl/curl.h> + +#ifndef foreach +#define foreach BOOST_FOREACH +#endif + +#include <ccapplication> +#include <ccquvi> +#include <ccutil> +#include <cclog> +#include <ccre> + +namespace cc +{ + +static boost::mt19937 _rng; + +static void rand_decor() +{ + boost::uniform_int<> r(2,5); + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > v(_rng,r); + + const int n = v(); + for (int i=0; i<n; ++i) cc::log << "."; +} + +static void handle_fetch(const quvi_word type, void*) +{ + rand_decor(); + if (type == QUVISTATUSTYPE_DONE) + cc::log << " "; +} + +static void print_done() +{ + cc::log << "done.\n"; +} + +static void handle_verify(const quvi_word type) +{ + rand_decor(); + if (type == QUVISTATUSTYPE_DONE) + print_done(); +} + +static void handle_resolve(const quvi_word type) +{ + rand_decor(); + if (type == QUVISTATUSTYPE_DONE) + cc::log << " "; +} + +static int status_callback(long param, void *ptr) +{ + const quvi_word status = quvi_loword(param); + const quvi_word type = quvi_hiword(param); + + switch (status) + { + case QUVISTATUS_FETCH : + handle_fetch(type,ptr); + break; + case QUVISTATUS_VERIFY: + handle_verify(type); + break; + case QUVISTATUS_RESOLVE: + handle_resolve(type); + break; + } + + cc::log << std::flush; + + return QUVI_OK; +} + +template<class Iterator> +static Iterator make_unique(Iterator first, Iterator last) +{ + while (first != last) + { + Iterator next(first); + last = std::remove(++next, last, *first); + first = next; + } + return last; +} + +static void print_retrying(const int retry, + const int max_retries, + const int retry_wait) +{ + if (retry > 0) + { + cc::log + << "Retrying " + << retry + << " of " + << max_retries + << " ... " + << std::flush; + + cc::wait(retry_wait); + } +} + +static void print_checking(const int i, const int n) +{ + if (n > 1) cc::log << "(" << i << " of " << n << ") "; + cc::log << "Checking ... " << std::flush; +} + +static void print_quvi_error(const quvi::error& e) +{ + cc::log << "libquvi: error: " << e.what() << std::endl; +} + +static void check_quvi_error(const quvi::error& e) +{ + const long resp_code = e.response_code(); + + if (resp_code >= 400 && resp_code <= 500) + throw e; + + else + { + switch (e.quvi_code()) + { + case QUVI_CALLBACK: + print_quvi_error(e); + break; // Retry. + + default: + throw e; + } + } +} + +static const char depr_msg[] = + "WARNING '--format list' is deprecated and will be removed in the later\n" + "WARNING versions. Use --query-formats instead."; + +static const char format_usage[] = + "Usage:\n" + " --format arg get format arg of media\n" + " --format list print domains with formats\n" + " --format list arg match arg to supported domain names\n" + "Examples:\n" + " --format list youtube print youtube formats\n" + " --format fmt34_360p get format fmt34_360p of media"; + +static application::exit_status print_format_help() +{ + std::cout << format_usage << "\n" << depr_msg << std::endl; + return application::ok; +} + +typedef std::map<std::string,std::string> map_ss; + +static void print_host(const map_ss::value_type& t) +{ + std::cout + << t.first + << ":\n " + << t.second + << "\n" + << std::endl; +} + +namespace po = boost::program_options; + +typedef std::vector<std::string> vst;
View file
cclive-0.7.8.tar.bz2/src/cc/application.h
Added
@@ -0,0 +1,52 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_application_h +#define cclive_application_h + +#include <ccoptions> + +namespace quvi +{ +class options; +class query; +} + +namespace cc +{ + +class application +{ +public: + typedef enum { ok=0, invalid_option, system } exit_status; +public: + exit_status exec(int,char **); +private: + void _tweak_curl_opts(const quvi::query&, + const boost::program_options::variables_map&); + void _set_format_string(const std::string&, + quvi::options&, + const boost::program_options::variables_map&); +private: + cc::options _opts; +}; + +} // namespace cc + +#endif // cclive_application_h + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/background.cpp
Added
@@ -0,0 +1,81 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccinternal> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif + +#include <boost/iostreams/tee.hpp> + +#include <ccutil> +#include <ccapplication> +#include <cclog> + +namespace cc +{ + +namespace io = boost::iostreams; + +void go_background(const std::string& log_file, bool& omit) +{ +#ifdef HAVE_FORK + const pid_t pid = fork(); + + if (pid < 0) + { + cc::perror("fork"); + exit(application::system); + } + else if (pid != 0) + { + std::clog // Parent exits + << "Run in background (pid: " + << static_cast<long>(pid) + << "). Redirect output to \"" + << log_file + << "\"." + << std::endl; + exit(0); + } + + // Child continues and becomes the session leader. + setsid(); + + // Clear file mode creation mask. + umask(0); + + // Close unneeded file descriptors/streams. + freopen("/dev/null", "w", stdout); + freopen("/dev/null", "w", stderr); + freopen("/dev/null", "r", stdin); + + // Redirect output to log file. + cc::log.push(io::tee(cc::flushable_file_sink(log_file))); + + omit = true; +#endif // HAVE_FORK +} + +} // namespace cc + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/error.cpp
Added
@@ -0,0 +1,49 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccinternal> + +#include <iostream> +#include <climits> +#include <cstring> +#include <cerrno> + +#include <ccquvi> +#include <ccutil> + +namespace cc +{ + +std::string perror(const std::string& p/*=""*/) +{ +#if defined (HAVE_STRERROR) || defined (HAVE_STRERROR_R) + std::string s; +#ifdef HAVE_STRERROR_R + char buf[256]; + s = strerror_r(errno, buf, sizeof(buf)); +#else // HAVE_STRERROR_R + s = strerror(errno); +#endif // HAVE_STRERROR_R + return s; +#else // HAVE_STRERROR || HAVE_STRERROR_R + perror(p.c_str()); // No strerror or strerror_r +#endif // HAVE_STRERROR || HAVE_STRERROR_R +} + +} // namspace cclive + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/exec.cpp
Added
@@ -0,0 +1,134 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <stdexcept> +#include <sstream> +#include <cstdio> +#include <cerrno> + +#include <sys/wait.h> + +#include <boost/program_options/variables_map.hpp> +#include <boost/foreach.hpp> +#include <pcrecpp.h> + +#ifndef foreach +#define foreach BOOST_FOREACH +#endif + +#include <ccquvi> +#include <ccfile> +#include <ccre> +#include <ccutil> +#include <cclog> + +namespace cc +{ + +typedef std::vector<std::string> vst; + +static int invoke_exec(const vst& args) +{ + const size_t sz = args.size(); + const char **argv = new const char* [sz+2]; + if (!argv) + throw std::runtime_error("memory allocation error"); + + argv[0] = args[0].c_str(); + + for (size_t i=1; i<sz; ++i) + argv[i] = args[i].c_str(); + + argv[sz] = NULL; + + fflush(stdout); + fflush(stderr); + + pid_t child_pid = fork(); + if (child_pid == -1) + { + delete [] argv; + throw std::runtime_error(cc::perror("fork")); + } + + if (child_pid == 0) + { + execvp(argv[0], (char **)argv); + exit(1); + } + + delete [] argv; + + int wait_status = 0; + while (waitpid(child_pid, &wait_status, 0) == (pid_t)-1) + { + if (errno != EINTR) + { + cc::log << "error waiting for " << args[0] << std::endl; + break; + } + } + + if (WIFSIGNALED(wait_status)) + { + cc::log << args[0] + << " terminated by signal " + << WTERMSIG(wait_status) + << std::endl; + } + + if (WEXITSTATUS(wait_status) == 0) + return 0; // OK. + + return 1; +} + +static void tokenize(const std::string& r, + const std::string& s, + vst& dst) +{ + pcrecpp::StringPiece sp(s); + pcrecpp::RE rx(r); + + std::string t; + while (rx.FindAndConsume(&sp, &t)) + { + pcrecpp::RE("[\"']").GlobalReplace("", &t); + dst.push_back(t); + } +} + +namespace po = boost::program_options; + +void exec(const file& file, const po::variables_map& map) +{ + const vst m = map["exec"].as<vst>(); + foreach (std::string e, m) + { + pcrecpp::RE("%f").GlobalReplace(file.path(), &e); + pcrecpp::RE("%n").GlobalReplace(file.name(), &e); + pcrecpp::RE("%t").GlobalReplace(file.title(), &e); + + vst args; + tokenize("([\"'](.*?)[\"']|\\S+)", e, args); + invoke_exec(args); + } +} + +} // namespace cc + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/file.cpp
Added
@@ -0,0 +1,501 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccinternal> + +#include <stdexcept> +#include <fstream> +#include <sstream> +#include <iomanip> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif + +#if defined (HAVE_SIGNAL_H) && defined (HAVE_SIGNAL) +#define WITH_SIGNAL +#endif + +#include <boost/program_options/variables_map.hpp> +#include <boost/filesystem.hpp> +#include <boost/foreach.hpp> +#include <boost/format.hpp> + +#ifndef foreach +#define foreach BOOST_FOREACH +#endif + +#include <curl/curl.h> +#include <pcrecpp.h> + +#include <ccquvi> +#include <ccprogressbar> +#include <ccre> +#include <ccutil> +#include <cclog> +#include <ccfile> + +namespace cc +{ + +file::file() + : _initial_length(0), _nothing_todo(false) +{ +} + +namespace po = boost::program_options; + +file::file(const quvi::media& media, + const quvi::url& url, + const int n, + const po::variables_map& map) + : _initial_length(0), _nothing_todo(false) +{ + try + { + _init(media, url, n, map); + } + catch (const cc::nothing_todo_error&) + { + _nothing_todo = true; + } +} + +file::file(const file& f) + : _initial_length(0), _nothing_todo(false) +{ + _swap(f); +} + +file& file::operator=(const file& f) +{ + if (this != &f) _swap(f); + return *this; +} + +void file::_swap(const file& f) +{ + _title = f._title; + _name = f._name; + _path = f._path; + _initial_length = f._initial_length; + _nothing_todo = f._nothing_todo; +} + +#define E "server response code %ld, expected 200 or 206 (conn_code=%ld)" + +static std::string format_unexpected_http_error( + const long resp_code, + const long conn_code) +{ + return (boost::format(E) % resp_code % conn_code).str(); +} + +#undef E + +#define E "%s (curl_code=%ld, resp_code=%ld, conn_code=%ld)" + +static std::string format_error(const CURLcode curl_code, + const long resp_code, + const long conn_code) +{ + const std::string e = curl_easy_strerror(curl_code); + return (boost::format(E) % e % curl_code % resp_code % conn_code).str(); +} + +#undef E + +static size_t write_cb(void *data, size_t size, size_t nmemb, void *ptr) +{ + std::ofstream *o = reinterpret_cast<std::ofstream*>(ptr); + const size_t rsize = size*nmemb; + o->write(static_cast<char*>(data), rsize); + o->flush(); + return rsize; +} + +#ifdef WITH_SIGNAL +static volatile sig_atomic_t recv_usr1; + +static void handle_usr1(int s) +{ + if (s == SIGUSR1) + recv_usr1 = 1; +} +#endif + +static int progress_cb(void *ptr, double, double now, double, double) +{ +#ifdef WITH_SIGNAL + if (recv_usr1) + { + recv_usr1 = 0; + return 1; // Return a non-zero value to abort this transfer. + } +#endif + reinterpret_cast<progressbar*>(ptr)->update(now); + return 0; +} + +bool file::write(const quvi::query& q, + const quvi::url& u, + const po::variables_map& map) const +{ + CURL *curl = q.curlHandle(); + + curl_easy_setopt(curl, CURLOPT_URL, u.media_url().c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb); + + std::ios_base::openmode mode = std::ofstream::binary; + + if (map.count("overwrite")) + mode |= std::ofstream::trunc; + else + { + if (_should_continue()) + mode |= std::ofstream::app; + } + + std::ofstream out(_path.c_str(), mode); + + if (out.fail()) + { + std::string s = _path + ": "; + + if (errno) + s += cc::perror(); + else + s += "unknown file open error"; + + throw std::runtime_error(s); + } + + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &out); + + curl_easy_setopt(curl, CURLOPT_ENCODING, "identity"); + curl_easy_setopt(curl, CURLOPT_HEADER, 0L); + + progressbar pb(*this, u, map); + curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &pb); + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); + curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_cb);
View file
cclive-0.7.8.tar.bz2/src/cc/file.h
Added
@@ -0,0 +1,74 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_file_h +#define cclive_file_h + +namespace boost +{ +namespace program_options +{ +class variables_map; +} +} + +namespace cc +{ + +class file +{ +public: + file(); + file(const quvi::media&, + const quvi::url&, + const int, + const boost::program_options::variables_map&); + file(const file&); + file& operator=(const file&); +public: + bool write(const quvi::query&, + const quvi::url&, + const boost::program_options::variables_map&) const; +public: + std::string to_s(const quvi::url&) const; + const std::string& title() const; + const std::string& path() const; + const std::string& name() const; + const bool nothing_todo() const; + double initial_length() const; +public: + static double exists(const std::string&); +private: + void _init(const quvi::media&, + const quvi::url&, + const int, + const boost::program_options::variables_map&); + bool _should_continue() const; + void _swap(const file&); +private: + double _initial_length; + bool _nothing_todo; + std::string _title; + std::string _name; + std::string _path; +}; + +} // namespace cc + +#endif // cclive_file_h + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/get.cpp
Added
@@ -0,0 +1,101 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <iostream> + +#include <boost/program_options/variables_map.hpp> + +#include <ccquvi> +#include <cclog> +#include <ccfile> +#include <ccutil> + +namespace cc +{ + +namespace po = boost::program_options; + +void get(const quvi::query& query, + quvi::media& media, + const po::variables_map& map) +{ + const bool no_download = map.count("no-download"); + const bool exec = map.count("exec"); + + const int max_retries = map["max-retries"].as<int>(); + const int retry_wait = map["retry-wait"].as<int>(); + + int n = 0; + + quvi::url url; + + while ((url = media.next_url()).ok()) + { + ++n; + + int retry = 0; + + while (retry <= max_retries) + { + cc::file file(media, url, n, map); + + if (file.nothing_todo()) + { + if (exec) + cc::exec(file, map); + +#define E_NOTHING_TODO "media retrieved completely already" + throw std::runtime_error(E_NOTHING_TODO); +#undef E_NOTHING_TODO + } + + // Download media. + + if (retry > 0) + { + cc::log + << "Retrying " + << retry + << " of " + << max_retries + << " ... " + << std::flush; + + cc::wait(retry_wait); + } + + ++retry; + + cc::log << file.to_s(url) << std::endl; + + if (!no_download) + { + if (!file.write(query, url, map)) + continue; // Retry. + + if (exec) + cc::exec(file, map); + } + + break; // Stop retrying. + } + } +} + +} // namespace cc + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/internal.h
Added
@@ -0,0 +1,38 @@ +/* cclive + * Copyright (C) 2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +// Include this header instead of 'config.h'. + +#ifndef cclive_internal_h +#define cclive_internal_h + +#include <boost/version.hpp> + +#include "config.h" + +#define BOOST_FILESYSTEM_NO_DEPRECATED + +// Boost 1.44+ +#if (BOOST_VERSION >= 104400) +#ifndef BOOST_FILESYSTEM_VERSION +#define BOOST_FILESYSTEM_VERSION 3 // Default in 1.46.0 +#endif +#endif + +#endif // cclive_internal_h + +/* vim: set ts=2 sw=2 tw=72 expandtab: */
View file
cclive-0.7.8.tar.bz2/src/cc/license.cpp
Added
@@ -0,0 +1,41 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace cc +{ + +char LICENSE[] = + "/* cclive\n" + " * Copyright (C) 2010,2011 Toni Gundogdu <legatvs@gmail.com>\n" + " *\n" + " * This program is free software: you can redistribute it and/or modify\n" + " * it under the terms of the GNU General Public License as published by\n" + " * the Free Software Foundation, either version 3 of the License, or\n" + " * (at your option) any later version.\n" + " *\n" + " * This program is distributed in the hope that it will be useful,\n" + " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + " * GNU General Public License for more details.\n" + " *\n" + " * You should have received a copy of the GNU General Public License\n" + " * along with this program. If not, see <http://www.gnu.org/licenses/>.\n" + " */"; + +} // namspace cclive + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/log.cpp
Added
@@ -0,0 +1,135 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <stdexcept> +#include <cerrno> + +#include <boost/filesystem.hpp> + +#include <ccutil> +#include <cclog> + +namespace cc +{ + +namespace io = boost::iostreams; + +io::filtering_ostream log; + +omit_sink::omit_sink(bool b/*=false*/) : _omit(b) { } + +std::streamsize omit_sink::write(const char *s, std::streamsize n) +{ + if (!_omit) std::clog.write(s,n); + return n; +} + +// Constructor. + +flushable_file_sink::flushable_file_sink( + const std::string& fpath, + const std::ios_base::openmode mode/*=std::ios::trunc|std::ios::out*/) + : _mode(mode), _fpath(fpath) +{ + _open(); +} + +// Copy constructor. + +flushable_file_sink::flushable_file_sink(const flushable_file_sink& f) +{ + _swap(f); +} + +// Copy assignment operator. + +flushable_file_sink& +flushable_file_sink::operator=(const flushable_file_sink& f) +{ + if (this != &f) _swap(f); + return *this; +} + +void flushable_file_sink::_swap(const flushable_file_sink& f) +{ + close(); + _fpath = f._fpath; + _mode = f._mode; + _open(); +} + +bool flushable_file_sink::is_open() const +{ + return _f.is_open(); +} + +std::streamsize +flushable_file_sink::write(const char *s, std::streamsize n) +{ + _f.write(s,n); + return n; +} + +std::streampos flushable_file_sink::seek( + std::streamoff o, + std::ios_base::seekdir d) +{ + _f.seekp(o,d); + _f.seekg(o,d); + return o; +} + +std::streamsize flushable_file_sink::read(char_type *t, std::streamsize n) +{ + _f.read(t,n); + return n; +} + +bool flushable_file_sink::flush() +{ + _f.flush(); + return true; +} + +void flushable_file_sink::close() +{ + flush(); + _f.close(); +} + +namespace fs = boost::filesystem; + +void flushable_file_sink::_open() +{ + _fpath = fs::system_complete(fs::path(_fpath)).string(); + _f.open(_fpath.c_str(), _mode); + if (_f.fail()) + { + std::string s = _fpath + ": "; + + if (errno) + s += cc::perror(); + else + s += "unknown file open error"; + + throw std::runtime_error(s); + } +} + +} // namspace cclive + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/log.h
Added
@@ -0,0 +1,76 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_log_h +#define cclive_log_h + +#include <iostream> +#include <fstream> + +#include <boost/iostreams/filtering_stream.hpp> + +namespace cc +{ + +extern boost::iostreams::filtering_ostream log; + +struct omit_sink : public boost::iostreams::sink +{ + std::streamsize write(const char *s, std::streamsize n); + explicit omit_sink(bool b=false); +private: + bool _omit; +}; + +struct flushable_file_sink +{ + typedef char char_type; + + struct category : + boost::iostreams::output_seekable, + boost::iostreams::device_tag, + boost::iostreams::closable_tag, + boost::iostreams::flushable_tag {}; + + flushable_file_sink( + const std::string&, + const std::ios_base::openmode mode = std::ios::trunc|std::ios::out); + + flushable_file_sink& operator=(const flushable_file_sink&); + flushable_file_sink(const flushable_file_sink&); + + std::streampos seek(std::streamoff, std::ios_base::seekdir); + std::streamsize write(const char *, std::streamsize); + std::streamsize read(char_type *, std::streamsize); + + bool is_open() const; + bool flush(); + void close(); +private: + void _swap(const flushable_file_sink&); + void _open(); +private: + std::ios_base::openmode _mode; + mutable std::fstream _f; + std::string _fpath; +}; + +} // namespace cc + +#endif // cclive_log_h + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/main.cpp
Added
@@ -0,0 +1,50 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <iostream> + +#include <ccapplication> +#include <ccquvi> + +using namespace cc; + +int main(int argc, char *argv[]) +{ + application app; + int rc = 0; // OK. + + try + { + rc = app.exec(argc,argv); + } + + // Thrown by quvi::query constructor (e.g. quvi_init failure). + catch (const quvi::error& e) + { + std::clog << "libquvi: error: " << e.what() << std::endl; + } + + // Thrown by boost (e.g. cc::go_background failure). + catch (const std::runtime_error& e) + { + std::clog << "error: " << e.what() << std::endl; + } + + return rc; +} + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/options.cpp
Added
@@ -0,0 +1,275 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccinternal> + +#include <iostream> +#include <fstream> +#include <cstring> + +#include <boost/filesystem.hpp> +#include <boost/foreach.hpp> + +#ifndef foreach +#define foreach BOOST_FOREACH +#endif + +#include <ccre> +#include <ccoptions> + +namespace cc +{ + +namespace opts = boost::program_options; +namespace fs = boost::filesystem; + +typedef std::vector<std::string> vst; + +void options::exec(int argc, char **argv) +{ + // Path to ccliverc. + +#if BOOST_FILESYSTEM_VERSION > 2 + fs::path conf_path(fs::current_path()); +#else + fs::path conf_path(fs::current_path<fs::path>()); +#endif + + const char *home = getenv("HOME"); + + if (home && strlen(home) > 0) + conf_path = fs::system_complete(fs::path(home)); + + conf_path /= +#ifndef _WIN32 + std::string(".") + +#endif + std::string("ccliverc"); + + // Construct options. + + opts::options_description generic; + std::string conf_file; + + generic.add_options() + ("version", + "Print version and exit") + ("help", + "Print help and exit") + ("license", + "Print license and exit") + ("support", + "Print supported websites and exit") + ("verbose-libcurl", + "Turn on libcurl verbose output") + ("quiet,q", + "Turn off all output, excl. errors") +#ifdef HAVE_FORK + ("background,b", + "Go to background") +#endif + ("query-formats,F", + "Query available formats to URL") + ("format,f", + opts::value<std::string>(), + "Download media format") + ("continue,c", + "Resume partially downloaded media") + ("overwrite,W", + "Overwrite existing media") + ("output-file,O", + opts::value<std::string>(), + "Write media to arg") + ("no-download,n", + "Do not download media, print details") + ("no-resolve,r", + "Do not resolve URL redirections") + ("no-proxy", + "Do not use HTTP proxy") + ("log-file", + opts::value<std::string>()->default_value("cclive_log"), + "Write log output to arg") + ("config-file", + opts::value<std::string>(&conf_file)->default_value(conf_path.string()), + "Read args from arg") + ; + + // Config. + + opts::options_description config("Configuration"); + + config.add_options() + ("prefer-format,p", + opts::value<std::vector<std::string> >()->composing(), + "Preferred format [domain:format[,...]]") + ("progressbar", + opts::value<std::string>()->default_value("normal"), + "Use progressbar arg") + ("update-interval", + opts::value<double>()->default_value(1.0), + "Update interval of progressbar") + ("filename-format", + opts::value<std::string>()->default_value("%t.%s"), + "Downloaded media filename format") + ("output-dir", + opts::value<std::string>(), + "Write downloaded media to arg directory") + ("tr,t", + opts::value<vst>()->composing(), + "Translate characters in media title") + ("regexp", + opts::value<std::string>(), + "Regexp to cleanup media title (depr.)") + ("subst", opts::value<std::string>(), + "Replace matched occurences in filename (depr.)") + ("exec", opts::value<vst>()->composing(), + "Invoke arg after each finished download") + ("agent", + opts::value<std::string>()->default_value("Mozilla/5.0"), + "Identify as arg to HTTP servers") + ("proxy", opts::value<std::string>(), + "Use proxy for HTTP connections") + ("throttle", opts::value<int>()->default_value(0), + "Do not exceed transfer rate arg KB/s") + ("connect-timeout", opts::value<int>()->default_value(30), + "Seconds connecting allowed to take") + ("transfer-timeout", opts::value<int>()->default_value(0), + "Seconds transfer allowed to take") + ("dns-cache-timeout", opts::value<int>()->default_value(60), + "Seconds DNS resolves kept in memory") + ("max-retries", opts::value<int>()->default_value(5), + "Max download attempts before giving up") + ("retry-wait", opts::value<int>()->default_value(5), + "Time to wait before retrying") + ; + + // Hidden. + + opts::options_description hidden; + + hidden.add_options() + ("url", opts::value<vst>(), "url"); + + // Visible. + + _visible.add(generic).add(config); + + // Command line options. + + opts::options_description cmdline_options; + cmdline_options.add(generic).add(config).add(hidden); + + // Config file options. + + opts::options_description config_file_options; + config_file_options.add(config); + + // Positional. + + opts::positional_options_description p; + p.add("url", -1); + + // Parse. + + store(opts::command_line_parser(argc,argv) + .options(cmdline_options).positional(p).run(), _map); + notify(_map); + + // Read config. + + std::ifstream ifs(conf_file.c_str()); + + if (ifs) + { + store(parse_config_file(ifs, config_file_options), _map); + notify(_map);
View file
cclive-0.7.8.tar.bz2/src/cc/options.h
Added
@@ -0,0 +1,43 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_options_h +#define cclive_options_h + +#include <boost/program_options.hpp> + +namespace cc +{ + +class options +{ + friend std::ostream& operator<<(std::ostream&, const options&); +public: + const boost::program_options::variables_map& map() const; + void exec(int argc, char **argv); +private: + void _validate(); +private: + boost::program_options::options_description _visible; + boost::program_options::variables_map _map; +}; + +} // namespace cc + +#endif // cclive_options_h + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/progressbar.cpp
Added
@@ -0,0 +1,427 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccinternal> + +#include <iomanip> +#include <cstdio> +#include <ctime> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif + +#ifdef HAVE_SYS_IOCTL_H +#include <sys/ioctl.h> +#endif + +#include <boost/date_time/posix_time/posix_time.hpp> +#include <boost/program_options/variables_map.hpp> +#include <boost/filesystem.hpp> + +#include <ccquvi> +#include <ccfile> +#include <cclog> +#include <ccprogressbar> + +#if defined(SIGWINCH) && defined(TIOCGWINSZ) +#define WITH_RESIZE +#endif + +namespace cc +{ +#ifdef WITH_RESIZE +static volatile sig_atomic_t recv_sigwinch; + +static void handle_sigwinch(int s) +{ + recv_sigwinch = 1; +} + +static size_t get_term_width() +{ + const int fd = fileno(stderr); + + winsize wsz; + + if (ioctl(fd, TIOCGWINSZ, &wsz) < 0) + return 0; + + return wsz.ws_col; +} +#endif // WITH_RESIZE + +namespace po = boost::program_options; + +progressbar::progressbar(const file& f, + const quvi::url& u, + const po::variables_map& map) + : _update_interval(1), + _expected_bytes(u.content_length()), + _initial_bytes(f.initial_length()), + _time_started(0), + _last_update(0), + _term_width(0), + _dot_count(0), + _count(0), + _width(0), + _file(f), + _done(false), + _mode(normal) +{ + if (_initial_bytes > _expected_bytes) + _expected_bytes = _initial_bytes; + +#ifdef WITH_RESIZE + signal(SIGWINCH, handle_sigwinch); + + if (!_term_width || recv_sigwinch) + { + _term_width = get_term_width(); + + if (!_term_width) + _term_width = default_term_width; + } +#else + _term_width = default_term_width; +#endif + + _width = _term_width; + + time(&_time_started); + + if (map.count("background")) + _mode = dotline; + else + { + const std::string s = map["progressbar"].as<std::string>(); + if (s == "simple") + _mode = simple; + else if (s == "dotline") + _mode = dotline; + } + + _update_interval = fabs(map["update-interval"].as<double>()); +} + +static double to_mb(const double bytes) +{ + return bytes/(1024*1024); +} + +namespace pt = boost::posix_time; + +static std::string to_s(const int secs) +{ + pt::time_duration td = pt::seconds(secs); + return pt::to_simple_string(td); +} + +static std::string to_unit(double& rate) +{ + std::string units = "K/s"; + if (rate >= 1024.0*1024.0*1024.0) + { + rate /= 1024.0*1024.0*1024.0; + units = "G/s"; + } + else if (rate >= 1024.0*1024.0) + { + rate /= 1024.0*1024.0; + units = "M/s"; + } + else + rate /= 1024.0; + return units; +} + +namespace fs = boost::filesystem; + +void progressbar::update(double now) +{ + time_t tnow; + + time(&tnow); + + const time_t elapsed = tnow - _time_started; + + bool force_update = false; + +#ifdef WITH_RESIZE + if (recv_sigwinch && _mode == normal) + { + const size_t old_term_width = _term_width; + + _term_width = get_term_width(); + + if (!_term_width) + _term_width = default_term_width; + + if (_term_width != old_term_width) + { + _width = _term_width; + force_update = true; + } + + recv_sigwinch = 0; + } +#endif // WITH_RESIZE + + const bool inactive = now == 0; + + if (!_done) + { + if ((elapsed - _last_update) < _update_interval + && !force_update) + { + return;
View file
cclive-0.7.8.tar.bz2/src/cc/progressbar.h
Added
@@ -0,0 +1,74 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_progressbar_h +#define cclive_progressbar_h + +#include <ccfile> + +namespace cc +{ + +class progressbar +{ + enum { default_term_width=80 }; +public: + enum mode { normal = 0, dotline, simple }; +public: + progressbar(const file&, + const quvi::url&, + const boost::program_options::variables_map&); + void update(double); + void finish(); +private: + void _normal(const std::stringstream& size_s, + const std::stringstream& rate_s, + const std::stringstream& eta_s, + const int percent, + const std::stringstream& percent_s); + + void _dotline(const std::stringstream& size_s, + const std::stringstream& rate_s, + const std::stringstream& eta_s, + const std::stringstream& percent_s); + + void _simple(const std::stringstream& size_s, + const std::stringstream& percent_s) const; + + void _render_meter(std::stringstream& bar, + const int percent, + const size_t space_left); +private: + double _update_interval; + double _expected_bytes; + double _initial_bytes; + time_t _time_started; + time_t _last_update; + size_t _term_width; + int _dot_count; + double _count; + size_t _width; + file _file; + bool _done; + mode _mode; +}; + +} // cclive namespace + +#endif // cclive_progressbar_h + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/re.cpp
Added
@@ -0,0 +1,183 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <sstream> + +#include <boost/format.hpp> +#include <pcrecpp.h> + +#include <ccre> + +namespace cc +{ +namespace re +{ + +static pcrecpp::RE_Options _init_re_opts(const std::string& flags) +{ + pcrecpp::RE_Options opts; + opts.set_caseless(strstr(flags.c_str(), "i") != 0); + opts.set_utf8(true); + return opts; +} + +bool subst(const std::string& re, std::string& src) +{ + std::string pat, sub, flags; + + static const char delims_b[] = "\\{\\<\\[\\(\\/"; + static const char delims_c[] = "\\}\\>\\]\\)\\/"; + + boost::format fmt = + boost::format("^s[%1%](.*)[%2%][%3%](.*)[%4%](.*)$") + % delims_b % delims_c % delims_b % delims_c; + + pcrecpp::RE rx(fmt.str(), pcrecpp::UTF8()); + + if (rx.PartialMatch(re, &pat, &sub, &flags)) + { + if (src.empty()) // Verify regexp only. + return true; + + pcrecpp::RE_Options opts = _init_re_opts(flags); + pcrecpp::RE subs(pat, opts); + + (strstr(flags.c_str(), "g")) + ? subs.GlobalReplace(sub, &src) + : subs.Replace(sub, &src); + + return true; + } + return false; +} + +bool capture(const std::string& re, std::string& src) +{ + std::string pat, flags; + pcrecpp::RE rx("^\\/(.*)\\/(.*)$", pcrecpp::UTF8()); + + if (rx.PartialMatch(re, &pat, &flags)) + { + if (src.empty()) // Check regexp + return true; + + pcrecpp::RE_Options opts = _init_re_opts(flags); + if (strstr(flags.c_str(), "g") != 0) + { + pcrecpp::StringPiece sp(src); + pcrecpp::RE re(pat, opts); + src.clear(); + + std::string s; + while (re.FindAndConsume(&sp, &s)) + src += s; + } + else + { + std::string tmp = src; + src.clear(); + pcrecpp::RE(pat, opts).PartialMatch(tmp, &src); + } + return true; + } + return false; +} + +bool grep(const std::string& r, const std::string& s) +{ + return pcrecpp::RE(r, pcrecpp::UTF8()).PartialMatch(s); +} + +static void tr_subst(const std::string& r, std::string& s) +{ + pcrecpp::RE rx("^s\\/(.*)\\/(.*)\\/(.*)$", pcrecpp::UTF8()); + std::string pat, sub, flags; + + if (!rx.PartialMatch(r, &pat, &sub, &flags)) + { + std::stringstream b; + b << "--tr: " << "no idea what to do with `" << r << "'"; + throw std::runtime_error(b.str()); + } + + if (s.empty()) // Validate regexp only. + return; + + pcrecpp::RE_Options o = _init_re_opts(flags); + pcrecpp::RE subs(pat, o); + + (strstr(flags.c_str(), "g")) + ? subs.GlobalReplace(sub, &s) + : subs.Replace(sub, &s); +} + +static void tr_filter(const std::string& r, std::string& s) +{ + pcrecpp::RE rx("^\\/(.*)\\/(.*)$", pcrecpp::UTF8()); + std::string pat, flags; + + if (!rx.PartialMatch(r, &pat, &flags)) + { + std::stringstream b; + b << "--tr: " << "no idea what to do with `" << r << "'"; + throw std::runtime_error(b.str()); + } + + if (s.empty()) // Validate regexp only. + return; + + pcrecpp::RE_Options o = _init_re_opts(flags); + + if (strstr(flags.c_str(), "g") != 0) + { + pcrecpp::StringPiece sp(s); + s.clear(); + + rx = pcrecpp::RE(pat, o); + std::string tmp; + + while (rx.FindAndConsume(&sp, &tmp)) + s += tmp; + } + else + { + std::string tmp = s; + s.clear(); + pcrecpp::RE(pat, o).PartialMatch(tmp, &s); + } +} + +void tr(const std::string& r, std::string& s) +{ + if (pcrecpp::RE("^s\\/", pcrecpp::UTF8()).PartialMatch(r)) + tr_subst(r, s); + else + tr_filter(r, s); +} + +void trim(std::string& s) +{ + tr_subst("s/^[\\s]+//", s); + tr_subst("s/\\s+$//", s); + tr_subst("s/\\s\\s+/ /g", s); +} + +} // namespace re + +} // namespace cc + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/re.h
Added
@@ -0,0 +1,39 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_re_h +#define cclive_re_h + +namespace cc +{ + +namespace re +{ + +bool subst(const std::string&, std::string&); +bool capture(const std::string&, std::string&); +bool grep(const std::string&, const std::string&); +void tr(const std::string&, std::string&); +void trim(std::string&); + +} // namespace re + +} // namespace cc + +#endif // cclive_re_h + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/cc/util.h
Added
@@ -0,0 +1,58 @@ +/* cclive + * Copyright (C) 2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_util_h +#define cclive_util_h + +namespace boost +{ +namespace program_options +{ +class variables_map; +} +} + +namespace quvi +{ +class query; +class media; +class url; +} // namespace quvi + +namespace cc +{ + +class nothing_todo_error { +public: + nothing_todo_error() { } +}; + +class file; + +void exec(const file&, const boost::program_options::variables_map& map); +void get(const quvi::query&, + quvi::media&, + const boost::program_options::variables_map& map); +void go_background(const std::string&, bool&); +std::string perror(const std::string& p=""); +void wait(const int); + +} // namespace cc + +#endif // cclive_util_h + +/* vim: set ts=2 sw=2 tw=72 expandtab: */
View file
cclive-0.7.8.tar.bz2/src/cc/wait.cpp
Added
@@ -0,0 +1,54 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccinternal> + +#include <iostream> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#ifdef _WIN32 +#include <windows.h> +#define sleep(n) Sleep(n*1000) +#endif + +#include <cclog> +#include <ccutil> + +namespace cc +{ + +void wait(const int retry_wait) +{ + for (int i=1; i<=retry_wait; ++i) + { + if (i % 5 == 0) + cc::log << i; + else + cc::log << "."; + + cc::log << std::flush; + sleep(1); + } + cc::log << std::endl; +} + +} // namespace cc + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/ccapplication
Added
@@ -0,0 +1,1 @@ +#include "cc/application.h"
View file
cclive-0.7.8.tar.bz2/src/ccfile
Added
@@ -0,0 +1,1 @@ +#include "cc/file.h"
View file
cclive-0.7.8.tar.bz2/src/ccinternal
Added
@@ -0,0 +1,1 @@ +#include "cc/internal.h"
View file
cclive-0.7.8.tar.bz2/src/cclog
Added
@@ -0,0 +1,1 @@ +#include "cc/log.h"
View file
cclive-0.7.8.tar.bz2/src/ccoptions
Added
@@ -0,0 +1,1 @@ +#include "cc/options.h"
View file
cclive-0.7.8.tar.bz2/src/ccprogressbar
Added
@@ -0,0 +1,1 @@ +#include "cc/progressbar.h"
View file
cclive-0.7.8.tar.bz2/src/ccquvi
Added
@@ -0,0 +1,1 @@ +#include "quvi/ccquvi.h"
View file
cclive-0.7.8.tar.bz2/src/ccre
Added
@@ -0,0 +1,1 @@ +#include "cc/re.h"
View file
cclive-0.7.8.tar.bz2/src/ccutil
Added
@@ -0,0 +1,1 @@ +#include "cc/util.h"
View file
cclive-0.7.8.tar.bz2/src/quvi
Added
+(directory)
View file
cclive-0.7.8.tar.bz2/src/quvi/ccquvi.h
Added
@@ -0,0 +1,177 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef cclive_ccquvi_h +#define cclive_ccquvi_h + +#include <string> +#include <vector> +#include <map> + +#include <quvi/quvi.h> + +namespace quvi +{ + +class options; +class query; +class media; +class error; +class url; + +// Version. + +std::string version(); +std::string version_long(); + +// To string. + +std::string support_to_s(const std::map<std::string,std::string>&); + +// Options. + +class options +{ + friend class query; + friend class error; +public: + options(); + options(const options&); + options& operator=(const options&); + virtual ~options(); +public: + void statusfunc(quvi_callback_status); + void format(const std::string&); + void resolve(const bool); + void verify(const bool); +private: + void _swap(const options&); +private: + quvi_callback_status _statusfunc; + std::string _format; + bool _resolve; + bool _verify; +}; + +// Query. + +class query +{ +public: + query(); + query(const query&); + query& operator=(const query&); + virtual ~query(); +public: + std::string formats(const std::string& url, const options&) const; + media parse(const std::string& url, const options&) const; + std::map<std::string,std::string> support() const; + void* curlHandle() const; +private: + void _set_opts(const options&) const; + void _init(); + void _close(); +private: + quvi_t _quvi; + void*_curl; +}; + +// Link. + +class url +{ +public: + url(); + url(quvi_media_t); + url(const url&); + url& operator=(const url&); + virtual ~url(); +public: + const std::string& content_type() const; + const std::string& media_url() const; + const std::string& suffix() const; + double content_length() const; + bool ok() const; +private: + void _swap(const url&); +private: + std::string _contentType; + double _contentLength; + std::string _suffix; + std::string _url; +}; + +// Media. + +class media +{ + friend std::ostream& operator<<(std::ostream&, const media&); +public: + media(); + media(quvi_media_t); + media(const media&); + media& operator=(const media&); + virtual ~media(); +public: + const std::string& title() const; + const std::string& host() const; + const std::string& url() const; + const std::string& id() const; + const std::string& format() const; + void print(std::ostream&); + long http_code() const; + quvi::url next_url(); + std::string to_s(); +private: + void _swap(const media&); +private: + std::vector<quvi::url>::const_iterator _current_url; + std::vector<quvi::url> _urls; + std::string _format; + std::string _title; + std::string _host; + std::string _url; + std::string _id; + long _http_code; +}; + +// Error. + +class error +{ +public: + error(quvi_t, QUVIcode); + error(const error&); + error& operator=(const error&); + virtual ~error(); +public: + const std::string& what() const; + long response_code() const; + QUVIcode quvi_code() const; +private: + void _swap(const error&); +private: + QUVIcode _quvi_code; + std::string _what; + long _resp_code; +}; + +} // namespace quvi + +#endif // cclive_quvi_h + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/quvi/err.cpp
Added
@@ -0,0 +1,81 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccquvi> + +namespace quvi +{ + +// Constructor. + +error::error(quvi_t q, QUVIcode c) + : _quvi_code(QUVI_OK), _resp_code(0) +{ + // Friend of quvi::error class -> clean API. + _what = quvi_strerror(q, c); + quvi_getinfo(q, QUVIINFO_RESPONSECODE, &_resp_code); +} + +// Copy constructor. + +error::error(const error& e) + : _quvi_code(QUVI_OK), _resp_code(0) +{ + _swap(e); +} + +// Copy assignment operator. + +error& error::operator=(const error& e) +{ + if (this != &e) + _swap(e); + return *this; +} + +// Destructor. +error::~error() { } + +// Swap. + +void error::_swap(const error& e) +{ + _quvi_code = e._quvi_code; + _resp_code = e._resp_code; + _what = e._what; +} + +// Get. + +const std::string& error::what() const +{ + return _what; +} + +long error::response_code() const +{ + return _resp_code; +} + +QUVIcode error::quvi_code() const +{ + return _quvi_code; +} + +} // namespace quvi + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/quvi/media.cpp
Added
@@ -0,0 +1,186 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <sstream> +#include <iomanip> + +#include <ccquvi> + +namespace quvi +{ + +// Constructors. + +media::media() + : _current_url( _urls.begin() ), _http_code(-1) +{ } + +media::media(quvi_media_t qv) + : _current_url( _urls.begin() ), _http_code(-1) +{ +#define _wrap(id,dst,type) \ + do { \ + type tmp; \ + quvi_getprop(qv,id,&tmp); \ + dst = tmp; \ + } while (0) + _wrap(QUVIPROP_HOSTID, _host, char*); + _wrap(QUVIPROP_PAGEURL, _url, char*); + _wrap(QUVIPROP_PAGETITLE, _title, char*); + _wrap(QUVIPROP_MEDIAID, _id, char*); + _wrap(QUVIPROP_FORMAT, _format, char*); +#undef _wrap + + do + { + _urls.push_back( quvi::url(qv) ); + } + while (quvi_next_media_url(qv) == QUVI_OK); + + _current_url = _urls.begin(); +} + +// Copy constructor. + +media::media(const media& v) + : _current_url( _urls.begin() ), _http_code(-1) +{ + _swap(v); +} + +// Copy assignment operator. + +media& media::operator=(const media& v) +{ + if (this != &v) + _swap(v); + return *this; +} + +// Destructor. + +media::~media() { } + +// Swap. + +void media::_swap(const media& v) +{ + _urls = v._urls; + _title = v._title; + _host = v._host; + _url = v._url; + _id = v._id; + _format = v._format; + _http_code = v._http_code; + _current_url = _urls.begin(); +} + +// Get. + +const std::string& media::title() const +{ + return _title; +} + +const std::string& media::host() const +{ + return _host; +} + +const std::string& media::url() const +{ + return _url; +} + +const std::string& media::id() const +{ + return _id; +} + +const std::string& media::format() const +{ + return _format; +} + +long media::http_code() const +{ + return _http_code; +} + +// Next URL. + +quvi::url media::next_url() +{ + if (_current_url == _urls.end()) + { + _current_url = _urls.begin(); + return quvi::url(); + } + return *(_current_url)++; +} + +// To string. Emulates quvi command's behaviour. + +std::string media::to_s() +{ + std::stringstream b; + + b.setf(std::ios::fixed); + + b << "title\t: " << _title << "\n" + << "host\t: " << _host << "\n" + << "url\t: " << _url << "\n" + << "id\t: " << _id << "\n" + << "format\t: " << _format << "\n" + << "httpcode: " << _http_code << "\n"; + + for (int i=0;; ++i) + { + const quvi::url u = next_url(); + + if (!u.ok()) break; + + b << "url #" + << i + << "\t: " + << u.media_url() + << "\n:: length\t: " + << std::setprecision(0) + << u.content_length() + << "\n:: content-type\t: " + << u.content_type() + << "\n:: suffix\t: " + << u.suffix() + << "\n"; + } + + return b.str(); +} + +std::ostream& operator<<(std::ostream& os, media& v) +{ + return os << v.to_s(); +} + +void media::print(std::ostream& os) +{ + os << to_s(); +} + +} // namespace quvi + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/quvi/misc.cpp
Added
@@ -0,0 +1,52 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <sstream> + +#include <ccquvi> + +namespace quvi +{ + +// Version. + +std::string version() +{ + return quvi_version(QUVI_VERSION); +} + +std::string version_long() +{ + return quvi_version(QUVI_VERSION_LONG); +} + +// To string. Mimic quvi(1) behaviour. + +std::string support_to_s(const std::map<std::string,std::string>& map) +{ + std::map<std::string,std::string>::const_iterator iter; + std::stringstream b; + + for (iter = map.begin(); iter != map.end(); ++iter) + b << (*iter).first << "\t" << (*iter).second << "\n"; + + return b.str(); +} + +} // namespace quvi + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/quvi/opts.cpp
Added
@@ -0,0 +1,94 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <cassert> +#include <iostream> + +#include <ccquvi> + +namespace quvi +{ + +options::options() + : _statusfunc(NULL), + _format("default"), + _resolve(true), + _verify(true) +{ } + +// Copy constructor. + +options::options(const options& opts) + : _statusfunc(NULL), + _format("default"), + _resolve(true), + _verify(true) +{ + _swap(opts); +} + +// Copy assignment operator. + +options& options::operator=(const options& qo) +{ + if (this != &qo) + _swap(qo); + return *this; +} + +// Destructor. + +options::~options() +{ + _statusfunc = NULL; +} + +// Swap. + +void options::_swap(const options& qo) +{ + _format = qo._format; + _verify = qo._verify; + _resolve = qo._resolve; + _statusfunc = qo._statusfunc; +} + +// Set. + +void options::format(const std::string& fmt) +{ + _format = fmt; +} + +void options::verify(const bool b) +{ + _verify = b; +} + +void options::resolve(const bool b) +{ + _resolve = b; +} + +void options::statusfunc(quvi_callback_status cb) +{ + _statusfunc = cb; +} + +} // namespace quvi + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/quvi/query.cpp
Added
@@ -0,0 +1,176 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <cassert> + +#include <ccquvi> + +namespace quvi +{ + +// Constructor. + +query::query() + : _quvi(NULL), _curl(NULL) +{ + _init(); +} + +// Copy constructor. + +query::query(const query& q) + : _quvi(NULL), _curl(NULL) +{ + _init(); +} + +// Copy assignment operator. + +query& query::operator=(const query& q) +{ + if (this != &q) + { + _close(); + _init(); + } + return *this; +} + +// Destructor. + +query::~query() +{ + _close(); +} + +// Init. + +void query::_init() +{ + + const QUVIcode rc = quvi_init(&_quvi); + + if (rc != QUVI_OK) + throw error(_quvi,rc); + + assert(_quvi != NULL); + + quvi_getinfo(_quvi, QUVIINFO_CURL, &_curl); + assert(_curl != NULL); +} + +// Close. + +void query::_close() +{ + if (_quvi) + quvi_close(&_quvi); // Resets to NULL. + assert(_quvi == NULL); + _curl = NULL; +} + +// Set common libquvi options. + +void query::_set_opts(const options& opts) const +{ + // Friend of quvi::options class -> clean API. + + if (!opts._format.empty()) + quvi_setopt(_quvi, QUVIOPT_FORMAT, opts._format.c_str()); + + quvi_setopt(_quvi, QUVIOPT_STATUSFUNCTION, opts._statusfunc); +#ifdef _0 + quvi_setopt(_quvi, QUVIOPT_NOVERIFY, opts._verify ? 1L:0L); +#endif + + quvi_setopt(_quvi, QUVIOPT_NORESOLVE, opts._resolve ? 1L:0L); + quvi_setopt(_quvi, QUVIOPT_CATEGORY, QUVIPROTO_HTTP); +} + +// Query formats. + +std::string query::formats(const std::string& url, + const options& opts) const +{ + _set_opts(opts); + + char *formats = NULL; + + QUVIcode rc = quvi_query_formats(_quvi, + const_cast<char*>(url.c_str()), + &formats); + if (rc != QUVI_OK) + throw error(_quvi,rc); + + std::string r = formats; + quvi_free(formats); + + return r; +} + + +// Parse. + +media query::parse(const std::string& pageURL, const options& opts) const +{ + _set_opts(opts); + + quvi_media_t qm; + + QUVIcode rc = + quvi_parse(_quvi, const_cast<char*>(pageURL.c_str()), &qm); + + if (rc != QUVI_OK) + throw error(_quvi,rc); + + assert(qm != NULL); + + media m(qm); + quvi_parse_close(&qm); + + return m; +} + +// Get. + +void* query::curlHandle() const +{ + return _curl; +} + +// Support. + +std::map<std::string,std::string> query::support() const +{ + std::map<std::string,std::string> map; + char *d=NULL, *f=NULL; + + while (quvi_next_supported_website(_quvi, &d, &f) == QUVI_OK) + { + map[d] = f; + quvi_free(d); + d = NULL; + quvi_free(f); + f = NULL; + } + + return map; +} + +} // namespace quvi + +// vim: set ts=2 sw=2 tw=72 expandtab:
View file
cclive-0.7.8.tar.bz2/src/quvi/url.cpp
Added
@@ -0,0 +1,106 @@ +/* cclive + * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <ccquvi> + +namespace quvi +{ + +// Constructors. + +url::url() + : _contentLength(-1) +{ +} + +url::url(quvi_media_t qv) + : _contentLength(-1) +{ +#define _wrap(id,dst,type) \ + do { \ + type tmp; \ + quvi_getprop(qv,id,&tmp); \ + dst = tmp; \ + } while (0) + _wrap(QUVIPROP_MEDIAURL, _url, char*); + _wrap(QUVIPROP_MEDIACONTENTTYPE, _contentType, char*); + _wrap(QUVIPROP_MEDIACONTENTLENGTH, _contentLength, double); + _wrap(QUVIPROP_FILESUFFIX, _suffix, char*); +#undef _wrap +} + +// Copy constructor. + +url::url(const url& u) + : _contentLength(-1) +{ + _swap(u); +} + +// Copy assignment operator. + +url& url::operator=(const url& u) +{ + if (this != &u) + _swap(u); + return *this; +} + +// Destructor. + +url::~url() { } + +// Swap. + +void url::_swap(const url& u) +{ + _contentLength = u._contentLength; + _contentType = u._contentType; + _suffix = u._suffix; + _url = u._url; +} + +// Get. + +const std::string& url::content_type() const +{ + return _contentType; +} + +const std::string& url::suffix() const +{ + return _suffix; +} + +const std::string& url::media_url() const +{ + return _url; +} + +double url::content_length() const +{ + return _contentLength; +} + +bool url::ok() const +{ + return _contentLength > -1; +} + +} // namespace quvi + +// vim: set ts=2 sw=2 tw=72 expandtab:
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.