Merge staging-next into staging
This commit is contained in:
@@ -1,72 +0,0 @@
|
||||
commit 970fb11a296b5bbdc5e8425851253d2c5913c45e
|
||||
Author: Leon Bottou <leon@bottou.org>
|
||||
Date: Tue Mar 26 20:36:31 2019 -0400
|
||||
|
||||
Fix bug#296
|
||||
|
||||
diff --git a/libdjvu/DjVmDir.cpp b/libdjvu/DjVmDir.cpp
|
||||
index a6a39e0..0a0fac6 100644
|
||||
--- a/libdjvu/DjVmDir.cpp
|
||||
+++ b/libdjvu/DjVmDir.cpp
|
||||
@@ -299,42 +299,44 @@ DjVmDir::decode(const GP<ByteStream> &gstr)
|
||||
memcpy((char*) strings+strings_size, buffer, length);
|
||||
}
|
||||
DEBUG_MSG("size of decompressed names block=" << strings.size() << "\n");
|
||||
- if (strings[strings.size()-1] != 0)
|
||||
- {
|
||||
- int strings_size=strings.size();
|
||||
- strings.resize(strings_size+1);
|
||||
- strings[strings_size] = 0;
|
||||
- }
|
||||
+ int strings_size=strings.size();
|
||||
+ strings.resize(strings_size+3);
|
||||
+ memset((char*) strings+strings_size, 0, 4);
|
||||
|
||||
- // Copy names into the files
|
||||
+ // Copy names into the files
|
||||
const char * ptr=strings;
|
||||
for(pos=files_list;pos;++pos)
|
||||
{
|
||||
GP<File> file=files_list[pos];
|
||||
-
|
||||
+ if (ptr >= (const char*)strings + strings_size)
|
||||
+ G_THROW( "DjVu document is corrupted (DjVmDir)" );
|
||||
file->id=ptr;
|
||||
ptr+=file->id.length()+1;
|
||||
if (file->flags & File::HAS_NAME)
|
||||
{
|
||||
- file->name=ptr;
|
||||
- ptr+=file->name.length()+1;
|
||||
- } else
|
||||
+ file->name=ptr;
|
||||
+ ptr+=file->name.length()+1;
|
||||
+ }
|
||||
+ else
|
||||
{
|
||||
file->name=file->id;
|
||||
}
|
||||
if (file->flags & File::HAS_TITLE)
|
||||
{
|
||||
- file->title=ptr;
|
||||
- ptr+=file->title.length()+1;
|
||||
- } else
|
||||
- file->title=file->id;
|
||||
- /* msr debug: multipage file, file->title is null.
|
||||
+ file->title=ptr;
|
||||
+ ptr+=file->title.length()+1;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ file->title=file->id;
|
||||
+ }
|
||||
+ /* msr debug: multipage file, file->title is null.
|
||||
DEBUG_MSG(file->name << ", " << file->id << ", " << file->title << ", " <<
|
||||
file->offset << ", " << file->size << ", " <<
|
||||
file->is_page() << "\n"); */
|
||||
}
|
||||
|
||||
- // Check that there is only one file with SHARED_ANNO flag on
|
||||
+ // Check that there is only one file with SHARED_ANNO flag on
|
||||
int shared_anno_cnt=0;
|
||||
for(pos=files_list;pos;++pos)
|
||||
{
|
||||
@@ -1,39 +0,0 @@
|
||||
commit b1f4e1b2187d9e5010cd01ceccf20b4a11ce723f
|
||||
Author: Leon Bottou <leon@bottou.org>
|
||||
Date: Tue Mar 26 20:45:46 2019 -0400
|
||||
|
||||
fix for bug #297
|
||||
|
||||
diff --git a/libdjvu/DjVmDir.cpp b/libdjvu/DjVmDir.cpp
|
||||
index 0a0fac6..5a49015 100644
|
||||
--- a/libdjvu/DjVmDir.cpp
|
||||
+++ b/libdjvu/DjVmDir.cpp
|
||||
@@ -309,7 +309,7 @@ DjVmDir::decode(const GP<ByteStream> &gstr)
|
||||
{
|
||||
GP<File> file=files_list[pos];
|
||||
if (ptr >= (const char*)strings + strings_size)
|
||||
- G_THROW( "DjVu document is corrupted (DjVmDir)" );
|
||||
+ G_THROW( ByteStream::EndOfFile );
|
||||
file->id=ptr;
|
||||
ptr+=file->id.length()+1;
|
||||
if (file->flags & File::HAS_NAME)
|
||||
diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp
|
||||
index 0e487f0..c2fdbe4 100644
|
||||
--- a/libdjvu/GBitmap.cpp
|
||||
+++ b/libdjvu/GBitmap.cpp
|
||||
@@ -890,11 +890,13 @@ GBitmap::read_rle_raw(ByteStream &bs)
|
||||
int c = 0;
|
||||
while (n >= 0)
|
||||
{
|
||||
- bs.read(&h, 1);
|
||||
+ if (bs.read(&h, 1) <= 0)
|
||||
+ G_THROW( ByteStream::EndOfFile );
|
||||
int x = h;
|
||||
if (x >= (int)RUNOVERFLOWVALUE)
|
||||
{
|
||||
- bs.read(&h, 1);
|
||||
+ if (bs.read(&h, 1) <= 0)
|
||||
+ G_THROW( ByteStream::EndOfFile );
|
||||
x = h + ((x - (int)RUNOVERFLOWVALUE) << 8);
|
||||
}
|
||||
if (c+x > ncolumns)
|
||||
@@ -1,111 +0,0 @@
|
||||
commit e15d51510048927f172f1bf1f27ede65907d940d
|
||||
Author: Leon Bottou <leon@bottou.org>
|
||||
Date: Mon Apr 8 22:25:55 2019 -0400
|
||||
|
||||
bug 299 fixed
|
||||
|
||||
diff --git a/libdjvu/GContainer.h b/libdjvu/GContainer.h
|
||||
index 96b067c..0140211 100644
|
||||
--- a/libdjvu/GContainer.h
|
||||
+++ b/libdjvu/GContainer.h
|
||||
@@ -550,52 +550,61 @@ public:
|
||||
template <class TYPE> void
|
||||
GArrayTemplate<TYPE>::sort(int lo, int hi)
|
||||
{
|
||||
- if (hi <= lo)
|
||||
- return;
|
||||
- if (hi > hibound || lo<lobound)
|
||||
- G_THROW( ERR_MSG("GContainer.illegal_subscript") );
|
||||
TYPE *data = (TYPE*)(*this);
|
||||
- // Test for insertion sort
|
||||
- if (hi <= lo + 50)
|
||||
+ while(true)
|
||||
{
|
||||
- for (int i=lo+1; i<=hi; i++)
|
||||
+ if (hi <= lo)
|
||||
+ return;
|
||||
+ if (hi > hibound || lo<lobound)
|
||||
+ G_THROW( ERR_MSG("GContainer.illegal_subscript") );
|
||||
+ // Test for insertion sort
|
||||
+ if (hi <= lo + 50)
|
||||
{
|
||||
- int j = i;
|
||||
- TYPE tmp = data[i];
|
||||
- while ((--j>=lo) && !(data[j]<=tmp))
|
||||
- data[j+1] = data[j];
|
||||
- data[j+1] = tmp;
|
||||
+ for (int i=lo+1; i<=hi; i++)
|
||||
+ {
|
||||
+ int j = i;
|
||||
+ TYPE tmp = data[i];
|
||||
+ while ((--j>=lo) && !(data[j]<=tmp))
|
||||
+ data[j+1] = data[j];
|
||||
+ data[j+1] = tmp;
|
||||
+ }
|
||||
+ return;
|
||||
}
|
||||
- return;
|
||||
- }
|
||||
- // -- determine suitable quick-sort pivot
|
||||
- TYPE tmp = data[lo];
|
||||
- TYPE pivot = data[(lo+hi)/2];
|
||||
- if (pivot <= tmp)
|
||||
- { tmp = pivot; pivot=data[lo]; }
|
||||
- if (data[hi] <= tmp)
|
||||
- { pivot = tmp; }
|
||||
- else if (data[hi] <= pivot)
|
||||
- { pivot = data[hi]; }
|
||||
- // -- partition set
|
||||
- int h = hi;
|
||||
- int l = lo;
|
||||
- while (l < h)
|
||||
- {
|
||||
- while (! (pivot <= data[l])) l++;
|
||||
- while (! (data[h] <= pivot)) h--;
|
||||
- if (l < h)
|
||||
+ // -- determine median-of-three pivot
|
||||
+ TYPE tmp = data[lo];
|
||||
+ TYPE pivot = data[(lo+hi)/2];
|
||||
+ if (pivot <= tmp)
|
||||
+ { tmp = pivot; pivot=data[lo]; }
|
||||
+ if (data[hi] <= tmp)
|
||||
+ { pivot = tmp; }
|
||||
+ else if (data[hi] <= pivot)
|
||||
+ { pivot = data[hi]; }
|
||||
+ // -- partition set
|
||||
+ int h = hi;
|
||||
+ int l = lo;
|
||||
+ while (l < h)
|
||||
{
|
||||
- tmp = data[l];
|
||||
- data[l] = data[h];
|
||||
- data[h] = tmp;
|
||||
- l = l+1;
|
||||
- h = h-1;
|
||||
+ while (! (pivot <= data[l])) l++;
|
||||
+ while (! (data[h] <= pivot)) h--;
|
||||
+ if (l < h)
|
||||
+ {
|
||||
+ tmp = data[l];
|
||||
+ data[l] = data[h];
|
||||
+ data[h] = tmp;
|
||||
+ l = l+1;
|
||||
+ h = h-1;
|
||||
+ }
|
||||
+ }
|
||||
+ // -- recurse, small partition first
|
||||
+ // tail-recursion elimination
|
||||
+ if (h - lo <= hi - l) {
|
||||
+ sort(lo,h);
|
||||
+ lo = l; // sort(l,hi)
|
||||
+ } else {
|
||||
+ sort(l,hi);
|
||||
+ hi = h; // sort(lo,h)
|
||||
}
|
||||
}
|
||||
- // -- recursively restart
|
||||
- sort(lo, h);
|
||||
- sort(l, hi);
|
||||
}
|
||||
|
||||
template<class TYPE> inline TYPE&
|
||||
@@ -1,28 +0,0 @@
|
||||
commit 9658b01431cd7ff6344d7787f855179e73fe81a7
|
||||
Author: Leon Bottou <leon@bottou.org>
|
||||
Date: Mon Apr 8 22:55:38 2019 -0400
|
||||
|
||||
fix bug #298
|
||||
|
||||
diff --git a/libdjvu/GBitmap.h b/libdjvu/GBitmap.h
|
||||
index e8e0c9b..ca89a19 100644
|
||||
--- a/libdjvu/GBitmap.h
|
||||
+++ b/libdjvu/GBitmap.h
|
||||
@@ -566,7 +566,7 @@ GBitmap::operator[](int row)
|
||||
{
|
||||
if (!bytes)
|
||||
uncompress();
|
||||
- if (row<0 || row>=nrows) {
|
||||
+ if (row<0 || row>=nrows || !bytes) {
|
||||
#ifndef NDEBUG
|
||||
if (zerosize < bytes_per_row + border)
|
||||
G_THROW( ERR_MSG("GBitmap.zero_small") );
|
||||
@@ -581,7 +581,7 @@ GBitmap::operator[](int row) const
|
||||
{
|
||||
if (!bytes)
|
||||
((GBitmap*)this)->uncompress();
|
||||
- if (row<0 || row>=nrows) {
|
||||
+ if (row<0 || row>=nrows || !bytes) {
|
||||
#ifndef NDEBUG
|
||||
if (zerosize < bytes_per_row + border)
|
||||
G_THROW( ERR_MSG("GBitmap.zero_small") );
|
||||
@@ -1,32 +0,0 @@
|
||||
commit c8bec6549c10ffaa2f2fbad8bbc629efdf0dd125
|
||||
Author: Leon Bottou <leon@bottou.org>
|
||||
Date: Thu Oct 17 22:20:31 2019 -0400
|
||||
|
||||
Fixed bug 309
|
||||
|
||||
diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp
|
||||
index 00752a0..f81eaeb 100644
|
||||
--- a/libdjvu/IW44EncodeCodec.cpp
|
||||
+++ b/libdjvu/IW44EncodeCodec.cpp
|
||||
@@ -405,7 +405,7 @@ filter_fv(short *p, int w, int h, int rowsize, int scale)
|
||||
int y = 0;
|
||||
int s = scale*rowsize;
|
||||
int s3 = s+s+s;
|
||||
- h = ((h-1)/scale)+1;
|
||||
+ h = (h>0) ? ((h-1)/scale)+1 : 0;
|
||||
y += 1;
|
||||
p += s;
|
||||
while (y-3 < h)
|
||||
diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
|
||||
index 6d0df3b..7109952 100644
|
||||
--- a/tools/ddjvu.cpp
|
||||
+++ b/tools/ddjvu.cpp
|
||||
@@ -279,7 +279,7 @@ render(ddjvu_page_t *page, int pageno)
|
||||
prect.h = (ih * 100) / dpi;
|
||||
}
|
||||
/* Process aspect ratio */
|
||||
- if (flag_aspect <= 0)
|
||||
+ if (flag_aspect <= 0 && iw>0 && ih>0)
|
||||
{
|
||||
double dw = (double)iw / prect.w;
|
||||
double dh = (double)ih / prect.h;
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "djvulibre";
|
||||
version = "3.5.27";
|
||||
version = "3.5.28";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/djvu/${pname}-${version}.tar.gz";
|
||||
sha256 = "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6";
|
||||
sha256 = "1p1fiygq9ny8aimwc4vxwjc6k9ykgdsq1sq06slfbzalfvm0kl7w";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
@@ -24,21 +24,10 @@ stdenv.mkDerivation rec {
|
||||
libiconv
|
||||
];
|
||||
|
||||
patches = [
|
||||
./CVE-2019-18804.patch
|
||||
# This one is needed to make the following
|
||||
# two CVE patches apply cleanly
|
||||
./fix_hongfuzz_crash.patch
|
||||
./CVE-2019-15142.patch
|
||||
./CVE-2019-15143.patch
|
||||
./CVE-2019-15144.patch
|
||||
./CVE-2019-15145.patch
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The big set of CLI tools to make/modify/optimize/show/export DJVU files";
|
||||
homepage = "http://djvu.sourceforge.net";
|
||||
license = licenses.gpl2;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ Anton-Latukha ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
commit 89d71b01d606e57ecec2c2930c145bb20ba5bbe3
|
||||
Author: Leon Bottou <leon@bottou.org>
|
||||
Date: Fri Jul 13 08:46:22 2018 -0400
|
||||
|
||||
fix hongfuzz crash.
|
||||
|
||||
diff --git a/libdjvu/DjVmDir.cpp b/libdjvu/DjVmDir.cpp
|
||||
index d322323..a6a39e0 100644
|
||||
--- a/libdjvu/DjVmDir.cpp
|
||||
+++ b/libdjvu/DjVmDir.cpp
|
||||
@@ -299,7 +299,13 @@ DjVmDir::decode(const GP<ByteStream> &gstr)
|
||||
memcpy((char*) strings+strings_size, buffer, length);
|
||||
}
|
||||
DEBUG_MSG("size of decompressed names block=" << strings.size() << "\n");
|
||||
-
|
||||
+ if (strings[strings.size()-1] != 0)
|
||||
+ {
|
||||
+ int strings_size=strings.size();
|
||||
+ strings.resize(strings_size+1);
|
||||
+ strings[strings_size] = 0;
|
||||
+ }
|
||||
+
|
||||
// Copy names into the files
|
||||
const char * ptr=strings;
|
||||
for(pos=files_list;pos;++pos)
|
||||
diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp
|
||||
index 6a5cd90..828addc 100644
|
||||
--- a/libdjvu/miniexp.cpp
|
||||
+++ b/libdjvu/miniexp.cpp
|
||||
@@ -1065,7 +1065,7 @@ print_c_string(const char *s, char *d, int flags, size_t len)
|
||||
c = (unsigned char)(*s++);
|
||||
if (char_quoted(c, flags))
|
||||
{
|
||||
- char buffer[10];
|
||||
+ char buffer[16]; /* 10+1 */
|
||||
static const char *tr1 = "\"\\tnrbf";
|
||||
static const char *tr2 = "\"\\\t\n\r\b\f";
|
||||
buffer[0] = buffer[1] = 0;
|
||||
diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp
|
||||
index 7ed13ad..fab9472 100644
|
||||
--- a/tools/csepdjvu.cpp
|
||||
+++ b/tools/csepdjvu.cpp
|
||||
@@ -1834,7 +1834,7 @@ main(int argc, const char **argv)
|
||||
ByteStream::create(GURL::Filename::UTF8(arg),"rb");
|
||||
BufferByteStream ibs(*fbs);
|
||||
do {
|
||||
- char pagename[16];
|
||||
+ char pagename[20];
|
||||
sprintf(pagename, "p%04d.djvu", ++pageno);
|
||||
if (opts.verbose > 1)
|
||||
DjVuPrintErrorUTF8("%s","--------------------\n");
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
mkYarnPackage rec {
|
||||
pname = "vieb";
|
||||
version = "3.4.0";
|
||||
version = "4.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jelmerro";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0h5yzmvs9zhhpg9l7rrgwd4rqd9n00n2ifwqf05kpymzliy6xsnk";
|
||||
sha256 = "sha256-7/oB2Inj+iMXzigqbCNJUY7dNrFBals2BOOl+Lp+ESs=";
|
||||
};
|
||||
|
||||
packageJSON = ./package.json;
|
||||
@@ -51,8 +51,8 @@ mkYarnPackage rec {
|
||||
meta = with lib; {
|
||||
homepage = "https://vieb.dev/";
|
||||
description = "Vim Inspired Electron Browser";
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
maintainers = with maintainers; [ gebner fortuneteller2k ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl3;
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
{
|
||||
"name": "vieb",
|
||||
"productName": "Vieb",
|
||||
"version": "3.4.0",
|
||||
"version": "4.5.1",
|
||||
"description": "Vim Inspired Electron Browser",
|
||||
"bin": "app.js",
|
||||
"main": "app/index.js",
|
||||
"scripts": {
|
||||
"test": "jest -u && eslint .",
|
||||
"test": "jest --coverage --collectCoverageFrom 'app/**/*.js' -u && eslint app && echo 'All good :)'",
|
||||
"dev": "electron app --datafolder ./ViebData/",
|
||||
"start": "electron app",
|
||||
"build": "node build.js",
|
||||
"buildall": "node build.js --linux --win --mac",
|
||||
@@ -16,24 +18,29 @@
|
||||
"repository": "https://github.com/Jelmerro/Vieb",
|
||||
"homepage": "https://vieb.dev",
|
||||
"keywords": [
|
||||
"Vim",
|
||||
"Electron",
|
||||
"Browser",
|
||||
"Internet"
|
||||
],
|
||||
"author": "Jelmer van Arnhem",
|
||||
"email": "Jelmerro@users.noreply.github.com",
|
||||
"license": "GPL-3.0+",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"archiver": "^5.2.0",
|
||||
"electron": "^11.2.1",
|
||||
"electron-builder": "^22.10.4",
|
||||
"eslint": "^7.19.0",
|
||||
"jest": "^26.6.3"
|
||||
"archiver": "5.3.0",
|
||||
"electron": "12.0.5",
|
||||
"electron-builder": "22.10.5",
|
||||
"eslint": "7.25.0",
|
||||
"eslint-plugin-compat": "^3.9.0",
|
||||
"jest": "26.6.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cliqz/adblocker-electron": "^1.20.0",
|
||||
"darkreader": "^4.9.27",
|
||||
"is-svg": "^4.2.1",
|
||||
"rimraf": "^3.0.2"
|
||||
}
|
||||
"7zip-bin": "5.1.1",
|
||||
"@cliqz/adblocker-electron": "1.20.4",
|
||||
"is-svg": "4.3.1",
|
||||
"rimraf": "3.0.2"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 2 Chrome versions"
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -164,9 +164,9 @@ in rec {
|
||||
});
|
||||
|
||||
terraform_0_15 = pluggable (generic {
|
||||
version = "0.15.1";
|
||||
sha256 = "02bqg05wsqld9xybvg7swvmympq5bggkw8vcq91z6vkpawm8z3kg";
|
||||
vendorSha256 = "1lnz6b2kjilidvs4flx9vj5j6dxliqdxni96fn2537nqaz4hc7l2";
|
||||
version = "0.15.2";
|
||||
sha256 = "1zsid3ri52cjhn4gr2vgnyf50zmqiz71fh18fkakql8vsqzb3zr0";
|
||||
vendorSha256 = "13ap1arn81lcxry08j42ck6lgvdcvdxgah6d40pmpkzkw9jcf55b";
|
||||
patches = [ ./provider-path-0_15.patch ];
|
||||
passthru = { inherit plugins; };
|
||||
});
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromSourcehut
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, pkg-config
|
||||
, kirigami2
|
||||
, libdeltachat
|
||||
, qtmultimedia
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "kdeltachat";
|
||||
version = "unstable-2021-05-03";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~link2xt";
|
||||
repo = "kdeltachat";
|
||||
rev = "dd7455764074c0864234a6a25ab6f87e8d5c3121";
|
||||
sha256 = "1vsy2jcisvf9mndxlwif3ghv1n2gz5ycr1qh72kgski38qan621v";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
kirigami2
|
||||
libdeltachat
|
||||
qtmultimedia
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Delta Chat client using Kirigami framework";
|
||||
homepage = "https://git.sr.ht/~link2xt/kdeltachat";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
# is this configure option of interest?
|
||||
#--enable-udev-rules-dir=PATH
|
||||
# Where to install udev rules (/etc/udev/rules.d)
|
||||
|
||||
#TODO shared version?
|
||||
|
||||
|
||||
# This is my config output.. Much TODO ?
|
||||
#source path /tmp/nix-31998-1/kino-1.2.0/ffmpeg
|
||||
#C compiler gcc
|
||||
#make make
|
||||
#.align is power-of-two no
|
||||
#ARCH x86_64 (generic)
|
||||
#build suffix -kino
|
||||
#big-endian no
|
||||
#MMX enabled yes
|
||||
#CMOV enabled no
|
||||
#CMOV is fast no
|
||||
#gprof enabled no
|
||||
#debug symbols yes
|
||||
#strip symbols yes
|
||||
#optimize yes
|
||||
#static yes
|
||||
#shared no
|
||||
#postprocessing support no
|
||||
#software scaler enabled yes
|
||||
#video hooking no
|
||||
#network support no
|
||||
#threading support no
|
||||
#SDL support no
|
||||
#Sun medialib support no
|
||||
#AVISynth enabled no
|
||||
#liba52 support no
|
||||
#liba52 dlopened no
|
||||
#libdts support no
|
||||
#libfaac enabled no
|
||||
#libfaad enabled no
|
||||
#faadbin enabled no
|
||||
#libgsm enabled no
|
||||
#libmp3lame enabled no
|
||||
#libnut enabled no
|
||||
#libogg enabled no
|
||||
#libtheora enabled no
|
||||
#libvorbis enabled no
|
||||
#x264 enabled no
|
||||
#XviD enabled no
|
||||
#zlib enabled no
|
||||
#AMR-NB float support no
|
||||
#AMR-NB fixed support no
|
||||
#AMR-WB float support no
|
||||
#AMR-WB IF2 support no
|
||||
|
||||
{ lib, stdenv, fetchurl, gtk2, libglade, libxml2, libraw1394, libsamplerate, libdv
|
||||
, pkg-config, perlPackages, libavc1394, libiec61883, libXv, gettext
|
||||
, libX11, glib, cairo, intltool, ffmpeg, libv4l
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "kino-1.3.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/kino/kino-1.3.4.tar.gz";
|
||||
sha256 = "020s05k0ma83rq2kfs8x474pqicaqp9spar81qc816ddfrnh8k8i";
|
||||
};
|
||||
|
||||
buildInputs = [ gtk2 libglade libxml2 libraw1394 libsamplerate libdv
|
||||
pkg-config libavc1394 libiec61883 intltool libXv gettext libX11 glib cairo ffmpeg libv4l ] # TODOoptional packages
|
||||
++ (with perlPackages; [ perl XMLParser ]);
|
||||
|
||||
configureFlags = [ "--enable-local-ffmpeg=no" ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
NIX_LDFLAGS = "-lavcodec -lavutil";
|
||||
|
||||
patches = [ ./kino-1.3.4-v4l1.patch ./kino-1.3.4-libav-0.7.patch ./kino-1.3.4-libav-0.8.patch ]; #./kino-1.3.4-libavcodec-pkg-config.patch ];
|
||||
|
||||
postInstall = "
|
||||
rpath=`patchelf --print-rpath \$out/bin/kino`;
|
||||
for i in $buildInputs; do
|
||||
echo adding \$i/lib
|
||||
rpath=\$rpath\${rpath:+:}\$i/lib
|
||||
done
|
||||
for i in \$out/bin/*; do
|
||||
patchelf --set-rpath \"\$rpath\" \"\$i\"
|
||||
done
|
||||
";
|
||||
|
||||
meta = {
|
||||
description = "Non-linear DV editor for GNU/Linux";
|
||||
homepage = "http://www.kinodv.org/";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
--- kino-1.3.4.orig/src/frame.cc 2011-07-17 14:54:59.089481638 +0200
|
||||
+++ kino-1.3.4/src/frame.cc 2011-07-17 15:09:23.199481714 +0200
|
||||
@@ -1063,7 +1063,12 @@
|
||||
AVPicture dest;
|
||||
int got_picture;
|
||||
|
||||
- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
|
||||
+ AVPacket pkt;
|
||||
+ av_init_packet(&pkt);
|
||||
+ pkt.data = data;
|
||||
+ pkt.size = GetFrameSize();
|
||||
+
|
||||
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
|
||||
if ( got_picture )
|
||||
{
|
||||
avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() );
|
||||
@@ -1123,7 +1128,12 @@
|
||||
AVPicture output;
|
||||
int got_picture;
|
||||
|
||||
- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
|
||||
+ AVPacket pkt;
|
||||
+ av_init_packet(&pkt);
|
||||
+ pkt.data = data;
|
||||
+ pkt.size = GetFrameSize();
|
||||
+
|
||||
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
|
||||
if ( got_picture )
|
||||
{
|
||||
avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() );
|
||||
@@ -1156,7 +1166,12 @@
|
||||
AVFrame *frame = avcodec_alloc_frame();
|
||||
int got_picture;
|
||||
|
||||
- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
|
||||
+ AVPacket pkt;
|
||||
+ av_init_packet(&pkt);
|
||||
+ pkt.data = data;
|
||||
+ pkt.size = GetFrameSize();
|
||||
+
|
||||
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
|
||||
|
||||
int width = GetWidth(), height = GetHeight();
|
||||
|
||||
@@ -1319,12 +1334,12 @@
|
||||
#if defined(HAVE_LIBAVCODEC)
|
||||
if ( avformatEncoder == NULL )
|
||||
{
|
||||
- avformatEncoder = av_alloc_format_context();
|
||||
+ avformatEncoder = avformat_alloc_context();
|
||||
if ( avformatEncoder )
|
||||
{
|
||||
- avformatEncoder->oformat = guess_format( "dv", NULL, NULL );
|
||||
+ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
|
||||
AVStream* vst = av_new_stream( avformatEncoder, 0 );
|
||||
- vst->codec->codec_type = CODEC_TYPE_VIDEO;
|
||||
+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
vst->codec->codec_id = CODEC_ID_DVVIDEO;
|
||||
vst->codec->bit_rate = 25000000;
|
||||
vst->start_time = 0;
|
||||
@@ -1,57 +0,0 @@
|
||||
--- kino-1.3.4.orig/src/frame.cc 2012-05-14 19:55:42.153772418 -0700
|
||||
+++ kino-1.3.4/src/frame.cc 2012-05-14 20:28:34.448838653 -0700
|
||||
@@ -101,8 +101,9 @@
|
||||
#if defined(HAVE_LIBAVCODEC)
|
||||
pthread_mutex_lock( &avcodec_mutex );
|
||||
av_register_all();
|
||||
- libavcodec = avcodec_alloc_context();
|
||||
- avcodec_open( libavcodec, avcodec_find_decoder( CODEC_ID_DVVIDEO ) );
|
||||
+ libavcodec = avcodec_alloc_context3(NULL);
|
||||
+ avcodec_open2( libavcodec,
|
||||
+ avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL );
|
||||
pthread_mutex_unlock( &avcodec_mutex );
|
||||
data = ( unsigned char* ) av_mallocz( 144000 );
|
||||
#if defined(HAVE_SWSCALE)
|
||||
@@ -1338,7 +1339,7 @@
|
||||
if ( avformatEncoder )
|
||||
{
|
||||
avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
|
||||
- AVStream* vst = av_new_stream( avformatEncoder, 0 );
|
||||
+ AVStream* vst = avformat_new_stream( avformatEncoder, NULL );
|
||||
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
vst->codec->codec_id = CODEC_ID_DVVIDEO;
|
||||
vst->codec->bit_rate = 25000000;
|
||||
@@ -1364,12 +1365,10 @@
|
||||
vst->sample_aspect_ratio = avcodecEncoder->sample_aspect_ratio;
|
||||
#endif
|
||||
avcodecEncoder->thread_count = 2;
|
||||
- avcodec_thread_init( avcodecEncoder, avcodecEncoder->thread_count );
|
||||
avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 };
|
||||
avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P;
|
||||
avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT;
|
||||
- av_set_parameters( avformatEncoder, NULL );
|
||||
- avcodec_open( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ) );
|
||||
+ avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL );
|
||||
av_new_packet( &avpacketEncoder, 144000 );
|
||||
tempImage = ( uint8_t* ) av_malloc(
|
||||
avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) );
|
||||
@@ -1475,16 +1474,16 @@
|
||||
|
||||
// Encode
|
||||
bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output );
|
||||
- url_open_buf( &avformatEncoder->pb, data, bytesInFrame, URL_WRONLY );
|
||||
+ avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL);
|
||||
avpacketEncoder.size = bytesInFrame;
|
||||
if ( !isEncoderHeaderWritten )
|
||||
{
|
||||
- av_write_header( avformatEncoder );
|
||||
+ avformat_write_header( avformatEncoder, NULL );
|
||||
isEncoderHeaderWritten = true;
|
||||
}
|
||||
av_write_frame( avformatEncoder, &avpacketEncoder );
|
||||
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
|
||||
- url_close_buf( avformatEncoder->pb );
|
||||
+ avio_close( avformatEncoder->pb );
|
||||
#else
|
||||
url_close_buf( &avformatEncoder->pb );
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/kino-1.3.4/configure.in 2009-09-08 02:35:23.000000000 -0400
|
||||
+++ b/kino-1.3.4/configure.in 2014-01-27 14:53:01.366063037 -0500
|
||||
@@ -221,7 +221,7 @@
|
||||
if (test "x$avcodec_include" != x) || (test "x$avcodec_lib" != x) ; then
|
||||
local_legacy_ffmpeg_test
|
||||
else
|
||||
- PKG_CHECK_MODULES(AVCODEC, libavformat,
|
||||
+ PKG_CHECK_MODULES(AVCODEC, [libavcodec libavformat libavutil],
|
||||
[
|
||||
AC_DEFINE(HAVE_LIBAVCODEC, 1, [Enable FFMPEG libavcodec])
|
||||
AC_SUBST(AVCODEC_LIBS)
|
||||
@@ -1,21 +0,0 @@
|
||||
no-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:20:37.161004916 +0400
|
||||
+++ kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:21:57.302377529 +0400
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/time.h>
|
||||
#define _LINUX_TIME_H 1
|
||||
-#include <linux/videodev.h>
|
||||
+#include <libv4l1-videodev.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef struct {
|
||||
--- kino-1.3.3.orig/src/v4l.h 2011-05-17 02:20:38.896969666 +0400
|
||||
+++ kino-1.3.3.orig/src/v4l.h 2011-05-17 02:21:39.922730395 +0400
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#define _DEVICE_H_
|
||||
#define _LINUX_TIME_H
|
||||
-#include <linux/videodev.h>
|
||||
+#include <libv4l1-videodev.h>
|
||||
|
||||
#include "displayer.h"
|
||||
Reference in New Issue
Block a user