diff options
26 files changed, 551 insertions, 1157 deletions
diff --git a/community/csfml/PKGBUILD b/community/csfml/PKGBUILD index 0a28d763e..b6fe646a4 100644 --- a/community/csfml/PKGBUILD +++ b/community/csfml/PKGBUILD @@ -1,59 +1,34 @@ -# $Id: PKGBUILD 70299 2012-05-04 03:01:09Z svenstaro $ +# $Id: PKGBUILD 88191 2013-04-13 15:25:43Z svenstaro $ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> pkgname=csfml - -_git=true - -if [[ "${_git}" = "true" ]]; then - pkgver=1.99.git20120504 -fi - +pkgver=2.0 pkgrel=1 pkgdesc='C bindings for sfml' arch=('i686' 'x86_64' 'mips64el') url='http://www.sfml-dev.org/' license=('zlib') -depends=('sfml') -makedepends=('git' 'cmake' 'doxygen') - -_gitroot='https://github.com/LaurentGomila/CSFML.git' -_gitname='CSFML' +depends=("sfml=${pkgver}") +makedepends=('cmake' 'doxygen') +source=("csfml-${pkgver}::https://github.com/LaurentGomila/CSFML/archive/2.0.tar.gz") +md5sums=('d609c9e3b115d480d8c61911d774472c') build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [ -d $_gitname ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot - cd $_gitname - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" + cd "$srcdir"/CSFML-${pkgver} mkdir build && cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr .. \ - -DBUILD_DOC=true + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_DOC=true make make doc } package() { - cd "$srcdir/$_gitname-build/build/" + cd "$srcdir"/CSFML-${pkgver}/build make DESTDIR="$pkgdir/" install - install -Dm644 ../license.txt \ - ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE - - make clean + install -Dm644 ../license.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE } diff --git a/community/ffmpegsource/PKGBUILD b/community/ffmpegsource/PKGBUILD index b6350db93..c434b18b0 100755 --- a/community/ffmpegsource/PKGBUILD +++ b/community/ffmpegsource/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 85215 2013-02-27 18:14:32Z alucryd $ +# $Id: PKGBUILD 88204 2013-04-13 20:20:33Z alucryd $ # Maintainer: Maxime Gauduin <alucryd@gmail.com> pkgname=ffmpegsource -pkgver=743 -pkgrel=2 +pkgver=753 +pkgrel=1 pkgdesc="A libav/ffmpeg based source library and Avisynth plugin for easy frame accurate access" arch=('i686' 'x86_64' 'mips64el') url="http://code.google.com/p/ffmpegsource/" @@ -11,49 +11,35 @@ license=('MIT') depends=('ffmpeg') makedepends=('svn') options=('!libtool') -source=('autoconf.patch' 'enable-libavresample.patch') -sha256sums=('b09a7e9a08a16bdaf19d43c7ad8d3ec455f6fecec2f4f5ada417345343adda93' - '05f03515cc2405cdf8a8ba835f5adc2057f40054a4a1d9e493f0ad512c5de70d') +source=("${pkgname}::svn+http://ffmpegsource.googlecode.com/svn/trunk/" + 'autoconf.patch') +sha256sums=('SKIP' + 'b09a7e9a08a16bdaf19d43c7ad8d3ec455f6fecec2f4f5ada417345343adda93') -_svntrunk=http://ffmpegsource.googlecode.com/svn/trunk/ -_svnmod=ffmpegsource +pkgver() { + cd "${SRCDEST}"/${pkgname} -build() { - cd "${srcdir}" - -# Checkout - msg "Connecting to SVN server...." - - if [[ -d ${_svnmod}/.svn ]]; then - (cd ${_svnmod} && svn up -r ${pkgver}) - else - svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod} - fi + svnversion | tr -d [A-z] +} - msg "SVN checkout done or server timeout" - msg "Starting build..." +prepare() { + cd "${srcdir}"/${pkgname} - rm -rf "${srcdir}"/${_svnmod}-build -# svn export "${srcdir}"/${_svnmod} "${srcdir}"/${_svnmod}-build - cp -R "${srcdir}"/${_svnmod} "${srcdir}"/${_svnmod}-build - cd "${srcdir}"/${_svnmod}-build + patch -Np1 -i ../autoconf.patch +} -# Patch - patch -Np1 -i "${srcdir}"/autoconf.patch - patch -Np1 -i "${srcdir}"/enable-libavresample.patch +build() { + cd "${srcdir}"/${pkgname} -# Build ./autogen.sh --prefix=/usr --enable-shared --disable-static make } package() { - cd "${srcdir}"/${_svnmod}-build + cd "${srcdir}"/${pkgname} -# Install make DESTDIR="${pkgdir}" install -# License install -dm 755 "${pkgdir}"/usr/share/licenses/ffmpegsource install -m 644 COPYING "${pkgdir}"/usr/share/licenses/ffmpegsource/LICENSE } diff --git a/community/ffmpegsource/enable-libavresample.patch b/community/ffmpegsource/enable-libavresample.patch deleted file mode 100755 index 56d435782..000000000 --- a/community/ffmpegsource/enable-libavresample.patch +++ /dev/null @@ -1,970 +0,0 @@ -# enable-libavresample.patch -# -# Adds libavresample support. Created by diffing Thomas Goyne's GIT repo -# with official ffms SVN. -# - -diff -ru ffmpegsource/configure.ac ffms2/configure.ac ---- ffmpegsource/configure.ac 2013-02-27 16:53:39.230691825 +0100 -+++ ffms2/configure.ac 2013-02-27 16:53:31.737713841 +0100 -@@ -181,6 +181,25 @@ - AC_MSG_RESULT([no]) - ]) - -+AC_ARG_ENABLE(avresample, -+ AS_HELP_STRING([--enable-avresample], -+ [use libavresample for audio resampling])) -+AS_IF([test x$enable_avresample != xno], [ -+ PKG_CHECK_MODULES(AVRESAMPLE, [libavresample >= 1.0.0], [enable_avresample=yes], [ -+ AS_IF([test x$enable_avresample = xyes], -+ [AC_MSG_ERROR([--enable-avresample was specified, but avresample 1.0.0+ could not be found.])]) -+ enable_avresample=no -+ ]) -+]) -+ -+AS_IF([test x$enable_avresample], -+ [libavresample="libavresample" -+ AC_DEFINE([WITH_AVRESAMPLE], [1], [Use avresample])]) -+ -+AC_SUBST([AVRESAMPLE_CFLAGS]) -+AC_SUBST([AVRESAMPLE_LIBS]) -+AC_SUBST([libavresample]) -+ - AC_MSG_CHECKING([whether -Wl,-Bsymbolic is needed]) - if test "$enable_shared" = yes; then - _LDFLAGS="$LDFLAGS" -diff -ru ffmpegsource/ffms2.pc.in ffms2/ffms2.pc.in ---- ffmpegsource/ffms2.pc.in 2013-02-27 16:53:38.924039701 +0100 -+++ ffms2/ffms2.pc.in 2013-02-27 16:53:31.737713841 +0100 -@@ -7,7 +7,7 @@ - - Name: ffms2 - Description: The Fabulous FM Library 2 --Requires.private: libavformat libavcodec libswscale libavutil -+Requires.private: libavformat libavcodec libswscale libavutil @libavresample@ - Version: @FFMS_VERSION@ - Libs.private: @ZLIB_LDFLAGS@ -lz - Libs: -L${libdir} -lffms2 -diff -ru ffmpegsource/include/ffmscompat.h ffms2/include/ffmscompat.h ---- ffmpegsource/include/ffmscompat.h 2013-02-27 16:53:38.920706525 +0100 -+++ ffms2/include/ffmscompat.h 2013-02-27 16:53:31.737713841 +0100 -@@ -71,6 +71,15 @@ - # define FFMS_CodecID AVCodecID - # undef CodecID - # endif -+# if VERSION_CHECK(LIBAVCODEC_VERSION_INT, <, 54, 28, 0, 54, 59, 100) -+# define avcodec_free_frame av_free -+# endif -+#endif -+ -+#ifdef LIBAVUTIL_VERSION_INT -+# if VERSION_CHECK(LIBAVUTIL_VERSION_INT, <, 51, 27, 0, 51, 46, 100) -+# define av_get_packed_sample_fmt(fmt) (fmt < AV_SAMPLE_FMT_U8P ? fmt : fmt - (AV_SAMPLE_FMT_U8P - AV_SAMPLE_FMT_U8)) -+# endif - #endif - - #endif // FFMSCOMPAT_H -diff -ru ffmpegsource/include/ffms.h ffms2/include/ffms.h ---- ffmpegsource/include/ffms.h 2013-02-27 16:53:38.920706525 +0100 -+++ ffms2/include/ffms.h 2013-02-27 16:53:31.737713841 +0100 -@@ -113,6 +113,7 @@ - FFMS_ERROR_TRACK, // track handling - FFMS_ERROR_WAVE_WRITER, // WAVE64 file writer - FFMS_ERROR_CANCELLED, // operation aborted -+ FFMS_ERROR_RESAMPLING, // audio resampling (libavresample) - - // Subtypes - what caused the error - FFMS_ERROR_UNKNOWN = 20, // unknown error -@@ -237,6 +238,53 @@ - FFMS_CR_JPEG = 2 // 2^n-1, or "fullrange" - } FFMS_ColorRanges; - -+typedef enum FFMS_MixingCoefficientType { -+ FFMS_MIXING_COEFFICIENT_Q8 = 0, -+ FFMS_MIXING_COEFFICIENT_Q15 = 1, -+ FFMS_MIXING_COEFFICIENT_FLT = 2 -+} FFMS_MixingCoefficientType; -+ -+typedef enum FFMS_MatrixEncoding { -+ FFMS_MATRIX_ENCODING_NONE = 0, -+ FFMS_MATRIX_ENCODING_DOBLY = 1, -+ FFMS_MATRIX_ENCODING_PRO_LOGIC_II = 2 -+} FFMS_MatrixEncoding; -+ -+typedef enum FFMS_ResampleFilterType { -+ FFMS_RESAMPLE_FILTER_CUBIC = 0, -+ FFMS_RESAMPLE_FILTER_SINC = 1, -+ FFMS_RESAMPLE_FILTER_KAISER = 2 -+} FFMS_ResampleFilterType; -+ -+typedef enum FFMS_AudioDitherMethod { -+ FFMS_RESAMPLE_DITHER_NONE = 0, -+ FFMS_RESAMPLE_DITHER_RECTANGULAR = 1, -+ FFMS_RESAMPLE_DITHER_TRIANGULAR = 2, -+ FFMS_RESAMPLE_DITHER_TRIANGULAR_HIGHPASS = 3, -+ FFMS_RESAMPLE_DITHER_TRIANGULAR_NOISESHAPING = 4 -+} FFMS_AudioDitherMethod; -+ -+typedef struct FFMS_ResampleOptions { -+ int64_t ChannelLayout; -+ FFMS_SampleFormat SampleFormat; -+ int SampleRate; -+ FFMS_MixingCoefficientType MixingCoefficientType; -+ double CenterMixLevel; -+ double SurroundMixLevel; -+ double LFEMixLevel; -+ int Normalize; -+ int ForceResample; -+ int ResampleFilterSize; -+ int ResamplePhaseShift; -+ int LinearInterpolation; -+ double CutoffFrequencyRatio; -+ FFMS_MatrixEncoding MatrixedStereoEncoding; -+ FFMS_ResampleFilterType FilterType; -+ int KaiserBeta; -+ FFMS_AudioDitherMethod DitherMethod; -+} FFMS_ResampleOptions; -+ -+ - typedef struct FFMS_Frame { - uint8_t *Data[4]; - int Linesize[4]; -@@ -319,6 +367,9 @@ - FFMS_API(void) FFMS_ResetOutputFormatV(FFMS_VideoSource *V); - FFMS_API(int) FFMS_SetInputFormatV(FFMS_VideoSource *V, int ColorSpace, int ColorRange, int Format, FFMS_ErrorInfo *ErrorInfo); /* Introduced in FFMS_VERSION ((2 << 24) | (17 << 16) | (1 << 8) | 0) */ - FFMS_API(void) FFMS_ResetInputFormatV(FFMS_VideoSource *V); -+FFMS_API(FFMS_ResampleOptions *) FFMS_CreateResampleOptions(FFMS_AudioSource *A); /* Introduced in FFMS_VERSION ((2 << 24) | (15 << 16) | (4 << 8) | 0) */ -+FFMS_API(int) FFMS_SetOutputFormatA(FFMS_AudioSource *A, const FFMS_ResampleOptions*options, FFMS_ErrorInfo *ErrorInfo); /* Introduced in FFMS_VERSION ((2 << 24) | (15 << 16) | (4 << 8) | 0) */ -+FFMS_API(void) FFMS_DestroyResampleOptions(FFMS_ResampleOptions *options); /* Introduced in FFMS_VERSION ((2 << 24) | (15 << 16) | (4 << 8) | 0) */ - FFMS_API(void) FFMS_DestroyIndex(FFMS_Index *Index); - FFMS_API(int) FFMS_GetSourceType(FFMS_Index *Index); - FFMS_API(int) FFMS_GetSourceTypeI(FFMS_Indexer *Indexer); -diff -ru ffmpegsource/Makefile.am ffms2/Makefile.am ---- ffmpegsource/Makefile.am 2013-02-27 16:53:39.310688030 +0100 -+++ ffms2/Makefile.am 2013-02-27 16:53:31.724381141 +0100 -@@ -9,7 +9,7 @@ - INCLUDES = -I. -I$(top_srcdir)/include -I$(top_srcdir)/src/config @LIBAV_CFLAGS@ @ZLIB_CPPFLAGS@ -include config.h - - lib_LTLIBRARIES = src/core/libffms2.la --src_core_libffms2_la_LIBADD = @LIBAV_LIBS@ @ZLIB_LDFLAGS@ -lz @LTUNDEF@ -+src_core_libffms2_la_LIBADD = @LIBAV_LIBS@ @AVRESAMPLE_LIBS@ @ZLIB_LDFLAGS@ -lz @LTUNDEF@ - src_core_libffms2_la_SOURCES = \ - src/core/audiosource.h \ - src/core/audiosource.cpp \ -diff -ru ffmpegsource/src/config/config.h.in ffms2/src/config/config.h.in ---- ffmpegsource/src/config/config.h.in 2013-02-27 16:53:39.017368608 +0100 -+++ ffms2/src/config/config.h.in 2013-02-27 16:53:31.744380192 +0100 -@@ -90,5 +90,8 @@ - /* Version number of package */ - #undef VERSION - -+/* Use avresample */ -+#undef WITH_AVRESAMPLE -+ - /* Define to `unsigned int' if <sys/types.h> does not define. */ - #undef size_t -diff -ru ffmpegsource/src/config/libs.cpp ffms2/src/config/libs.cpp ---- ffmpegsource/src/config/libs.cpp 2013-02-27 16:53:39.017368608 +0100 -+++ ffms2/src/config/libs.cpp 2013-02-27 16:53:31.744380192 +0100 -@@ -45,6 +45,9 @@ - #pragma comment(lib, "libavcodec.a") - #pragma comment(lib, "libavformat.a") - #pragma comment(lib, "libswscale.a") -+#ifdef WITH_AVRESAMPLE -+#pragma comment(lib, "libavresample.a") -+#endif - - #ifdef WITH_OPENCORE_AMR_NB - #ifdef WITH_GCC_LIBAV -diff -ru ffmpegsource/src/core/audiosource.cpp ffms2/src/core/audiosource.cpp ---- ffmpegsource/src/core/audiosource.cpp 2013-02-27 16:53:39.137362917 +0100 -+++ ffms2/src/core/audiosource.cpp 2013-02-27 16:53:31.744380192 +0100 -@@ -23,17 +23,45 @@ - #include <algorithm> - #include <cassert> - -+namespace { -+ -+ int64_t ChannelLayout; -+ FFMS_SampleFormat SampleFormat; -+ int SampleRate; -+#define MAPPER(m, n) OptionMapper<FFMS_ResampleOptions>(n, &FFMS_ResampleOptions::m) -+OptionMapper<FFMS_ResampleOptions> resample_options[] = { -+ MAPPER(ChannelLayout, "out_channel_layout"), -+ MAPPER(SampleFormat, "out_sample_fmt"), -+ MAPPER(SampleRate, "out_sample_rate"), -+ MAPPER(MixingCoefficientType, "mix_coeff_type"), -+ MAPPER(CenterMixLevel, "center_mix_level"), -+ MAPPER(SurroundMixLevel, "surround_mix_level"), -+ MAPPER(LFEMixLevel, "lfe_mix_level"), -+ MAPPER(Normalize, "normalize_mix_level"), -+ MAPPER(ForceResample, "force_resampling"), -+ MAPPER(ResampleFilterSize, "filter_size"), -+ MAPPER(ResamplePhaseShift, "phase_shift"), -+ MAPPER(LinearInterpolation, "linear_interp"), -+ MAPPER(CutoffFrequencyRatio, "cutoff"), -+ MAPPER(MatrixedStereoEncoding, "matrix_encoding"), -+ MAPPER(FilterType, "filter_type"), -+ MAPPER(KaiserBeta, "kaiser_beta"), -+ MAPPER(DitherMethod, "dither_method") -+}; -+#undef MAPPER -+ -+} -+ - FFMS_AudioSource::FFMS_AudioSource(const char *SourceFile, FFMS_Index &Index, int Track) - : Delay(0) - , MaxCacheBlocks(50) - , BytesPerSample(0) --, Decoded(0) -+, NeedsResample(false) - , CurrentSample(-1) - , PacketNumber(0) - , CurrentFrame(NULL) - , TrackNumber(Track) - , SeekOffset(0) --, DecodingBuffer(AVCODEC_MAX_AUDIO_FRAME_SIZE * 10) - , Index(Index) - { - if (Track < 0 || Track >= static_cast<int>(Index.size())) -@@ -57,44 +85,14 @@ - Index.AddRef(); - } - -- - #define EXCESSIVE_CACHE_SIZE 400 - - void FFMS_AudioSource::Init(const FFMS_Index &Index, int DelayMode) { -- // The first packet after a seek is often decoded incorrectly, which -- // makes it impossible to ever correctly seek back to the beginning, so -- // store the first block now -- -- // In addition, anything with the same PTS as the first packet can't be -- // distinguished from the first packet and so can't be seeked to, so -- // store those as well -- -- // Some of LAVF's splitters don't like to seek to the beginning of the -- // file (ts and?), so cache a few blocks even if PTSes are unique -- // Packet 7 is the last packet I've had be unseekable to, so cache up to -- // 10 for a bit of an extra buffer -- CacheIterator end = Cache.end(); -- while (PacketNumber < Frames.size() && -- ((Frames[0].PTS != ffms_av_nopts_value && Frames[PacketNumber].PTS == Frames[0].PTS) || -- Cache.size() < 10)) { -- -- // Vorbis in particular seems to like having 60+ packets at the start of the file with a PTS of 0, -- // so we might need to expand the search range to account for that. -- if (Cache.size() >= MaxCacheBlocks - 1) { -- if (MaxCacheBlocks >= EXCESSIVE_CACHE_SIZE) -- throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_ALLOCATION_FAILED, "Exceeded the search range for an initial valid audio PTS"); -- MaxCacheBlocks *= 2; -- } -- -+ // Decode the first packet to ensure all properties are initialized -+ // Don't cache it since it might be in the wrong format -+ // Instead, leave it in DecodeFrame and it'll get cached later -+ while (DecodeFrame->nb_samples == 0) - DecodeNextBlock(); -- if (Decoded) -- CacheBlock(end, CurrentSample, Decoded, &DecodingBuffer[0]); -- } -- // Store the iterator to the last element of the cache which is used for -- // correctness rather than speed, so that when looking for one to delete -- // we know how much to skip -- CacheNoDelete = Cache.end(); -- --CacheNoDelete; - - // Read properties of the audio which may not be available until the first - // frame has been decoded -@@ -104,6 +102,11 @@ - throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, - "Codec returned zero size audio"); - -+ if (av_sample_fmt_is_planar(CodecContext->sample_fmt)) { -+ std::auto_ptr<FFMS_ResampleOptions> opt(CreateResampleOptions()); -+ SetOutputFormat(opt.get()); -+ } -+ - if (DelayMode < FFMS_DELAY_NO_SHIFT) - throw FFMS_Exception(FFMS_ERROR_INDEX, FFMS_ERROR_INVALID_ARGUMENT, - "Bad audio delay compensation mode"); -@@ -146,8 +149,133 @@ - AP.NumSamples += Delay; - } - --void FFMS_AudioSource::CacheBlock(CacheIterator &pos, int64_t Start, size_t Samples, uint8_t *SrcData) { -- Cache.insert(pos, AudioBlock(Start, Samples, SrcData, Samples * BytesPerSample)); -+void FFMS_AudioSource::CacheBeginning() { -+ // Nothing to do if the cache is already populated -+ if (!Cache.empty()) return; -+ -+ // The first frame is already decoded, so add it to the cache -+ CacheBlock(Cache.end()); -+ -+ // The first packet after a seek is often decoded incorrectly, which -+ // makes it impossible to ever correctly seek back to the beginning, so -+ // store the first block now -+ -+ // In addition, anything with the same PTS as the first packet can't be -+ // distinguished from the first packet and so can't be seeked to, so -+ // store those as well -+ -+ // Some of LAVF's splitters don't like to seek to the beginning of the -+ // file (ts and?), so cache a few blocks even if PTSes are unique -+ // Packet 7 is the last packet I've had be unseekable to, so cache up to -+ // 10 for a bit of an extra buffer -+ CacheIterator end = Cache.end(); -+ while (PacketNumber < Frames.size() && -+ ((Frames[0].PTS != ffms_av_nopts_value && Frames[PacketNumber].PTS == Frames[0].PTS) || -+ Cache.size() < 10)) { -+ -+ // Vorbis in particular seems to like having 60+ packets at the start -+ // of the file with a PTS of 0, so we might need to expand the search -+ // range to account for that. -+ // Expanding slightly before it's strictly needed to ensure there's a -+ // bit of space for an actual cache -+ if (Cache.size() >= MaxCacheBlocks - 5) { -+ if (MaxCacheBlocks >= EXCESSIVE_CACHE_SIZE) -+ throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_ALLOCATION_FAILED, -+ "Exceeded the search range for an initial valid audio PTS"); -+ MaxCacheBlocks *= 2; -+ } -+ -+ DecodeNextBlock(&end); -+ } -+ // Store the iterator to the last element of the cache which is used for -+ // correctness rather than speed, so that when looking for one to delete -+ // we know how much to skip -+ CacheNoDelete = Cache.end(); -+ --CacheNoDelete; -+} -+ -+void FFMS_AudioSource::SetOutputFormat(const FFMS_ResampleOptions *opt) { -+ if (!Cache.empty()) -+ throw FFMS_Exception(FFMS_ERROR_RESAMPLING, FFMS_ERROR_USER, -+ "Cannot change the output format after audio decoding has begun"); -+ -+ BytesPerSample = av_get_bytes_per_sample(static_cast<AVSampleFormat>(opt->SampleFormat)) * av_get_channel_layout_nb_channels(opt->ChannelLayout); -+ -+ NeedsResample = -+ opt->SampleFormat != (int)CodecContext->sample_fmt || -+ opt->SampleRate != AP.SampleRate || -+ opt->ChannelLayout != AP.ChannelLayout || -+ opt->ForceResample; -+ if (!NeedsResample) return; -+ -+ if (opt->SampleRate != AP.SampleRate) -+ throw FFMS_Exception(FFMS_ERROR_RESAMPLING, FFMS_ERROR_UNSUPPORTED, -+ "Sample rate changes are currently unsupported."); -+ -+#ifdef WITH_AVRESAMPLE -+ if (opt->SampleRate != AP.SampleRate) -+ throw FFMS_Exception(FFMS_ERROR_RESAMPLING, FFMS_ERROR_UNSUPPORTED, -+ "Changing the audio sample rate is currently not supported"); -+ -+ std::auto_ptr<FFMS_ResampleOptions> oldOptions(ReadOptions(ResampleContext, resample_options)); -+ SetOptions(opt, ResampleContext, resample_options); -+ av_opt_set_int(ResampleContext, "in_sample_rate", AP.SampleRate, 0); -+ av_opt_set_int(ResampleContext, "in_sample_fmt", CodecContext->sample_fmt, 0); -+ av_opt_set_int(ResampleContext, "in_channel_layout", AP.ChannelLayout, 0); -+ -+ if (avresample_open(ResampleContext)) { -+ SetOptions(oldOptions.get(), ResampleContext, resample_options); -+ avresample_open(ResampleContext); -+ throw FFMS_Exception(FFMS_ERROR_RESAMPLING, FFMS_ERROR_UNKNOWN, -+ "Could not open avresample context"); -+ } -+#else -+ if (opt->SampleFormat != AP.SampleFormat || opt->SampleRate != AP.SampleRate || opt->ChannelLayout != AP.ChannelLayout) -+ throw FFMS_Exception(FFMS_ERROR_RESAMPLING, FFMS_ERROR_UNSUPPORTED, -+ "FFMS was not built with resampling enabled. The only supported conversion is interleaving planar audio."); -+#endif -+} -+ -+FFMS_ResampleOptions *FFMS_AudioSource::CreateResampleOptions() const { -+#ifdef WITH_AVRESAMPLE -+ FFMS_ResampleOptions *ret = ReadOptions(ResampleContext, resample_options); -+#else -+ FFMS_ResampleOptions *ret = new FFMS_ResampleOptions; -+ memset(ret, 0, sizeof(FFMS_ResampleOptions)); -+#endif -+ ret->SampleRate = AP.SampleRate; -+ ret->SampleFormat = static_cast<FFMS_SampleFormat>(AP.SampleFormat); -+ ret->ChannelLayout = AP.ChannelLayout; -+ return ret; -+} -+ -+void FFMS_AudioSource::ResampleAndCache(CacheIterator pos) { -+ AudioBlock& block = *Cache.insert(pos, AudioBlock(CurrentSample, DecodeFrame->nb_samples)); -+ block.Data.reserve(DecodeFrame->nb_samples * BytesPerSample); -+ -+#ifdef WITH_AVRESAMPLE -+ block.Data.resize(block.Data.capacity()); -+ -+ uint8_t *OutPlanes[1] = { static_cast<uint8_t *>(&block.Data[0]) }; -+ avresample_convert(ResampleContext, -+ OutPlanes, block.Data.size(), DecodeFrame->nb_samples, -+ DecodeFrame->extended_data, DecodeFrame->nb_samples * av_get_bytes_per_sample(CodecContext->sample_fmt), DecodeFrame->nb_samples); -+#else -+ int width = av_get_bytes_per_sample(CodecContext->sample_fmt); -+ uint8_t **Data = DecodeFrame->extended_data; -+ -+ for (int s = 0; s < DecodeFrame->nb_samples; ++s) { -+ for (int c = 0; c < CodecContext->channels; ++c) -+ block.Data.insert(block.Data.end(), &Data[c][s * width], &Data[c][(s + 1) * width]); -+ } -+#endif -+} -+ -+void FFMS_AudioSource::CacheBlock(CacheIterator pos) { -+ if (NeedsResample) -+ ResampleAndCache(pos); -+ else -+ Cache.insert(pos, AudioBlock(CurrentSample, DecodeFrame->nb_samples, DecodeFrame->extended_data[0], DecodeFrame->nb_samples * BytesPerSample)); - - if (Cache.size() >= MaxCacheBlocks) { - // Kill the oldest one -@@ -162,45 +290,45 @@ - } - } - --void FFMS_AudioSource::DecodeNextBlock() { -- if (BytesPerSample == 0) BytesPerSample = av_get_bytes_per_sample(CodecContext->sample_fmt) * CodecContext->channels; -- -+void FFMS_AudioSource::DecodeNextBlock(CacheIterator *pos) { - CurrentFrame = &Frames[PacketNumber]; - - AVPacket Packet; - if (!ReadPacket(&Packet)) -- throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_UNKNOWN, "ReadPacket unexpectedly failed to read a packet"); -+ throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_UNKNOWN, -+ "ReadPacket unexpectedly failed to read a packet"); - - // ReadPacket may have changed the packet number - CurrentFrame = &Frames[PacketNumber]; - CurrentSample = CurrentFrame->SampleStart; -- ++PacketNumber; - -- uint8_t *Buf = &DecodingBuffer[0]; -+ bool GotSamples = false; - uint8_t *Data = Packet.data; - while (Packet.size > 0) { -- int TempOutputBufSize = AVCODEC_MAX_AUDIO_FRAME_SIZE * 10 - (Buf - &DecodingBuffer[0]); -- int Ret = avcodec_decode_audio3(CodecContext, (int16_t *)Buf, &TempOutputBufSize, &Packet); -+ DecodeFrame.reset(); -+ int GotFrame = 0; -+ int Ret = avcodec_decode_audio4(CodecContext, DecodeFrame, &GotFrame, &Packet); - - // Should only ever happen if the user chose to ignore decoding errors - // during indexing, so continue to just ignore decoding errors - if (Ret < 0) break; - -- if (Ret > 0) { -+ if (Ret > 0 && GotFrame) { - Packet.size -= Ret; - Packet.data += Ret; -- Buf += TempOutputBufSize; -+ if (DecodeFrame->nb_samples > 0) { -+ GotSamples = true; -+ if (pos) -+ CacheBlock(*pos); -+ } - } - } - Packet.data = Data; - FreePacket(&Packet); - -- Decoded = (Buf - &DecodingBuffer[0]) / BytesPerSample; -- if (Decoded == 0) { -- // zero sample packets aren't included in the index so we didn't -- // actually move to the next packet -- --PacketNumber; -- } -+ // Zero sample packets aren't included in the index -+ if (GotSamples) -+ ++PacketNumber; - } - - static bool SampleStartComp(const TFrameInfo &a, const TFrameInfo &b) { -@@ -216,6 +344,8 @@ - throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_INVALID_ARGUMENT, - "Out of bounds audio samples requested"); - -+ CacheBeginning(); -+ - uint8_t *Dst = static_cast<uint8_t*>(Buf); - - // Apply audio delay (if any) and fill any samples before the start time with zero -@@ -253,10 +383,12 @@ - } - // Decode another block - else { -+ CacheIterator cachePos = it; --cachePos; -+ - if (Start < CurrentSample && SeekOffset == -1) - throw FFMS_Exception(FFMS_ERROR_SEEKING, FFMS_ERROR_CODEC, "Audio stream is not seekable"); - -- if (SeekOffset >= 0 && (Start < CurrentSample || Start > CurrentSample + Decoded * 5)) { -+ if (SeekOffset >= 0 && (Start < CurrentSample || Start > CurrentSample + DecodeFrame->nb_samples * 5)) { - TFrameInfo f; - f.SampleStart = Start; - int NewPacketNumber = std::distance(Frames.begin(), std::lower_bound(Frames.begin(), Frames.end(), f, SampleStartComp)); -@@ -266,32 +398,22 @@ - // Only seek forward if it'll actually result in moving forward - if (Start < CurrentSample || static_cast<size_t>(NewPacketNumber) > PacketNumber) { - PacketNumber = NewPacketNumber; -- Decoded = 0; - CurrentSample = -1; -+ DecodeFrame.reset(); - avcodec_flush_buffers(CodecContext); - Seek(); - } - } - -- // Decode everything between the last keyframe and the block we want -+ // Decode until we hit the block we want - if (PacketNumber >= Frames.size()) - throw FFMS_Exception(FFMS_ERROR_SEEKING, FFMS_ERROR_CODEC, "Seeking is severely broken"); -- while (CurrentSample + Decoded <= Start && PacketNumber < Frames.size()) -- DecodeNextBlock(); -+ while (CurrentSample + DecodeFrame->nb_samples <= Start && PacketNumber < Frames.size()) -+ DecodeNextBlock(&it); - if (CurrentSample > Start) - throw FFMS_Exception(FFMS_ERROR_SEEKING, FFMS_ERROR_CODEC, "Seeking is severely broken"); - -- CacheBlock(it, CurrentSample, Decoded, &DecodingBuffer[0]); -- -- size_t FirstSample = static_cast<size_t>(Start - CurrentSample); -- size_t Samples = static_cast<size_t>(Decoded - FirstSample); -- size_t Bytes = FFMIN(Samples, static_cast<size_t>(Count)) * BytesPerSample; -- -- memcpy(Dst, &DecodingBuffer[FirstSample * BytesPerSample], Bytes); -- -- Start += Samples; -- Count -= Samples; -- Dst += Bytes; -+ it = cachePos; - } - } - } -diff -ru ffmpegsource/src/core/audiosource.h ffms2/src/core/audiosource.h ---- ffmpegsource/src/core/audiosource.h 2013-02-27 16:53:39.130696566 +0100 -+++ ffms2/src/core/audiosource.h 2013-02-27 16:53:31.744380192 +0100 -@@ -46,7 +46,6 @@ - #endif - - struct FFMS_AudioSource { --private: - struct AudioBlock { - int64_t Age; - int64_t Start; -@@ -54,9 +53,17 @@ - std::vector<uint8_t> Data; - - AudioBlock(int64_t Start, int64_t Samples, uint8_t *SrcData, size_t SrcBytes) -- : Start(Start) -- , Samples(Samples) -- , Data(SrcData, SrcData + SrcBytes) -+ : Start(Start) -+ , Samples(Samples) -+ , Data(SrcData, SrcData + SrcBytes) -+ { -+ static int64_t Now = 0; -+ Age = Now++; -+ } -+ -+ AudioBlock(int64_t Start, int64_t Samples) -+ : Start(Start) -+ , Samples(Samples) - { - static int64_t Now = 0; - Age = Now++; -@@ -74,11 +81,18 @@ - CacheIterator CacheNoDelete; - // bytes per sample * number of channels - size_t BytesPerSample; -- // Number of samples stored in the decoding buffer -- size_t Decoded; - -- // Insert a block into the cache -- void CacheBlock(CacheIterator &pos, int64_t Start, size_t Samples, uint8_t *SrcData); -+ bool NeedsResample; -+ FFResampleContext ResampleContext; -+ -+ // Insert the current audio frame into the cache -+ void CacheBlock(CacheIterator pos); -+ -+ // Interleave the current audio frame and insert it into the cache -+ void ResampleAndCache(CacheIterator pos); -+ -+ // Cache the unseekable beginning of the file once the output format is set -+ void CacheBeginning(); - - // Called after seeking - virtual void Seek() { }; -@@ -99,13 +113,13 @@ - int SeekOffset; - - // Buffer which audio is decoded into -- AlignedBuffer<uint8_t> DecodingBuffer; -+ ScopedFrame DecodeFrame; - FFMS_Index &Index; - FFMS_Track Frames; - FFCodecContext CodecContext; - FFMS_AudioProperties AP; - -- void DecodeNextBlock(); -+ void DecodeNextBlock(CacheIterator *cachePos = 0); - // Initialization which has to be done after the codec is opened - void Init(const FFMS_Index &Index, int DelayMode); - -@@ -116,6 +130,9 @@ - FFMS_Track *GetTrack() { return &Frames; } - const FFMS_AudioProperties& GetAudioProperties() const { return AP; } - void GetAudio(void *Buf, int64_t Start, int64_t Count); -+ -+ FFMS_ResampleOptions *CreateResampleOptions() const; -+ void SetOutputFormat(const FFMS_ResampleOptions *opt); - }; - - class FFLAVFAudio : public FFMS_AudioSource { -diff -ru ffmpegsource/src/core/ffms.cpp ffms2/src/core/ffms.cpp ---- ffmpegsource/src/core/ffms.cpp 2013-02-27 16:53:39.137362917 +0100 -+++ ffms2/src/core/ffms.cpp 2013-02-27 16:53:31.744380192 +0100 -@@ -256,6 +256,24 @@ - V->ResetInputFormat(); - } - -+FFMS_API(FFMS_ResampleOptions *) FFMS_CreateResampleOptions(FFMS_AudioSource *A) { -+ return A->CreateResampleOptions(); -+} -+ -+FFMS_API(void) FFMS_DestroyResampleOptions(FFMS_ResampleOptions *options) { -+ delete options; -+} -+ -+FFMS_API(int) FFMS_SetOutputFormatA(FFMS_AudioSource *A, const FFMS_ResampleOptions *options, FFMS_ErrorInfo *ErrorInfo) { -+ ClearErrorInfo(ErrorInfo); -+ try { -+ A->SetOutputFormat(options); -+ } catch (FFMS_Exception &e) { -+ return e.CopyOut(ErrorInfo); -+ } -+ return FFMS_ERROR_SUCCESS; -+} -+ - FFMS_API(void) FFMS_DestroyIndex(FFMS_Index *Index) { - assert(Index != NULL); - if (Index == NULL) -diff -ru ffmpegsource/src/core/indexing.cpp ffms2/src/core/indexing.cpp ---- ffmpegsource/src/core/indexing.cpp 2013-02-27 16:53:39.134029741 +0100 -+++ ffms2/src/core/indexing.cpp 2013-02-27 16:53:31.744380192 +0100 -@@ -693,7 +693,6 @@ - , ANC(0) - , ANCPrivate(0) - , SourceFile(Filename) --, DecodingBuffer(AVCODEC_MAX_AUDIO_FRAME_SIZE * 10) - { - FFMS_Index::CalculateFileSignature(Filename, &Filesize, Digest); - } -@@ -702,9 +701,9 @@ - - } - --void FFMS_Indexer::WriteAudio(SharedAudioContext &AudioContext, FFMS_Index *Index, int Track, int DBSize) { -+void FFMS_Indexer::WriteAudio(SharedAudioContext &AudioContext, FFMS_Index *Index, int Track) { - // Delay writer creation until after an audio frame has been decoded. This ensures that all parameters are known when writing the headers. -- if (DBSize <= 0) return; -+ if (DecodeFrame->nb_samples) return; - - if (!AudioContext.W64Writer) { - FFMS_AudioProperties AP; -@@ -715,6 +714,8 @@ - return; - } - -+ int Format = av_get_packed_sample_fmt(AudioContext.CodecContext->sample_fmt); -+ - std::vector<char> WName(FNSize); - (*ANC)(SourceFile.c_str(), Track, &AP, &WName[0], FNSize, ANCPrivate); - std::string WN(&WName[0]); -@@ -724,14 +725,14 @@ - av_get_bytes_per_sample(AudioContext.CodecContext->sample_fmt), - AudioContext.CodecContext->channels, - AudioContext.CodecContext->sample_rate, -- (AudioContext.CodecContext->sample_fmt == AV_SAMPLE_FMT_FLT) || (AudioContext.CodecContext->sample_fmt == AV_SAMPLE_FMT_DBL)); -+ (Format == AV_SAMPLE_FMT_FLT) || (Format == AV_SAMPLE_FMT_DBL)); - } catch (...) { - throw FFMS_Exception(FFMS_ERROR_WAVE_WRITER, FFMS_ERROR_FILE_WRITE, - "Failed to write wave data"); - } - } - -- AudioContext.W64Writer->WriteData(&DecodingBuffer[0], DBSize); -+ AudioContext.W64Writer->WriteData(*DecodeFrame); - } - - int64_t FFMS_Indexer::IndexAudioPacket(int Track, AVPacket *Packet, SharedAudioContext &Context, FFMS_Index &TrackIndices) { -@@ -739,8 +740,10 @@ - int64_t StartSample = Context.CurrentSample; - int Read = 0; - while (Packet->size > 0) { -- int dbsize = AVCODEC_MAX_AUDIO_FRAME_SIZE*10; -- int Ret = avcodec_decode_audio3(CodecContext, (int16_t *)&DecodingBuffer[0], &dbsize, Packet); -+ DecodeFrame.reset(); -+ -+ int GotFrame = 0; -+ int Ret = avcodec_decode_audio4(CodecContext, DecodeFrame, &GotFrame, Packet); - if (Ret < 0) { - if (ErrorHandling == FFMS_IEH_ABORT) { - throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_DECODING, "Audio decoding error"); -@@ -756,13 +759,14 @@ - Packet->data += Ret; - Read += Ret; - -- CheckAudioProperties(Track, CodecContext); -+ if (GotFrame) { -+ CheckAudioProperties(Track, CodecContext); - -- if (dbsize > 0) -- Context.CurrentSample += dbsize / (av_get_bytes_per_sample(CodecContext->sample_fmt) * CodecContext->channels); -+ Context.CurrentSample += DecodeFrame->nb_samples; - -- if (DumpMask & (1 << Track)) -- WriteAudio(Context, &TrackIndices, Track, dbsize); -+ if (DumpMask & (1 << Track)) -+ WriteAudio(Context, &TrackIndices, Track); -+ } - } - Packet->size += Read; - Packet->data -= Read; -diff -ru ffmpegsource/src/core/indexing.h ffms2/src/core/indexing.h ---- ffmpegsource/src/core/indexing.h 2013-02-27 16:53:39.127363391 +0100 -+++ ffms2/src/core/indexing.h 2013-02-27 16:53:31.744380192 +0100 -@@ -155,7 +155,6 @@ - }; - - struct FFMS_Indexer { --private: - std::map<int, FFMS_AudioProperties> LastAudioProperties; - protected: - int IndexMask; -@@ -166,12 +165,12 @@ - TAudioNameCallback ANC; - void *ANCPrivate; - std::string SourceFile; -- AlignedBuffer<uint8_t> DecodingBuffer; -+ ScopedFrame DecodeFrame; - - int64_t Filesize; - uint8_t Digest[20]; - -- void WriteAudio(SharedAudioContext &AudioContext, FFMS_Index *Index, int Track, int DBSize); -+ void WriteAudio(SharedAudioContext &AudioContext, FFMS_Index *Index, int Track); - void CheckAudioProperties(int Track, AVCodecContext *Context); - int64_t IndexAudioPacket(int Track, AVPacket *Packet, SharedAudioContext &Context, FFMS_Index &TrackIndices); - void ParseVideoPacket(SharedVideoContext &VideoContext, AVPacket &pkt, int *RepeatPict, int *FrameType, bool *Invisible); -diff -ru ffmpegsource/src/core/utils.cpp ffms2/src/core/utils.cpp ---- ffmpegsource/src/core/utils.cpp 2013-02-27 16:53:39.134029741 +0100 -+++ ffms2/src/core/utils.cpp 2013-02-27 16:53:31.744380192 +0100 -@@ -214,10 +214,32 @@ - pkt.size = 0; - } - -+extern "C" { -+#if VERSION_CHECK(LIBAVUTIL_VERSION_INT, >=, 52, 2, 0, 52, 6, 100) -+#include <libavutil/channel_layout.h> -+#elif VERSION_CHECK(LIBAVUTIL_VERSION_INT, >=, 51, 26, 0, 51, 45, 100) -+#include <libavutil/audioconvert.h> -+#else -+static int64_t av_get_default_channel_layout(int nb_channels) { -+ switch(nb_channels) { -+ case 1: return AV_CH_LAYOUT_MONO; -+ case 2: return AV_CH_LAYOUT_STEREO; -+ case 3: return AV_CH_LAYOUT_SURROUND; -+ case 4: return AV_CH_LAYOUT_QUAD; -+ case 5: return AV_CH_LAYOUT_5POINT0; -+ case 6: return AV_CH_LAYOUT_5POINT1; -+ case 7: return AV_CH_LAYOUT_6POINT1; -+ case 8: return AV_CH_LAYOUT_7POINT1; -+ default: return 0; -+ } -+} -+#endif -+} -+ - void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames) { -- AP.SampleFormat = static_cast<FFMS_SampleFormat>(CTX->sample_fmt); -+ AP.SampleFormat = static_cast<FFMS_SampleFormat>(av_get_packed_sample_fmt(CTX->sample_fmt)); - AP.BitsPerSample = av_get_bytes_per_sample(CTX->sample_fmt) * 8; -- AP.Channels = CTX->channels;; -+ AP.Channels = CTX->channels; - AP.ChannelLayout = CTX->channel_layout; - AP.SampleRate = CTX->sample_rate; - if (!Frames.empty()) { -@@ -225,6 +247,9 @@ - AP.FirstTime = ((Frames.front().PTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000; - AP.LastTime = ((Frames.back().PTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000; - } -+ -+ if (AP.ChannelLayout == 0) -+ AP.ChannelLayout = av_get_default_channel_layout(AP.Channels); - } - - #ifdef HAALISOURCE -diff -ru ffmpegsource/src/core/utils.h ffms2/src/core/utils.h ---- ffmpegsource/src/core/utils.h 2013-02-27 16:53:39.127363391 +0100 -+++ ffms2/src/core/utils.h 2013-02-27 16:53:31.744380192 +0100 -@@ -31,9 +31,13 @@ - extern "C" { - #include "stdiostream.h" - #include <libavutil/mem.h> -+#include <libavutil/opt.h> - #include <libavformat/avformat.h> - #include <libavcodec/avcodec.h> - #include <libswscale/swscale.h> -+#ifdef WITH_AVRESAMPLE -+#include <libavresample/avresample.h> -+#endif - } - - // must be included after ffmpeg headers -@@ -133,6 +137,34 @@ - } - }; - -+template<typename T, T *(*Alloc)(), void (*Del)(T **)> -+class unknown_size { -+ T *ptr; -+ -+ unknown_size(unknown_size const&); -+ unknown_size& operator=(unknown_size const&); -+public: -+ operator T*() const { return ptr; } -+ operator void*() const { return ptr; } -+ T *operator->() const { return ptr; } -+ -+ unknown_size() : ptr(Alloc()) { } -+ ~unknown_size() { Del(&ptr); } -+}; -+ -+class ScopedFrame : public unknown_size<AVFrame, avcodec_alloc_frame, avcodec_free_frame> { -+public: -+ void reset() { -+ avcodec_get_frame_defaults(*this); -+ } -+}; -+ -+#ifdef WITH_AVRESAMPLE -+typedef unknown_size<AVAudioResampleContext, avresample_alloc_context, avresample_free> FFResampleContext; -+#else -+typedef struct {} FFResampleContext; -+#endif -+ - inline void DeleteHaaliCodecContext(AVCodecContext *CodecContext) { - av_freep(&CodecContext->extradata); - av_freep(&CodecContext); -@@ -228,4 +240,68 @@ - - void FlushBuffers(AVCodecContext *CodecContext); - -+namespace optdetail { -+ template<typename T> -+ T get_av_opt(void *v, const char *name) { -+ return static_cast<T>(av_get_int(v, name, 0)); -+ } -+ -+ template<> -+ inline double get_av_opt<double>(void *v, const char *name) { -+ return av_get_double(v, name, 0); -+ } -+ -+ template<typename T> -+ void set_av_opt(void *v, const char *name, T value) { -+ av_opt_set_int(v, name, value, 0); -+ } -+ -+ template<> -+ inline void set_av_opt<double>(void *v, const char *name, double value) { -+ av_opt_set_double(v, name, value, 0); -+ } -+} -+ -+template<typename FFMS_Struct> -+class OptionMapper { -+ struct OptionMapperBase { -+ virtual void ToOpt(const FFMS_Struct *src, void *dst) const=0; -+ virtual void FromOpt(FFMS_Struct *dst, void *src) const=0; -+ }; -+ -+ template<typename T> -+ class OptionMapperImpl : public OptionMapperBase { -+ T (FFMS_Struct::*ptr); -+ const char *name; -+ -+ public: -+ OptionMapperImpl(T (FFMS_Struct::*ptr), const char *name) : ptr(ptr), name(name) { } -+ void ToOpt(const FFMS_Struct *src, void *dst) const { optdetail::set_av_opt(dst, name, src->*ptr); } -+ void FromOpt(FFMS_Struct *dst, void *src) const { dst->*ptr = optdetail::get_av_opt<T>(src, name); } -+ }; -+ -+ OptionMapperBase *impl; -+ -+public: -+ template<typename T> -+ OptionMapper(const char *opt_name, T (FFMS_Struct::*member)) : impl(new OptionMapperImpl<T>(member, opt_name)) { } -+ -+ void ToOpt(const FFMS_Struct *src, void *dst) const { impl->ToOpt(src, dst); } -+ void FromOpt(FFMS_Struct *dst, void *src) const { impl->FromOpt(dst, src); } -+}; -+ -+template<typename T, int N> -+T *ReadOptions(void *opt, OptionMapper<T> (&options)[N]) { -+ T *ret = new T; -+ for (int i = 0; i < N; ++i) -+ options[i].FromOpt(ret, opt); -+ return ret; -+} -+ -+template<typename T, int N> -+void SetOptions(const T* src, void *opt, OptionMapper<T> (&options)[N]) { -+ for (int i = 0; i < N; ++i) -+ options[i].ToOpt(src, opt); -+} -+ - #endif -diff -ru ffmpegsource/src/core/wave64writer.cpp ffms2/src/core/wave64writer.cpp ---- ffmpegsource/src/core/wave64writer.cpp 2013-02-27 16:53:39.134029741 +0100 -+++ ffms2/src/core/wave64writer.cpp 2013-02-27 16:53:31.744380192 +0100 -@@ -106,7 +106,16 @@ - WavFile.seekp(CPos, std::ios::beg); - } - --void Wave64Writer::WriteData(void *Data, std::streamsize Length) { -- WavFile.write(reinterpret_cast<char *>(Data), Length); -+void Wave64Writer::WriteData(AVFrame const& Frame) { -+ uint64_t Length = Frame.nb_samples * BytesPerSample * Channels; -+ if (Channels > 1 && av_sample_fmt_is_planar(static_cast<AVSampleFormat>(Frame.format))) { -+ for (int32_t sample = 0; sample < Frame.nb_samples; ++sample) { -+ for (int32_t channel = 0; channel < Channels; ++channel) -+ WavFile.write(reinterpret_cast<char *>(&Frame.extended_data[channel][sample * BytesPerSample]), BytesPerSample); -+ } -+ } -+ else { -+ WavFile.write(reinterpret_cast<char *>(Frame.extended_data[0]), Length); -+ } - BytesWritten += Length; - } -diff -ru /tmp/ffmpegsource/src/ffmpegsource/src/core/wave64writer.h ffms2/src/core/wave64writer.h ---- /tmp/ffmpegsource/src/ffmpegsource/src/core/wave64writer.h 2013-02-27 16:53:39.127363391 +0100 -+++ ffms2/src/core/wave64writer.h 2013-02-27 16:53:31.744380192 +0100 -@@ -28,8 +28,8 @@ - class Wave64Writer { - public: - Wave64Writer(const char *Filename, uint16_t BitsPerSample, uint16_t Channels, uint32_t SamplesPerSec, bool IsFloat); - ~Wave64Writer(); -- void WriteData(void *Data, std::streamsize Length); -+ void WriteData(AVFrame const& Frame); - private: - ffms_fstream WavFile; - int32_t BytesPerSample; diff --git a/community/intellij-idea-libs/PKGBUILD b/community/intellij-idea-libs/PKGBUILD index 2984b2e3d..2548da534 100644 --- a/community/intellij-idea-libs/PKGBUILD +++ b/community/intellij-idea-libs/PKGBUILD @@ -1,16 +1,17 @@ -# $Id: PKGBUILD 87801 2013-04-06 19:27:42Z stativ $ +# $Id: PKGBUILD 88193 2013-04-13 15:39:41Z stativ $ # Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com> pkgname=intellij-idea-libs -pkgver=12.1 -_pkgver=129.161 +pkgver=12.1.1 +_pkgver=129.239 pkgrel=1 pkgdesc="Architecture dependend libraries needed by the Intellij Idea IDE" arch=('i686' 'x86_64' 'mips64el') url="http://www.jetbrains.org/" license=('apache') depends=('glibc') +options=(!strip) source=(http://download.jetbrains.com/idea/ideaIC-$pkgver.tar.gz) -md5sums=('687ba6aea524099f10605bb50569864d') +md5sums=('279905aa380822f8a72a01e2b4955b44') package() { cd "$srcdir" diff --git a/community/nodejs/PKGBUILD b/community/nodejs/PKGBUILD index aa4de710d..a4774f9ac 100644 --- a/community/nodejs/PKGBUILD +++ b/community/nodejs/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 87751 2013-04-06 09:18:35Z bpiotrowski $ +# $Id: PKGBUILD 88176 2013-04-13 10:02:06Z bpiotrowski $ # Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> # Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: James Campos <james.r.campos@gmail.com> @@ -8,7 +8,7 @@ # Contributor: TIanyi Cui <tianyicui@gmail.com> pkgname=nodejs -pkgver=0.10.3 +pkgver=0.10.4 pkgrel=1 pkgdesc='Evented I/O for V8 javascript' arch=('i686' 'x86_64' 'mips64el') @@ -18,7 +18,7 @@ depends=('openssl' 'python2') checkdepends=('curl') options=('!emptydirs') source=(http://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz) -sha256sums=('bc8796ff6414231fa0603e0383404f14648dfd2fe9fb0fa4d4a6043dfddbb328') +sha256sums=('1c960d2822447a9e4f7c46b832ff05e86743033c6643d644975af1cbf6a44fb8') build() { cd node-v${pkgver} diff --git a/community/python-psutil/PKGBUILD b/community/python-psutil/PKGBUILD index bd8641c1e..df1a0ab2f 100644 --- a/community/python-psutil/PKGBUILD +++ b/community/python-psutil/PKGBUILD @@ -1,16 +1,16 @@ -# $Id: PKGBUILD 78236 2012-10-17 10:26:22Z allan $ -# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> +# $Id: PKGBUILD 88178 2013-04-13 10:41:30Z seblu $ +# Maintainer: Sébastien Luttringer pkgbase=python-psutil pkgname=('python-psutil' 'python2-psutil') -pkgver=0.6.1 -pkgrel=2 +pkgver=0.7.0 +pkgrel=1 arch=('i686' 'x86_64' 'mips64el') url='http://code.google.com/p/psutil/' license=('custom: BSD') makedepends=('python' 'python-distribute' 'python2' 'python2-distribute') source=("https://psutil.googlecode.com/files/psutil-$pkgver.tar.gz") -sha1sums=('f7a76e201601d8e06a1fdf434422f884888aac86') +sha1sums=('e19bd1c050786616dd81a3b200c61b8147eb9985') build() { cd psutil-$pkgver @@ -40,4 +40,4 @@ package_python2-psutil() { install -D -m 644 LICENSE "$pkgdir/"usr/share/licenses/$pkgname/LICENSE } -# vim:set ts=2 sw=2 ft=sh et: +# vim:set ts=2 sw=2 et: diff --git a/core/sudo/PKGBUILD b/core/sudo/PKGBUILD index 8ce07389d..5c856e591 100644 --- a/core/sudo/PKGBUILD +++ b/core/sudo/PKGBUILD @@ -1,12 +1,12 @@ -# $Id: PKGBUILD 180116 2013-03-17 15:39:56Z foutrelis $ +# $Id: PKGBUILD 182700 2013-04-12 23:52:17Z foutrelis $ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Allan McRae <allan@archlinux.org> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> pkgname=sudo -_sudover=1.8.6p7 +_sudover=1.8.6p8 pkgver=${_sudover/p/.p} -pkgrel=2 +pkgrel=1 pkgdesc="Give certain users the ability to run some commands as root" arch=('i686' 'x86_64' 'mips64el') url="http://www.sudo.ws/sudo/" @@ -17,8 +17,8 @@ backup=('etc/sudoers' 'etc/pam.d/sudo') options=('!libtool') source=(http://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig} sudo.pam) -sha256sums=('301089edb22356f59d097f6abbe1303f03927a38691b02959d618546c2125036' - 'ab7660cbaba45f6aff03abbae69a62e9644a86bed76b53334364147569f104d6' +sha256sums=('c0baaa87f59153967b650a0dde2f7d4147d358fa15f3fdabb47e84d0282fe625' + 'SKIP' 'e7de79d2c73f2b32b20a8e797e54777a2bf19788ec03e48decd6c15cd93718ae') build() { diff --git a/extra/libdiscid/PKGBUILD b/extra/libdiscid/PKGBUILD index 55e2d646a..8e4ef4e50 100644 --- a/extra/libdiscid/PKGBUILD +++ b/extra/libdiscid/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 179626 2013-03-08 21:37:31Z eric $ +# $Id: PKGBUILD 182706 2013-04-13 00:27:30Z eric $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: Eric Gillingham <sysrq@sysrq.tk> pkgname=libdiscid -pkgver=0.4.1 +pkgver=0.5.0 pkgrel=1 pkgdesc="A Library for creating MusicBrainz DiscIDs" arch=('i686' 'x86_64' 'mips64el') @@ -12,7 +12,7 @@ license=('LGPL') depends=('glibc') options=('!libtool') source=("http://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/${pkgname}-${pkgver}.tar.gz") -md5sums=('d8287c46dff9858c2ce2d70154fe6f4c') +md5sums=('a029355e53db1c2c24cc34a6d3e3b626') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/perl-dbi/PKGBUILD b/extra/perl-dbi/PKGBUILD index 262b737d6..a93b49575 100644 --- a/extra/perl-dbi/PKGBUILD +++ b/extra/perl-dbi/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 175925 2013-01-25 04:01:07Z eric $ +# $Id: PKGBUILD 182702 2013-04-12 23:53:53Z eric $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Matt Thompson <mattt@defunct.ca> pkgname=perl-dbi _realname=DBI -pkgver=1.623 +pkgver=1.625 pkgrel=1 pkgdesc="Database independent interface for Perl" arch=('i686' 'x86_64' 'mips64el') @@ -13,7 +13,7 @@ url="http://search.cpan.org/dist/${_realname}/" depends=('perl') options=('!emptydirs') source=(http://www.cpan.org/authors/id/T/TI/TIMB/${_realname}-${pkgver}.tar.gz) -md5sums=('b45654dca3b495f3d496c359f0029d96') +md5sums=('b0521be412faff4ec8d511cd5f3f6a31') build() { cd "${srcdir}/${_realname}-${pkgver}" diff --git a/extra/timidity++/PKGBUILD b/extra/timidity++/PKGBUILD index ba3a7744e..151d036f4 100644 --- a/extra/timidity++/PKGBUILD +++ b/extra/timidity++/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 173850 2012-12-25 00:34:49Z foutrelis $ +# $Id: PKGBUILD 182711 2013-04-13 07:33:18Z eric $ # Maintainer: Eric Bélanger <eric@archlinux.org> pkgname=timidity++ pkgver=2.14.0 -pkgrel=4.1 +pkgrel=5 pkgdesc="A MIDI to WAVE converter and player" arch=('i686' 'x86_64' 'mips64el') url="http://timidity.sourceforge.net" @@ -14,10 +14,9 @@ optdepends=('gtk2: for using the GTK+ interface' 'tk: for using the Tk interface 'xaw3d: for using the Xaw interface') backup=('etc/timidity++/timidity.cfg') source=(http://downloads.sourceforge.net/timidity/TiMidity++-${pkgver}.tar.xz \ - timidity.cfg timidity++.sh timidity.service) + timidity.cfg timidity.service) sha1sums=('15ec27f1ea3e718a8d61603521fc16df5c0dd24b' '660b3afbb720d26e8f008034cee66dd8da082d6e' - '9f3e732a7ca1e97119a76df62ecf154df04d4f77' 'f0351b9eb8928d3d82c380107654a7dbe7cd2d54') build() { @@ -35,6 +34,5 @@ package() { cd "${srcdir}/TiMidity++-${pkgver}" make DESTDIR="${pkgdir}" install install -D -m644 ../timidity.cfg "${pkgdir}/etc/timidity++/timidity.cfg" - install -D -m755 ../timidity++.sh "${pkgdir}/etc/rc.d/timidity++" install -D -m644 ../timidity.service "${pkgdir}/usr/lib/systemd/system/timidity.service" } diff --git a/extra/timidity++/timidity++.sh b/extra/timidity++/timidity++.sh deleted file mode 100644 index 3fa13cea9..000000000 --- a/extra/timidity++/timidity++.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/bin/timidity` -case "$1" in - start) - stat_busy "Starting Timidity++ ALSA Daemon" - [ -z "$PID" ] && /usr/bin/timidity -iAD > /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - echo $PID > /var/run/timidity.pid - add_daemon timidity++ - stat_done - fi - ;; - stop) - stat_busy "Stopping Timidity++ ALSA Daemon" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm /var/run/timidity.pid - rm_daemon timidity++ - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD index f003a128a..296bea51a 100644 --- a/kernels/linux-libre-pae/PKGBUILD +++ b/kernels/linux-libre-pae/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 182057 2013-04-06 06:50:23Z tpowa $ +# $Id: PKGBUILD 182718 2013-04-13 10:58:55Z tpowa $ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -6,12 +6,12 @@ pkgbase=linux-libre-pae # Build stock -LIBRE-PAE kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.8 -pkgver=${_basekernel}.6 +pkgver=${_basekernel}.7 pkgrel=1 arch=('i686') url="http://linux-libre.fsfla.org/" license=('GPL2') -makedepends=('xmlto' 'docbook-xsl') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc') options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz" @@ -22,7 +22,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'boot-logo.patch' 'change-default-console-loglevel.patch') md5sums=('84c2a77910932ffc7d958744ac9cf2f5' - '1b3cd03d2add3bfe74e98a953f28c8d0' + 'f83582104813c022e6739e12664dbb0c' '6294513cfa9830d48ad1915ff7053a98' 'f302c931bd85309da9d9792b4cc96467' '04b21c79df0a952c22d681dd4f4562df' @@ -31,7 +31,7 @@ md5sums=('84c2a77910932ffc7d958744ac9cf2f5' _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-PAE -build() { +prepare() { cd "${srcdir}/linux-${_basekernel}" if [ "${_basekernel}" != "${pkgver}" ]; then @@ -58,6 +58,10 @@ build() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh +} + +build() { + cd "${srcdir}/linux-${_basekernel}" # get kernel version make prepare diff --git a/kernels/linux-libre-pae/linux-libre-pae.install b/kernels/linux-libre-pae/linux-libre-pae.install index c8ba6a356..1e8ed6868 100644 --- a/kernels/linux-libre-pae/linux-libre-pae.install +++ b/kernels/linux-libre-pae/linux-libre-pae.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-pae -KERNEL_VERSION=3.8.6-1-LIBRE-PAE +KERNEL_VERSION=3.8.7-1-LIBRE-PAE # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/kernels/linux-libre-rt/PKGBUILD b/kernels/linux-libre-rt/PKGBUILD index a239bce41..fed3ad748 100644 --- a/kernels/linux-libre-rt/PKGBUILD +++ b/kernels/linux-libre-rt/PKGBUILD @@ -18,7 +18,7 @@ _lxopkgver=${_basekernel}.4 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') -makedepends=('xmlto' 'docbook-xsl') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc') options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}-gnu/patch-${_basekernel}-gnu-${_pkgver}-gnu.xz" @@ -52,7 +52,7 @@ fi _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-RT -build() { +prepare() { cd "${srcdir}/linux-${_basekernel}" if [ "${_basekernel}" != "${pkgver}" ]; then @@ -102,6 +102,10 @@ build() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh +} + +build() { + cd "${srcdir}/linux-${_basekernel}" # get kernel version make prepare diff --git a/kernels/linux-libre-xen/PKGBUILD b/kernels/linux-libre-xen/PKGBUILD index 8d112b6ab..45759cd92 100644 --- a/kernels/linux-libre-xen/PKGBUILD +++ b/kernels/linux-libre-xen/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 182057 2013-04-06 06:50:23Z tpowa $ +# $Id: PKGBUILD 182718 2013-04-13 10:58:55Z tpowa $ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -6,12 +6,12 @@ pkgbase=linux-libre-xen # Build stock -LIBRE-XEN kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.8 -pkgver=${_basekernel}.6 +pkgver=${_basekernel}.7 pkgrel=1 arch=('i686') url="http://linux-libre.fsfla.org/" license=('GPL2') -makedepends=('xmlto' 'docbook-xsl') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc') options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz" @@ -22,7 +22,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'boot-logo.patch' 'change-default-console-loglevel.patch') md5sums=('84c2a77910932ffc7d958744ac9cf2f5' - '1b3cd03d2add3bfe74e98a953f28c8d0' + 'f83582104813c022e6739e12664dbb0c' '2708b6f03f827e2c94ecbd050df4286d' 'b7c2805bb287a644c0a303bf7721e534' '04b21c79df0a952c22d681dd4f4562df' @@ -31,7 +31,7 @@ md5sums=('84c2a77910932ffc7d958744ac9cf2f5' _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-XEN -build() { +prepare() { cd "${srcdir}/linux-${_basekernel}" if [ "${_basekernel}" != "${pkgver}" ]; then @@ -58,6 +58,10 @@ build() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh +} + +build() { + cd "${srcdir}/linux-${_basekernel}" # get kernel version make prepare diff --git a/kernels/linux-libre-xen/linux-libre-xen.install b/kernels/linux-libre-xen/linux-libre-xen.install index 2b4029b64..f9430058d 100644 --- a/kernels/linux-libre-xen/linux-libre-xen.install +++ b/kernels/linux-libre-xen/linux-libre-xen.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-xen -KERNEL_VERSION=3.8.6-1-LIBRE-XEN +KERNEL_VERSION=3.8.7-1-LIBRE-XEN # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/libre/calibre-libre/PKGBUILD b/libre/calibre-libre/PKGBUILD index 9279a463f..1ef8b1d76 100644 --- a/libre/calibre-libre/PKGBUILD +++ b/libre/calibre-libre/PKGBUILD @@ -1,5 +1,7 @@ # $Id$ -# Maintainer: Giovanni Scafora <giovanni@archlinux.org> +# Maintainer: jelle van der Waa <jelle@vdwaa.nl> +# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com> +# Contributor: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Petrov Roman <nwhisper@gmail.com> # Contributor: Andrea Fagiani <andfagiani _at_ gmail dot com> # Contributor: Larry Hajali <larryhaja@gmail.com> @@ -7,7 +9,7 @@ _pkgname=calibre pkgname=calibre-libre -pkgver=0.9.26 +pkgver=0.9.27 pkgrel=1 pkgdesc="Ebook management application, with unar support included and nonfree fonts removed" arch=('i686' 'x86_64' 'mips64el') @@ -28,7 +30,7 @@ install=calibre.install source=("http://calibre-ebook.googlecode.com/files/${_pkgname}-${pkgver}.tar.xz" 'desktop_integration.patch' 'calibre-mount-helper') -md5sums=('14df8fbe5e0fa5e8cc14b480603920e2' +md5sums=('1d5bbe102e3ec6ec71399aad5d074137' '8353d1878c5a498b3e49eddef473605f' '675cd87d41342119827ef706055491e7') diff --git a/libre/linux-libre-kmod-alx/PKGBUILD b/libre/linux-libre-kmod-alx/PKGBUILD index 524b24bae..d6dc1c328 100644 --- a/libre/linux-libre-kmod-alx/PKGBUILD +++ b/libre/linux-libre-kmod-alx/PKGBUILD @@ -1,12 +1,12 @@ # Maintainer: André Silva <emulatorman@lavabit.com> -_kernver=3.8.6 +_kernver=3.8.7 _kernrel=1 pkgname=('linux-libre-kmod-alx') _version=v3.8-rc7 _pkgver=3.8-rc7-1-u pkgver=3.8rc7.1 -pkgrel=12 +pkgrel=13 pkgdesc='Atheros alx ethernet device driver for linux-libre kernel' arch=('i686' 'x86_64') url='http://www.linuxfoundation.org/collaborate/workgroups/networking/alx' diff --git a/libre/linux-libre-lts-kmod-alx/PKGBUILD b/libre/linux-libre-lts-kmod-alx/PKGBUILD index d2b2839ea..1963f2536 100644 --- a/libre/linux-libre-lts-kmod-alx/PKGBUILD +++ b/libre/linux-libre-lts-kmod-alx/PKGBUILD @@ -1,12 +1,12 @@ # Maintainer: André Silva <emulatorman@lavabit.com> -_kernver=3.0.72 +_kernver=3.0.73 _kernrel=1 pkgname=('linux-libre-lts-kmod-alx') _version=v3.8-rc7 _pkgver=3.8-rc7-1-u pkgver=3.8rc7.1 -pkgrel=10 +pkgrel=11 pkgdesc='Atheros alx ethernet device driver for linux-libre-lts kernel' arch=('i686' 'x86_64') url='http://www.linuxfoundation.org/collaborate/workgroups/networking/alx' diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index e0fb91bd4..df302a20d 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 182062 2013-04-06 09:14:10Z tpowa $ +# $Id: PKGBUILD 182731 2013-04-13 15:31:06Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -7,14 +7,14 @@ pkgbase=linux-libre-lts # Build stock -LIBRE-LTS kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.0 -_sublevel=72 +_sublevel=73 pkgver=${_basekernel}.${_sublevel} pkgrel=1 -_lxopkgver=${_basekernel}.71 # nearly always the same as pkgver +_lxopkgver=${_basekernel}.72 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') -makedepends=('xmlto' 'docbook-xsl') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils') options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz" @@ -30,10 +30,9 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'ext4-options.patch' 'module-symbol-waiting-3.0.patch' 'module-init-wait-3.0.patch' - 'ext4-use-atomic64_t-for-the-per-flexbg-free_clusters-count.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") md5sums=('5f64180fe7df4e574dac5911b78f5067' - '337d8baa608067d3ef79a553af790416' + '846a503d4bacfaca417fbea67aceabc2' 'fe0e9b4415b82f306fc1b63eb9a742a4' '69a689019ea0b6ed46b387907f14bc8a' 'c072b17032e80debc6a8626299245d46' @@ -45,8 +44,7 @@ md5sums=('5f64180fe7df4e574dac5911b78f5067' 'f36222e7ce20c8e4dc27376f9be60f6c' '670931649c60fcb3ef2e0119ed532bd4' '8a71abc4224f575008f974a099b5cf6f' - 'ee587972bbd35841cc0efe82db9caa7c' - 'fd5bb788a849895ebf1b8efe64646715') + '5d433e634f9744824a5a3122d734e6f6') if [ "$CARCH" != "mips64el" ]; then # Don't use the Loongson-specific patches on non-mips64el arches. unset source[${#source[@]}-1] @@ -56,7 +54,7 @@ fi _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-LTS -build() { +prepare() { cd "${srcdir}/linux-${_basekernel}" if [ "${_basekernel}" != "${pkgver}" ]; then @@ -66,10 +64,6 @@ build() { # Add freedo as boot logo patch -Np1 -i "${srcdir}/boot-logo.patch" - # revert i686 build breaker 3.0.72 kernel - if [ "${CARCH}" = "i686" ]; then - patch -Rp1 -i "${srcdir}/ext4-use-atomic64_t-for-the-per-flexbg-free_clusters-count.patch" - fi # Some chips detect a ghost TV output # mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html # Arch Linux bug report: FS#19234 @@ -125,6 +119,10 @@ build() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh +} + +build() { + cd "${srcdir}/linux-${_basekernel}" # get kernel version make prepare diff --git a/libre/linux-libre-lts/linux-libre-lts.install b/libre/linux-libre-lts/linux-libre-lts.install index 76b9b14f0..c3aff92ae 100644 --- a/libre/linux-libre-lts/linux-libre-lts.install +++ b/libre/linux-libre-lts/linux-libre-lts.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-lts -KERNEL_VERSION=3.0.72-1-LIBRE-LTS +KERNEL_VERSION=3.0.73-1-LIBRE-LTS # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index 91dbb8a6d..2b8af7675 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 182057 2013-04-06 06:50:23Z tpowa $ +# $Id: PKGBUILD 182718 2013-04-13 10:58:55Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): Nicolás Reynolds <fauno@kiwwwi.com.ar> @@ -10,14 +10,14 @@ pkgbase=linux-libre # Build stock -LIBRE kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.8 -_sublevel=6 +_sublevel=7 pkgver=${_basekernel}.${_sublevel} pkgrel=1 _lxopkgver=${_basekernel}.6 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') -makedepends=('xmlto' 'docbook-xsl') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc') options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz" @@ -31,7 +31,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'change-default-console-loglevel.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") md5sums=('84c2a77910932ffc7d958744ac9cf2f5' - '1b3cd03d2add3bfe74e98a953f28c8d0' + 'f83582104813c022e6739e12664dbb0c' '9b425f069f920cdd6798b3adab79d3af' '9316ebdb21ea9948ae5c83795a3dcf61' 'e49ac236dfeef709f91a3d993ea7b62c' @@ -49,7 +49,7 @@ fi _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE -build() { +prepare() { cd "${srcdir}/linux-${_basekernel}" if [ "${_basekernel}" != "${pkgver}" ]; then @@ -98,6 +98,10 @@ build() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh +} + +build() { + cd "${srcdir}/linux-${_basekernel}" # get kernel version make prepare diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install index a7672f35c..46f383749 100644 --- a/libre/linux-libre/linux-libre.install +++ b/libre/linux-libre/linux-libre.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME= -KERNEL_VERSION=3.8.6-1-LIBRE +KERNEL_VERSION=3.8.7-1-LIBRE # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/pcr/debootstrap/PKGBUILD b/pcr/debootstrap/PKGBUILD index 9f03c48db..e46a7d0b1 100644 --- a/pcr/debootstrap/PKGBUILD +++ b/pcr/debootstrap/PKGBUILD @@ -2,19 +2,43 @@ # Maintainer: André Silva <emulatorman@lavabit.com> pkgname=debootstrap -pkgver=1.0.26 +pkgver=1.0.48 pkgrel=1 -pkgdesc="A tool used to create a gNewSense base system from scratch, without requiring the availability of dpkg or apt" +pkgdesc="A tool used to create a gNewSense or Trisquel base system from scratch, without requiring the availability of dpkg or apt" arch=('any') license=('GPL') -url="http://www.gnewsense.org" -depends=('bash' 'wget') -source=("http://archive.gnewsense.org/gnewsense-three/gnewsense/pool/overlays/parkes/kgoetz/${pkgname}/${pkgname}_${pkgver}+squeeze1+gnewsense1_all.deb") +url="http://packages.debian.org/sid/debootstrap" +depends=('wget') +source=("http://ftp.debian.org/debian/pool/main/d/${pkgname}/${pkgname}_${pkgver}_all.deb" + 'metad' + 'trisquel') install="debootstrap.install" -md5sums=('2049317eac54c0fac6c3201a90fadc18') +md5sums=('f75ae43204ed273c7a95c12a5a2f715a' + '4425300ca68d60fb60a6d699e153a519' + 'b020aa8426e70a6024c8e76312c17d78') -build(){ - tar -xzf "${srcdir}/data.tar.gz" -C "${pkgdir}/" - # doesn't work with gpg 2.x, patch to point to gpgv1 - sed 's/gpgv/gpgv1/g;' -i "${pkgdir}/usr/sbin/debootstrap" "${pkgdir}/usr/share/debootstrap/functions" +package(){ + tar -xzf "$srcdir/data.tar.gz" -C "$pkgdir/" + + # doesn't work with gpg 2.x, patch to point to gpg1v + sed 's/gpgv/gpg1v/g;' -i "$pkgdir/usr/sbin/debootstrap" "$pkgdir/usr/share/debootstrap/functions" + + # add gNewSense script + install -m644 metad "$pkgdir/usr/share/debootstrap/scripts" + + # create gNewSense symlinks + ln -s metad "$pkgdir/usr/share/debootstrap/scripts/deltah" + ln -s metad "$pkgdir/usr/share/debootstrap/scripts/parkes" + + # add Trisquel script + install -m644 trisquel "$pkgdir/usr/share/debootstrap/scripts" + + # create Trisquel symlinks + ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/awen" + ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/brigantia" + ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/dagda" + ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/dwyn" + ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/robur" + ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/slaine" + ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/taranis" } diff --git a/pcr/debootstrap/metad b/pcr/debootstrap/metad new file mode 100644 index 000000000..8d14c0ed9 --- /dev/null +++ b/pcr/debootstrap/metad @@ -0,0 +1,203 @@ +case $SUITE in + parkes|metad) + default_mirror http://archive.gnewsense.org/gnewsense-three/gnewsense/ + ;; + deltah) + default_mirror http://archive.gnewsense.org/gnewsense + ;; +esac + + +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot minbase scratchbox + +if doing_variant fakechroot; then + test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" +fi + +case $ARCH in + alpha|ia64) LIBC="libc6.1" ;; + kfreebsd-*) LIBC="libc0.1" ;; + hurd-*) LIBC="libc0.3" ;; + *) LIBC="libc6" ;; +esac + +work_out_debs () { + required="$(get_debs Priority: required)" + + if doing_variant - || doing_variant fakechroot; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd || doing_variant scratchbox; then + base="apt $(get_debs Build-Essential: yes)" + elif doing_variant minbase; then + base="apt" + fi + + if doing_variant fakechroot; then + # ldd.fake needs binutils + required="$required binutils" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + if doing_variant fakechroot; then + setup_devices_fakechroot + else + setup_devices + fi + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$(extract_deb_field "$TARGET/$deb" Version)" + + mkdir -p "$TARGET/var/lib/dpkg/info" + + echo \ +"Package: $pkg +Version: $ver +Status: install ok installed" >> "$TARGET/var/lib/dpkg/status" + + touch "$TARGET/var/lib/dpkg/info/${pkg}.list" + } + + x_feign_install dpkg +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + if doing_variant fakechroot; then + setup_proc_fakechroot + elif doing_variant scratchbox; then + true + else + setup_proc + in_target /sbin/ldconfig + fi + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk "$TARGET/usr/bin/awk" + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + if doing_variant fakechroot; then + install_fakechroot_tools + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm "$TARGET/usr/bin/awk" + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + exec 7>&1 + + smallyes '' | + (repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING + + info CONFREQ "Configuring required packages..." + + mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL" + echo \ +"#!/bin/sh +echo +echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon" + chmod 755 "$TARGET/sbin/start-stop-daemon" + + setup_dselect_method apt + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + setup_available $required $base + done_predeps= + while predep=$(get_next_predep); do + # We have to resolve dependencies of pre-dependencies manually because + # dpkg --predep-package doesn't handle this. + predep=$(without "$(without "$(resolve_deps $predep)" "$required")" "$done_predeps") + # XXX: progress is tricky due to how dpkg_progress works + # -- cjwatson 2009-07-29 + p; smallyes '' | + in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep) + base=$(without "$base" "$predep") + done_predeps="$done_predeps $predep" + done + + smallyes '' | + (repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/pcr/debootstrap/trisquel b/pcr/debootstrap/trisquel new file mode 100644 index 000000000..7efa062f9 --- /dev/null +++ b/pcr/debootstrap/trisquel @@ -0,0 +1,199 @@ +default_mirror http://archive.trisquel.info/trisquel +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot minbase + +if doing_variant fakechroot; then + test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" +fi + +case $ARCH in + alpha|ia64) LIBC="libc6.1" ;; + *) LIBC="libc6" ;; +esac + +work_out_debs () { + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + base="$(get_debs Build-Essential: yes)" + elif doing_variant fakechroot || doing_variant minbase; then + base="apt" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + if doing_variant fakechroot; then + setup_devices_fakechroot + else + setup_devices + fi + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$(extract_deb_field "$TARGET/$deb" Version)" + + mkdir -p "$TARGET/var/lib/dpkg/info" + + echo \ +"Package: $pkg +Version: $ver +Status: install ok installed" >> "$TARGET/var/lib/dpkg/status" + + touch "$TARGET/var/lib/dpkg/info/${pkg}.list" + } + + x_feign_install dpkg +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + if doing_variant fakechroot; then + setup_proc_fakechroot + else + setup_proc + in_target /sbin/ldconfig + fi + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk "$TARGET/usr/bin/awk" + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime" + fi + + if doing_variant fakechroot; then + install_fakechroot_tools + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm "$TARGET/usr/bin/awk" + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + info CONFREQ "Configuring required packages..." + + if doing_variant fakechroot; then + # fix initscripts postinst (no mounting possible, and wrong if condition) + sed -i '/dpkg.*--compare-versions/ s/\<lt\>/lt-nl/' "$TARGET/var/lib/dpkg/info/initscripts.postinst" + fi + + mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL" + echo \ +"#!/bin/sh +echo +echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon" + chmod 755 "$TARGET/sbin/start-stop-daemon" + + if [ -x "$TARGET/sbin/initctl" ]; then + mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL" + echo \ +"#!/bin/sh +echo +echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl" + chmod 755 "$TARGET/sbin/initctl" + fi + + setup_dselect_method apt + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + setup_available $required $base + done_predeps= + while predep=$(get_next_predep); do + # We have to resolve dependencies of pre-dependencies manually because + # dpkg --predep-package doesn't handle this. + predep=$(without "$(without "$(resolve_deps $predep)" "$required")" "$done_predeps") + # XXX: progress is tricky due to how dpkg_progress works + # -- cjwatson 2009-07-29 + p; smallyes '' | in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep) + base=$(without "$base" "$predep") + done_predeps="$done_predeps $predep" + done + + smallyes '' | + (repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + if [ -x "$TARGET/sbin/initctl.REAL" ]; then + mv "$TARGET/sbin/initctl.REAL" "$TARGET/sbin/initctl" + fi + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} |