diff options
Diffstat (limited to 'gnu/packages/patches')
67 files changed, 5023 insertions, 1146 deletions
diff --git a/gnu/packages/patches/aegisub-boost68.patch b/gnu/packages/patches/aegisub-boost68.patch new file mode 100644 index 0000000000..013721f3bd --- /dev/null +++ b/gnu/packages/patches/aegisub-boost68.patch @@ -0,0 +1,35 @@ +Source: https://git.archlinux.org/svntogit/community.git/plain/trunk/boost-1.68.patch?h=packages/aegisub +From d8336d2fed73c72d1227b343d6acfb991bc1651b Mon Sep 17 00:00:00 2001 +From: Jan Beich <jbeich@FreeBSD.org> +Date: Mon, 9 Jul 2018 20:15:29 +0000 +Subject: [PATCH] Keep using std::distance after Boost 1.68 + +src/search_replace_engine.cpp:256:14: error: call to + 'distance' is ambiguous + count += distance( + ^~~~~~~~ +/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter = + boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >] +distance(_InputIter __first, _InputIter __last) +^ +/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator = + boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >] + distance(SinglePassIterator first, SinglePassIterator last) + ^ +--- + src/search_replace_engine.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/search_replace_engine.cpp b/src/search_replace_engine.cpp +index 594c21e5e..14c71680d 100644 +--- a/src/search_replace_engine.cpp ++++ b/src/search_replace_engine.cpp +@@ -253,7 +253,7 @@ bool SearchReplaceEngine::ReplaceAll() { + if (MatchState ms = matches(&diag, 0)) { + auto& diag_field = diag.*get_dialogue_field(settings.field); + std::string const& text = diag_field.get(); +- count += distance( ++ count += std::distance( + boost::u32regex_iterator<std::string::const_iterator>(begin(text), end(text), *ms.re), + boost::u32regex_iterator<std::string::const_iterator>()); + diag_field = u32regex_replace(text, *ms.re, settings.replace_with); diff --git a/gnu/packages/patches/beets-python-3.7-fix.patch b/gnu/packages/patches/beets-python-3.7-fix.patch new file mode 100644 index 0000000000..43707cd9d0 --- /dev/null +++ b/gnu/packages/patches/beets-python-3.7-fix.patch @@ -0,0 +1,57 @@ +Fix compatibility issue with Python 3.7: + +https://github.com/beetbox/beets/issues/2978 + +Patch copied from upstream source repository: + +https://github.com/beetbox/beets/commit/15d44f02a391764da1ce1f239caef819f08beed8 + +From 15d44f02a391764da1ce1f239caef819f08beed8 Mon Sep 17 00:00:00 2001 +From: Adrian Sampson <adrian@radbox.org> +Date: Sun, 22 Jul 2018 12:34:19 -0400 +Subject: [PATCH] Fix Python 3.7 compatibility (#2978) + +--- + beets/autotag/hooks.py | 8 +++++++- + docs/changelog.rst | 2 ++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py +index 3615a9333..1c62a54c5 100644 +--- a/beets/autotag/hooks.py ++++ b/beets/autotag/hooks.py +@@ -31,6 +31,12 @@ + + log = logging.getLogger('beets') + ++# The name of the type for patterns in re changed in Python 3.7. ++try: ++ Pattern = re._pattern_type ++except AttributeError: ++ Pattern = re.Pattern ++ + + # Classes used to represent candidate options. + +@@ -433,7 +439,7 @@ def _eq(self, value1, value2): + be a compiled regular expression, in which case it will be + matched against `value2`. + """ +- if isinstance(value1, re._pattern_type): ++ if isinstance(value1, Pattern): + return bool(value1.match(value2)) + return value1 == value2 + +#diff --git a/docs/changelog.rst b/docs/changelog.rst +#index be6de2904..d487f31f5 100644 +#--- a/docs/changelog.rst +#+++ b/docs/changelog.rst +#@@ -19,6 +19,8 @@ New features: +# +# Fixes: +# +#+* Fix compatibility Python 3.7 and its change to a name in the ``re`` module. +#+ :bug:`2978` +# * R128 normalization tags are now properly deleted from files when the values +# are missing. +# Thanks to :user:`autrimpo`. diff --git a/gnu/packages/patches/blender-newer-ffmpeg.patch b/gnu/packages/patches/blender-newer-ffmpeg.patch new file mode 100644 index 0000000000..363489bc70 --- /dev/null +++ b/gnu/packages/patches/blender-newer-ffmpeg.patch @@ -0,0 +1,80 @@ +https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch + +From: Bastien Montagne <montagne29@wanadoo.fr> +Date: Tue, 8 May 2018 16:00:52 +0200 +Subject: fix_building_with_latest_versions_of_FFmpeg + +Some years-old deprecated stuff has now been removed. + +Correct solution is probably to use valid defines etc. in own code, but +this is more FFMEPG maintainer task (since it also may change how old +FFMPEG we do support...). +--- + intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++ + source/blender/blenkernel/intern/writeffmpeg.c | 3 +- + 2 files changed, 41 insertions(+), 1 deletion(-) + +diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h +index 9c06c8a..f7f437c 100644 +--- a/intern/ffmpeg/ffmpeg_compat.h ++++ b/intern/ffmpeg/ffmpeg_compat.h +@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) + + #endif + ++/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, ++ * so for now this will do. */ ++ ++#ifndef FF_MIN_BUFFER_SIZE ++# ifdef AV_INPUT_BUFFER_MIN_SIZE ++# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++# endif ++#endif ++ ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# ifdef AV_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_DCT ++# ifdef AV_CODEC_FLAG_INTERLACED_DCT ++# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_ME ++# ifdef AV_CODEC_FLAG_INTERLACED_ME ++# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME ++# endif ++#endif ++ + /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) + # define AV_CODEC_ID_NONE CODEC_ID_NONE +diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c +index a19e414..04d508a 100644 +--- a/source/blender/blenkernel/intern/writeffmpeg.c ++++ b/source/blender/blenkernel/intern/writeffmpeg.c +@@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int + c->rc_buffer_aggressivity = 1.0; + #endif + +- c->me_method = ME_EPZS; ++ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */ ++ //c->me_method = ME_EPZS; + + codec = avcodec_find_encoder(c->codec_id); + if (!codec) diff --git a/gnu/packages/patches/borg-respect-storage-quota.patch b/gnu/packages/patches/borg-respect-storage-quota.patch deleted file mode 100644 index d23d1ffc01..0000000000 --- a/gnu/packages/patches/borg-respect-storage-quota.patch +++ /dev/null @@ -1,32 +0,0 @@ -Make sure the client respects the storage quota set by the server: - -https://github.com/borgbackup/borg/issues/4093 - -Patch copied from upstream source repository: - -https://github.com/borgbackup/borg/commit/975cc33206e0e3644626fb7204c34d2157715b61 - -From 975cc33206e0e3644626fb7204c34d2157715b61 Mon Sep 17 00:00:00 2001 -From: Manu <manu@snapdragon.cc> -Date: Wed, 3 Oct 2018 23:47:36 +0800 -Subject: [PATCH] Add storage_quota for forced_result if set by serve command. - ---- - src/borg/archiver.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/borg/archiver.py b/src/borg/archiver.py -index 916725e7..279194c1 100644 ---- a/src/borg/archiver.py -+++ b/src/borg/archiver.py -@@ -4276,6 +4276,7 @@ def get_args(self, argv, cmd): - result.restrict_to_paths = forced_result.restrict_to_paths - result.restrict_to_repositories = forced_result.restrict_to_repositories - result.append_only = forced_result.append_only -+ result.storage_quota = forced_result.storage_quota - return result - - def parse_args(self, args=None): --- -2.19.1 - diff --git a/gnu/packages/patches/casync-renameat2-declaration.patch b/gnu/packages/patches/casync-renameat2-declaration.patch new file mode 100644 index 0000000000..74c2ca7b3c --- /dev/null +++ b/gnu/packages/patches/casync-renameat2-declaration.patch @@ -0,0 +1,27 @@ +Fix build failure on glibc 2.28 where 'renameat2' would end up being +declared twice: <https://github.com/systemd/casync/issues/166>. + +From 625244ca47e8ee1375d2d0092271bfd13b0913ea Mon Sep 17 00:00:00 2001 +From: Daniel Mack <daniel@zonque.org> +Date: Tue, 13 Nov 2018 17:52:48 +0100 +Subject: [PATCH] meson.build: pass -D_GNU_SOURCE when checking for functions + +As described in #166, -D_GNU_SOURCE needs to be passed to the meson function +availability checker. h/t to @tomeon for providing a link to the solution as +well. +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index f42ed16..c0f741e 100644 +--- a/meson.build ++++ b/meson.build +@@ -78,6 +78,6 @@ foreach ident : [ + ['copy_file_range', '''#include <sys/syscall.h> + #include <unistd.h>'''], + ] +- have = cc.has_function(ident[0], prefix : ident[1]) ++ have = cc.has_function(ident[0], args : '-D_GNU_SOURCE', prefix : ident[1]) + conf.set10('HAVE_' + ident[0].to_upper(), have) + endforeach diff --git a/gnu/packages/patches/ceph-detect-rocksdb.patch b/gnu/packages/patches/ceph-detect-rocksdb.patch new file mode 100644 index 0000000000..badad6d1b9 --- /dev/null +++ b/gnu/packages/patches/ceph-detect-rocksdb.patch @@ -0,0 +1,24 @@ +Help the build system find system RocksDB. + +Taken from this upstream commit: +https://github.com/ceph/ceph/commit/2ac26bd0e01fd6c82bd59936cf25c25173f7775a + +diff --git a/cmake/modules/Findrocksdb.cmake b/cmake/modules/Findrocksdb.cmake +index f8369f73fc..5926647348 100644 +--- a/cmake/modules/Findrocksdb.cmake ++++ b/cmake/modules/Findrocksdb.cmake +@@ -15,11 +15,11 @@ find_library(ROCKSDB_LIBRARIES rocksdb) + + if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") + foreach(ver "MAJOR" "MINOR" "PATCH") +- file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE ++ file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE + REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$") + string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$" +- "\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}") +- unset(${ROCKDB_VER_${ver}_LINE}) ++ "\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}") ++ unset(${ROCKSDB_VER_${ver}_LINE}) + endforeach() + set(ROCKSDB_VERSION_STRING + "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}") diff --git a/gnu/packages/patches/ceph-rocksdb-compat.patch b/gnu/packages/patches/ceph-rocksdb-compat.patch deleted file mode 100644 index 1a3c6b0b23..0000000000 --- a/gnu/packages/patches/ceph-rocksdb-compat.patch +++ /dev/null @@ -1,63 +0,0 @@ -Fix compatibility with newer versions of RocksDB. - -Adapted from this upstream patch, with some additional changes for 12.2: -https://github.com/ceph/ceph/commit/9d73a7121fdb1ae87cb1aa6f7d9d7a13f329ae68 - -diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc -index 8660afe1886d..bc0de79e23cb 100644 ---- a/src/kv/RocksDBStore.cc -+++ b/src/kv/RocksDBStore.cc -@@ -505,7 +505,7 @@ - // considering performance overhead, default is disabled - if (g_conf->rocksdb_perf) { - rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); -- rocksdb::perf_context.Reset(); -+ rocksdb::get_perf_context()->Reset(); - } - - RocksDBTransactionImpl * _t = -@@ -532,13 +532,13 @@ - utime_t write_wal_time; - utime_t write_pre_and_post_process_time; - write_wal_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000); - write_memtable_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000); - write_delay_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000); - write_pre_and_post_process_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000); - logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time); - logger->tinc(l_rocksdb_write_delay_time, write_delay_time); - logger->tinc(l_rocksdb_write_wal_time, write_wal_time); -@@ -558,7 +558,7 @@ - // considering performance overhead, default is disabled - if (g_conf->rocksdb_perf) { - rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); -- rocksdb::perf_context.Reset(); -+ rocksdb::get_perf_context()->Reset(); - } - - RocksDBTransactionImpl * _t = -@@ -586,13 +586,13 @@ - utime_t write_wal_time; - utime_t write_pre_and_post_process_time; - write_wal_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000); - write_memtable_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000); - write_delay_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000); - write_pre_and_post_process_time.set_from_double( -- static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000); -+ static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000); - logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time); - logger->tinc(l_rocksdb_write_delay_time, write_delay_time); - logger->tinc(l_rocksdb_write_wal_time, write_wal_time); diff --git a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch index 43b9984862..407bd93278 100644 --- a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch +++ b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch @@ -4,25 +4,21 @@ This test tries to walk a sysfs path and hits a null pointer exception. Expected: (dir) != (nullptr), actual: NULL vs 8-byte object <00-00 00-00 00-00 00-00> diff --git a/src/test/common/CMakeLists.txt b/src/test/common/CMakeLists.txt -index 5172663898..ac84085eaa 100644 --- a/src/test/common/CMakeLists.txt +++ b/src/test/common/CMakeLists.txt -@@ -12,15 +12,6 @@ target_link_libraries(get_command_descriptions +@@ -12,15 +12,6 @@ ${CMAKE_DL_LIBS} ) -if(HAVE_BLKID) --# unittest_blkdev --add_executable(unittest_blkdev -- test_blkdev.cc -- ) --add_ceph_unittest(unittest_blkdev ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_blkdev) --target_link_libraries(unittest_blkdev global ${BLKID_LIBRARIES}) --endif(HAVE_BLKID) +- # unittest_blkdev +- add_executable(unittest_blkdev +- test_blkdev.cc +- ) +- add_ceph_unittest(unittest_blkdev) +- target_link_libraries(unittest_blkdev ceph-common ${BLKID_LIBRARIES}) +-endif() - # unittest_bloom_filter add_executable(unittest_bloom_filter test_bloom_filter.cc --- -2.11.1 - diff --git a/gnu/packages/patches/ceph-volume-respect-PATH.patch b/gnu/packages/patches/ceph-volume-respect-PATH.patch new file mode 100644 index 0000000000..08a9a15ddd --- /dev/null +++ b/gnu/packages/patches/ceph-volume-respect-PATH.patch @@ -0,0 +1,22 @@ +Look for required tools in $PATH instead of just a handful locations. + +diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py +index b637f023a4..14516e1c65 100644 +--- a/src/ceph-volume/ceph_volume/util/system.py ++++ b/src/ceph-volume/ceph_volume/util/system.py +@@ -33,14 +33,7 @@ def generate_uuid(): + + def which(executable): + """find the location of an executable""" +- locations = ( +- '/usr/local/bin', +- '/bin', +- '/usr/bin', +- '/usr/local/sbin', +- '/usr/sbin', +- '/sbin', +- ) ++ locations = os.getenv('PATH').split(':') + + for location in locations: + executable_path = os.path.join(location, executable) diff --git a/gnu/packages/patches/clamav-config-llvm-libs.patch b/gnu/packages/patches/clamav-config-llvm-libs.patch new file mode 100644 index 0000000000..054264ee2e --- /dev/null +++ b/gnu/packages/patches/clamav-config-llvm-libs.patch @@ -0,0 +1,14 @@ +Our llvm does not contain a single top-level library, so consult llvm-config +for the libraries that need to be linked against. + +--- clamav-0.100.2/libclamav/c++/configure.ac 2018-09-19 14:29:07.000000000 -0500 ++++ clamav-0.100.2/libclamav/c++/configure.ac 2018-10-06 21:45:09.377249158 -0500 +@@ -105,7 +105,7 @@ + + if test "x$llvm_linking" = "xdynamic"; then + AC_SUBST(LLVMCONFIG_LDFLAGS, [`$llvmconfig --ldflags`]) +- AC_SUBST(LLVMCONFIG_LIBS, [-lLLVM-$llvmver]) ++ AC_SUBST(LLVMCONFIG_LIBS, [`$llvmconfig --libs $llvmcomp`]) + AC_SUBST(LLVMCONFIG_LIBFILES, []) + else + if test $llvmver_test -ge 350; then diff --git a/gnu/packages/patches/clamav-system-tomsfastmath.patch b/gnu/packages/patches/clamav-system-tomsfastmath.patch new file mode 100644 index 0000000000..07ab79f3f7 --- /dev/null +++ b/gnu/packages/patches/clamav-system-tomsfastmath.patch @@ -0,0 +1,102 @@ +From 756ff89526b5ffaa7a4f49b1bbecf2ecbd6f85f9 Mon Sep 17 00:00:00 2001 +From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> +Date: Wed, 11 Mar 2015 20:03:15 +0100 +Subject: add support for system tomsfastmath + +Patch-Name: add-support-for-system-tomsfastmath.patch +--- + configure.ac | 2 ++ + libclamav/Makefile.am | 10 ++++++++-- + libclamav/bignum.h | 6 +++++- + libclamav/xdp.c | 2 +- + m4/reorganization/libs/tomsfastmath.m4 | 12 ++++++++++++ + 5 files changed, 28 insertions(+), 4 deletions(-) + create mode 100644 m4/reorganization/libs/tomsfastmath.m4 + +--- a/configure.ac ++++ b/configure.ac +@@ -82,6 +82,7 @@ m4_include([m4/reorganization/libs/xml.m + m4_include([m4/reorganization/libs/openssl.m4]) + m4_include([m4/reorganization/libs/json.m4]) + m4_include([m4/reorganization/libs/pcre.m4]) ++m4_include([m4/reorganization/libs/tomsfastmath.m4]) + + AM_MAINTAINER_MODE + m4_include([m4/reorganization/libs/libz.m4]) +@@ -285,6 +286,7 @@ else + fi + CL_MSG_STATUS([yara ],[$enable_yara],[$enable_yara]) + CL_MSG_STATUS([fts ],[yes],[$lfs_fts_msg]) ++CL_MSG_STATUS([tomsfastmath],[yes],[$tomsfastmath_msg]) + + + # Yep, downgrading the compiler avoids the bug too: +--- a/libclamav/Makefile.am ++++ b/libclamav/Makefile.am +@@ -496,8 +496,10 @@ libclamav_la_SOURCES += yara_arena.c \ + yara_clam.h + endif + +-libclamav_la_SOURCES += bignum.h\ +- bignum_fast.h\ ++libclamav_la_SOURCES += bignum.h ++ ++if !SYSTEM_TOMSFASTMATH ++libclamav_la_SOURCES += bignum_fast.h\ + tomsfastmath/addsub/fp_add.c\ + tomsfastmath/addsub/fp_add_d.c\ + tomsfastmath/addsub/fp_addmod.c\ +@@ -579,6 +581,10 @@ libclamav_la_SOURCES += bignum.h\ + tomsfastmath/sqr/fp_sqr_comba_generic.c\ + tomsfastmath/sqr/fp_sqr_comba_small_set.c\ + tomsfastmath/sqr/fp_sqrmod.c ++else ++libclamav_la_CFLAGS += $(TOMSFASTMATH_CFLAGS) ++libclamav_la_LIBADD += $(TOMSFASTMATH_LIBS) ++endif + + .PHONY: version.h.tmp + version.c: version.h +--- a/libclamav/bignum.h ++++ b/libclamav/bignum.h +@@ -1,9 +1,13 @@ + #ifndef BIGNUM_H_ + #define BIGNUM_H_ + ++#if HAVE_SYSTEM_TOMSFASTMATH ++#include <tfm.h> ++#else + #define TFM_CHECK +- + #include "bignum_fast.h" ++#endif ++ + typedef fp_int mp_int; + #define mp_cmp fp_cmp + #define mp_toradix_n(a,b,c,d) fp_toradix_n(a,b,c,d) +--- a/libclamav/xdp.c ++++ b/libclamav/xdp.c +@@ -57,7 +57,7 @@ + #include "scanners.h" + #include "conv.h" + #include "xdp.h" +-#include "bignum_fast.h" ++#include "bignum.h" + #include "filetypes.h" + + static char *dump_xdp(cli_ctx *ctx, const char *start, size_t sz); +--- /dev/null ++++ b/m4/reorganization/libs/tomsfastmath.m4 +@@ -0,0 +1,12 @@ ++dnl Check for system tomsfastmath ++PKG_CHECK_MODULES([TOMSFASTMATH], [tomsfastmath], [have_system_tomsfastmath=yes], [have_system_tomsfastmath=no]) ++ ++AM_CONDITIONAL([SYSTEM_TOMSFASTMATH], [test "x$have_system_tomsfastmath" = "xyes"]) ++ ++if test "x$have_system_tomsfastmath" = "xyes"; then ++ AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [1], [link against system-wide tomsfastmath library]) ++ tomsfastmath_msg="External, $TOMSFASTMATH_CFLAGS $TOMSFASTMATH_LIBS" ++else ++ AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [0], [don't link against system-wide tomsfastmath library]) ++ tomsfastmath_msg="Internal" ++fi diff --git a/gnu/packages/patches/crossmap-allow-system-pysam.patch b/gnu/packages/patches/crossmap-allow-system-pysam.patch deleted file mode 100644 index 611c4ff74d..0000000000 --- a/gnu/packages/patches/crossmap-allow-system-pysam.patch +++ /dev/null @@ -1,121 +0,0 @@ -This patch modifies the build process such that the bundled copy of pysam does -not need to be built if CROSSMAP_USE_SYSTEM_PYSAM is set and the pysam module -can be imported. - -Upstream has agreed to apply the patch in the next maintenance release of -crossmap. The patch has already been uploaded to -http://sourceforge.net/projects/crossmap/files/patch/. - -diff --git a/setup.py b/setup.py ---- a/setup.py 2015-02-26 15:28:49.771189185 +0100 -+++ b/setup.py 2015-02-26 15:55:03.440327752 +0100 -@@ -19,6 +19,15 @@ - except: - have_numpy = False - -+try: -+ import pysam -+ if os.environ['CROSSMAP_USE_SYSTEM_PYSAM']: -+ have_pysam = True -+ else: -+ have_pysam = False -+except ImportError: -+ have_pysam = False -+ - if platform.system()=='Windows': - print >> sys.stderr, "Sorry, Windows platform is not supported!" - sys.exit() -@@ -165,49 +174,50 @@ - - - #================= pysam samtools ==================== -- extensions.append(Extension( -- "pysam.csamtools", -- csamtools_sources + [ "lib/pysam/%s" % x for x in ("pysam_util.c", )] +\ -- glob.glob( os.path.join( "lib/samtools", "*.pysam.c" )) +\ -- os_c_files + \ -- glob.glob( os.path.join( "lib/samtools", "*", "*.pysam.c" ) ), -- library_dirs=[], -- include_dirs=[ "lib/samtools", "lib/pysam" ] + include_os, -- libraries=[ "z", ], -- language="c", -- define_macros = [('_FILE_OFFSET_BITS','64'),('_USE_KNETFILE','')], -- )) -- -- extensions.append(Extension( -- "pysam.ctabix", -- tabix_sources + [ "lib/pysam/%s" % x for x in ( "tabix_util.c", )] +\ -- os_c_files + \ -- glob.glob( os.path.join( "lib/tabix", "*.pysam.c" ) ), -- library_dirs=[], -- include_dirs=[ "lib/tabix", "lib/pysam" ] + include_os, -- libraries=[ "z", ], -- language="c", -- define_macros = [('_FILE_OFFSET_BITS','64'), -- ('_USE_KNETFILE','')], -- )) -- -- extensions.append(Extension( -- "pysam.TabProxies", -- tabproxies_sources + os_c_files, -- library_dirs=[], -- include_dirs= include_os, -- libraries=[ "z", ], -- language="c", -- )) -- -- extensions.append(Extension( -- "pysam.cvcf", -- cvcf_sources + os_c_files, -- library_dirs=[], -- include_dirs= ["lib/tabix",] + include_os, -- libraries=[ "z", ], -- language="c", -- )) -+ if not have_pysam: -+ extensions.append(Extension( -+ "pysam.csamtools", -+ csamtools_sources + [ "lib/pysam/%s" % x for x in ("pysam_util.c", )] +\ -+ glob.glob( os.path.join( "lib/samtools", "*.pysam.c" )) +\ -+ os_c_files + \ -+ glob.glob( os.path.join( "lib/samtools", "*", "*.pysam.c" ) ), -+ library_dirs=[], -+ include_dirs=[ "lib/samtools", "lib/pysam" ] + include_os, -+ libraries=[ "z", ], -+ language="c", -+ define_macros = [('_FILE_OFFSET_BITS','64'),('_USE_KNETFILE','')], -+ )) -+ -+ extensions.append(Extension( -+ "pysam.ctabix", -+ tabix_sources + [ "lib/pysam/%s" % x for x in ( "tabix_util.c", )] +\ -+ os_c_files + \ -+ glob.glob( os.path.join( "lib/tabix", "*.pysam.c" ) ), -+ library_dirs=[], -+ include_dirs=[ "lib/tabix", "lib/pysam" ] + include_os, -+ libraries=[ "z", ], -+ language="c", -+ define_macros = [('_FILE_OFFSET_BITS','64'), -+ ('_USE_KNETFILE','')], -+ )) -+ -+ extensions.append(Extension( -+ "pysam.TabProxies", -+ tabproxies_sources + os_c_files, -+ library_dirs=[], -+ include_dirs= include_os, -+ libraries=[ "z", ], -+ language="c", -+ )) -+ -+ extensions.append(Extension( -+ "pysam.cvcf", -+ cvcf_sources + os_c_files, -+ library_dirs=[], -+ include_dirs= ["lib/tabix",] + include_os, -+ libraries=[ "z", ], -+ language="c", -+ )) - - - return extensions diff --git a/gnu/packages/patches/delly-use-system-libraries.patch b/gnu/packages/patches/delly-use-system-libraries.patch deleted file mode 100644 index 3315c2a176..0000000000 --- a/gnu/packages/patches/delly-use-system-libraries.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/Makefile 2017-04-09 12:48:15.000000000 +0200 -+++ b/Makefile 2017-06-21 14:26:02.749282787 +0200 -@@ -9,8 +9,8 @@ - - # Flags - CXX=g++ --CXXFLAGS += -isystem ${SEQTK_ROOT} -isystem ${BOOST_ROOT} -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing --LDFLAGS += -L${SEQTK_ROOT} -L${BOOST_ROOT}/stage/lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time -+CXXFLAGS += -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing -+LDFLAGS += -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time - - # Additional flags for release/debug - ifeq (${PARALLEL}, 1) -@@ -23,7 +23,7 @@ - ifeq (${STATIC}, 1) - LDFLAGS += -static -static-libgcc -pthread -lhts -lz - else -- LDFLAGS += -lhts -lz -Wl,-rpath,${SEQTK_ROOT},-rpath,${BOOST_ROOT}/stage/lib -+ LDFLAGS += -lhts -lz - endif - ifeq (${DEBUG}, 1) - CXXFLAGS += -g -O0 -fno-inline -DDEBUG -@@ -41,29 +41,17 @@ - DELLYSOURCES = $(wildcard src/*.h) $(wildcard src/*.cpp) - - # Targets --TARGETS = .htslib .bcftools .boost src/delly src/cov src/dpe -+TARGETS = src/delly src/cov src/dpe - - all: $(TARGETS) - --.htslib: $(HTSLIBSOURCES) -- cd src/htslib && make && make lib-static && cd ../../ && touch .htslib -- --.bcftools: $(HTSLIBSOURCES) -- cd src/bcftools && make && cd ../../ && touch .bcftools -- --.boost: $(BOOSTSOURCES) -- cd src/modular-boost && ./bootstrap.sh --prefix=${PWD}/src/modular-boost --without-icu --with-libraries=iostreams,filesystem,system,program_options,date_time && ./b2 && ./b2 headers && cd ../../ && touch .boost -- --src/delly: .htslib .bcftools .boost $(DELLYSOURCES) -- $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) -- --src/cov: .htslib .bcftools .boost $(DELLYSOURCES) -+src/cov: $(DELLYSOURCES) - $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) - --src/dpe: .htslib .bcftools .boost $(DELLYSOURCES) -+src/dpe: $(DELLYSOURCES) - $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) - - clean: - cd src/htslib && make clean - cd src/modular-boost && ./b2 --clean-all -- rm -f $(TARGETS) $(TARGETS:=.o) .htslib .boost .bcftools -+ rm -f $(TARGETS) $(TARGETS:=.o) diff --git a/gnu/packages/patches/elogind-glibc-2.27.patch b/gnu/packages/patches/elogind-glibc-2.27.patch deleted file mode 100644 index 4ade587b5e..0000000000 --- a/gnu/packages/patches/elogind-glibc-2.27.patch +++ /dev/null @@ -1,22 +0,0 @@ -Look for memfd_create in sys/mman.h instead of linux/memfd.h. -Needed to build with glibc-2.27. - ---- a/configure.ac 1969-12-31 19:00:00.000000000 -0500 -+++ b/configure.ac 2018-03-27 23:54:15.414589005 -0400 -@@ -360,7 +360,7 @@ - # ------------------------------------------------------------------------------ - - AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) --AC_CHECK_HEADERS([linux/memfd.h], [], []) -+AC_CHECK_HEADERS([sys/mman.h], [], []) - - AC_CHECK_HEADERS([printf.h], [have_printf_h=yes], [have_printf_h=no]) - AS_IF([test x$have_printf_h = xyes], [ -@@ -395,6 +395,7 @@ - [], [], [[ - #include <sys/types.h> - #include <unistd.h> -+#include <sys/mman.h> - #include <sys/mount.h> - #include <fcntl.h> - #include <sched.h> diff --git a/gnu/packages/patches/emacs-pdf-tools-poppler.patch b/gnu/packages/patches/emacs-pdf-tools-poppler.patch new file mode 100644 index 0000000000..0477508fa9 --- /dev/null +++ b/gnu/packages/patches/emacs-pdf-tools-poppler.patch @@ -0,0 +1,41 @@ +Fix build issue with recent Poppler: + <https://github.com/politza/pdf-tools/issues/372>. + +This combines upstream commits +6cd76dec9aece2a8daa90f17ab77fbf773157a1d..50a5297b82e26cfd52f6c00645ddc1057099d6a7 +for this file. + +diff --git a/server/poppler-hack.cc b/server/poppler-hack.cc +index 0c62f73..427f9df 100644 +--- a/server/poppler-hack.cc ++++ b/server/poppler-hack.cc +@@ -51,7 +51,10 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + double y2; + }; + +- char *_xpoppler_goo_string_to_utf8(GooString *s) ++ // This function does not modify its argument s, but for ++ // compatibility reasons (e.g. getLength in GooString.h before 2015) ++ // with older poppler code, it can't be declared as such. ++ char *_xpoppler_goo_string_to_utf8(/* const */ GooString *s) + { + char *result; + +@@ -85,7 +88,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + // Set the rectangle of an annotation. It was first added in v0.26. + void xpoppler_annot_set_rectangle (PopplerAnnot *a, PopplerRectangle *rectangle) + { +- GooString *state = a->annot->getAppearState (); ++ GooString *state = (GooString*) a->annot->getAppearState (); + char *ustate = _xpoppler_goo_string_to_utf8 (state); + + a->annot->setRect (rectangle->x1, rectangle->y1, +@@ -105,7 +108,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL); + + annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot); +- text = annot->getDate (); ++ text = (GooString*) annot->getDate (); + + return text ? _xpoppler_goo_string_to_utf8 (text) : NULL; + } diff --git a/gnu/packages/patches/emacs-realgud-fix-configure-ac.patch b/gnu/packages/patches/emacs-realgud-fix-configure-ac.patch new file mode 100644 index 0000000000..8165857c87 --- /dev/null +++ b/gnu/packages/patches/emacs-realgud-fix-configure-ac.patch @@ -0,0 +1,27 @@ +From a293690f29407ac54a218d6d20c2142e1a0319d1 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer <maxim.cournoyer@gmail.com> +Date: Wed, 31 Oct 2018 00:08:34 -0400 +Subject: [PATCH] configure.ac: Fix NO_CHECK_EMACS_PACKAGES elisp. + +Remove the extraneous trailing parenthesis. +--- + configure.ac | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index de0d932..69bcea7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,8 +25,7 @@ AC_MSG_NOTICE("Checking prerequiste packages") + $EMACS -batch -q --no-site-file -eval \ + '(dolist (package + (quote (cl-lib loc-changes load-relative test-simple))) +- (require package)) +- )' ++ (require package))' + fi + if test $? -ne 0 ; then + AC_MSG_ERROR([Can't continue until above error is corrected.]) +-- +2.19.0 + diff --git a/gnu/packages/patches/gcc-libsanitizer-fix.patch b/gnu/packages/patches/gcc-libsanitizer-fix.patch deleted file mode 100644 index 67aa44bed4..0000000000 --- a/gnu/packages/patches/gcc-libsanitizer-fix.patch +++ /dev/null @@ -1,113 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=8937b94d1a643fd9760714642296d034a45254a8 -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81066 - -This patch can be removed when gcc-6.5.0 is released - -From 8937b94d1a643fd9760714642296d034a45254a8 Mon Sep 17 00:00:00 2001 -From: doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> -Date: Thu, 7 Sep 2017 07:15:24 +0000 -Subject: [PATCH] 2017-09-07 Matthias Klose <doko@ubuntu.com> - - Backported from mainline - 2017-07-14 Jakub Jelinek <jakub@redhat.com> - - PR sanitizer/81066 - * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969. - * sanitizer_common/sanitizer_linux.cc: Likewise. - * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise. - * tsan/tsan_platform_linux.cc: Likewise. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@251828 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - libsanitizer/ChangeLog | 11 +++++++++++ - libsanitizer/sanitizer_common/sanitizer_linux.cc | 3 +-- - libsanitizer/sanitizer_common/sanitizer_linux.h | 4 +--- - .../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +- - libsanitizer/tsan/tsan_platform_linux.cc | 2 +- - 5 files changed, 15 insertions(+), 7 deletions(-) - -diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog -index 252cd09..d988b28 100644 ---- a/libsanitizer/ChangeLog -+++ b/libsanitizer/ChangeLog -@@ -1,3 +1,14 @@ -+2017-09-07 Matthias Klose <doko@ubuntu.com> -+ -+ Backported from mainline -+ 2017-07-14 Jakub Jelinek <jakub@redhat.com> -+ -+ PR sanitizer/81066 -+ * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969. -+ * sanitizer_common/sanitizer_linux.cc: Likewise. -+ * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise. -+ * tsan/tsan_platform_linux.cc: Likewise. -+ - 2017-07-04 Release Manager - - * GCC 6.4.0 released. -diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc -index 2cefa20..223d9c6 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_linux.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc -@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) { - } - #endif - --uptr internal_sigaltstack(const struct sigaltstack *ss, -- struct sigaltstack *oss) { -+uptr internal_sigaltstack(const void *ss, void *oss) { - return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss); - } - -diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h -index 4497702..1594058 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_linux.h -+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h -@@ -19,7 +19,6 @@ - #include "sanitizer_platform_limits_posix.h" - - struct link_map; // Opaque type returned by dlopen(). --struct sigaltstack; - - namespace __sanitizer { - // Dirent structure for getdents(). Note that this structure is different from -@@ -28,8 +27,7 @@ struct linux_dirent; - - // Syscall wrappers. - uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count); --uptr internal_sigaltstack(const struct sigaltstack* ss, -- struct sigaltstack* oss); -+uptr internal_sigaltstack(const void* ss, void* oss); - uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set, - __sanitizer_sigset_t *oldset); - void internal_sigfillset(__sanitizer_sigset_t *set); -diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc -index c919e4f..014162af 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc -@@ -267,7 +267,7 @@ static int TracerThread(void* argument) { - - // Alternate stack for signal handling. - InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize); -- struct sigaltstack handler_stack; -+ stack_t handler_stack; - internal_memset(&handler_stack, 0, sizeof(handler_stack)); - handler_stack.ss_sp = handler_stack_memory.data(); - handler_stack.ss_size = kHandlerStackSize; -diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc -index 09cec5f..908f4fe 100644 ---- a/libsanitizer/tsan/tsan_platform_linux.cc -+++ b/libsanitizer/tsan/tsan_platform_linux.cc -@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) { - int ExtractResolvFDs(void *state, int *fds, int nfd) { - #if SANITIZER_LINUX - int cnt = 0; -- __res_state *statp = (__res_state*)state; -+ struct __res_state *statp = (struct __res_state*)state; - for (int i = 0; i < MAXNS && cnt < nfd; i++) { - if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1) - fds[cnt++] = statp->_u._ext.nssocks[i]; --- -2.9.3 - diff --git a/gnu/packages/patches/gemma-intel-compat.patch b/gnu/packages/patches/gemma-intel-compat.patch deleted file mode 100644 index f12ec56d9b..0000000000 --- a/gnu/packages/patches/gemma-intel-compat.patch +++ /dev/null @@ -1,44 +0,0 @@ -From da1ed24209121f7b0f03f360b1029d7125a38e70 Mon Sep 17 00:00:00 2001 -From: Efraim Flashner <efraim@flashner.co.il> -Date: Tue, 4 Jul 2017 12:44:53 +0300 -Subject: [PATCH] Add NO_INTEL_COMPAT flag to Makefile. - -see also: https://github.com/xiangzhou/GEMMA/pull/47 - ---- - Makefile | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/Makefile b/Makefile -index 5bb8748..712b1ad 100644 ---- a/Makefile -+++ b/Makefile -@@ -11,6 +11,7 @@ - SYS = LNX - # Leave blank after "=" to disable; put "= 1" to enable - WITH_LAPACK = 1 -+NO_INTEL_COMPAT = - FORCE_32BIT = - FORCE_DYNAMIC = - DIST_NAME = gemma-0.96 -@@ -64,10 +65,13 @@ endif - HDR += $(SRC_DIR)/lapack.h - endif - --ifdef FORCE_32BIT -- CPPFLAGS += -m32 --else -- CPPFLAGS += -m64 -+ifdef NO_INTEL_COMPAT -+ else -+ ifdef FORCE_32BIT -+ CPPFLAGS += -m32 -+ else -+ CPPFLAGS += -m64 -+ endif - endif - - ifdef FORCE_DYNAMIC --- -2.13.2 - diff --git a/gnu/packages/patches/handbrake-pkg-config-path.patch b/gnu/packages/patches/handbrake-pkg-config-path.patch deleted file mode 100644 index 18f3953eaa..0000000000 --- a/gnu/packages/patches/handbrake-pkg-config-path.patch +++ /dev/null @@ -1,24 +0,0 @@ -Do not clobber PKG_CONFIG_PATH during configure. - ---- HandBrake-0.10.5/gtk/module.rules.orig 2016-02-11 14:14:05.000000000 -0600 -+++ HandBrake-0.10.5/gtk/module.rules 2016-10-29 22:27:50.550960848 -0500 -@@ -15,7 +15,7 @@ - set -e; cd $(GTK.src/); NOCONFIGURE=1 ./autogen.sh - set -e; cd $(GTK.build/); $(call fn.ABSOLUTE,$(GTK.src/))configure \ - $(GTK.CONFIGURE.extra) \ -- PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig \ -+ PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig$(if $(PKG_CONFIG_PATH),:)$(PKG_CONFIG_PATH) \ - CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D ?extra)" \ - LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe)" \ - --prefix=$(PREFIX) \ ---- Handbrake-0.10.5-0.77d09e9-checkout/make/include/contrib.defs 1969-12-31 18:00:00.000000000 -0600 -+++ Handbrake-0.10.5-0.77d09e9-checkout/make/include/contrib.defs 2016-11-01 13:11:43.826144311 -0500 -@@ -119,7 +119,7 @@ - endif - $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra *D)" - $(1).CONFIGURE.env.LDFLAGS = LDFLAGS="-L$$(call fn.ABSOLUTE,$(CONTRIB.build/))lib $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra.exe *D)" -- $(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig" -+ $(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig$(if $(PKG_CONFIG_PATH),:)$(PKG_CONFIG_PATH)" - - $(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LD !LDFLAGS !PKG_CONFIG_PATH !LOCAL_PATH !CROSS - $(1).CONFIGURE.env = $$(call fn.ARGS,$(1).CONFIGURE.env,$$($(1).CONFIGURE.env.args)) diff --git a/gnu/packages/patches/hplip-remove-imageprocessor.patch b/gnu/packages/patches/hplip-remove-imageprocessor.patch new file mode 100644 index 0000000000..cde3ecba2d --- /dev/null +++ b/gnu/packages/patches/hplip-remove-imageprocessor.patch @@ -0,0 +1,232 @@ +This patch is based heavily on the Debian patch. + +https://salsa.debian.org/printing-team/hplip/raw/debian/3.18.10+dfsg0-1/debian/patches/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch + +--- + Makefile.am | 22 +++------------------- + Makefile.in | 33 +++++---------------------------- + prnt/hpcups/HPCupsFilter.cpp | 21 --------------------- + 3 files changed, 8 insertions(+), 68 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ef6480f..ecada5c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER + dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py + endif #HPLIP_CLASS_DRIVER + +-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so ++dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template + dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv + + if !HPLIP_CLASS_DRIVER +@@ -590,11 +590,10 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp + prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ + prnt/hpcups/genPCLm.h \ + common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ +- prnt/hpcups/ImageProcessor.h ++ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp + + hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) +-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) ++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) + #else + #hpcupsdir = $(cupsfilterdir) + #hpcups_PROGRAMS = hpcups +@@ -679,21 +678,10 @@ printpluginsdir=$(cupsfilterdir) + + + dist_filter_DATA = hpcups hpps dat2drv +-dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so + endif #HPLIP_CLASS_DRIVER + + install-data-hook: + if HPLIP_BUILD +- if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \ +- cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \ +- chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \ +- ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \ +- fi; \ +- if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \ +- cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \ +- chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \ +- ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ +- fi + if !HPLIP_CLASS_DRIVER + # If scanner build, add hpaio entry to sane dll.conf. + if [ "$(scan_build)" = "yes" ]; then \ +@@ -874,10 +862,6 @@ if HPLIP_CLASS_DRIVER + rm -rf $(distdir)/setup.py + rm -rf $(distdir)/systray.py + rm -rf $(distdir)/timedate.py +- rm -rf $(distdir)/prnt/plugins/lj-arm32.so +- rm -rf $(distdir)/prnt/plugins/lj-arm64.so +- rm -rf $(distdir)/prnt/plugins/lj-x86_32.so +- rm -rf $(distdir)/prnt/plugins/lj-x86_64.so + rm -rf $(distdir)/hpijs-drv + rm -rf $(distdir)/prnt/hpcups/ + rm -rf $(distdir)/prnt/ps/ +diff --git a/Makefile.in b/Makefile.in +index 910a268..cd44203 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -103,7 +103,7 @@ DIST_COMMON = $(am__configure_deps) \ + + # ip library + @HPLIP_BUILD_TRUE@am__append_12 = libhpip.la +-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so ++@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_14 = dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@am__append_15 = scan/sane/hpaio.desc \ + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ installer/text_install.py \ +@@ -500,8 +500,7 @@ am__hpcups_SOURCES_DIST = prnt/hpcups/HPCupsFilter.cpp \ + prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ + prnt/hpcups/genPCLm.h common/utils.c common/utils.h \ + prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ +- prnt/hpcups/ImageProcessor.h ++ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp + @HPCUPS_INSTALL_TRUE@am_hpcups_OBJECTS = \ + @HPCUPS_INSTALL_TRUE@ hpcups-HPCupsFilter.$(OBJEXT) \ + @HPCUPS_INSTALL_TRUE@ hpcups-dbuscomm.$(OBJEXT) \ +@@ -723,8 +722,7 @@ am__dist_locatedriver_DATA_DIST = locatedriver + am__dist_models_DATA_DIST = data/models/models.dat + am__dist_noinst_DATA_DIST = prnt/drv/hpijs.drv.in.template \ + prnt/drv/hpcups.drv.in.template \ +- prnt/hpcups/libImageProcessor-x86_64.so \ +- prnt/hpcups/libImageProcessor-x86_32.so scan/sane/hpaio.desc \ ++ scan/sane/hpaio.desc \ + installer/text_install.py data/localization/hplip_de.ts \ + data/localization/hplip_es.ts data/localization/hplip_fr.ts \ + data/localization/hplip_it.ts data/localization/hplip_pt.ts \ +@@ -1932,11 +1930,6 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-designjet_z6810ps_42in-ps.ppd.gz \ + ppd/classppd/ps/hp-postscript-inkjet.ppd.gz \ + ppd/classppd/ps/hp-postscript-laserjet-pro.ppd.gz \ + ppd/classppd/ps/hp-postscript-laserjet.ppd.gz +-am__dist_printplugins_DATA_DIST = prnt/plugins/hbpl1-arm32.so \ +- prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so \ +- prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so \ +- prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so \ +- prnt/plugins/lj-x86_64.so + am__dist_prnt_DATA_DIST = prnt/cups.py prnt/__init__.py prnt/ldl.py \ + prnt/pcl.py prnt/colorcal.py + am__dist_rules_DATA_DIST = data/rules/56-hpmud.rules \ +@@ -4665,11 +4658,10 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpijs + @HPCUPS_INSTALL_TRUE@ prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ + @HPCUPS_INSTALL_TRUE@ prnt/hpcups/genPCLm.h \ + @HPCUPS_INSTALL_TRUE@ common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +-@HPCUPS_INSTALL_TRUE@ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ +-@HPCUPS_INSTALL_TRUE@ prnt/hpcups/ImageProcessor.h ++@HPCUPS_INSTALL_TRUE@ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp + + @HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) +-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) ++@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) + #else + #hpcupsdir = $(cupsfilterdir) + #hpcups_PROGRAMS = hpcups +@@ -4717,7 +4709,6 @@ ppddir = $(hpppddir) + @HPLIP_CLASS_DRIVER_TRUE@filterdir = $(cupsfilterdir) + @HPLIP_CLASS_DRIVER_TRUE@printpluginsdir = $(cupsfilterdir) + @HPLIP_CLASS_DRIVER_TRUE@dist_filter_DATA = hpcups hpps dat2drv +-@HPLIP_CLASS_DRIVER_TRUE@dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so + all: all-am + + .SUFFIXES: +@@ -9380,16 +9371,6 @@ uninstall-am: uninstall-apparmor_abstractionDATA \ + + + install-data-hook: +-@HPLIP_BUILD_TRUE@ if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \ +-@HPLIP_BUILD_TRUE@ cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \ +-@HPLIP_BUILD_TRUE@ chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \ +-@HPLIP_BUILD_TRUE@ ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \ +-@HPLIP_BUILD_TRUE@ fi; \ +-@HPLIP_BUILD_TRUE@ if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \ +-@HPLIP_BUILD_TRUE@ cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \ +-@HPLIP_BUILD_TRUE@ chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \ +-@HPLIP_BUILD_TRUE@ ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ +-@HPLIP_BUILD_TRUE@ fi + # If scanner build, add hpaio entry to sane dll.conf. + @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ if [ "$(scan_build)" = "yes" ]; then \ + @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \ +@@ -9556,10 +9537,6 @@ dist-hook: + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/setup.py + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/systray.py + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/timedate.py +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-arm32.so +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-arm64.so +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-x86_32.so +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-x86_64.so + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/hpijs-drv + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/hpcups/ + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/ps/ +diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp +index 5b282d8..0bacfaf 100644 +--- a/prnt/hpcups/HPCupsFilter.cpp ++++ b/prnt/hpcups/HPCupsFilter.cpp +@@ -31,7 +31,6 @@ + \*****************************************************************************/ + + #include "HPCupsFilter.h" +-#include "ImageProcessor.h" + + #include <signal.h> + #include <sys/wait.h> +@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + + + sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); +- image_processor_t* imageProcessor = imageProcessorCreate(); + + while (cupsRasterReadHeader2(cups_raster, &cups_header)) + { + +- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); +- } +- + current_page_number++; + + if (current_page_number == 1) { +@@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + color_raster = rgbRaster; + black_raster = kRaster; + +- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); +- } +- +- + if ((y == 0) && !is_ljmono) { + //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer + //may not skip blank lines before actual data +@@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + } + } // for() loop end + +- result = imageProcessorEndPage(imageProcessor); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); +- } +- +- + m_Job.NewPage(); + if (err != NO_ERROR) { + break; +@@ -800,8 +781,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + rgbRaster = NULL; + } + +- imageProcessorDestroy(imageProcessor); +- + unlink(hpPreProcessedRasterFile); + return ret_status; + } +-- +2.19.1 + diff --git a/gnu/packages/patches/icecat-CVE-2018-12383.patch b/gnu/packages/patches/icecat-CVE-2018-12383.patch deleted file mode 100644 index 17ca0f3773..0000000000 --- a/gnu/packages/patches/icecat-CVE-2018-12383.patch +++ /dev/null @@ -1,103 +0,0 @@ -Based on upstream changeset: - https://hg.mozilla.org/releases/mozilla-esr60/rev/300efdbc9fe1 -but with the git binary patch and related test changes omitted, -and adapted to apply cleanly to GNU IceCat. - -# HG changeset patch -# User David Keeler <dkeeler@mozilla.com> -# Date 1531860660 25200 -# Node ID 300efdbc9fe1f9165428c7934861033935b5abfa -# Parent 80a4a7ef281374dbb2afda8edac54665b14b9ef8 -Bug 1475775 - Clean up old NSS DB file after upgrade if necessary. r=franziskus, r=mattn, a=RyanVM - -Reviewers: franziskus, mattn - -Bug #: 1475775 - -Differential Revision: https://phabricator.services.mozilla.com/D2202 - -diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp ---- a/security/manager/ssl/nsNSSComponent.cpp -+++ b/security/manager/ssl/nsNSSComponent.cpp -@@ -1935,16 +1935,61 @@ AttemptToRenameBothPKCS11ModuleDBVersion - NS_NAMED_LITERAL_CSTRING(sqlModuleDBFilename, "pkcs11.txt"); - nsresult rv = AttemptToRenamePKCS11ModuleDB(profilePath, - legacyModuleDBFilename); - if (NS_FAILED(rv)) { - return rv; - } - return AttemptToRenamePKCS11ModuleDB(profilePath, sqlModuleDBFilename); - } -+ -+// When we changed from the old dbm database format to the newer sqlite -+// implementation, the upgrade process left behind the existing files. Suppose a -+// user had not set a password for the old key3.db (which is about 99% of -+// users). After upgrading, both the old database and the new database are -+// unprotected. If the user then sets a password for the new database, the old -+// one will not be protected. In this scenario, we should probably just remove -+// the old database (it would only be relevant if the user downgraded to a -+// version of IceCat before 58, but we have to trade this off against the -+// user's old private keys being unexpectedly unprotected after setting a -+// password). -+// This was never an issue on Android because we always used the new -+// implementation. -+static void -+MaybeCleanUpOldNSSFiles(const nsACString& profilePath) -+{ -+ UniquePK11SlotInfo slot(PK11_GetInternalKeySlot()); -+ if (!slot) { -+ return; -+ } -+ // Unfortunately we can't now tell the difference between "there already was a -+ // password when the upgrade happened" and "there was not a password but then -+ // the user added one after upgrading". -+ bool hasPassword = PK11_NeedLogin(slot.get()) && -+ !PK11_NeedUserInit(slot.get()); -+ if (!hasPassword) { -+ return; -+ } -+ nsCOMPtr<nsIFile> dbFile = do_CreateInstance("@mozilla.org/file/local;1"); -+ if (!dbFile) { -+ return; -+ } -+ nsresult rv = dbFile->InitWithNativePath(profilePath); -+ if (NS_FAILED(rv)) { -+ return; -+ } -+ NS_NAMED_LITERAL_CSTRING(keyDBFilename, "key3.db"); -+ rv = dbFile->AppendNative(keyDBFilename); -+ if (NS_FAILED(rv)) { -+ return; -+ } -+ // Since this isn't a directory, the `recursive` argument to `Remove` is -+ // irrelevant. -+ Unused << dbFile->Remove(false); -+} - #endif // ifndef ANDROID - - // Given a profile directory, attempt to initialize NSS. If nocertdb is true, - // (or if we don't have a profile directory) simply initialize NSS in no DB mode - // and return. Otherwise, first attempt to initialize in read/write mode, and - // then read-only mode if that fails. If both attempts fail, we may be failing - // to initialize an NSS DB collection that has FIPS mode enabled. Attempt to - // ascertain if this is the case, and if so, rename the offending PKCS#11 module -@@ -1966,16 +2011,19 @@ InitializeNSSWithFallbacks(const nsACStr - - // Try read/write mode. If we're in safeMode, we won't load PKCS#11 modules. - #ifndef ANDROID - PRErrorCode savedPRErrorCode1; - #endif // ifndef ANDROID - SECStatus srv = ::mozilla::psm::InitializeNSS(profilePath, false, !safeMode); - if (srv == SECSuccess) { - MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("initialized NSS in r/w mode")); -+#ifndef ANDROID -+ MaybeCleanUpOldNSSFiles(profilePath); -+#endif // ifndef ANDROID - return NS_OK; - } - #ifndef ANDROID - savedPRErrorCode1 = PR_GetError(); - PRErrorCode savedPRErrorCode2; - #endif // ifndef ANDROID - // That failed. Try read-only mode. - srv = ::mozilla::psm::InitializeNSS(profilePath, true, !safeMode); diff --git a/gnu/packages/patches/jq-CVE-2015-8863.patch b/gnu/packages/patches/jq-CVE-2015-8863.patch deleted file mode 100644 index 20b3bb3f06..0000000000 --- a/gnu/packages/patches/jq-CVE-2015-8863.patch +++ /dev/null @@ -1,45 +0,0 @@ -Fix CVE-2015-8863 (Off-by-one error in the tokenadd function in -jv_parse.c in jq allows remote attackers to cause a denial of service -(crash) via a long JSON-encoded number, which triggers a heap-based -buffer overflow): - -<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8863> - -Copied from upstream code repository: - -<https://github.com/stedolan/jq/commit/8eb1367ca44e772963e704a700ef72ae2e12babd> - -From 8eb1367ca44e772963e704a700ef72ae2e12babd Mon Sep 17 00:00:00 2001 -From: Nicolas Williams <nico@cryptonector.com> -Date: Sat, 24 Oct 2015 17:24:57 -0500 -Subject: [PATCH] Heap buffer overflow in tokenadd() (fix #105) - -This was an off-by one: the NUL terminator byte was not allocated on -resize. This was triggered by JSON-encoded numbers longer than 256 -bytes. ---- - jv_parse.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/jv_parse.c b/jv_parse.c -index 3102ed4..84245b8 100644 ---- a/jv_parse.c -+++ b/jv_parse.c -@@ -383,7 +383,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) { - - static void tokenadd(struct jv_parser* p, char c) { - assert(p->tokenpos <= p->tokenlen); -- if (p->tokenpos == p->tokenlen) { -+ if (p->tokenpos >= (p->tokenlen - 1)) { - p->tokenlen = p->tokenlen*2 + 256; - p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen); - } -@@ -485,7 +485,7 @@ static pfunc check_literal(struct jv_parser* p) { - TRY(value(p, v)); - } else { - // FIXME: better parser -- p->tokenbuf[p->tokenpos] = 0; // FIXME: invalid -+ p->tokenbuf[p->tokenpos] = 0; - char* end = 0; - double d = jvp_strtod(&p->dtoa, p->tokenbuf, &end); - if (end == 0 || *end != 0) diff --git a/gnu/packages/patches/libgit2-oom-test.patch b/gnu/packages/patches/libgit2-oom-test.patch new file mode 100644 index 0000000000..9667d1c0da --- /dev/null +++ b/gnu/packages/patches/libgit2-oom-test.patch @@ -0,0 +1,62 @@ +Fix a test failure on 32-bit platforms as reported +at <https://github.com/libgit2/libgit2/issues/4868>. + +From 415a8ae9c9b6ac18f0524b6af8e58408b426457d Mon Sep 17 00:00:00 2001 +From: Edward Thomson <ethomson@edwardthomson.com> +Date: Thu, 13 Sep 2018 13:27:07 +0100 +Subject: [PATCH] tests: don't run buf::oom on 32-bit systems + +On a 32-bit Linux systems, the value large enough to make malloc +guarantee a failure is also large enough that valgrind considers it +"fishy". Skip this test on those systems entirely. +--- + tests/buf/oom.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/tests/buf/oom.c b/tests/buf/oom.c +index 2741a8ddf2..ec3bad9979 100644 +--- a/tests/buf/oom.c ++++ b/tests/buf/oom.c +@@ -11,12 +11,8 @@ + */ + #if defined(GIT_ARCH_64) && defined(__linux__) + # define TOOBIG 0x0fffffffffffffff +-#elif defined(__linux__) +-# define TOOBIG 0x0fffffff + #elif defined(GIT_ARCH_64) + # define TOOBIG 0xffffffffffffff00 +-#else +-# define TOOBIG 0xffffff00 + #endif + + /** +@@ -25,13 +21,18 @@ + * will fail. And because the git_buf_grow() wrapper always + * sets mark_oom, the code in git_buf_try_grow() will free + * the internal buffer and set it to git_buf__oom. +- * ++ * + * We initialized the internal buffer to (the static variable) + * git_buf__initbuf. The purpose of this test is to make sure + * that we don't try to free the static buffer. ++ * ++ * Skip this test entirely on 32-bit platforms; a buffer large enough ++ * to guarantee malloc failures is so large that valgrind considers ++ * it likely to be an error. + */ + void test_buf_oom__grow(void) + { ++#ifdef GIT_ARCH_64 + git_buf buf = GIT_BUF_INIT; + + git_buf_clear(&buf); +@@ -40,6 +41,9 @@ void test_buf_oom__grow(void) + cl_assert(git_buf_oom(&buf)); + + git_buf_free(&buf); ++#else ++ cl_skip(); ++#endif + } + + void test_buf_oom__grow_by(void) diff --git a/gnu/packages/patches/liblxqt-include.patch b/gnu/packages/patches/liblxqt-include.patch deleted file mode 100644 index 4e8cf04789..0000000000 --- a/gnu/packages/patches/liblxqt-include.patch +++ /dev/null @@ -1,14 +0,0 @@ -Patch to fix build with Qt 5.5, taken from upstream: - https://github.com/lxde/liblxqt/commit/7303ea207de0771d6f450a31ec4a1ce69202869b - -diff -u -r liblxqt-0.9.0.orig/lxqtnotification.h liblxqt-0.9.0/lxqtnotification.h ---- liblxqt-0.9.0.orig/lxqtnotification.h 2015-07-27 22:49:05.365166482 +0200 -+++ liblxqt-0.9.0/lxqtnotification.h 2015-07-27 22:49:36.897606619 +0200 -@@ -25,6 +25,7 @@ - #ifndef LXQTNOTIFICATION_H - #define LXQTNOTIFICATION_H - -+#include <QObject> - #include <QStringList> - #include "lxqtglobals.h" - diff --git a/gnu/packages/patches/libopenshot-tests-with-system-libs.patch b/gnu/packages/patches/libopenshot-tests-with-system-libs.patch new file mode 100644 index 0000000000..a18c4b8bba --- /dev/null +++ b/gnu/packages/patches/libopenshot-tests-with-system-libs.patch @@ -0,0 +1,95 @@ +Combination of two patches that fix libopenshot tests when built with +system-provided ffmpeg and jsoncpp. See + + https://github.com/OpenShot/libopenshot/pull/163 + +From 0d7691ab53433e1583f6a66ea96683b0f7af8a57 Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" <ferdnyc@gmail.com> +Date: Mon, 17 Sep 2018 14:04:40 -0400 +Subject: [PATCH] tests/CMakeFiles: Use FFMpeg like src/ + +--- + tests/CMakeLists.txt | 32 +++++++++++++++++++++++++++++++- + 1 file changed, 31 insertions(+), 1 deletion(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 2c45550..4df8464 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -79,7 +79,37 @@ ENDIF (ImageMagick_FOUND) + FIND_PACKAGE(FFmpeg REQUIRED) + + # Include FFmpeg headers (needed for compile) +-include_directories(${FFMPEG_INCLUDE_DIR}) ++message('AVCODEC_FOUND: ${AVCODEC_FOUND}') ++message('AVCODEC_INCLUDE_DIRS: ${AVCODEC_INCLUDE_DIRS}') ++message('AVCODEC_LIBRARIES: ${AVCODEC_LIBRARIES}') ++ ++IF (AVCODEC_FOUND) ++ include_directories(${AVCODEC_INCLUDE_DIRS}) ++ENDIF (AVCODEC_FOUND) ++IF (AVDEVICE_FOUND) ++ include_directories(${AVDEVICE_INCLUDE_DIRS}) ++ENDIF (AVDEVICE_FOUND) ++IF (AVFORMAT_FOUND) ++ include_directories(${AVFORMAT_INCLUDE_DIRS}) ++ENDIF (AVFORMAT_FOUND) ++IF (AVFILTER_FOUND) ++ include_directories(${AVFILTER_INCLUDE_DIRS}) ++ENDIF (AVFILTER_FOUND) ++IF (AVUTIL_FOUND) ++ include_directories(${AVUTIL_INCLUDE_DIRS}) ++ENDIF (AVUTIL_FOUND) ++IF (POSTPROC_FOUND) ++ include_directories(${POSTPROC_INCLUDE_DIRS}) ++ENDIF (POSTPROC_FOUND) ++IF (SWSCALE_FOUND) ++ include_directories(${SWSCALE_INCLUDE_DIRS}) ++ENDIF (SWSCALE_FOUND) ++IF (SWRESAMPLE_FOUND) ++ include_directories(${SWRESAMPLE_INCLUDE_DIRS}) ++ENDIF (SWRESAMPLE_FOUND) ++IF (AVRESAMPLE_FOUND) ++ include_directories(${AVRESAMPLE_INCLUDE_DIRS}) ++ENDIF (AVRESAMPLE_FOUND) + + ################# LIBOPENSHOT-AUDIO ################### + # Find JUCE-based openshot Audio libraries + + +From e9e85cdfd036587adb86341f7f81619dc69f102c Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" <ferdnyc@gmail.com> +Date: Mon, 17 Sep 2018 19:23:25 -0400 +Subject: [PATCH] Use system jsoncpp in tests, too + +The tests/ build needs to use the same jsoncpp as the src/ build, +or tests in Clip_Tests.cpp can fail. +--- + tests/CMakeLists.txt | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 4df8464..a1a0356 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -180,12 +180,18 @@ endif(OPENMP_FOUND) + # Find ZeroMQ library (used for socket communication & logging) + FIND_PACKAGE(ZMQ REQUIRED) + +-# Include FFmpeg headers (needed for compile) ++# Include ZeroMQ headers (needed for compile) + include_directories(${ZMQ_INCLUDE_DIRS}) + + ################### JSONCPP ##################### + # Include jsoncpp headers (needed for JSON parsing) +-include_directories("../thirdparty/jsoncpp/include") ++if (USE_SYSTEM_JSONCPP) ++ find_package(JsonCpp REQUIRED) ++ include_directories(${JSONCPP_INCLUDE_DIRS}) ++else() ++ message("Using embedded JsonCpp") ++ include_directories("../thirdparty/jsoncpp/include") ++endif(USE_SYSTEM_JSONCPP) + + IF (NOT DISABLE_TESTS) + ############### SET TEST SOURCE FILES ################# diff --git a/gnu/packages/patches/lirc-reproducible-build.patch b/gnu/packages/patches/lirc-reproducible-build.patch new file mode 100644 index 0000000000..20f9344715 --- /dev/null +++ b/gnu/packages/patches/lirc-reproducible-build.patch @@ -0,0 +1,72 @@ +Build Lirc reproducibly. + +https://sourceforge.net/p/lirc/tickets/301/ +https://sourceforge.net/p/lirc/git/merge-requests/33/ +https://sourceforge.net/p/lirc/git/merge-requests/34/ +https://sourceforge.net/p/lirc/git/merge-requests/36/ + +Index: lirc-0.10.1/tools/lirc-lsplugins.cpp +=================================================================== +--- lirc-0.10.1.orig/tools/lirc-lsplugins.cpp ++++ lirc-0.10.1/tools/lirc-lsplugins.cpp +@@ -415,10 +415,9 @@ static void print_header(void) + static void print_yaml_header(void) + { + static const char* const YAML_HEADER = +- "#\n# Generated by lirc-lsplugins --yaml (%s) at %s#\n "; +- const time_t now = time(NULL); ++ "#\n# Generated by lirc-lsplugins --yaml (%s)#\n "; + +- printf(YAML_HEADER, VERSION, ctime(&now)); ++ printf(YAML_HEADER, VERSION); + printf("\ndrivers:\n"); + } + +Index: lirc-0.10.1/python-pkg/lirc/database.py +=================================================================== +--- lirc-0.10.1.orig/python-pkg/lirc/database.py ++++ lirc-0.10.1/python-pkg/lirc/database.py +@@ -156,7 +156,7 @@ class Database(object): + d['device_hint'] = hint + + configs = {} +- for path in glob.glob(configdir + '/*.conf'): ++ for path in sorted(glob.glob(configdir + '/*.conf')): + with open(path) as f: + cf = yaml.load(f.read()) + configs[cf['config']['id']] = cf['config'] +Index: lirc-0.10.1/tools/irdb-get +=================================================================== +--- lirc-0.10.1.orig/tools/irdb-get ++++ lirc-0.10.1/tools/irdb-get +@@ -9,7 +9,6 @@ import fnmatch + import os + import os.path + import sys +-import time + import urllib.error # pylint: disable=no-name-in-module,F0401,E0611 + import urllib.request # pylint: disable=no-name-in-module,F0401,E0611 + +@@ -193,7 +192,7 @@ def do_yaml_config(): + lircmd_by_driver[driver].append("%s/%s" % (tokens[0], tokens[2])) + + print("#") +- print("# Created by 'irdb-get yaml-config' at " + time.ctime()) ++ print("# Created by 'irdb-get yaml-config'") + print("#") + print("\nlircd_by_driver:") + print_yaml_dict(lircd_by_driver) +Index: lirc-0.10.1/tools/lirc-make-devinput +=================================================================== +--- lirc-0.10.1.orig/tools/lirc-make-devinput ++++ lirc-0.10.1/tools/lirc-make-devinput +@@ -61,8 +61,7 @@ if test -n "$lirc_map"; then + fi + + +-echo "# Generated by $(basename $0) on $(uname -r)" +-echo "# Date: $(date)" ++echo "# Generated by $(basename $0)" + cat <<EOF + + begin remote diff --git a/gnu/packages/patches/mailutils-uninitialized-memory.patch b/gnu/packages/patches/mailutils-uninitialized-memory.patch deleted file mode 100644 index ef4daf94cb..0000000000 --- a/gnu/packages/patches/mailutils-uninitialized-memory.patch +++ /dev/null @@ -1,87 +0,0 @@ -Without this patch, the MH test suite would fail when building with -glibc 2.26, with 'ali' segfaulting like this: - - Core was generated by `/tmp/guix-build-mailutils-3.4.drv-0/mailutils-3.4/mh/.libs/ali -a ./Mail/mh_ali'. - Program terminated with signal SIGSEGV, Segmentation fault. - #0 0x00007f8eac263a14 in hash ( - name=0x72642e342e332d73 <error: Cannot access memory at address 0x72642e342e332d73>, hash_num=0) at assoc.c:102 - 102 for (i = 0; *name; name++) - (gdb) bt - #0 0x00007f8eac263a14 in hash ( - name=0x72642e342e332d73 <error: Cannot access memory at address 0x72642e342e332d73>, hash_num=0) at assoc.c:102 - #1 0x00007f8eac263e6b in assoc_find_slot (assoc=0xaa59e0, - name=0x72642e342e332d73 <error: Cannot access memory at address 0x72642e342e332d73>, install=0x0, slot=0x7ffcddcbf2b8) at assoc.c:219 - #2 0x00007f8eac264124 in mu_assoc_lookup (assoc=0xaa59e0, - name=0x72642e342e332d73 <error: Cannot access memory at address 0x72642e342e332d73>, dataptr=0x7ffcddcbf2e0) at assoc.c:308 - #3 0x00007f8eac29e8ac in mu_ident_deref ( - name=0x72642e342e332d73 <error: Cannot access memory at address 0x72642e342e332d73>) at ident.c:98 - #4 0x00007f8eac29f8a6 in mu_locus_point_deinit (pt=0xaa5718) at locus.c:48 - #5 0x00007f8eac29fa1b in mu_locus_range_deinit (lr=0xaa5718) at locus.c:99 - #6 0x00007f8eac29f9db in mu_locus_range_copy (dest=0xaa5718, - src=0x622be0 <ali_yylloc>) at locus.c:89 - #7 0x0000000000408a2a in push_source (name=0xaa74bc "mh_aliases2", fail=1) - at mh_alias_lex.l:170 - -commit b330af9008e4c9168b379867b854f5900a539ad7 -Author: Sergey Poznyakoff <gray@gnu.org> -Date: Sat Nov 18 10:15:48 2017 +0200 - - Fix the use of uninitialized memory - - * mh/mh_alias_lex.l (push_source): Initialize locus range prior to copying - to it. - * libmailutils/cfg/parser.y (mu_cfg_tree_create_node): Likewise. - * libmu_sieve/util.c: (mu_sieve_value_create): Likewise. - -diff --git a/libmailutils/cfg/parser.y b/libmailutils/cfg/parser.y -index 4503c7781..3436b8d90 100644 ---- a/libmailutils/cfg/parser.y -+++ b/libmailutils/cfg/parser.y -@@ -1134,10 +1134,9 @@ mu_cfg_tree_create_node (struct mu_cfg_tree *tree, - - np = mu_alloc (size); - np->type = type; -+ mu_locus_range_init (&np->locus); - if (loc) - mu_locus_range_copy (&np->locus, loc); -- else -- memset (&np->locus, 0, sizeof np->locus); - p = (char*) (np + 1); - np->tag = p; - strcpy (p, tag); -diff --git a/libmu_sieve/sieve-lex.l b/libmu_sieve/sieve-lex.l -index fd145bfe1..f14e80194 100644 ---- a/libmu_sieve/sieve-lex.l -+++ b/libmu_sieve/sieve-lex.l -@@ -190,6 +190,7 @@ push_source (const char *name) - { - ctx = mu_sieve_malloc (mu_sieve_machine, sizeof (*ctx)); - ctx->trk = trk; -+ mu_locus_range_init (&ctx->incl_range); - mu_locus_range_copy (&ctx->incl_range, &yylloc); - ctx->i_node = sieve_source_inode; - ctx->input = input_stream; -diff --git a/libmu_sieve/util.c b/libmu_sieve/util.c -index 8d62a60c2..7d71b5509 100644 ---- a/libmu_sieve/util.c -+++ b/libmu_sieve/util.c -@@ -55,6 +55,7 @@ mu_sieve_value_create (mu_sieve_machine_t mach, mu_sieve_data_type type, - val->locus.end.mu_line = locus->end.mu_line; - val->locus.end.mu_col = locus->end.mu_col; - -+ mu_locus_range_init (&val->locus); - mu_locus_range_copy (&val->locus, locus); - switch (type) - { -diff --git a/mh/mh_alias_lex.l b/mh/mh_alias_lex.l -index 371353ed3..b97264b38 100644 ---- a/mh/mh_alias_lex.l -+++ b/mh/mh_alias_lex.l -@@ -167,6 +167,7 @@ push_source (const char *name, int fail) - { - ctx = mu_alloc (sizeof (*ctx)); - ctx->trk = trk; -+ mu_locus_range_init (&ctx->incl_range); - mu_locus_range_copy (&ctx->incl_range, &yylloc); - ctx->exec_p = exec_p; - ctx->i_node = ali_source_inode; diff --git a/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch b/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch new file mode 100644 index 0000000000..505cbd23fe --- /dev/null +++ b/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch @@ -0,0 +1,50 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Wed, 31 Oct 2018 02:24:26 +0100 +Subject: [PATCH] gnu: meandmyshadow: Define paths earlier. + +The following patch was taken verbatim from the upstream repository[0] +and will be included in the next release. + +[0]: https://github.com/acmepjz/meandmyshadow/pull/29 +--- +From 4847e6b5755258a1e0534f2d4b91dce2ce3b459e Mon Sep 17 00:00:00 2001 +From: Dmitry Marakasov <amdmi3@amdmi3.ru> +Date: Wed, 24 Oct 2018 23:31:19 +0300 +Subject: [PATCH] Define paths earlier in CMakeLists.txt + +At the very least, paths should be defined before Configure_File(), otherwise empty DATAROOTDIR is substituted in config.h +--- + CMakeLists.txt | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e79639a..6321d9d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,6 +2,13 @@ Project (meandmyshadow) + CMake_Minimum_Required (VERSION 3.1) + Set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + ++#Path options ++Set (BINDIR "bin" CACHE STRING "Where to install binaries") ++Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location") ++Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.") ++Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.") ++ ++#Options + Option (DEBUG_MODE "Compile the game with debug mode enabled" OFF) + Option (DISABLED_DEBUG_STUFF "Enable this you'll see a lot of annoying script debug messages which will lag the game." OFF) + +@@ -164,12 +171,6 @@ Target_Link_Libraries ( + ${LUA_LIBRARIES} + ) + +-#Path options +-Set (BINDIR "bin" CACHE STRING "Where to install binaries") +-Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location") +-Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.") +-Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.") +- + #Install locations + Install (DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${DATAROOTDIR}/meandmyshadow/) + Install (FILES AUTHORS DESTINATION ${DATAROOTDIR}/meandmyshadow/) diff --git a/gnu/packages/patches/mono-mdoc-timestamping.patch b/gnu/packages/patches/mono-mdoc-timestamping.patch new file mode 100644 index 0000000000..d5191a93eb --- /dev/null +++ b/gnu/packages/patches/mono-mdoc-timestamping.patch @@ -0,0 +1,15 @@ +--- mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs.orig 2018-11-26 22:16:25.008879747 +0100 ++++ mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs 2018-11-26 22:21:53.969770985 +0100 +@@ -74,6 +74,12 @@ + id = GetNewCode (); + + ZipEntry entry = new ZipEntry (id); ++ var SOURCE_DATE_EPOCH_string = Environment.GetEnvironmentVariable("SOURCE_DATE_EPOCH"); ++ if (SOURCE_DATE_EPOCH_string != null) ++ { ++ var SOURCE_DATE_EPOCH = Convert.ToInt64(SOURCE_DATE_EPOCH_string); ++ entry.DateTime = new DateTime(SOURCE_DATE_EPOCH, DateTimeKind.Utc); ++ } + zipOutput.PutNextEntry (entry); + } + diff --git a/gnu/packages/patches/myrepos-CVE-2018-7032.patch b/gnu/packages/patches/myrepos-CVE-2018-7032.patch deleted file mode 100644 index ce9493e5f9..0000000000 --- a/gnu/packages/patches/myrepos-CVE-2018-7032.patch +++ /dev/null @@ -1,69 +0,0 @@ -http://source.myrepos.branchable.com/?p=source.git;a=patch;h=40a3df21c73f1bb1b6915cc6fa503f50814664c8 -This can be removed with the next release. It was modified slightly to apply - -From 40a3df21c73f1bb1b6915cc6fa503f50814664c8 Mon Sep 17 00:00:00 2001 -From: Paul Wise <pabs3@bonedaddy.net> -Date: Sun, 11 Feb 2018 21:57:49 +0800 -Subject: [PATCH] Mitigate vulnerabilities caused by some git remotes being - able to execute code - -Set GIT_PROTOCOL_FROM_USER=0 with git versions newer than 2.12. - -Prevent remote websites from causing cloning of local repositories. - -Manually whitelist known-safe protocols (http, https, git, ssh) -when using git versions older than 2.12. - -Fixes: CVE-2018-7032 -Fixes: https://bugs.debian.org/840014 -Suggestions-by: Jakub Wilk <jwilk@jwilk.net> -Reported-by: Jakub Wilk <jwilk@jwilk.net> ---- - webcheckout | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/webcheckout b/webcheckout -index e98da5c..de497ba 100755 ---- a/webcheckout -+++ b/webcheckout -@@ -71,6 +71,16 @@ use Getopt::Long; - use warnings; - use strict; - -+# Mitigate some git remote types being dangerous -+my $git_unsafe = 1; -+my $git_version = `git --version`; -+$git_version =~ s{^git version }{}; -+my ($major, $minor) = split(/\./, $git_version); -+if (int($major) >= 2 && int($minor) >= 12) { -+ $ENV{GIT_PROTOCOL_FROM_USER} = 0; -+ $git_unsafe = 0; -+} -+ - # What to download. - my $url; - -@@ -89,7 +99,17 @@ my $destdir; - - # how to perform checkouts - my %handlers=( -- git => sub { doit("git", "clone", shift, $destdir) }, -- svn => sub { doit("svn", "checkout", shift, $destdir) }, -- bzr => sub { doit("bzr", "branch", shift, $destdir) }, -+ git => sub { -+ my $git_url = shift; -+ # Reject unsafe URLs with older versions of git -+ # that do not already check the URL safety. -+ if ($git_unsafe && $git_url !~ m{^(?:(?:https?|git|ssh):[^:]|(?:[-_.A-Za-z0-9]+@)?[-_.A-Za-z0-9]+:(?!:|//))}) { -+ print STDERR "potentially unsafe git URL, may fail, touch local files or execute arbitrary code\n"; -+ return 1; -+ } -+ # Reject cloning local directories too, webcheckout is for remote repos -+ doit(qw(git -c protocol.file.allow=user clone --), $git_url, $destdir) -+ }, -+ svn => sub { doit(qw(svn checkout --), shift, $destdir) }, -+ bzr => sub { doit(qw(bzr branch --), shift, $destdir) }, - ); --- -2.11.0 - diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch index 2056b42356..fd9a4c9401 100644 --- a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch +++ b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch @@ -1,16 +1,28 @@ -From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001 +From bc3b353cb2f26cf10aa5c5caebddf6d3d5b1e318 Mon Sep 17 00:00:00 2001 From: Julien Lepiller <julien@lepiller.eu> -Date: Wed, 14 Dec 2016 14:14:59 +0100 +Date: Fri, 21 Sep 2018 22:31:29 +0200 Subject: [PATCH] fix camlp4 in another directory --- - Makefile | 11 ++++++----- - configure | 13 ++++++++++++- - myocamlbuild.ml | 2 +- - 3 files changed, 19 insertions(+), 7 deletions(-) + Makefile | 11 ++++++----- + configure | 13 ++++++++++++- + tests/Makefile | 2 +- + tests/camlp4-comments/Makefile | 2 +- + tests/camlp4-exclude-file/Makefile | 2 +- + tests/camlp4-exclude/Makefile | 2 +- + tests/camlp4-instrument-fast/Makefile | 2 +- + tests/camlp4-instrument/Makefile | 2 +- + tests/combine-expr/Makefile | 2 +- + tests/ppx-comments/Makefile | 2 +- + tests/ppx-exclude-file/Makefile | 2 +- + tests/ppx-exclude/Makefile | 2 +- + tests/ppx-instrument-fast/Makefile | 2 +- + tests/ppx-instrument/Makefile | 2 +- + tests/report/Makefile | 2 +- + 15 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile -index 4a8ce17..d94a6d5 100644 +index b0980ee..6697922 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build @@ -19,12 +31,12 @@ index 4a8ce17..d94a6d5 100644 PATH_TESTS=$(PATH_BASE)/tests -PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect +PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect - - + + # DEFINITIONS @@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect PROJECT_NAME=bisect - OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild + OCAMLBUILD=ocamlbuild OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX) -OCAMLBUILD_FLAGS=-classic-display -no-links +CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)") @@ -33,22 +45,22 @@ index 4a8ce17..d94a6d5 100644 MODULES_MLPACK=$(PROJECT_NAME).mlpack MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack @@ -80,11 +81,11 @@ veryclean: clean - rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css - + rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css + install: FORCE - cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \ + cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \ - if [ "$(PPX)" = "TRUE" ]; then \ + if [ "$(PPX)" = "TRUE" ]; then \ - cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \ + cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \ - fi; \ -- (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ -+ (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ - if [ -x "$(PATH_OCAMLFIND)" ]; then \ - $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ - $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ + fi; \ +- (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ ++ (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ + if [ -x "$(PATH_OCAMLFIND)" ]; then \ + $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ + $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ diff --git a/configure b/configure -index bb7ebf4..61a3095 100755 +index bb7ebf4..43ef46b 100755 --- a/configure +++ b/configure @@ -21,7 +21,9 @@ @@ -79,47 +91,193 @@ index bb7ebf4..61a3095 100755 ppx='TRUE';; *) - echo "usage: $0 [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]"; -+ echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]"; ++ echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-camlp4-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]"; exit 1;; esac shift @@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then exit 1 fi - + +# prefix default value +test -z $prefix && prefix=$ocaml_prefix + # make options make_quiet=`make -f - <<EOF default: gnumake -@@ -67,11 +76,13 @@ EOF` +@@ -66,7 +75,9 @@ EOF` + # file creation echo "# timestamp: `date`" > Makefile.config ++echo "PREFIX=$prefix" >> Makefile.config echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config +echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config echo "WARNINGS=$devel" >> Makefile.config - echo "NO_CAMLP4=$no_camlp4" >> Makefile.config - echo "PPX=$ppx" >> Makefile.config - echo "MAKE_QUIET=$make_quiet" >> Makefile.config -+echo "PREFIX=$prefix" >> Makefile.config - echo "" >> Makefile.config - echo 'Makefile.config successfully created' -diff --git a/myocamlbuild.ml b/myocamlbuild.ml -index 8aa25fd..09a7d48 100644 ---- a/myocamlbuild.ml -+++ b/myocamlbuild.ml -@@ -70,7 +70,7 @@ let () = - | After_rules -> - let camlp4of = - try -- let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in -+ let path_bin = Filename.concat (Sys.getenv "PATH_CAMLP4_PREFIX") "bin" in - Filename.concat path_bin "camlp4of" - with _ -> "camlp4of" in - flag ["ocaml"; "compile"; "pp_camlp4of"] (S[A"-pp"; A camlp4of]); --- -2.7.4 +diff --git a/tests/Makefile b/tests/Makefile +index 1aba27f..9642323 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -41,7 +41,7 @@ one: FORCE + else \ + echo "Running tests for '$(NAME)'..." | tee -a _log; \ + (cd $(NAME) && \ +- $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin \ ++ $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin PATH_CAMLP4_PREFIX=$(PATH_CAMLP4_PREFIX) \ + COMPILER=ocamlc EXECUTABLE=bytecode RUN=./ LIB_EXT=cma EXE_SUFFIX='' \ + REPORT=../../_build/src/report/report.byte && \ + cd ..) || echo '*** error' >> _log; \ +diff --git a/tests/camlp4-comments/Makefile b/tests/camlp4-comments/Makefile +index 33fca72..a918118 100644 +--- a/tests/camlp4-comments/Makefile ++++ b/tests/camlp4-comments/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-exclude-file/Makefile b/tests/camlp4-exclude-file/Makefile +index ab13983..e2520fa 100644 +--- a/tests/camlp4-exclude-file/Makefile ++++ b/tests/camlp4-exclude-file/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-exclude/Makefile b/tests/camlp4-exclude/Makefile +index 18aada4..d71a7bc 100644 +--- a/tests/camlp4-exclude/Makefile ++++ b/tests/camlp4-exclude/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-instrument-fast/Makefile b/tests/camlp4-instrument-fast/Makefile +index f60767f..8506e38 100644 +--- a/tests/camlp4-instrument-fast/Makefile ++++ b/tests/camlp4-instrument-fast/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-instrument/Makefile b/tests/camlp4-instrument/Makefile +index 33fca72..a918118 100644 +--- a/tests/camlp4-instrument/Makefile ++++ b/tests/camlp4-instrument/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/combine-expr/Makefile b/tests/combine-expr/Makefile +index 46ae9eb..e8e2af2 100644 +--- a/tests/combine-expr/Makefile ++++ b/tests/combine-expr/Makefile +@@ -1,4 +1,4 @@ +-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) ++COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) + + default: clean compile run report + +diff --git a/tests/ppx-comments/Makefile b/tests/ppx-comments/Makefile +index f8c645a..667526f 100644 +--- a/tests/ppx-comments/Makefile ++++ b/tests/ppx-comments/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-exclude-file/Makefile b/tests/ppx-exclude-file/Makefile +index a575a77..0dd1a20 100644 +--- a/tests/ppx-exclude-file/Makefile ++++ b/tests/ppx-exclude-file/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-exclude/Makefile b/tests/ppx-exclude/Makefile +index a517af4..f502a42 100644 +--- a/tests/ppx-exclude/Makefile ++++ b/tests/ppx-exclude/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-instrument-fast/Makefile b/tests/ppx-instrument-fast/Makefile +index da78bb6..1195988 100644 +--- a/tests/ppx-instrument-fast/Makefile ++++ b/tests/ppx-instrument-fast/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-instrument/Makefile b/tests/ppx-instrument/Makefile +index f8c645a..667526f 100644 +--- a/tests/ppx-instrument/Makefile ++++ b/tests/ppx-instrument/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/report/Makefile b/tests/report/Makefile +index a7ffe44..a968bf9 100644 +--- a/tests/report/Makefile ++++ b/tests/report/Makefile +@@ -1,4 +1,4 @@ +-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) ++COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) + XMLLINT=$(shell which xmllint) + + default: clean compile run report +-- +2.18.0 diff --git a/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch b/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch new file mode 100644 index 0000000000..b29a06f272 --- /dev/null +++ b/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch @@ -0,0 +1,36 @@ +From a0a0c6a43b88d946f2b5484892cf0209bd7c0e68 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com> +Date: Sat, 8 Dec 2018 21:25:31 +0100 +Subject: [PATCH] Make idlj respect SOURCE_DATE_EPOCH. + +--- + .../sun/tools/corba/se/idl/toJavaPortable/Util.java | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java b/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java +index 7397619f2..583d6b8e4 100644 +--- a/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java ++++ b/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java +@@ -1146,7 +1146,18 @@ public class Util extends com.sun.tools.corba.se.idl.Util + else + formatter.setTimeZone (java.util.TimeZone.getDefault ()); + +- stream.println ("* " + formatter.format (new Date ())); ++ try { ++ String epoch = System.getenv("SOURCE_DATE_EPOCH"); ++ if(epoch != null) { ++ long unixTime = Long.parseLong(epoch); ++ stream.println ("* " + formatter.format (new Date (unixTime*1000L))); ++ } else { ++ stream.println ("* " + formatter.format (new Date ())); ++ } ++ } catch (Exception e) { ++ //in case of error fall back to default ++ stream.println ("* " + formatter.format (new Date ())); ++ } + + // <daz> + /////////////// +-- +2.19.2 + diff --git a/gnu/packages/patches/patchutils-test-perms.patch b/gnu/packages/patches/patchutils-test-perms.patch new file mode 100644 index 0000000000..c7652b9af2 --- /dev/null +++ b/gnu/packages/patches/patchutils-test-perms.patch @@ -0,0 +1,14 @@ +Need to mark one of the tests as PHONY to get permissions set correctly on +built scripts. + +--- a/Makefile.in 2011-02-10 09:44:43.000000000 -0600 ++++ b/Makefile.in 2018-11-29 21:52:05.000000000 -0600 +@@ -1106,5 +1108,6 @@ + rm -f $(DESTDIR)$(bindir)/"`echo lsdiff|sed '$(transform)'`" + rm -f $(DESTDIR)$(bindir)/"`echo grepdiff|sed '$(transform)'`" + ++.PHONY: tests/newline1/run-test + tests/newline1/run-test: src/combinediff$(EXEEXT) src/flipdiff$(EXEEXT) \ + src/lsdiff$(EXEEXT) src/grepdiff$(EXEEXT) \ + scripts/splitdiff + diff --git a/gnu/packages/patches/patchutils-xfail-gendiff-tests.patch b/gnu/packages/patches/patchutils-xfail-gendiff-tests.patch deleted file mode 100644 index b2e77d22f2..0000000000 --- a/gnu/packages/patches/patchutils-xfail-gendiff-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -The gendiff1 and gendiff2 tests need the gendiff script that's distributed -with the rpm package management tool. Without that script, these tests are -expected to fail. - -Need to mark one of the tests as PHONY to get permissions set correctly on -built scripts. - ---- a/Makefile.in 2011-02-10 09:44:43.000000000 -0600 -+++ b/Makefile.in 2014-03-06 17:27:55.610048953 -0600 -@@ -378,6 +378,8 @@ - # These ones don't work yet. - # Feel free to send me patches. :-) - XFAIL_TESTS = \ -+ tests/gendiff1/run-test \ -+ tests/gendiff2/run-test \ - tests/delhunk5/run-test \ - tests/delhunk6/run-test - -@@ -1106,6 +1108,7 @@ - rm -f $(DESTDIR)$(bindir)/"`echo lsdiff|sed '$(transform)'`" - rm -f $(DESTDIR)$(bindir)/"`echo grepdiff|sed '$(transform)'`" - -+.PHONY: tests/combine1/run-test - tests/combine1/run-test: src/combinediff$(EXEEXT) src/flipdiff$(EXEEXT) \ - src/lsdiff$(EXEEXT) src/grepdiff$(EXEEXT) - for script in $(bin_SCRIPTS); do \ diff --git a/gnu/packages/patches/pinentry-efl.patch b/gnu/packages/patches/pinentry-efl.patch new file mode 100644 index 0000000000..5ba79e28df --- /dev/null +++ b/gnu/packages/patches/pinentry-efl.patch @@ -0,0 +1,798 @@ +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=pinentry.git;a=commit;h=948105b7a34ec9a9e5479d376b7c86bafee50a01 +This patch can be removed with the next release of pinentry. + +From 948105b7a34ec9a9e5479d376b7c86bafee50a01 Mon Sep 17 00:00:00 2001 +From: "William L. Thomson Jr" <wlt@o-sinc.com> +Date: Tue, 29 May 2018 22:50:47 +0100 +Subject: [PATCH] efl: Add an EFL-based pinentry. + +* NEWS: Update. +* Makefile.am: Add new efl subdirectory. +* configure.ac: Add --enable-pinentry-efl option. +* efl/Makefile.am: New file. +* efl/pinentry-efl.c: New file. + +Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org> +--- + Makefile.am | 8 +- + configure.ac | 44 +++- + efl/Makefile.am | 38 ++++ + efl/pinentry-efl.c | 623 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 716 insertions(+), 2 deletions(-) + create mode 100644 efl/Makefile.am + create mode 100644 efl/pinentry-efl.c + +diff --git a/Makefile.am b/Makefile.am +index 8c8b8e5..b8fd0e1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -82,10 +82,16 @@ else + pinentry_fltk = + endif + ++if BUILD_PINENTRY_EFL ++pinentry_efl = efl ++else ++pinentry_efl = ++endif ++ + SUBDIRS = m4 secmem pinentry ${pinentry_curses} ${pinentry_tty} \ + ${pinentry_emacs} ${pinentry_gtk_2} ${pinentry_gnome_3} \ + ${pinentry_qt} ${pinentry_tqt} ${pinentry_w32} \ +- ${pinentry_fltk} doc ++ ${pinentry_fltk} ${pinentry_efl} doc + + + install-exec-local: +diff --git a/configure.ac b/configure.ac +index ff6c2e0..e305e44 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -419,6 +419,42 @@ fi + + + dnl ++dnl Check for EFL pinentry programs. ++dnl ++AC_ARG_ENABLE(pinentry-efl, ++ AC_HELP_STRING([--enable-pinentry-efl], [build EFL pinentry]), ++ pinentry_efl=$enableval, pinentry_efl=maybe) ++ ++dnl check for pkg-config ++if test "$pinentry_efl" != "no"; then ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ if test x"${PKG_CONFIG}" = xno ; then ++ pinentry_efl=no ++ fi ++fi ++ ++if test "$pinentry_efl" != "no"; then ++ AC_MSG_CHECKING([for efl]) ++ "${PKG_CONFIG}" --exists 'elementary >= 1.18' ++ if test $? -ne 0 ; then ++ AC_MSG_RESULT([no]) ++ AC_MSG_WARN([efl >= 1.18 is required for efl pinentry]) ++ pinentry_efl=no ++ else ++ AC_MSG_RESULT([yes]) ++ EFL_CFLAGS=`"${PKG_CONFIG}" --cflags ecore-x elementary` ++ EFL_LIBS=`"${PKG_CONFIG}" --libs ecore-x elementary` ++ AC_SUBST(EFL_CFLAGS) ++ AC_SUBST(EFL_LIBS) ++ if test "$pinentry_efl" != "no" ++ then ++ pinentry_efl=yes ++ fi ++ fi ++fi ++AM_CONDITIONAL(BUILD_PINENTRY_EFL, test "$pinentry_efl" = "yes") ++ ++dnl + dnl Check for GTK+-2 / GNOME3 pinentry programs. + dnl + AC_ARG_ENABLE(pinentry-gtk2, +@@ -645,7 +681,11 @@ else + if test "$pinentry_tqt" = "yes"; then + PINENTRY_DEFAULT=pinentry-tqt + else +- AC_MSG_ERROR([[No pinentry enabled.]]) ++ if test "$pinentry_efl" = "yes"; then ++ PINENTRY_DEFAULT=pinentry-efl ++ else ++ AC_MSG_ERROR([[No pinentry enabled.]]) ++ fi + fi + fi + fi +@@ -721,6 +761,7 @@ secmem/Makefile + pinentry/Makefile + curses/Makefile + tty/Makefile ++efl/Makefile + emacs/Makefile + gtk+-2/Makefile + gnome3/Makefile +@@ -744,6 +785,7 @@ AC_MSG_NOTICE([ + Curses Pinentry ..: $pinentry_curses + TTY Pinentry .....: $pinentry_tty + Emacs Pinentry ...: $pinentry_emacs ++ EFL Pinentry .....: $pinentry_efl + GTK+-2 Pinentry ..: $pinentry_gtk_2 + GNOME 3 Pinentry .: $pinentry_gnome_3 + Qt Pinentry ......: $pinentry_qt $pinentry_qt_lib_version +diff --git a/efl/Makefile.am b/efl/Makefile.am +new file mode 100644 +index 0000000..b986a04 +--- /dev/null ++++ b/efl/Makefile.am +@@ -0,0 +1,38 @@ ++# Makefile.am - PIN entry EFL frontend. ++# Copyright (C) 2017 Obsidian-Studios, Inc. ++# Author William L. Thomson Jr. <wlt@o-sinc.com> ++# ++# This file is part of PINENTRY. ++# ++# PINENTRY is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# PINENTRY is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ++ ++## Process this file with automake to produce Makefile.in ++ ++bin_PROGRAMS = pinentry-efl ++ ++if FALLBACK_CURSES ++ncurses_include = $(NCURSES_INCLUDE) ++libcurses = ../pinentry/libpinentry-curses.a $(LIBCURSES) $(LIBICONV) ++else ++ncurses_include = ++libcurses = ++endif ++ ++AM_CPPFLAGS = $(COMMON_CFLAGS) $(EFL_CFLAGS) $(ncurses_include) \ ++ -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry ++LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \ ++ $(COMMON_LIBS) $(LIBCAP) $(EFL_LIBS) $(libcurses) ++ ++pinentry_efl_SOURCES = pinentry-efl.c +diff --git a/efl/pinentry-efl.c b/efl/pinentry-efl.c +new file mode 100644 +index 0000000..ca99693 +--- /dev/null ++++ b/efl/pinentry-efl.c +@@ -0,0 +1,623 @@ ++/* pinentry-efl.c ++ Copyright (C) 2017 Obsidian-Studios, Inc. ++ Author William L. Thomson Jr. <wlt@o-sinc.com> ++ ++ Based on pinentry-gtk2.c ++ Copyright (C) 1999 Robert Bihlmeyer <robbe@orcus.priv.at> ++ Copyright (C) 2001, 2002, 2007, 2015 g10 Code GmbH ++ Copyright (C) 2004 by Albrecht Dreà <albrecht.dress@arcor.de> ++ ++ pinentry-efl is a pinentry application for the EFL widget set. ++ It tries to follow the Gnome Human Interface Guide as close as ++ possible. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++#include <Elementary.h> ++#include <Ecore_X.h> ++#include <gpg-error.h> ++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wstrict-prototypes" ++#endif ++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) ++#pragma GCC diagnostic pop ++#endif ++ ++#ifdef HAVE_GETOPT_H ++#include <getopt.h> ++#else ++#include "getopt.h" ++#endif /* HAVE_GETOPT_H */ ++ ++#include "pinentry.h" ++ ++#ifdef FALLBACK_CURSES ++#include "pinentry-curses.h" ++#endif ++ ++#define PGMNAME "pinentry-efl" ++ ++#ifndef VERSION ++#define VERSION ++#endif ++ ++#define ENTRY_HIDE "Hide entry" ++#define ENTRY_SHOW "Show entry" ++ ++typedef enum { CONFIRM_CANCEL, CONFIRM_OK, CONFIRM_NOTOK } confirm_value_t; ++ ++static const int WIDTH = 480; ++static const int BUTTON_HEIGHT = 27; ++static const int BUTTON_WIDTH = 70; ++static const int BUTTON_ICON_SIZE = 13; ++static const int PADDING = 5; ++ ++static Eina_Bool got_input; ++static Ecore_Timer *timer; ++static Evas_Object *check_label; ++static Evas_Object *error_label; ++static Evas_Object *entry; ++static Evas_Object *repeat_entry; ++static Evas_Object *qualitybar; ++static Evas_Object *win; ++static char **pargv; ++static int grab_failed; ++static int passphrase_ok; ++static int confirm_mode; ++static int pargc; ++static confirm_value_t confirm_value; ++static pinentry_t pinentry; ++ ++pinentry_cmd_handler_t pinentry_cmd_handler; ++ ++static void ++quit (void) ++{ ++ evas_object_del(win); ++ elm_exit(); ++ ecore_main_loop_quit (); ++} ++ ++static void ++delete_event (void *data EINA_UNUSED, ++ Evas_Object *obj EINA_UNUSED, ++ void *event EINA_UNUSED) ++{ ++ pinentry->close_button = 1; ++ quit (); ++} ++ ++static void ++changed_text_handler (void *data EINA_UNUSED, ++ Evas_Object *obj, ++ void *event EINA_UNUSED) ++{ ++ const char *s; ++ int length; ++ int percent; ++ ++ got_input = EINA_TRUE; ++ ++ if (pinentry->repeat_passphrase && repeat_entry) ++ { ++ elm_object_text_set (repeat_entry, ""); ++ elm_object_text_set (error_label, ""); ++ } ++ ++ if (!qualitybar || !pinentry->quality_bar) ++ return; ++ ++ s = elm_object_text_get (obj); ++ if (!s) ++ s = ""; ++ length = strlen (s); ++ percent = length? pinentry_inq_quality (pinentry, s, length) : 0; ++ evas_object_color_set(qualitybar, ++ 255 - ( 2.55 * percent ), ++ 2.55 * percent, 0, 255); ++ elm_progressbar_value_set (qualitybar, (double) percent / 100.0); ++} ++ ++static void ++on_check (void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED) ++{ ++ if(elm_check_state_get(obj)) ++ { ++ elm_entry_password_set(entry, EINA_FALSE); ++ elm_object_text_set(check_label,ENTRY_HIDE); ++ } ++ else ++ { ++ elm_entry_password_set(entry, EINA_TRUE); ++ elm_object_text_set(check_label,ENTRY_SHOW); ++ } ++ evas_object_size_hint_min_set(check_label, ++ ELM_SCALE_SIZE(BUTTON_WIDTH), ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ evas_object_size_hint_align_set(check_label, 0, 1); ++} ++ ++static void ++on_click (void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) ++{ ++ if (confirm_mode) ++ { ++ confirm_value = (confirm_value_t) data; ++ quit (); ++ return; ++ } ++ ++ if (data) ++ { ++ const char *s; ++ const char *s2; ++ ++ s = elm_entry_entry_get (entry); ++ if (!s) ++ s = ""; ++ ++ if (pinentry->repeat_passphrase && repeat_entry) ++ { ++ s2 = elm_entry_entry_get (repeat_entry); ++ if (!s2) ++ s2 = ""; ++ if (strcmp (s, s2)) ++ { ++ elm_object_text_set(error_label, ++ pinentry->repeat_error_string? ++ pinentry->repeat_error_string: ++ "not correctly repeated"); ++ elm_object_focus_set(entry,EINA_TRUE); ++ return; ++ } ++ pinentry->repeat_okay = 1; ++ } ++ ++ passphrase_ok = 1; ++ pinentry_setbufferlen (pinentry, strlen (s) + 1); ++ if (pinentry->pin) ++ strncpy (pinentry->pin, s, strlen(s) + 1); ++ } ++ quit (); ++} ++ ++static void ++enter_callback (void *data, Evas_Object * obj, void *event_info EINA_UNUSED) ++{ ++ if (data) ++ elm_object_focus_set (data, 1); ++ else ++ on_click ((void *) CONFIRM_OK, obj, NULL); ++} ++ ++static Eina_Bool ++timeout_cb (const void * data) ++{ ++ pinentry_t pe = (pinentry_t)data; ++ if (!got_input) ++ { ++ ecore_main_loop_quit(); ++ if (pe) ++ pe->specific_err = gpg_error (GPG_ERR_TIMEOUT); ++ } ++ ++ timer = NULL; ++ return ECORE_CALLBACK_DONE; ++} ++ ++static void ++create_window (void) ++{ ++ char *txt; ++ Evas_Object *icon; ++ Evas_Object *obj; ++ Evas_Object *table; ++ int btn_txt_len = 0; ++ int row = 0; ++ int ok_len = 0; ++ ++ win = elm_win_util_dialog_add(NULL,"pinentry","enter pin"); ++ elm_win_autodel_set(win, EINA_TRUE); ++ elm_win_center(win,EINA_TRUE,EINA_TRUE); ++ evas_object_smart_callback_add(win, "delete,request", delete_event, NULL); ++ ++ table = elm_table_add(win); ++ elm_table_padding_set(table,ELM_SCALE_SIZE(PADDING),0); ++ evas_object_size_hint_padding_set (table, ++ ELM_SCALE_SIZE(PADDING), ++ ELM_SCALE_SIZE(PADDING), ++ ELM_SCALE_SIZE(PADDING), ++ ELM_SCALE_SIZE(PADDING)); ++ evas_object_show(table); ++ ++ if (pinentry->title) ++ { ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->title); ++ elm_win_title_set ( win, txt ); ++ free (txt); ++ } ++ ++ /* Description Label */ ++ if (pinentry->description) ++ { ++ char* aligned; ++ int len; ++ ++ obj = elm_label_add(table); ++ elm_label_line_wrap_set (obj, ELM_WRAP_WORD); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->description); ++ len = strlen(txt)+20; // 20 chars for align tag ++ aligned = calloc(len+1,sizeof(char)); ++ if(aligned) ++ { ++ snprintf(aligned,len, "<align=left>%s</align>",txt); ++ elm_object_text_set(obj,aligned); ++ free (aligned); ++ } else ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); ++ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, obj, 1, row, 5, 1); ++ evas_object_show(obj); ++ row++; ++ } ++ if (!confirm_mode && (pinentry->error || pinentry->repeat_passphrase)) ++ { ++ /* Error Label */ ++ if (pinentry->error) ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->error); ++ else ++ txt = ""; ++ obj = elm_label_add(table); ++ evas_object_color_set(obj, 255, 0, 0, 255); ++ elm_object_text_set(obj,txt); ++ elm_object_style_set(obj,"slide_bounce"); ++ elm_label_slide_duration_set(obj, 10); ++ elm_label_slide_mode_set(obj, ELM_LABEL_SLIDE_MODE_ALWAYS); ++ elm_label_slide_go(obj); ++ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); ++ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, obj, 1, row, 5, 1); ++ evas_object_show(obj); ++ if (pinentry->error) ++ free (txt); ++ row++; ++ } ++ ++ qualitybar = NULL; ++ ++ if (!confirm_mode) ++ { ++ ++ if (pinentry->prompt) ++ { ++ /* Entry/Prompt Label */ ++ obj = elm_label_add(table); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->prompt); ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_show(obj); ++ } ++ ++ entry = elm_entry_add(table); ++ elm_entry_scrollable_set(entry, EINA_TRUE); ++ elm_scroller_policy_set(entry, ++ ELM_SCROLLER_POLICY_OFF, ++ ELM_SCROLLER_POLICY_OFF); ++ elm_entry_password_set(entry, EINA_TRUE); ++ elm_entry_single_line_set(entry, EINA_TRUE); ++ evas_object_size_hint_weight_set(entry, 0, 0); ++ evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, entry, 2, row, 4, 1); ++ evas_object_smart_callback_add(entry, ++ "changed", ++ changed_text_handler, ++ NULL); ++ evas_object_show(entry); ++ row++; ++ ++ /* Check box */ ++ obj = elm_check_add(table); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_smart_callback_add(obj, "changed", on_check, NULL); ++ evas_object_show(obj); ++ ++ /* Check Label */ ++ check_label = elm_label_add(table); ++ on_check((void *)NULL, obj, (void *)NULL); ++ elm_table_pack(table, check_label, 2, row, 4, 1); ++ evas_object_show(check_label); ++ row++; ++ ++ if (pinentry->quality_bar) ++ { ++ /* Quality Bar Label */ ++ obj = elm_label_add(table); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->quality_bar); ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_show(obj); ++ ++ qualitybar = elm_progressbar_add(table); ++ evas_object_color_set(qualitybar, 255, 0, 0, 255); ++ evas_object_show(qualitybar); ++ if (pinentry->quality_bar_tt) ++ elm_object_tooltip_text_set (qualitybar, ++ pinentry->quality_bar_tt); ++ evas_object_size_hint_weight_set(qualitybar, EVAS_HINT_EXPAND, 0); ++ evas_object_size_hint_align_set(qualitybar, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, qualitybar, 2, row, 4, 1); ++ row++; ++ } ++ ++ if (pinentry->repeat_passphrase) ++ { ++ /* Repeat Label */ ++ obj = elm_label_add(table); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->repeat_passphrase); ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_show(obj); ++ ++ repeat_entry = elm_entry_add(table); ++ elm_entry_scrollable_set(repeat_entry, EINA_TRUE); ++ elm_scroller_policy_set(repeat_entry, ++ ELM_SCROLLER_POLICY_OFF, ++ ELM_SCROLLER_POLICY_OFF); ++ elm_entry_password_set(repeat_entry, EINA_TRUE); ++ elm_entry_single_line_set(repeat_entry, EINA_TRUE); ++ evas_object_size_hint_weight_set(repeat_entry, 0, 0); ++ evas_object_size_hint_align_set(repeat_entry, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, repeat_entry, 2, row, 4, 1); ++ evas_object_smart_callback_add (repeat_entry, "activated", ++ enter_callback, NULL); ++ evas_object_show(repeat_entry); ++ evas_object_smart_callback_add (entry, ++ "activated", ++ enter_callback, ++ repeat_entry); ++ evas_object_smart_callback_add(repeat_entry, ++ "activated", ++ on_click, ++ (void *) CONFIRM_OK); ++ row++; ++ } ++ else ++ evas_object_smart_callback_add(entry, ++ "activated", ++ on_click, ++ (void *) CONFIRM_OK); ++ } ++ ++ /* Cancel Button */ ++ if (!pinentry->one_button) ++ { ++ obj = elm_button_add(table); ++ icon = elm_icon_add (table); ++ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); ++ if (elm_icon_standard_set (icon, "dialog-cancel") || ++ elm_icon_standard_set (icon, "window-close")) ++ { ++ evas_object_size_hint_min_set(icon, ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); ++ elm_object_part_content_set(obj, "icon", icon); ++ evas_object_show (icon); ++ } ++ else ++ evas_object_del(icon); ++ if (pinentry->cancel || pinentry->default_cancel) ++ { ++ if(pinentry->cancel) ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->cancel); ++ else ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->default_cancel); ++ if(txt[0]=='_') ++ elm_object_text_set(obj,txt+1); ++ else ++ elm_object_text_set(obj,txt); ++ btn_txt_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); ++ free (txt); ++ } ++ else ++ elm_object_text_set(obj, "Cancel"); //STOCK_CANCEL ++ evas_object_size_hint_align_set(obj, 0, 0); ++ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) ++ evas_object_size_hint_min_set(obj, ++ btn_txt_len, ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ else ++ evas_object_size_hint_min_set(obj, ++ ELM_SCALE_SIZE(BUTTON_WIDTH), ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ elm_table_pack(table, obj, 4, row, 1, 1); ++ evas_object_smart_callback_add(obj, ++ "clicked", ++ on_click, ++ (void *) CONFIRM_CANCEL); ++ evas_object_show(obj); ++ } ++ ++ /* OK Button */ ++ obj = elm_button_add(table); ++ icon = elm_icon_add (table); ++ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); ++ if (elm_icon_standard_set (icon, "dialog-ok") || ++ elm_icon_standard_set (icon, "list-add")) ++ { ++ evas_object_size_hint_min_set(icon, ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); ++ elm_object_part_content_set(obj, "icon", icon); ++ evas_object_show (icon); ++ } ++ else ++ evas_object_del(icon); ++ if (pinentry->ok || pinentry->default_ok) ++ { ++ if(pinentry->ok) ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->ok); ++ else ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->default_ok); ++ if(txt[0]=='_') ++ elm_object_text_set(obj,txt+1); ++ else ++ elm_object_text_set(obj,txt); ++ ok_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); ++ if(ok_len>btn_txt_len) ++ btn_txt_len = ok_len; ++ free (txt); ++ } ++ else ++ elm_object_text_set(obj,"OK"); //STOCK_OK ++ evas_object_size_hint_align_set(obj, 0, 0); ++ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) ++ evas_object_size_hint_min_set(obj, ++ btn_txt_len, ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ else ++ evas_object_size_hint_min_set(obj, ++ ELM_SCALE_SIZE(BUTTON_WIDTH), ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ elm_table_pack(table, obj, 5, row, 1, 1); ++ evas_object_smart_callback_add(obj, "clicked", on_click, (void *) CONFIRM_OK); ++ evas_object_show(obj); ++ ++ /* Key/Lock Icon */ ++ obj = elm_icon_add (win); ++ evas_object_size_hint_aspect_set (obj, EVAS_ASPECT_CONTROL_BOTH, 1, 1); ++ if (elm_icon_standard_set (obj, "dialog-password")) ++ { ++ double ic_size = WIDTH/5; ++ if(row==0) ++ ic_size = ic_size/3.5; ++ else if(row<4) ++ ic_size = ic_size - ic_size/row; ++ evas_object_size_hint_min_set(obj, ++ ELM_SCALE_SIZE(ic_size), ++ ELM_SCALE_SIZE(ic_size)); ++ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0.5); ++ elm_table_pack(table, obj, 0, 0, 1, row? row:1); ++ evas_object_show (obj); ++ } ++ else ++ evas_object_del(obj); ++ ++ /* Box for padding */ ++ obj = elm_box_add (win); ++ elm_box_pack_end (obj, table); ++ evas_object_show (obj); ++ ++ elm_win_resize_object_add(win,obj); ++ evas_object_show(win); ++ ++ if(entry) ++ elm_object_focus_set (entry, EINA_TRUE); ++ ++ if (pinentry->timeout > 0) ++ timer = ecore_timer_add (pinentry->timeout, ++ (Ecore_Task_Cb)timeout_cb, ++ pinentry); ++} ++ ++static int ++efl_cmd_handler (pinentry_t pe) ++{ ++ int want_pass = !!pe->pin; ++ ++ got_input = EINA_FALSE; ++ pinentry = pe; ++ confirm_value = CONFIRM_CANCEL; ++ passphrase_ok = 0; ++ confirm_mode = want_pass ? 0 : 1; ++ /* init ecore-x explicitly using DISPLAY since this can launch ++ * from console ++ */ ++ if (pe->display) ++ ecore_x_init (pe->display); ++ elm_init (pargc, pargv); ++ create_window (); ++ ecore_main_loop_begin (); ++ ++ if (timer) ++ { ++ ecore_timer_del (timer); ++ timer = NULL; ++ } ++ ++ if (confirm_value == CONFIRM_CANCEL || grab_failed) ++ pe->canceled = 1; ++ ++ pinentry = NULL; ++ if (want_pass) ++ { ++ if (passphrase_ok && pe->pin) ++ return strlen (pe->pin); ++ else ++ return -1; ++ } ++ else ++ return (confirm_value == CONFIRM_OK) ? 1 : 0; ++} ++ ++int ++main (int argc, char *argv[]) ++{ ++ pinentry_init (PGMNAME); ++ ++#ifdef FALLBACK_CURSES ++ if (pinentry_have_display (argc, argv)) ++ { ++#endif ++ ++ pinentry_cmd_handler = efl_cmd_handler; ++ pargc = argc; ++ pargv = argv; ++ ++#ifdef FALLBACK_CURSES ++ } ++ else ++ { ++ pinentry_cmd_handler = curses_cmd_handler; ++ } ++#endif ++ ++ pinentry_parse_opts (argc, argv); ++ if (pinentry_loop ()) ++ return 1; ++ ++ return 0; ++} +-- +2.8.0.rc3 + diff --git a/gnu/packages/patches/podofo-cmake-3.12.patch b/gnu/packages/patches/podofo-cmake-3.12.patch new file mode 100644 index 0000000000..0a3c19b21a --- /dev/null +++ b/gnu/packages/patches/podofo-cmake-3.12.patch @@ -0,0 +1,19 @@ +The build fails with cmake 3.12.0. This patch will be obsolete with the next +release. + +https://sourceforge.net/p/podofo/tickets/24/attachment/podofo-cmake-3.12.patch + + +--- a/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:26:02.921494293 +0200 ++++ b/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:34:53.727136443 +0200 +@@ -2,10 +2,3 @@ + TARGET_LINK_LIBRARIES(TokenizerTest ${PODOFO_LIB} ${PODOFO_LIB_DEPENDS}) + SET_TARGET_PROPERTIES(TokenizerTest PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") + ADD_DEPENDENCIES(TokenizerTest ${PODOFO_DEPEND_TARGET}) +- +-# Copy the test samples over to the build tree +-ADD_CUSTOM_COMMAND( +- TARGET TokenizerTest +- POST_BUILD +- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/objects" "${CMAKE_CURRENT_BINARY_DIR}/objects" +- ) diff --git a/gnu/packages/patches/polkit-CVE-2018-19788.patch b/gnu/packages/patches/polkit-CVE-2018-19788.patch new file mode 100644 index 0000000000..58cde6c5dc --- /dev/null +++ b/gnu/packages/patches/polkit-CVE-2018-19788.patch @@ -0,0 +1,197 @@ +Fix CVE-2018-19788: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19788 +https://gitlab.freedesktop.org/polkit/polkit/issues/74 + +Patch copied from upstream source repository: + +https://gitlab.freedesktop.org/polkit/polkit/commit/2cb40c4d5feeaa09325522bd7d97910f1b59e379 + +From 2cb40c4d5feeaa09325522bd7d97910f1b59e379 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> +Date: Mon, 3 Dec 2018 10:28:58 +0100 +Subject: [PATCH] Allow negative uids/gids in PolkitUnixUser and Group objects + +(uid_t) -1 is still used as placeholder to mean "unset". This is OK, since +there should be no users with such number, see +https://systemd.io/UIDS-GIDS#special-linux-uids. + +(uid_t) -1 is used as the default value in class initialization. + +When a user or group above INT32_MAX is created, the numeric uid or +gid wraps around to negative when the value is assigned to gint, and +polkit gets confused. Let's accept such gids, except for -1. + +A nicer fix would be to change the underlying type to e.g. uint32 to +not have negative values. But this cannot be done without breaking the +API, so likely new functions will have to be added (a +polkit_unix_user_new variant that takes a unsigned, and the same for +_group_new, _set_uid, _get_uid, _set_gid, _get_gid, etc.). This will +require a bigger patch. + +Fixes https://gitlab.freedesktop.org/polkit/polkit/issues/74. +--- + src/polkit/polkitunixgroup.c | 15 +++++++++++---- + src/polkit/polkitunixprocess.c | 12 ++++++++---- + src/polkit/polkitunixuser.c | 13 ++++++++++--- + 3 files changed, 29 insertions(+), 11 deletions(-) + +diff --git a/src/polkit/polkitunixgroup.c b/src/polkit/polkitunixgroup.c +index c57a1aa..309f689 100644 +--- a/src/polkit/polkitunixgroup.c ++++ b/src/polkit/polkitunixgroup.c +@@ -71,6 +71,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixGroup, polkit_unix_group, G_TYPE_OBJECT, + static void + polkit_unix_group_init (PolkitUnixGroup *unix_group) + { ++ unix_group->gid = -1; /* (git_t) -1 is not a valid GID under Linux */ + } + + static void +@@ -100,11 +101,14 @@ polkit_unix_group_set_property (GObject *object, + GParamSpec *pspec) + { + PolkitUnixGroup *unix_group = POLKIT_UNIX_GROUP (object); ++ gint val; + + switch (prop_id) + { + case PROP_GID: +- unix_group->gid = g_value_get_int (value); ++ val = g_value_get_int (value); ++ g_return_if_fail (val != -1); ++ unix_group->gid = val; + break; + + default: +@@ -131,9 +135,9 @@ polkit_unix_group_class_init (PolkitUnixGroupClass *klass) + g_param_spec_int ("gid", + "Group ID", + "The UNIX group ID", +- 0, ++ G_MININT, + G_MAXINT, +- 0, ++ -1, + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE | + G_PARAM_STATIC_NAME | +@@ -166,9 +170,10 @@ polkit_unix_group_get_gid (PolkitUnixGroup *group) + */ + void + polkit_unix_group_set_gid (PolkitUnixGroup *group, +- gint gid) ++ gint gid) + { + g_return_if_fail (POLKIT_IS_UNIX_GROUP (group)); ++ g_return_if_fail (gid != -1); + group->gid = gid; + } + +@@ -183,6 +188,8 @@ polkit_unix_group_set_gid (PolkitUnixGroup *group, + PolkitIdentity * + polkit_unix_group_new (gint gid) + { ++ g_return_val_if_fail (gid != -1, NULL); ++ + return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_GROUP, + "gid", gid, + NULL)); +diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c +index 972b777..b02b258 100644 +--- a/src/polkit/polkitunixprocess.c ++++ b/src/polkit/polkitunixprocess.c +@@ -159,9 +159,14 @@ polkit_unix_process_set_property (GObject *object, + polkit_unix_process_set_pid (unix_process, g_value_get_int (value)); + break; + +- case PROP_UID: +- polkit_unix_process_set_uid (unix_process, g_value_get_int (value)); ++ case PROP_UID: { ++ gint val; ++ ++ val = g_value_get_int (value); ++ g_return_if_fail (val != -1); ++ polkit_unix_process_set_uid (unix_process, val); + break; ++ } + + case PROP_START_TIME: + polkit_unix_process_set_start_time (unix_process, g_value_get_uint64 (value)); +@@ -239,7 +244,7 @@ polkit_unix_process_class_init (PolkitUnixProcessClass *klass) + g_param_spec_int ("uid", + "User ID", + "The UNIX user ID", +- -1, ++ G_MININT, + G_MAXINT, + -1, + G_PARAM_CONSTRUCT | +@@ -303,7 +308,6 @@ polkit_unix_process_set_uid (PolkitUnixProcess *process, + gint uid) + { + g_return_if_fail (POLKIT_IS_UNIX_PROCESS (process)); +- g_return_if_fail (uid >= -1); + process->uid = uid; + } + +diff --git a/src/polkit/polkitunixuser.c b/src/polkit/polkitunixuser.c +index 8bfd3a1..234a697 100644 +--- a/src/polkit/polkitunixuser.c ++++ b/src/polkit/polkitunixuser.c +@@ -72,6 +72,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixUser, polkit_unix_user, G_TYPE_OBJECT, + static void + polkit_unix_user_init (PolkitUnixUser *unix_user) + { ++ unix_user->uid = -1; /* (uid_t) -1 is not a valid UID under Linux */ + unix_user->name = NULL; + } + +@@ -112,11 +113,14 @@ polkit_unix_user_set_property (GObject *object, + GParamSpec *pspec) + { + PolkitUnixUser *unix_user = POLKIT_UNIX_USER (object); ++ gint val; + + switch (prop_id) + { + case PROP_UID: +- unix_user->uid = g_value_get_int (value); ++ val = g_value_get_int (value); ++ g_return_if_fail (val != -1); ++ unix_user->uid = val; + break; + + default: +@@ -144,9 +148,9 @@ polkit_unix_user_class_init (PolkitUnixUserClass *klass) + g_param_spec_int ("uid", + "User ID", + "The UNIX user ID", +- 0, ++ G_MININT, + G_MAXINT, +- 0, ++ -1, + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE | + G_PARAM_STATIC_NAME | +@@ -182,6 +186,7 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, + gint uid) + { + g_return_if_fail (POLKIT_IS_UNIX_USER (user)); ++ g_return_if_fail (uid != -1); + user->uid = uid; + } + +@@ -196,6 +201,8 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, + PolkitIdentity * + polkit_unix_user_new (gint uid) + { ++ g_return_val_if_fail (uid != -1, NULL); ++ + return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_USER, + "uid", uid, + NULL)); +-- +2.18.1 + diff --git a/gnu/packages/patches/poppler-CVE-2018-19149.patch b/gnu/packages/patches/poppler-CVE-2018-19149.patch new file mode 100644 index 0000000000..3641f5f078 --- /dev/null +++ b/gnu/packages/patches/poppler-CVE-2018-19149.patch @@ -0,0 +1,80 @@ +Fix CVE-2018-19149: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19149 +https://gitlab.freedesktop.org/poppler/poppler/issues/664 + +Patch copied from upstream source repository: + +https://gitlab.freedesktop.org/poppler/poppler/commit/f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 + +From f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 Mon Sep 17 00:00:00 2001 +From: Marek Kasik <mkasik@redhat.com> +Date: Fri, 20 Apr 2018 11:38:13 +0200 +Subject: [PATCH] Fix crash on missing embedded file + +Check whether an embedded file is actually present in the PDF +and show warning in that case. + +https://bugs.freedesktop.org/show_bug.cgi?id=106137 +https://gitlab.freedesktop.org/poppler/poppler/issues/236 +--- + glib/poppler-attachment.cc | 26 +++++++++++++++++--------- + glib/poppler-document.cc | 3 ++- + 2 files changed, 19 insertions(+), 10 deletions(-) + +diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc +index c6502e9d..11ba5bb5 100644 +--- a/glib/poppler-attachment.cc ++++ b/glib/poppler-attachment.cc +@@ -111,17 +111,25 @@ _poppler_attachment_new (FileSpec *emb_file) + attachment->description = _poppler_goo_string_to_utf8 (emb_file->getDescription ()); + + embFile = emb_file->getEmbeddedFile(); +- attachment->size = embFile->size (); ++ if (embFile != NULL && embFile->streamObject()->isStream()) ++ { ++ attachment->size = embFile->size (); + +- if (embFile->createDate ()) +- _poppler_convert_pdf_date_to_gtime (embFile->createDate (), (time_t *)&attachment->ctime); +- if (embFile->modDate ()) +- _poppler_convert_pdf_date_to_gtime (embFile->modDate (), (time_t *)&attachment->mtime); ++ if (embFile->createDate ()) ++ _poppler_convert_pdf_date_to_gtime (embFile->createDate (), (time_t *)&attachment->ctime); ++ if (embFile->modDate ()) ++ _poppler_convert_pdf_date_to_gtime (embFile->modDate (), (time_t *)&attachment->mtime); + +- if (embFile->checksum () && embFile->checksum ()->getLength () > 0) +- attachment->checksum = g_string_new_len (embFile->checksum ()->getCString (), +- embFile->checksum ()->getLength ()); +- priv->obj_stream = embFile->streamObject()->copy(); ++ if (embFile->checksum () && embFile->checksum ()->getLength () > 0) ++ attachment->checksum = g_string_new_len (embFile->checksum ()->getCString (), ++ embFile->checksum ()->getLength ()); ++ priv->obj_stream = embFile->streamObject()->copy(); ++ } ++ else ++ { ++ g_warning ("Missing stream object for embedded file"); ++ g_clear_object (&attachment); ++ } + + return attachment; + } +diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc +index 83f6aea6..ea319344 100644 +--- a/glib/poppler-document.cc ++++ b/glib/poppler-document.cc +@@ -670,7 +670,8 @@ poppler_document_get_attachments (PopplerDocument *document) + attachment = _poppler_attachment_new (emb_file); + delete emb_file; + +- retval = g_list_prepend (retval, attachment); ++ if (attachment != NULL) ++ retval = g_list_prepend (retval, attachment); + } + return g_list_reverse (retval); + } +-- +2.19.1 + diff --git a/gnu/packages/patches/python-cffi-x87-stack-clean.patch b/gnu/packages/patches/python-cffi-x87-stack-clean.patch new file mode 100644 index 0000000000..50243505ee --- /dev/null +++ b/gnu/packages/patches/python-cffi-x87-stack-clean.patch @@ -0,0 +1,29 @@ +Fix test that fails on i686: + +https://bitbucket.org/cffi/cffi/issues/382 + +This is a squashed version of these commits: +https://bitbucket.org/cffi/cffi/commits/ef09637b2314 +https://bitbucket.org/cffi/cffi/commits/7a76a3815340 + +diff -r 99940f1f5402 testing/cffi0/test_function.py +--- a/testing/cffi0/test_function.py Tue Feb 27 21:18:33 2018 +0100 ++++ b/testing/cffi0/test_function.py Sun Nov 11 16:26:23 2018 +0100 +@@ -45,14 +45,14 @@ + assert x != math.sin(1.23) # rounding effects + assert abs(x - math.sin(1.23)) < 1E-6 + +- def test_sin_no_return_value(self): ++ def test_lround_no_return_value(self): + # check that 'void'-returning functions work too + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" +- void sin(double x); ++ void lround(double x); + """) + m = ffi.dlopen(lib_m) +- x = m.sin(1.23) ++ x = m.lround(1.23) + assert x is None + + def test_dlopen_filename(self): diff --git a/gnu/packages/patches/python-networkx2-reproducible-build.patch b/gnu/packages/patches/python-networkx2-reproducible-build.patch deleted file mode 100644 index 8274767ab8..0000000000 --- a/gnu/packages/patches/python-networkx2-reproducible-build.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c065b972ed294769a41936d6b9feb336473af5d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com> -Date: Sat, 4 Nov 2017 15:28:47 +0100 -Subject: Fix SOURCE_DATE_EPOCH ignored bug (#2735) - -* Fix SOURCE_DATE_EPOCH ignored bug - -Fix a bug in networkx/release.py that makes build -non-reproducible. ---- - networkx/release.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/networkx/release.py b/networkx/release.py -index e81fc0c0..6322cf0d 100644 ---- a/networkx/release.py -+++ b/networkx/release.py -@@ -135,7 +135,7 @@ def get_revision(): - - def get_info(dynamic=True): - # Date information -- date_info = datetime.datetime.now() -+ date_info = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) - date = time.asctime(date_info.timetuple()) - - revision, version, version_info, vcs_info = None, None, None, None --- -2.14.2 - diff --git a/gnu/packages/patches/python-paste-remove-website-test.patch b/gnu/packages/patches/python-paste-remove-website-test.patch deleted file mode 100644 index 93417fbe75..0000000000 --- a/gnu/packages/patches/python-paste-remove-website-test.patch +++ /dev/null @@ -1,21 +0,0 @@ -Remove the test to see if the Python Paste website is up. - -Obviously without network access there is no way for us to check this, and -it's pretty strange to test a project's website when you really mean to test -the project anyhow... - ---- a/tests/test_proxy.py 2016-02-22 19:13:04.040117767 -0800 -+++ b/tests/test_proxy.py 2016-02-22 19:13:04.040117767 -0800 -@@ -1,12 +1,3 @@ - from paste import proxy - from paste.fixture import TestApp - --def test_paste_website(): -- # Not the most robust test... -- # need to test things like POSTing to pages, and getting from pages -- # that don't set content-length. -- app = proxy.Proxy('http://pythonpaste.org') -- app = TestApp(app) -- res = app.get('/') -- assert 'documentation' in res -- diff --git a/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch b/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch deleted file mode 100644 index 90328cc0eb..0000000000 --- a/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch +++ /dev/null @@ -1,25 +0,0 @@ -This patch stops a test sometimes failing because of non-determinism. See -https://github.com/scikit-learn/scikit-learn/pull/9542 - -From ff9f6db6e8b59c2b3528c8137ed4054f57c1d7c4 Mon Sep 17 00:00:00 2001 -From: Hanmin Qin <qinhanmin2005@sina.com> -Date: Sun, 13 Aug 2017 22:13:49 +0800 -Subject: [PATCH] add random_state - ---- - sklearn/tests/test_kernel_ridge.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sklearn/tests/test_kernel_ridge.py b/sklearn/tests/test_kernel_ridge.py -index 4750a096ac6..979875870b6 100644 ---- a/sklearn/tests/test_kernel_ridge.py -+++ b/sklearn/tests/test_kernel_ridge.py -@@ -10,7 +10,7 @@ - from sklearn.utils.testing import assert_array_almost_equal - - --X, y = make_regression(n_features=10) -+X, y = make_regression(n_features=10, random_state=0) - Xcsr = sp.csr_matrix(X) - Xcsc = sp.csc_matrix(X) - Y = np.array([y, y]).T diff --git a/gnu/packages/patches/qemu-CVE-2018-16847.patch b/gnu/packages/patches/qemu-CVE-2018-16847.patch new file mode 100644 index 0000000000..c76bdf764a --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2018-16847.patch @@ -0,0 +1,158 @@ +Fix CVE-2018-16847: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16847 + +Patch copied from upstream source repository: + +https://git.qemu.org/?p=qemu.git;a=commitdiff;h=87ad860c622cc8f8916b5232bd8728c08f938fce + +From 87ad860c622cc8f8916b5232bd8728c08f938fce Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini <pbonzini@redhat.com> +Date: Tue, 20 Nov 2018 19:41:48 +0100 +Subject: [PATCH] nvme: fix out-of-bounds access to the CMB +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Because the CMB BAR has a min_access_size of 2, if you read the last +byte it will try to memcpy *2* bytes from n->cmbuf, causing an off-by-one +error. This is CVE-2018-16847. + +Another way to fix this might be to register the CMB as a RAM memory +region, which would also be more efficient. However, that might be a +change for big-endian machines; I didn't think this through and I don't +know how real hardware works. Add a basic testcase for the CMB in case +somebody does this change later on. + +Cc: Keith Busch <keith.busch@intel.com> +Cc: qemu-block@nongnu.org +Reported-by: Li Qiang <liq3ea@gmail.com> +Reviewed-by: Li Qiang <liq3ea@gmail.com> +Tested-by: Li Qiang <liq3ea@gmail.com> +Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> +Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> +Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> +Signed-off-by: Kevin Wolf <kwolf@redhat.com> +--- + hw/block/nvme.c | 2 +- + tests/Makefile.include | 2 +- + tests/nvme-test.c | 68 +++++++++++++++++++++++++++++++++++------- + 3 files changed, 60 insertions(+), 12 deletions(-) + +diff --git a/hw/block/nvme.c b/hw/block/nvme.c +index 28d284346dd..8c35cab2b43 100644 +--- a/hw/block/nvme.c ++++ b/hw/block/nvme.c +@@ -1201,7 +1201,7 @@ static const MemoryRegionOps nvme_cmb_ops = { + .write = nvme_cmb_write, + .endianness = DEVICE_LITTLE_ENDIAN, + .impl = { +- .min_access_size = 2, ++ .min_access_size = 1, + .max_access_size = 8, + }, + }; +diff --git a/tests/Makefile.include b/tests/Makefile.include +index 613242bc6ef..fb0b449c02a 100644 +--- a/tests/Makefile.include ++++ b/tests/Makefile.include +@@ -730,7 +730,7 @@ tests/test-hmp$(EXESUF): tests/test-hmp.o + tests/machine-none-test$(EXESUF): tests/machine-none-test.o + tests/drive_del-test$(EXESUF): tests/drive_del-test.o $(libqos-virtio-obj-y) + tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y) +-tests/nvme-test$(EXESUF): tests/nvme-test.o ++tests/nvme-test$(EXESUF): tests/nvme-test.o $(libqos-pc-obj-y) + tests/pvpanic-test$(EXESUF): tests/pvpanic-test.o + tests/i82801b11-test$(EXESUF): tests/i82801b11-test.o + tests/ac97-test$(EXESUF): tests/ac97-test.o +diff --git a/tests/nvme-test.c b/tests/nvme-test.c +index 7674a446e4f..2700ba838aa 100644 +--- a/tests/nvme-test.c ++++ b/tests/nvme-test.c +@@ -8,25 +8,73 @@ + */ + + #include "qemu/osdep.h" ++#include "qemu/units.h" + #include "libqtest.h" ++#include "libqos/libqos-pc.h" ++ ++static QOSState *qnvme_start(const char *extra_opts) ++{ ++ QOSState *qs; ++ const char *arch = qtest_get_arch(); ++ const char *cmd = "-drive id=drv0,if=none,file=null-co://,format=raw " ++ "-device nvme,addr=0x4.0,serial=foo,drive=drv0 %s"; ++ ++ if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { ++ qs = qtest_pc_boot(cmd, extra_opts ? : ""); ++ global_qtest = qs->qts; ++ return qs; ++ } ++ ++ g_printerr("nvme tests are only available on x86\n"); ++ exit(EXIT_FAILURE); ++} ++ ++static void qnvme_stop(QOSState *qs) ++{ ++ qtest_shutdown(qs); ++} + +-/* Tests only initialization so far. TODO: Replace with functional tests */ + static void nop(void) + { ++ QOSState *qs; ++ ++ qs = qnvme_start(NULL); ++ qnvme_stop(qs); + } + +-int main(int argc, char **argv) ++static void nvmetest_cmb_test(void) + { +- int ret; ++ const int cmb_bar_size = 2 * MiB; ++ QOSState *qs; ++ QPCIDevice *pdev; ++ QPCIBar bar; + +- g_test_init(&argc, &argv, NULL); +- qtest_add_func("/nvme/nop", nop); ++ qs = qnvme_start("-global nvme.cmb_size_mb=2"); ++ pdev = qpci_device_find(qs->pcibus, QPCI_DEVFN(4,0)); ++ g_assert(pdev != NULL); ++ ++ qpci_device_enable(pdev); ++ bar = qpci_iomap(pdev, 2, NULL); ++ ++ qpci_io_writel(pdev, bar, 0, 0xccbbaa99); ++ g_assert_cmpint(qpci_io_readb(pdev, bar, 0), ==, 0x99); ++ g_assert_cmpint(qpci_io_readw(pdev, bar, 0), ==, 0xaa99); ++ ++ /* Test partially out-of-bounds accesses. */ ++ qpci_io_writel(pdev, bar, cmb_bar_size - 1, 0x44332211); ++ g_assert_cmpint(qpci_io_readb(pdev, bar, cmb_bar_size - 1), ==, 0x11); ++ g_assert_cmpint(qpci_io_readw(pdev, bar, cmb_bar_size - 1), !=, 0x2211); ++ g_assert_cmpint(qpci_io_readl(pdev, bar, cmb_bar_size - 1), !=, 0x44332211); ++ g_free(pdev); + +- qtest_start("-drive id=drv0,if=none,file=null-co://,format=raw " +- "-device nvme,drive=drv0,serial=foo"); +- ret = g_test_run(); ++ qnvme_stop(qs); ++} + +- qtest_end(); ++int main(int argc, char **argv) ++{ ++ g_test_init(&argc, &argv, NULL); ++ qtest_add_func("/nvme/nop", nop); ++ qtest_add_func("/nvme/cmb_test", nvmetest_cmb_test); + +- return ret; ++ return g_test_run(); + } +-- +2.19.2 + diff --git a/gnu/packages/patches/qemu-CVE-2018-16867.patch b/gnu/packages/patches/qemu-CVE-2018-16867.patch new file mode 100644 index 0000000000..1403d8e0f8 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2018-16867.patch @@ -0,0 +1,49 @@ +Fix CVE-2018-16867: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16867 +https://seclists.org/oss-sec/2018/q4/202 + +Patch copied from upstream source repository: + +https://git.qemu.org/?p=qemu.git;a=commitdiff;h=c52d46e041b42bb1ee6f692e00a0abe37a9659f6 + +From c52d46e041b42bb1ee6f692e00a0abe37a9659f6 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <kraxel@redhat.com> +Date: Mon, 3 Dec 2018 11:10:45 +0100 +Subject: [PATCH] usb-mtp: outlaw slashes in filenames +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Slash is unix directory separator, so they are not allowed in filenames. +Note this also stops the classic escape via "../". + +Fixes: CVE-2018-16867 +Reported-by: Michael Hanselmann <public@hansmi.ch> +Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> +Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> +Message-id: 20181203101045.27976-3-kraxel@redhat.com +--- + hw/usb/dev-mtp.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c +index 0f6a9702ef1..100b7171f4e 100644 +--- a/hw/usb/dev-mtp.c ++++ b/hw/usb/dev-mtp.c +@@ -1719,6 +1719,12 @@ static void usb_mtp_write_metadata(MTPState *s) + + filename = utf16_to_str(dataset->length, dataset->filename); + ++ if (strchr(filename, '/')) { ++ usb_mtp_queue_result(s, RES_PARAMETER_NOT_SUPPORTED, d->trans, ++ 0, 0, 0, 0); ++ return; ++ } ++ + o = usb_mtp_object_lookup_name(p, filename, dataset->length); + if (o != NULL) { + next_handle = o->handle; +-- +2.19.2 + diff --git a/gnu/packages/patches/qt-5-renameat2.patch b/gnu/packages/patches/qt-5-renameat2.patch new file mode 100644 index 0000000000..036070c7ff --- /dev/null +++ b/gnu/packages/patches/qt-5-renameat2.patch @@ -0,0 +1,35 @@ +Avoid conflicting declaration of 'renameat2' on glibc 2.28 +(see <https://github.com/meta-qt5/meta-qt5/issues/94>.) + +Patch from <https://github.com/meta-qt5/meta-qt5/pull/95> +by Andreas Müller <schnitzeltony@gmail.com>. + +--- + src/corelib/io/qfilesystemengine_unix.cpp | 11 ++++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp +index be6ce48d0cb..1bf1bebc7f1 100644 +--- a/qtbase/src/corelib/io/qfilesystemengine_unix.cpp ++++ b/qtbase/src/corelib/io/qfilesystemengine_unix.cpp +@@ -98,6 +98,17 @@ extern "C" NSString *NSTemporaryDirectory(); + # define FICLONE _IOW(0x94, 9, int) + #endif + ++// renameat2/statx features for non bootstrapped build ++#ifndef QT_BOOTSTRAPPED ++#ifdef __GLIBC_PREREQ ++# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++#else ++# define QT_FEATURE_renameat2 -1 ++# define QT_FEATURE_statx -1 ++#endif ++#endif ++ + # if defined(Q_OS_ANDROID) + // renameat2() and statx() are disabled on Android because quite a few systems + // come with sandboxes that kill applications that make system calls outside a +-- +2.14.4 + diff --git a/gnu/packages/patches/qtbase-glibc-compat.patch b/gnu/packages/patches/qtbase-glibc-compat.patch deleted file mode 100644 index 15a2540b3a..0000000000 --- a/gnu/packages/patches/qtbase-glibc-compat.patch +++ /dev/null @@ -1,50 +0,0 @@ -Fix qmake build with glibc 2.28. - -Taken from upstream: -https://code.qt.io/cgit/qt/qtbase.git/commit/?id=25feee4e061b99edab79503d81f5bd045c6c8e3d - -diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h -index 3469ebe5e6..c5585ea32a 100644 ---- a/src/corelib/global/qconfig-bootstrapped.h -+++ b/src/corelib/global/qconfig-bootstrapped.h -@@ -98,10 +98,18 @@ - #define QT_NO_QOBJECT - #define QT_FEATURE_process -1 - #define QT_FEATURE_regularexpression -1 --#define QT_FEATURE_renameat2 -1 -+#ifdef __GLIBC_PREREQ -+# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) -+#else -+# define QT_FEATURE_renameat2 -1 -+#endif - #define QT_FEATURE_sharedmemory -1 - #define QT_FEATURE_slog2 -1 --#define QT_FEATURE_statx -1 -+#ifdef __GLIBC_PREREQ -+# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) -+#else -+# define QT_FEATURE_statx -1 -+#endif - #define QT_FEATURE_syslog -1 - #define QT_NO_SYSTEMLOCALE - #define QT_FEATURE_systemsemaphore -1 -diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp -index 0c9cdb8667..deb4a9f220 100644 ---- a/src/corelib/io/qfilesystemengine_unix.cpp -+++ b/src/corelib/io/qfilesystemengine_unix.cpp -@@ -91,7 +91,6 @@ extern "C" NSString *NSTemporaryDirectory(); - # include <sys/syscall.h> - # include <sys/sendfile.h> - # include <linux/fs.h> --# include <linux/stat.h> - - // in case linux/fs.h is too old and doesn't define it: - #ifndef FICLONE -@@ -112,6 +111,7 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp - # endif - - # if !QT_CONFIG(statx) && defined(SYS_statx) -+# include <linux/stat.h> - static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf) - { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); } - # elif !QT_CONFIG(statx) && !defined(SYS_statx) diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch b/gnu/packages/patches/quilt-getopt-nondigit-param.patch index 6bbec67e75..6bbec67e75 100644 --- a/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch +++ b/gnu/packages/patches/quilt-getopt-nondigit-param.patch diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch b/gnu/packages/patches/quilt-getopt-second-separator.patch index cde2c8d41c..cde2c8d41c 100644 --- a/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch +++ b/gnu/packages/patches/quilt-getopt-second-separator.patch diff --git a/gnu/packages/patches/randomjungle-disable-static-build.patch b/gnu/packages/patches/randomjungle-disable-static-build.patch new file mode 100644 index 0000000000..3de6c269fd --- /dev/null +++ b/gnu/packages/patches/randomjungle-disable-static-build.patch @@ -0,0 +1,14 @@ +Drop build time dependency on the static executables. + +--- a/src/Makefile.in 2018-11-25 20:27:10.691508925 +0100 ++++ b/src/Makefile.in 2018-11-25 20:27:43.565631413 +0100 +@@ -34,8 +34,7 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-bin_PROGRAMS = rjungle$(EXEEXT) rjungle_static$(EXEEXT) \ +- rjunglesparse$(EXEEXT) rjunglesparse_static$(EXEEXT) ++bin_PROGRAMS = rjungle$(EXEEXT) rjunglesparse$(EXEEXT) + subdir = src + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 diff --git a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch index 6ffc897297..a2bad55117 100644 --- a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch +++ b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch @@ -1,5 +1,6 @@ GDB responds with some overly detailed lines - which makes the tests fail. Patch rust to accept those instead. +See <https://github.com/rust-lang/rust/issues/54178>. diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs --- orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:24:33.775565159 +0200 +++ rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:25:56.322513658 +0200 @@ -92,3 +93,19 @@ diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs ru // gdb-command:print univariant // gdbg-check:$4 = {{__0 = -1}} +--- orig/rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-09-13 10:24:33.783565071 +0200 ++++ rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-10-26 18:19:20.404564587 +0200 +@@ -17,11 +17,11 @@ + + // gdb-command:print first + // gdbg-check:$1 = {<No data fields>} +-// gdbr-check:$1 = <error reading variable> ++// gdbr-check:$1 = nil_enum::ANilEnum + + // gdb-command:print second + // gdbg-check:$2 = {<No data fields>} +-// gdbr-check:$2 = <error reading variable> ++// gdbr-check:$2 = nil_enum::AnotherNilEnum + + #![allow(unused_variables)] + #![feature(omit_gdb_pretty_printer_section)] diff --git a/gnu/packages/patches/rust-reproducible-builds.patch b/gnu/packages/patches/rust-reproducible-builds.patch new file mode 100644 index 0000000000..ef7bf53b5d --- /dev/null +++ b/gnu/packages/patches/rust-reproducible-builds.patch @@ -0,0 +1,25 @@ +From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 +From: Tim Ryan <id@timryan.org> +Date: Mon, 14 May 2018 06:22:21 -0400 +Subject: [PATCH] Support reproducible builds by forcing window.search to use + stable key ordering. (#692) +See <https://github.com/rust-lang-nursery/mdBook/pull/692> +--- + src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +index d49772f8b..1ee66a511 100644 +--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs ++++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result<String> { + searchoptions, + index, + }; ++ ++ // By converting to serde_json::Value as an intermediary, we use a ++ // BTreeMap internally and can force a stable ordering of map keys. ++ let json_contents = serde_json::to_value(&json_contents)?; + let json_contents = serde_json::to_string(&json_contents)?; + + Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/patches/scribus-poppler.patch b/gnu/packages/patches/scribus-poppler.patch new file mode 100644 index 0000000000..9b969e4cb6 --- /dev/null +++ b/gnu/packages/patches/scribus-poppler.patch @@ -0,0 +1,72 @@ +Fix build with recent Poppler. + +From d867ec3c386baaed1b8e076dd70b278863411480 Mon Sep 17 00:00:00 2001 +From: Jean Ghali <jghali@libertysurf.fr> +Date: Mon, 30 Apr 2018 09:19:33 +0000 +Subject: [PATCH] =?UTF-8?q?#15289:=20FTBFS=201.5.4=20with=20error:=20inval?= + =?UTF-8?q?id=20conversion=20from=20=E2=80=98const=20GooString*=E2=80=99?= + =?UTF-8?q?=20to=20=E2=80=98GooString*=E2=80=99?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-svn-id: svn://scribus.net/trunk/Scribus@22498 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/importpdf.cpp | 2 +- + scribus/plugins/import/pdf/importpdf.h | 2 +- + scribus/plugins/import/pdf/slaoutput.cpp | 2 +- + scribus/plugins/import/pdf/slaoutput.h | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp +index c1802861aa..d4c5a9ba49 100644 +--- a/scribus/plugins/import/pdf/importpdf.cpp ++++ b/scribus/plugins/import/pdf/importpdf.cpp +@@ -1081,7 +1081,7 @@ QRectF PdfPlug::getCBox(int box, int pgNum) + return cRect; + } + +-QString PdfPlug::UnicodeParsedString(GooString *s1) ++QString PdfPlug::UnicodeParsedString(const GooString *s1) + { + if ( !s1 || s1->getLength() == 0 ) + return QString(); +diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h +index c8c5efcd0d..5249562692 100644 +--- a/scribus/plugins/import/pdf/importpdf.h ++++ b/scribus/plugins/import/pdf/importpdf.h +@@ -81,7 +81,7 @@ class PdfPlug : public QObject + private: + bool convert(const QString& fn); + QRectF getCBox(int box, int pgNum); +- QString UnicodeParsedString(GooString *s1); ++ QString UnicodeParsedString(const GooString *s1); + + QList<PageItem*> Elements; + double baseX, baseY; +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index be1815dc29..17b6357246 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -4252,7 +4252,7 @@ void SlaOutputDev::pushGroup(QString maskName, GBool forSoftMask, GBool alpha, b + m_groupStack.push(gElements); + } + +-QString SlaOutputDev::UnicodeParsedString(GooString *s1) ++QString SlaOutputDev::UnicodeParsedString(const GooString *s1) + { + if ( !s1 || s1->getLength() == 0 ) + return QString(); +diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index 20e8b2d311..6698c030e0 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -266,7 +266,7 @@ class SlaOutputDev : public OutputDev + int getBlendMode(GfxState *state); + void applyMask(PageItem *ite); + void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false); +- QString UnicodeParsedString(GooString *s1); ++ QString UnicodeParsedString(const GooString *s1); + bool checkClip(); + bool pathIsClosed; + QString CurrColorFill; diff --git a/gnu/packages/patches/teeworlds-use-latest-wavpack.patch b/gnu/packages/patches/teeworlds-use-latest-wavpack.patch index e9fd991087..3ad1340d2e 100644 --- a/gnu/packages/patches/teeworlds-use-latest-wavpack.patch +++ b/gnu/packages/patches/teeworlds-use-latest-wavpack.patch @@ -1,10 +1,20 @@ -Downloaded from https://anonscm.debian.org/cgit/pkg-games/teeworlds.git/plain/debian/patches/new-wavpack.patch. +Downloaded from https://salsa.debian.org/games-team/teeworlds/raw/master/debian/patches/new-wavpack.patch. -This patch lets us build teeworlds with wavpack 5.1.0. +From: Markus Koschany <apo@debian.org> +Date: Thu, 25 Oct 2018 20:52:27 +0200 +Subject: new-wavpack +Make wavpack compatible with Debian's version. +--- + src/engine/client/sound.cpp | 33 +++++++++++++++------------------ + src/engine/client/sound.h | 4 ---- + 2 files changed, 15 insertions(+), 22 deletions(-) + +diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp +index 048ec24..80de3c5 100644 --- a/src/engine/client/sound.cpp +++ b/src/engine/client/sound.cpp -@@ -328,17 +328,14 @@ void CSound::RateConvert(int SampleID) +@@ -325,10 +325,6 @@ void CSound::RateConvert(int SampleID) pSample->m_NumFrames = NumFrames; } @@ -12,10 +22,10 @@ This patch lets us build teeworlds with wavpack 5.1.0. -{ - return io_read(ms_File, pBuffer, Size); -} -- - int CSound::LoadWV(const char *pFilename) + + ISound::CSampleHandle CSound::LoadWV(const char *pFilename) { - CSample *pSample; +@@ -336,6 +332,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) int SampleID = -1; char aError[100]; WavpackContext *pContext; @@ -24,17 +34,18 @@ This patch lets us build teeworlds with wavpack 5.1.0. // don't waste memory on sound when we are stress testing if(g_Config.m_DbgStress) -@@ -351,19 +348,23 @@ int CSound::LoadWV(const char *pFilename - if(!m_pStorage) - return -1; +@@ -349,25 +347,29 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + return CSampleHandle(); + lock_wait(m_SoundLock); - ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL); - if(!ms_File) + File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL, aWholePath, sizeof(aWholePath)); + if(!File) { dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename); - return -1; + lock_unlock(m_SoundLock); + return CSampleHandle(); } + else + { @@ -43,7 +54,14 @@ This patch lets us build teeworlds with wavpack 5.1.0. SampleID = AllocID(); if(SampleID < 0) - return -1; + { +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } pSample = &m_aSamples[SampleID]; - pContext = WavpackOpenFileInput(ReadData, aError); @@ -51,7 +69,29 @@ This patch lets us build teeworlds with wavpack 5.1.0. if (pContext) { int m_aSamples = WavpackGetNumSamples(pContext); -@@ -419,9 +420,6 @@ int CSound::LoadWV(const char *pFilename +@@ -385,8 +387,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + if(pSample->m_Channels > 2) + { + dbg_msg("sound/wv", "file is not mono or stereo. filename='%s'", pFilename); +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } +@@ -401,8 +403,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + if(BitsPerSample != 16) + { + dbg_msg("sound/wv", "bps is %d, not 16, filname='%s'", BitsPerSample, pFilename); +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } +@@ -429,9 +431,6 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) dbg_msg("sound/wv", "failed to open %s: %s", pFilename, aError); } @@ -61,14 +101,16 @@ This patch lets us build teeworlds with wavpack 5.1.0. if(g_Config.m_Debug) dbg_msg("sound/wv", "loaded %s", pFilename); -@@ -527,7 +525,5 @@ void CSound::StopAll() - lock_unlock(m_SoundLock); +@@ -560,7 +559,5 @@ bool CSound::IsPlaying(CSampleHandle SampleID) + return Ret; } -IOHANDLE CSound::ms_File = 0; - IEngineSound *CreateEngineSound() { return new CSound; } +diff --git a/src/engine/client/sound.h b/src/engine/client/sound.h +index ff357c0..cec2cde 100644 --- a/src/engine/client/sound.h +++ b/src/engine/client/sound.h @@ -21,10 +21,6 @@ public: @@ -81,4 +123,4 @@ This patch lets us build teeworlds with wavpack 5.1.0. - virtual bool IsSoundEnabled() { return m_SoundEnabled != 0; } - virtual int LoadWV(const char *pFilename); + virtual CSampleHandle LoadWV(const char *pFilename); diff --git a/gnu/packages/patches/telegram-purple-adjust-test.patch b/gnu/packages/patches/telegram-purple-adjust-test.patch new file mode 100644 index 0000000000..db3b497d5d --- /dev/null +++ b/gnu/packages/patches/telegram-purple-adjust-test.patch @@ -0,0 +1,14 @@ +This test incorrectly expects the libpurple search path to initially +contain exactly one element. Remove this incorrect assertion. + +--- telegram-purple-1.3.1-checkout/test/loadtest.c 2018-10-27 16:25:06.258459600 +0200 ++++ telegram-purple-1.3.1-checkout/test/loadtest.c 2018-10-27 16:25:11.830434770 +0200 +@@ -156,7 +156,7 @@ static void tdf_inject_plugin (void) { + printf ("Injecting our module into purple_plugins_* ...\n"); + purple_plugins_init (); + GList *search_paths = purple_plugins_get_search_paths (); +- assert (!search_paths->prev && !search_paths->next && search_paths->data); ++ assert (!search_paths->prev && search_paths->data); + GList *new_paths = g_list_append (search_paths, g_strdup ("bin/")); + assert (new_paths == search_paths); + // Load "my" path before the default. diff --git a/gnu/packages/patches/tomsfastmath-constness.patch b/gnu/packages/patches/tomsfastmath-constness.patch new file mode 100644 index 0000000000..7c6ab5bbec --- /dev/null +++ b/gnu/packages/patches/tomsfastmath-constness.patch @@ -0,0 +1,76 @@ +From dac089515901d6bf315cd15a6e744b8d2c02c1cb Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> +Date: Sat, 31 Oct 2015 22:48:07 +0100 +Subject: [PATCH] tfm: make a few functions static + +clamav expects them to be static and it does not seem bad to do so. + +Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> +--- + src/bin/fp_read_radix.c | 2 +- + src/bin/fp_read_signed_bin.c | 2 +- + src/bin/fp_read_unsigned_bin.c | 2 +- + src/headers/tfm.h | 6 +++--- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/bin/fp_read_radix.c b/src/bin/fp_read_radix.c +index 0b5e826..431afa0 100644 +--- a/src/bin/fp_read_radix.c ++++ b/src/bin/fp_read_radix.c +@@ -9,7 +9,7 @@ + */ + #include <tfm_private.h> + +-int fp_read_radix(fp_int *a, char *str, int radix) ++int fp_read_radix(fp_int *a, const char *str, int radix) + { + int y, neg; + char ch; +diff --git a/src/bin/fp_read_signed_bin.c b/src/bin/fp_read_signed_bin.c +index e2b8003..6467d19 100644 +--- a/src/bin/fp_read_signed_bin.c ++++ b/src/bin/fp_read_signed_bin.c +@@ -9,7 +9,7 @@ + */ + #include <tfm_private.h> + +-void fp_read_signed_bin(fp_int *a, unsigned char *b, int c) ++void fp_read_signed_bin(fp_int *a, const unsigned char *b, int c) + { + /* read magnitude */ + fp_read_unsigned_bin (a, b + 1, c - 1); +diff --git a/src/bin/fp_read_unsigned_bin.c b/src/bin/fp_read_unsigned_bin.c +index 3ee64c0..2ee89cb 100644 +--- a/src/bin/fp_read_unsigned_bin.c ++++ b/src/bin/fp_read_unsigned_bin.c +@@ -9,7 +9,7 @@ + */ + #include <tfm_private.h> + +-void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c) ++void fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c) + { + /* zero the int */ + fp_zero (a); +diff --git a/src/headers/tfm.h b/src/headers/tfm.h +index af87b56..f406388 100644 +--- a/src/headers/tfm.h ++++ b/src/headers/tfm.h +@@ -467,14 +467,14 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback + int fp_count_bits(fp_int *a); + + int fp_unsigned_bin_size(fp_int *a); +-void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c); ++void fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c); + void fp_to_unsigned_bin(fp_int *a, unsigned char *b); + + int fp_signed_bin_size(fp_int *a); +-void fp_read_signed_bin(fp_int *a, unsigned char *b, int c); ++void fp_read_signed_bin(fp_int *a, const unsigned char *b, int c); + void fp_to_signed_bin(fp_int *a, unsigned char *b); + +-int fp_read_radix(fp_int *a, char *str, int radix); ++int fp_read_radix(fp_int *a, const char *str, int radix); + + int fp_radix_size(fp_int *a, int radix, int *size); + int fp_toradix(fp_int *a, char *str, int radix); diff --git a/gnu/packages/patches/tophat-build-with-later-seqan.patch b/gnu/packages/patches/tophat-build-with-later-seqan.patch deleted file mode 100644 index fc742e2a7d..0000000000 --- a/gnu/packages/patches/tophat-build-with-later-seqan.patch +++ /dev/null @@ -1,24 +0,0 @@ -This patch resolves a build failure when building TopHat 2.1.0 with SeqAn 1.4. -This is the relevant part of a patch originally posted here: -https://lists.fu-berlin.de/pipermail/seqan-dev/2014-July/msg00001.html - ---- a/src/segment_juncs.cpp -+++ b/src/segment_juncs.cpp -@@ -2050,10 +2050,13 @@ void juncs_from_ref_segs(RefSequenceTabl - typedef map<uint32_t, IntronMotifs> MotifMap; - - MotifMap ims; -- -- seqan::DnaStringReverseComplement rev_donor_dinuc(donor_dinuc); -- seqan::DnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc); -- -+ -+ typedef seqan::ModifiedString< -+ seqan::ModifiedString<seqan::DnaString const, seqan::ModView<seqan::FunctorComplement<seqan::Dna> > >, -+ seqan::ModReverse> ConstDnaStringReverseComplement; -+ ConstDnaStringReverseComplement rev_donor_dinuc(donor_dinuc); -+ ConstDnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc); -+ - if (talkative) - fprintf(stderr, "Collecting potential splice sites in islands\n"); - diff --git a/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch b/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch new file mode 100644 index 0000000000..9d0a08c8bf --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch @@ -0,0 +1,1485 @@ +From 1b39a1834ed182bbd8036a5cd74a9ea111fa4691 Mon Sep 17 00:00:00 2001 +From: Andre Przywara <andre.przywara@arm.com> +Date: Mon, 29 Oct 2018 00:56:47 +0000 +Subject: [PATCH 03/13] sunxi: A64: Update .dts/.dtsi files +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Update the .dts/.dtsi file from the Linux sunxi/dt64-for-4.20 tree: +commit 679294497be31596e1c9c61507746d72b6b05f26 +Author: Rodrigo Exterckötter Tjäder <rodrigo@tjader.xyz> +Date: Wed Sep 26 19:48:24 2018 +0000 + arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay + +Signed-off-by: Andre Przywara <andre.przywara@arm.com> +Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> +Reviewed-by: Jagan Teki <jagan@openedev.com> +--- + arch/arm/dts/sun50i-a64-amarula-relic.dts | 168 +++++++++++++- + arch/arm/dts/sun50i-a64-bananapi-m64.dts | 34 ++- + arch/arm/dts/sun50i-a64-nanopi-a64.dts | 89 +++++++- + arch/arm/dts/sun50i-a64-olinuxino.dts | 103 ++++++++- + arch/arm/dts/sun50i-a64-orangepi-win.dts | 179 ++++++++++++++- + arch/arm/dts/sun50i-a64-pine64.dts | 32 ++- + arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 32 ++- + arch/arm/dts/sun50i-a64-sopine.dtsi | 15 ++ + arch/arm/dts/sun50i-a64.dtsi | 313 +++++++++++++++++++++++++-- + 9 files changed, 920 insertions(+), 45 deletions(-) + +diff --git a/arch/arm/dts/sun50i-a64-amarula-relic.dts b/arch/arm/dts/sun50i-a64-amarula-relic.dts +index f3b4e93ece..6cb2b7f0c8 100644 +--- a/arch/arm/dts/sun50i-a64-amarula-relic.dts ++++ b/arch/arm/dts/sun50i-a64-amarula-relic.dts +@@ -22,11 +22,11 @@ + stdout-path = "serial0:115200n8"; + }; + +- reg_vcc3v3: vcc3v3 { +- compatible = "regulator-fixed"; +- regulator-name = "vcc3v3"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; ++ wifi_pwrseq: wifi-pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ clocks = <&rtc 1>; ++ clock-names = "ext_clock"; ++ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */ + }; + }; + +@@ -34,10 +34,34 @@ + status = "okay"; + }; + ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dcdc1>; ++ /* ++ * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but ++ * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with ++ * 0Ohm register to vcc-io-wifi so eldo1 is used. ++ */ ++ vqmmc-supply = <®_eldo1>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ brcmf: wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&r_pio>; ++ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ + &mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; +- vmmc-supply = <®_vcc3v3>; ++ vmmc-supply = <®_dcdc1>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; +@@ -48,9 +72,138 @@ + status = "okay"; + }; + ++&r_rsb { ++ status = "okay"; ++ ++ axp803: pmic@3a3 { ++ compatible = "x-powers,axp803"; ++ reg = <0x3a3>; ++ interrupt-parent = <&r_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ ++ }; ++}; ++ ++#include "axp803.dtsi" ++ ++®_aldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "avdd-csi"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pl"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1040000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-name = "vdd-cpux"; ++}; ++ ++/* DCDC3 is polyphased with DCDC2 */ ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dcdc6 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-hdmi-dsi-sensor"; ++}; ++ ++®_dldo2 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-mipi"; ++}; ++ ++®_dldo3 { ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "dovdd-csi"; ++}; ++ ++®_dldo4 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi-io"; ++}; ++ ++®_drivevbus { ++ regulator-name = "usb0-vbus"; ++ status = "okay"; ++}; ++ ++®_eldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "cpvdd"; ++}; ++ ++®_eldo3 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "dvdd-csi"; ++}; ++ ++®_fldo1 { ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "vcc-1v2-hsic"; ++}; ++ ++/* ++ * The A64 chip cannot work without this regulator off, although ++ * it seems to be only driving the AR100 core. ++ * Maybe we don't still know well about CPUs domain. ++ */ ++®_fldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +@@ -61,5 +214,6 @@ + + &usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ ++ usb0_vbus-supply = <®_drivevbus>; + status = "okay"; + }; +diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts +index 0716b14411..ef1c90401b 100644 +--- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts ++++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts +@@ -60,6 +60,17 @@ + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + +@@ -86,6 +97,10 @@ + }; + }; + ++&de { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -103,6 +118,17 @@ + status = "okay"; + }; + ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; +@@ -151,7 +177,7 @@ + + &mmc2 { + pinctrl-names = "default"; +- pinctrl-0 = <&mmc2_pins>; ++ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; + vmmc-supply = <®_dcdc1>; + bus-width = <8>; + non-removable; +@@ -296,9 +322,13 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-nanopi-a64.dts b/arch/arm/dts/sun50i-a64-nanopi-a64.dts +index e2dce48fa2..31884dbc88 100644 +--- a/arch/arm/dts/sun50i-a64-nanopi-a64.dts ++++ b/arch/arm/dts/sun50i-a64-nanopi-a64.dts +@@ -51,12 +51,44 @@ + compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; + + aliases { ++ ethernet0 = &emac; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ blue { ++ label = "nanopi-a64:blue:status"; ++ gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ ++ }; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ clocks = <&rtc 1>; ++ clock-names = "ext_clock"; ++ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ ++ }; ++}; ++ ++&de { ++ status = "okay"; + }; + + &ehci0 { +@@ -67,6 +99,26 @@ + status = "okay"; + }; + ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-supply = <®_dcdc1>; ++ status = "okay"; ++}; ++ ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + /* i2c1 connected with gpio headers like pine64, bananapi */ + &i2c1 { + pinctrl-names = "default"; +@@ -78,6 +130,13 @@ + bias-pull-up; + }; + ++&mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <7>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; +@@ -88,6 +147,24 @@ + status = "okay"; + }; + ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dcdc1>; ++ vqmmc-supply = <®_dldo4>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ rtl8189etv: wifi@1 { ++ reg = <1>; ++ interrupt-parent = <&r_pio>; ++ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ + &ohci0 { + status = "okay"; + }; +@@ -125,9 +202,9 @@ + + ®_dcdc1 { + regulator-always-on; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3000000>; +- regulator-name = "vcc-3v"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; + }; + + ®_dcdc2 { +@@ -195,9 +272,13 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-olinuxino.dts b/arch/arm/dts/sun50i-a64-olinuxino.dts +index 3b3081b10e..f7a4bccaa5 100644 +--- a/arch/arm/dts/sun50i-a64-olinuxino.dts ++++ b/arch/arm/dts/sun50i-a64-olinuxino.dts +@@ -51,6 +51,7 @@ + compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64"; + + aliases { ++ ethernet0 = &emac; + serial0 = &uart0; + }; + +@@ -58,12 +59,74 @@ + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ ++ reg_usb1_vbus: usb1-vbus { ++ compatible = "regulator-fixed"; ++ regulator-name = "usb1-vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-boot-on; ++ enable-active-high; ++ gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */ ++ status = "okay"; ++ }; ++ + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + }; + }; + ++&de { ++ status = "okay"; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-supply = <®_dcdc1>; ++ allwinner,tx-delay-ps = <600>; ++ status = "okay"; ++}; ++ ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ ++&mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; +@@ -92,6 +155,14 @@ + }; + }; + ++&ohci0 { ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ + &r_rsb { + status = "okay"; + +@@ -100,6 +171,7 @@ + reg = <0x3a3>; + interrupt-parent = <&r_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ + }; + }; + +@@ -142,10 +214,14 @@ + + /* DCDC3 is polyphased with DCDC2 */ + ++/* ++ * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal ++ * 1.35V that the PMIC can drive. ++ */ + ®_dcdc5 { + regulator-always-on; +- regulator-min-microvolt = <1500000>; +- regulator-max-microvolt = <1500000>; ++ regulator-min-microvolt = <1360000>; ++ regulator-max-microvolt = <1360000>; + regulator-name = "vcc-ddr3"; + }; + +@@ -180,6 +256,11 @@ + regulator-name = "vcc-wifi-io"; + }; + ++®_drivevbus { ++ regulator-name = "usb0-vbus"; ++ status = "okay"; ++}; ++ + ®_eldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; +@@ -214,8 +295,24 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usbphy { + status = "okay"; ++ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ ++ usb0_vbus-supply = <®_drivevbus>; ++ usb1_vbus-supply = <®_usb1_vbus>; + }; +diff --git a/arch/arm/dts/sun50i-a64-orangepi-win.dts b/arch/arm/dts/sun50i-a64-orangepi-win.dts +index bf42690a33..b0c64f7579 100644 +--- a/arch/arm/dts/sun50i-a64-orangepi-win.dts ++++ b/arch/arm/dts/sun50i-a64-orangepi-win.dts +@@ -1,5 +1,6 @@ + /* + * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> ++ * Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual +@@ -51,23 +52,127 @@ + compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64"; + + aliases { ++ ethernet0 = &emac; + serial0 = &uart0; ++ serial1 = &uart1; ++ serial2 = &uart2; ++ serial3 = &uart3; ++ serial4 = &uart4; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ status { ++ label = "orangepi:green:status"; ++ gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ ++ }; ++ }; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ enable-active-high; ++ gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */ ++ status = "okay"; ++ }; ++ ++ reg_usb1_vbus: usb1-vbus { ++ compatible = "regulator-fixed"; ++ regulator-name = "usb1-vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-boot-on; ++ enable-active-high; ++ gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */ ++ status = "okay"; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ ++ }; ++}; ++ ++&de { ++ status = "okay"; ++}; ++ ++&ehci0 { ++ status = "okay"; + }; + + &ehci1 { + status = "okay"; + }; + ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-supply = <®_gmac_3v3>; ++ status = "okay"; ++}; ++ ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ ++&mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_dcdc1>; +- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ ++ disable-wp; ++ bus-width = <4>; ++ status = "okay"; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dldo2>; ++ vqmmc-supply = <®_dldo4>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&ohci0 { + status = "okay"; + }; + +@@ -89,9 +194,8 @@ + #include "axp803.dtsi" + + ®_aldo1 { +- regulator-always-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; + regulator-name = "afvcc-csi"; + }; + +@@ -163,12 +267,23 @@ + regulator-name = "vcc-wifi-io"; + }; + ++®_drivevbus { ++ regulator-name = "usb0-vbus"; ++ status = "okay"; ++}; ++ + ®_eldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "cpvdd"; + }; + ++®_eldo3 { ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "dvdd-csi"; ++}; ++ + ®_fldo1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; +@@ -191,13 +306,65 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ ++&spi0 { ++ status = "okay"; ++ ++ spi-flash@0 { ++ compatible = "mxicy,mx25l1606e", "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <80000000>; ++ m25p,fast-read; ++ status = "okay"; ++ }; ++}; ++ ++/* On debug connector */ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +-&usbphy { ++/* Bluetooth */ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; ++ status = "okay"; ++}; ++ ++/* On Pi-2 connector, RTS/CTS optional */ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart2_pins>; ++ status = "disabled"; ++}; ++ ++/* On Pi-2 connector, RTS/CTS optional */ ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart3_pins>; ++ status = "disabled"; ++}; ++ ++/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */ ++&uart4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart4_pins>; ++ status = "disabled"; ++}; ++ ++&usb_otg { ++ dr_mode = "otg"; + status = "okay"; + }; + ++&usbphy { ++ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ ++ usb0_vbus-supply = <®_drivevbus>; ++ usb1_vbus-supply = <®_usb1_vbus>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/sun50i-a64-pine64.dts b/arch/arm/dts/sun50i-a64-pine64.dts +index a75825798a..c077b6c1f4 100644 +--- a/arch/arm/dts/sun50i-a64-pine64.dts ++++ b/arch/arm/dts/sun50i-a64-pine64.dts +@@ -62,6 +62,21 @@ + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++}; ++ ++&de { ++ status = "okay"; + }; + + &ehci0 { +@@ -82,6 +97,17 @@ + + }; + ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; +@@ -229,6 +255,10 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + /* On Euler connector */ + &spdif { + status = "disabled"; +@@ -237,7 +267,7 @@ + /* On Exp and Euler connectors */ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts +index abe179de35..53fcc9098d 100644 +--- a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts ++++ b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts +@@ -61,6 +61,17 @@ + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + reg_vcc1v8: vcc1v8 { + compatible = "regulator-fixed"; + regulator-name = "vcc1v8"; +@@ -69,6 +80,10 @@ + }; + }; + ++&de { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -86,6 +101,17 @@ + status = "okay"; + }; + ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; +@@ -134,9 +160,13 @@ + regulator-name = "vcc-wifi"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-sopine.dtsi b/arch/arm/dts/sun50i-a64-sopine.dtsi +index 43418bd881..6723b8695e 100644 +--- a/arch/arm/dts/sun50i-a64-sopine.dtsi ++++ b/arch/arm/dts/sun50i-a64-sopine.dtsi +@@ -45,6 +45,8 @@ + + #include "sun50i-a64.dtsi" + ++#include <dt-bindings/gpio/gpio.h> ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; +@@ -52,6 +54,7 @@ + non-removable; + disable-wp; + bus-width = <4>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + status = "okay"; + }; + +@@ -66,6 +69,18 @@ + }; + }; + ++&spi0 { ++ status = "okay"; ++ ++ flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ }; ++}; ++ + #include "axp803.dtsi" + + ®_aldo2 { +diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi +index 7a083637c4..f3a66f8882 100644 +--- a/arch/arm/dts/sun50i-a64.dtsi ++++ b/arch/arm/dts/sun50i-a64.dtsi +@@ -43,9 +43,12 @@ + */ + + #include <dt-bindings/clock/sun50i-a64-ccu.h> ++#include <dt-bindings/clock/sun8i-de2.h> + #include <dt-bindings/clock/sun8i-r-ccu.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/reset/sun50i-a64-ccu.h> ++#include <dt-bindings/reset/sun8i-de2.h> ++#include <dt-bindings/reset/sun8i-r-ccu.h> + + / { + interrupt-parent = <&gic>; +@@ -57,17 +60,21 @@ + #size-cells = <1>; + ranges; + +-/* +- * The pipeline mixer0-lcd0 depends on clock CLK_MIXER0 from DE2 CCU. +- * However there is no support for this clock on A64 yet, so we depend +- * on the upstream clocks here to keep them (and thus CLK_MIXER0) up. +- */ + simplefb_lcd: framebuffer-lcd { + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "mixer0-lcd0"; + clocks = <&ccu CLK_TCON0>, +- <&ccu CLK_DE>, <&ccu CLK_BUS_DE>; ++ <&display_clocks CLK_MIXER0>; ++ status = "disabled"; ++ }; ++ ++ simplefb_hdmi: framebuffer-hdmi { ++ compatible = "allwinner,simple-framebuffer", ++ "simple-framebuffer"; ++ allwinner,pipeline = "mixer1-lcd1-hdmi"; ++ clocks = <&display_clocks CLK_MIXER1>, ++ <&ccu CLK_TCON1>, <&ccu CLK_HDMI>; + status = "disabled"; + }; + }; +@@ -81,6 +88,7 @@ + device_type = "cpu"; + reg = <0>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; + + cpu1: cpu@1 { +@@ -88,6 +96,7 @@ + device_type = "cpu"; + reg = <1>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; + + cpu2: cpu@2 { +@@ -95,6 +104,7 @@ + device_type = "cpu"; + reg = <2>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; + + cpu3: cpu@3 { +@@ -102,7 +112,20 @@ + device_type = "cpu"; + reg = <3>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; ++ ++ L2: l2-cache { ++ compatible = "cache"; ++ cache-level = <2>; ++ }; ++ }; ++ ++ de: display-engine { ++ compatible = "allwinner,sun50i-a64-display-engine"; ++ allwinner,pipelines = <&mixer0>, ++ <&mixer1>; ++ status = "disabled"; + }; + + osc24M: osc24M_clk { +@@ -168,10 +191,92 @@ + #size-cells = <1>; + ranges; + ++ de2@1000000 { ++ compatible = "allwinner,sun50i-a64-de2"; ++ reg = <0x1000000 0x400000>; ++ allwinner,sram = <&de2_sram 1>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x1000000 0x400000>; ++ ++ display_clocks: clock@0 { ++ compatible = "allwinner,sun50i-a64-de2-clk"; ++ reg = <0x0 0x100000>; ++ clocks = <&ccu CLK_DE>, ++ <&ccu CLK_BUS_DE>; ++ clock-names = "mod", ++ "bus"; ++ resets = <&ccu RST_BUS_DE>; ++ #clock-cells = <1>; ++ #reset-cells = <1>; ++ }; ++ ++ mixer0: mixer@100000 { ++ compatible = "allwinner,sun50i-a64-de2-mixer-0"; ++ reg = <0x100000 0x100000>; ++ clocks = <&display_clocks CLK_BUS_MIXER0>, ++ <&display_clocks CLK_MIXER0>; ++ clock-names = "bus", ++ "mod"; ++ resets = <&display_clocks RST_MIXER0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mixer0_out: port@1 { ++ reg = <1>; ++ ++ mixer0_out_tcon0: endpoint { ++ remote-endpoint = <&tcon0_in_mixer0>; ++ }; ++ }; ++ }; ++ }; ++ ++ mixer1: mixer@200000 { ++ compatible = "allwinner,sun50i-a64-de2-mixer-1"; ++ reg = <0x200000 0x100000>; ++ clocks = <&display_clocks CLK_BUS_MIXER1>, ++ <&display_clocks CLK_MIXER1>; ++ clock-names = "bus", ++ "mod"; ++ resets = <&display_clocks RST_MIXER1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mixer1_out: port@1 { ++ reg = <1>; ++ ++ mixer1_out_tcon1: endpoint { ++ remote-endpoint = <&tcon1_in_mixer1>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ + syscon: syscon@1c00000 { +- compatible = "allwinner,sun50i-a64-system-controller", +- "syscon"; ++ compatible = "allwinner,sun50i-a64-system-control"; + reg = <0x01c00000 0x1000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ ++ sram_c: sram@18000 { ++ compatible = "mmio-sram"; ++ reg = <0x00018000 0x28000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x00018000 0x28000>; ++ ++ de2_sram: sram-section@0 { ++ compatible = "allwinner,sun50i-a64-sram-c"; ++ reg = <0x0000 0x28000>; ++ }; ++ }; + }; + + dma: dma-controller@1c02000 { +@@ -185,6 +290,75 @@ + #dma-cells = <1>; + }; + ++ tcon0: lcd-controller@1c0c000 { ++ compatible = "allwinner,sun50i-a64-tcon-lcd", ++ "allwinner,sun8i-a83t-tcon-lcd"; ++ reg = <0x01c0c000 0x1000>; ++ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; ++ clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>; ++ clock-names = "ahb", "tcon-ch0"; ++ clock-output-names = "tcon-pixel-clock"; ++ resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>; ++ reset-names = "lcd", "lvds"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ tcon0_in: port@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ tcon0_in_mixer0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&mixer0_out_tcon0>; ++ }; ++ }; ++ ++ tcon0_out: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ }; ++ }; ++ ++ tcon1: lcd-controller@1c0d000 { ++ compatible = "allwinner,sun50i-a64-tcon-tv", ++ "allwinner,sun8i-a83t-tcon-tv"; ++ reg = <0x01c0d000 0x1000>; ++ interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; ++ clocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_TCON1>; ++ clock-names = "ahb", "tcon-ch1"; ++ resets = <&ccu RST_BUS_TCON1>; ++ reset-names = "lcd"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ tcon1_in: port@0 { ++ reg = <0>; ++ ++ tcon1_in_mixer1: endpoint { ++ remote-endpoint = <&mixer1_out_tcon1>; ++ }; ++ }; ++ ++ tcon1_out: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ tcon1_out_hdmi: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&hdmi_in_tcon1>; ++ }; ++ }; ++ }; ++ }; ++ + mmc0: mmc@1c0f000 { + compatible = "allwinner,sun50i-a64-mmc"; + reg = <0x01c0f000 0x1000>; +@@ -227,6 +401,11 @@ + #size-cells = <0>; + }; + ++ sid: eeprom@1c14000 { ++ compatible = "allwinner,sun50i-a64-sid"; ++ reg = <0x1c14000 0x400>; ++ }; ++ + usb_otg: usb@1c19000 { + compatible = "allwinner,sun8i-a33-musb"; + reg = <0x01c19000 0x0400>; +@@ -356,7 +535,7 @@ + }; + + mmc2_pins: mmc2-pins { +- pins = "PC1", "PC5", "PC6", "PC8", "PC9", ++ pins = "PC5", "PC6", "PC8", "PC9", + "PC10","PC11", "PC12", "PC13", + "PC14", "PC15", "PC16"; + function = "mmc2"; +@@ -364,6 +543,18 @@ + bias-pull-up; + }; + ++ mmc2_ds_pin: mmc2-ds-pin { ++ pins = "PC1"; ++ function = "mmc2"; ++ drive-strength = <30>; ++ bias-pull-up; ++ }; ++ ++ pwm_pin: pwm_pin { ++ pins = "PD22"; ++ function = "pwm"; ++ }; ++ + rmii_pins: rmii_pins { + pins = "PD10", "PD11", "PD13", "PD14", "PD17", + "PD18", "PD19", "PD20", "PD22", "PD23"; +@@ -394,7 +585,7 @@ + function = "spi1"; + }; + +- uart0_pins_a: uart0 { ++ uart0_pb_pins: uart0-pb-pins { + pins = "PB8", "PB9"; + function = "uart0"; + }; +@@ -474,15 +665,6 @@ + status = "disabled"; + }; + +- pwm: pwm@1c21400 { +- compatible = "allwinner,sun50i-a64-pwm", +- "allwinner,sun5i-a13-pwm"; +- reg = <0x01c21400 0x8>; +- clocks = <&osc24M>; +- #pwm-cells = <3>; +- status = "disabled"; +- }; +- + uart0: serial@1c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; +@@ -617,8 +799,6 @@ + clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; + status = "disabled"; +- #address-cells = <1>; +- #size-cells = <0>; + + mdio: mdio { + compatible = "snps,dwmac-mdio"; +@@ -638,11 +818,69 @@ + #interrupt-cells = <3>; + }; + ++ pwm: pwm@1c21400 { ++ compatible = "allwinner,sun50i-a64-pwm", ++ "allwinner,sun5i-a13-pwm"; ++ reg = <0x01c21400 0x400>; ++ clocks = <&osc24M>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_pin>; ++ #pwm-cells = <3>; ++ status = "disabled"; ++ }; ++ ++ hdmi: hdmi@1ee0000 { ++ compatible = "allwinner,sun50i-a64-dw-hdmi", ++ "allwinner,sun8i-a83t-dw-hdmi"; ++ reg = <0x01ee0000 0x10000>; ++ reg-io-width = <1>; ++ interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>; ++ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, ++ <&ccu CLK_HDMI>; ++ clock-names = "iahb", "isfr", "tmds"; ++ resets = <&ccu RST_BUS_HDMI1>; ++ reset-names = "ctrl"; ++ phys = <&hdmi_phy>; ++ phy-names = "hdmi-phy"; ++ status = "disabled"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hdmi_in: port@0 { ++ reg = <0>; ++ ++ hdmi_in_tcon1: endpoint { ++ remote-endpoint = <&tcon1_out_hdmi>; ++ }; ++ }; ++ ++ hdmi_out: port@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++ ++ hdmi_phy: hdmi-phy@1ef0000 { ++ compatible = "allwinner,sun50i-a64-hdmi-phy"; ++ reg = <0x01ef0000 0x10000>; ++ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, ++ <&ccu 7>; ++ clock-names = "bus", "mod", "pll-0"; ++ resets = <&ccu RST_BUS_HDMI0>; ++ reset-names = "phy"; ++ #phy-cells = <0>; ++ }; ++ + rtc: rtc@1f00000 { + compatible = "allwinner,sun6i-a31-rtc"; + reg = <0x01f00000 0x54>; + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; ++ clock-output-names = "rtc-osc32k", "rtc-osc32k-out"; ++ clocks = <&osc32k>; ++ #clock-cells = <1>; + }; + + r_intc: interrupt-controller@1f00c00 { +@@ -664,6 +902,29 @@ + #reset-cells = <1>; + }; + ++ r_i2c: i2c@1f02400 { ++ compatible = "allwinner,sun50i-a64-i2c", ++ "allwinner,sun6i-a31-i2c"; ++ reg = <0x01f02400 0x400>; ++ interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; ++ clocks = <&r_ccu CLK_APB0_I2C>; ++ resets = <&r_ccu RST_APB0_I2C>; ++ status = "disabled"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ r_pwm: pwm@1f03800 { ++ compatible = "allwinner,sun50i-a64-pwm", ++ "allwinner,sun5i-a13-pwm"; ++ reg = <0x01f03800 0x400>; ++ clocks = <&osc24M>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_pwm_pin>; ++ #pwm-cells = <3>; ++ status = "disabled"; ++ }; ++ + r_pio: pinctrl@1f02c00 { + compatible = "allwinner,sun50i-a64-r-pinctrl"; + reg = <0x01f02c00 0x400>; +@@ -675,6 +936,16 @@ + interrupt-controller; + #interrupt-cells = <3>; + ++ r_i2c_pl89_pins: r-i2c-pl89-pins { ++ pins = "PL8", "PL9"; ++ function = "s_i2c"; ++ }; ++ ++ r_pwm_pin: pwm { ++ pins = "PL10"; ++ function = "s_pwm"; ++ }; ++ + r_rsb_pins: rsb { + pins = "PL0", "PL1"; + function = "s_rsb"; +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-dts.patch b/gnu/packages/patches/u-boot-pinebook-dts.patch new file mode 100644 index 0000000000..48c004fdfc --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-dts.patch @@ -0,0 +1,388 @@ +From b972831c3cd24f3c9bb0995ed61db8f8239f3391 Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick <anarsoul@gmail.com> +Date: Mon, 5 Nov 2018 20:24:31 -0800 +Subject: [PATCH 10/13] sunxi: DT: add support for Pinebook + +Pinebook is a laptop produced by Pine64, with USB-connected keyboard, +USB-connected touchpad and an eDP LCD panel connected via a RGB-eDP +bridge from Analogix. + +Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> +Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> +Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> +Cc: Vagrant Cascadian <vagrant@debian.org> +Reviewed-by: Jagan Teki <jagan@openedev.com> +--- + arch/arm/dts/Makefile | 1 + + arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi | 15 ++ + arch/arm/dts/sun50i-a64-pinebook.dts | 294 +++++++++++++++++++++++++++ + configs/pinebook_defconfig | 22 ++ + 4 files changed, 332 insertions(+) + create mode 100644 arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi + create mode 100644 arch/arm/dts/sun50i-a64-pinebook.dts + create mode 100644 configs/pinebook_defconfig + +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 3093c1185e..eae6b9ee5d 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -406,6 +406,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \ + sun50i-a64-orangepi-win.dtb \ + sun50i-a64-pine64-plus.dtb \ + sun50i-a64-pine64.dtb \ ++ sun50i-a64-pinebook.dtb \ + sun50i-a64-sopine-baseboard.dtb + dtb-$(CONFIG_MACH_SUN9I) += \ + sun9i-a80-optimus.dtb \ +diff --git a/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi +new file mode 100644 +index 0000000000..a99b7171d0 +--- /dev/null ++++ b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi +@@ -0,0 +1,15 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com> ++ * ++ */ ++ ++/* The ANX6345 eDP-bridge is on r_i2c */ ++&r_i2c { ++ anx6345: edp-bridge@38 { ++ compatible = "analogix,anx6345"; ++ reg = <0x38>; ++ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ ++ status = "okay"; ++ }; ++}; +diff --git a/arch/arm/dts/sun50i-a64-pinebook.dts b/arch/arm/dts/sun50i-a64-pinebook.dts +new file mode 100644 +index 0000000000..ec537c5297 +--- /dev/null ++++ b/arch/arm/dts/sun50i-a64-pinebook.dts +@@ -0,0 +1,294 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz> ++ * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com> ++ * ++ */ ++ ++/dts-v1/; ++ ++#include "sun50i-a64.dtsi" ++ ++#include <dt-bindings/gpio/gpio.h> ++#include <dt-bindings/input/input.h> ++#include <dt-bindings/pwm/pwm.h> ++ ++/ { ++ model = "Pinebook"; ++ compatible = "pine64,pinebook", "allwinner,sun50i-a64"; ++ ++ aliases { ++ serial0 = &uart0; ++ ethernet0 = &rtl8723cs; ++ }; ++ ++ vdd_bl: regulator@0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "bl-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ ++ enable-active-high; ++ }; ++ ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm 0 50000 0>; ++ brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>; ++ default-brightness-level = <2>; ++ enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ ++ power-supply = <&vdd_bl>; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ ++ framebuffer-lcd { ++ panel-supply = <®_dc1sw>; ++ dvdd25-supply = <®_dldo2>; ++ dvdd12-supply = <®_fldo1>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ ++ lid_switch { ++ label = "Lid Switch"; ++ gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */ ++ linux,input-type = <EV_SW>; ++ linux,code = <SW_LID>; ++ linux,can-disable; ++ wakeup-source; ++ }; ++ }; ++ ++ reg_vcc3v3: vcc3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ ++ }; ++}; ++ ++&ehci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins>; ++ vmmc-supply = <®_dcdc1>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; ++ disable-wp; ++ bus-width = <4>; ++ status = "okay"; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dldo4>; ++ vqmmc-supply = <®_eldo1>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ rtl8723cs: wifi@1 { ++ reg = <1>; ++ }; ++}; ++ ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; ++ vmmc-supply = <®_dcdc1>; ++ vqmmc-supply = <®_eldo1>; ++ bus-width = <8>; ++ non-removable; ++ cap-mmc-hw-reset; ++ mmc-hs200-1_8v; ++ status = "okay"; ++}; ++ ++&ohci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&pwm { ++ status = "okay"; ++}; ++ ++&r_rsb { ++ status = "okay"; ++ ++ axp803: pmic@3a3 { ++ compatible = "x-powers,axp803"; ++ reg = <0x3a3>; ++ interrupt-parent = <&r_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++/* The ANX6345 eDP-bridge is on r_i2c */ ++&r_i2c { ++ clock-frequency = <100000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_i2c_pl89_pins>; ++ status = "okay"; ++}; ++ ++#include "axp803.dtsi" ++ ++®_aldo1 { ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "vcc-csi"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pl"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dc1sw { ++ regulator-name = "vcc-lcd"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-name = "vdd-cpux"; ++}; ++ ++/* DCDC3 is polyphased with DCDC2 */ ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dcdc6 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-hdmi"; ++}; ++ ++®_dldo2 { ++ regulator-min-microvolt = <2500000>; ++ regulator-max-microvolt = <2500000>; ++ regulator-name = "vcc-edp"; ++}; ++ ++®_dldo3 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "avdd-csi"; ++}; ++ ++®_dldo4 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++}; ++ ++®_eldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "cpvdd"; ++}; ++ ++®_eldo3 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vdd-1v8-csi"; ++}; ++ ++®_fldo1 { ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "vcc-1v2-hsic"; ++}; ++ ++®_fldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_ldo_io0 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-usb"; ++ status = "okay"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; ++}; ++ ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pb_pins>; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ dr_mode = "host"; ++}; ++ ++&usbphy { ++ usb0_vbus-supply = <®_ldo_io0>; ++ usb1_vbus-supply = <®_ldo_io0>; ++ status = "okay"; ++}; +diff --git a/configs/pinebook_defconfig b/configs/pinebook_defconfig +new file mode 100644 +index 0000000000..5294dbd2eb +--- /dev/null ++++ b/configs/pinebook_defconfig +@@ -0,0 +1,22 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_SPL=y ++CONFIG_MACH_SUN50I=y ++CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y ++CONFIG_DRAM_CLK=552 ++CONFIG_DRAM_ZQ=3881949 ++CONFIG_MMC_SUNXI_SLOT_EXTRA=2 ++CONFIG_R_I2C_ENABLE=y ++# CONFIG_CMD_FLASH is not set ++# CONFIG_SPL_DOS_PARTITION is not set ++# CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook" ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_SUNXI=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y ++# CONFIG_USB_GADGET is not set ++CONFIG_VIDEO_BRIDGE=y ++CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch b/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch new file mode 100644 index 0000000000..118bdf8e0c --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch @@ -0,0 +1,98 @@ +From 20940ef2a397446a209350900d3bd618c3fd5b94 Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick <anarsoul@gmail.com> +Date: Mon, 5 Nov 2018 20:24:28 -0800 +Subject: [PATCH 07/13] mmc: sunxi: add support for automatic delay calibration + +A64 and H6 support automatic delay calibration and Linux driver uses it +instead of hardcoded delays. Add support for it to u-boot driver. + +Fixes eMMC instability on Pinebook + +Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> +Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> +Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> +Reviewed-by: Andre Przywara <andre.przywara@arm.com> +Cc: Vagrant Cascadian <vagrant@debian.org> +Reviewed-by: Jagan Teki <jagan@openedev.com> +--- + arch/arm/include/asm/arch-sunxi/mmc.h | 6 +++++- + drivers/mmc/sunxi_mmc.c | 21 ++++++++++++++++++++- + 2 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h +index d98c53faaa..f2deafddd2 100644 +--- a/arch/arm/include/asm/arch-sunxi/mmc.h ++++ b/arch/arm/include/asm/arch-sunxi/mmc.h +@@ -46,7 +46,9 @@ struct sunxi_mmc { + u32 cbda; /* 0x94 */ + u32 res2[26]; + #if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6) +- u32 res3[64]; ++ u32 res3[17]; ++ u32 samp_dl; ++ u32 res4[46]; + #endif + u32 fifo; /* 0x100 / 0x200 FIFO access address */ + }; +@@ -130,5 +132,7 @@ struct sunxi_mmc { + #define SUNXI_MMC_COMMON_CLK_GATE (1 << 16) + #define SUNXI_MMC_COMMON_RESET (1 << 18) + ++#define SUNXI_MMC_CAL_DL_SW_EN (0x1 << 7) ++ + struct mmc *sunxi_mmc_init(int sdc_no); + #endif /* _SUNXI_MMC_H */ +diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c +index 39f15eb423..147eb9b4d5 100644 +--- a/drivers/mmc/sunxi_mmc.c ++++ b/drivers/mmc/sunxi_mmc.c +@@ -99,11 +99,16 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz) + { + unsigned int pll, pll_hz, div, n, oclk_dly, sclk_dly; + bool new_mode = false; ++ bool calibrate = false; + u32 val = 0; + + if (IS_ENABLED(CONFIG_MMC_SUNXI_HAS_NEW_MODE) && (priv->mmc_no == 2)) + new_mode = true; + ++#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6) ++ calibrate = true; ++#endif ++ + /* + * The MMC clock has an extra /2 post-divider when operating in the new + * mode. +@@ -174,7 +179,11 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz) + val = CCM_MMC_CTRL_MODE_SEL_NEW; + setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW); + #endif +- } else { ++ } else if (!calibrate) { ++ /* ++ * Use hardcoded delay values if controller doesn't support ++ * calibration ++ */ + val = CCM_MMC_CTRL_OCLK_DLY(oclk_dly) | + CCM_MMC_CTRL_SCLK_DLY(sclk_dly); + } +@@ -228,6 +237,16 @@ static int mmc_config_clock(struct sunxi_mmc_priv *priv, struct mmc *mmc) + rval &= ~SUNXI_MMC_CLK_DIVIDER_MASK; + writel(rval, &priv->reg->clkcr); + ++#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6) ++ /* A64 supports calibration of delays on MMC controller and we ++ * have to set delay of zero before starting calibration. ++ * Allwinner BSP driver sets a delay only in the case of ++ * using HS400 which is not supported by mainline U-Boot or ++ * Linux at the moment ++ */ ++ writel(SUNXI_MMC_CAL_DL_SW_EN, &priv->reg->samp_dl); ++#endif ++ + /* Re-enable Clock */ + rval |= SUNXI_MMC_CLK_ENABLE; + writel(rval, &priv->reg->clkcr); +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch b/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch new file mode 100644 index 0000000000..824a16b9db --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch @@ -0,0 +1,70 @@ +From 31a4ac4d79d75baeede3edfa95515fd4169ef502 Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick <anarsoul@gmail.com> +Date: Mon, 5 Nov 2018 20:24:30 -0800 +Subject: [PATCH 09/13] sun50i: A64: add support for R_I2C controller + +Allwinner A64 has a I2C controller, which is in the R_ MMIO zone and has +two groups of pinmuxes on PL bank, so it's called R_I2C. + +Add support for this I2C controller and the pinmux which doesn't conflict +with RSB. + +Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> +Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> +Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> +Cc: Vagrant Cascadian <vagrant@debian.org> +Acked-by: Jagan Teki <jagan@openedev.com> +--- + arch/arm/include/asm/arch-sunxi/gpio.h | 1 + + arch/arm/mach-sunxi/Kconfig | 1 + + board/sunxi/board.c | 6 ++++++ + 3 files changed, 8 insertions(+) + +diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h +index 6a5eafc3d3..2daf23f6f5 100644 +--- a/arch/arm/include/asm/arch-sunxi/gpio.h ++++ b/arch/arm/include/asm/arch-sunxi/gpio.h +@@ -211,6 +211,7 @@ enum sunxi_gpio_number { + #define SUN8I_H3_GPL_R_TWI 2 + #define SUN8I_A23_GPL_R_TWI 3 + #define SUN8I_GPL_R_UART 2 ++#define SUN50I_GPL_R_TWI 2 + + #define SUN9I_GPN_R_RSB 3 + +diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig +index 6277abc3cc..560dc9b25d 100644 +--- a/arch/arm/mach-sunxi/Kconfig ++++ b/arch/arm/mach-sunxi/Kconfig +@@ -278,6 +278,7 @@ config MACH_SUN50I + select ARM64 + select DM_I2C + select PHY_SUN4I_USB ++ select SUN6I_PRCM + select SUNXI_DE2 + select SUNXI_GEN_SUN6I + select SUPPORT_SPL +diff --git a/board/sunxi/board.c b/board/sunxi/board.c +index b196d48674..64ccbc7245 100644 +--- a/board/sunxi/board.c ++++ b/board/sunxi/board.c +@@ -168,10 +168,16 @@ void i2c_init_board(void) + #endif + + #ifdef CONFIG_R_I2C_ENABLE ++#ifdef CONFIG_MACH_SUN50I ++ clock_twi_onoff(5, 1); ++ sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI); ++ sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI); ++#else + clock_twi_onoff(5, 1); + sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_H3_GPL_R_TWI); + sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN8I_H3_GPL_R_TWI); + #endif ++#endif + } + + #if defined(CONFIG_ENV_IS_IN_MMC) && defined(CONFIG_ENV_IS_IN_FAT) +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-syscon-node.patch b/gnu/packages/patches/u-boot-pinebook-syscon-node.patch new file mode 100644 index 0000000000..9289645bec --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-syscon-node.patch @@ -0,0 +1,38 @@ +From ababb5920e8992c9bb7956df3cc85dc68d27dfe8 Mon Sep 17 00:00:00 2001 +From: Andre Przywara <andre.przywara@arm.com> +Date: Mon, 29 Oct 2018 00:56:48 +0000 +Subject: [PATCH 04/13] sunxi: A64: Re-add syscon to DT node + +The sun50i-a64.dtsi changes introduced in Linux v4.19-rc1 changed the +compatible name for the syscon controller, dropping the generic "syscon" +fallback. Using this new DT node will make the Ethernet driver in every +older kernel (or non-Linux kernels) fail to initialise the MAC device. + +To allow booting distribution kernels (from installer images via UEFI, +for instance), re-add the syscon compatible string as a fallback. This +works with both older and newer kernels. + +Signed-off-by: Andre Przywara <andre.przywara@arm.com> +Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> +Reviewed-by: Jagan Teki <jagan@openedev.com> +--- + arch/arm/dts/sun50i-a64.dtsi | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi +index f3a66f8882..ff41abc96a 100644 +--- a/arch/arm/dts/sun50i-a64.dtsi ++++ b/arch/arm/dts/sun50i-a64.dtsi +@@ -259,7 +259,8 @@ + }; + + syscon: syscon@1c00000 { +- compatible = "allwinner,sun50i-a64-system-control"; ++ compatible = "allwinner,sun50i-a64-system-control", ++ "syscon"; + reg = <0x01c00000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-video-bridge.patch b/gnu/packages/patches/u-boot-pinebook-video-bridge.patch new file mode 100644 index 0000000000..8c6ca8a992 --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-video-bridge.patch @@ -0,0 +1,50 @@ +From 8336a43792a103c13d939b3925cb75322911f7fb Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick <anarsoul@gmail.com> +Date: Mon, 5 Nov 2018 20:24:29 -0800 +Subject: [PATCH 08/13] dm: video: bridge: don't fail to activate bridge if + reset or sleep GPIO is missing + +Both GPIOs are optional, so we shouldn't fail if any is missing. +Without this fix reset is not deasserted if sleep GPIO is missing. + +Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> +Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> +Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> +Reviewed-by: Andre Przywara <andre.przywara@arm.com> +Cc: Vagrant Cascadian <vagrant@debian.org> +--- + drivers/video/bridge/video-bridge-uclass.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c +index cd4959cc71..5fecb4cfd5 100644 +--- a/drivers/video/bridge/video-bridge-uclass.c ++++ b/drivers/video/bridge/video-bridge-uclass.c +@@ -106,13 +106,19 @@ static int video_bridge_pre_probe(struct udevice *dev) + int video_bridge_set_active(struct udevice *dev, bool active) + { + struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev); +- int ret; ++ int ret = 0; + + debug("%s: %d\n", __func__, active); +- ret = dm_gpio_set_value(&uc_priv->sleep, !active); +- if (ret) +- return ret; +- if (active) { ++ if (uc_priv->sleep.dev) { ++ ret = dm_gpio_set_value(&uc_priv->sleep, !active); ++ if (ret) ++ return ret; ++ } ++ ++ if (!active) ++ return 0; ++ ++ if (uc_priv->reset.dev) { + ret = dm_gpio_set_value(&uc_priv->reset, true); + if (ret) + return ret; +-- +2.11.0 + diff --git a/gnu/packages/patches/vsearch-unbundle-cityhash.patch b/gnu/packages/patches/vsearch-unbundle-cityhash.patch index b1ecb1f063..2a2ab13a73 100644 --- a/gnu/packages/patches/vsearch-unbundle-cityhash.patch +++ b/gnu/packages/patches/vsearch-unbundle-cityhash.patch @@ -6,7 +6,7 @@ index e56a8a2..4adcc48 100644 if TARGET_PPC AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -mcpu=power8 else --AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g +-AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -march=x86-64 -mtune=generic +AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -lcityhash endif @@ -39,7 +39,7 @@ index e56a8a2..4adcc48 100644 - if TARGET_WIN --libcityhash_a_CXXFLAGS = -Wall -Wno-sign-compare -O3 -g -D_MSC_VER +-libcityhash_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-sign-compare -D_MSC_VER -__top_builddir__bin_vsearch_LDFLAGS = -static -__top_builddir__bin_vsearch_LDADD = libregex.a libcityhash.a libcpu_ssse3.a libcpu_sse2.a +__top_builddir__bin_vsearch_LDFLAGS = -static -lcityhash @@ -47,7 +47,7 @@ index e56a8a2..4adcc48 100644 else --libcityhash_a_CXXFLAGS = -Wall -Wno-sign-compare -O3 -g +-libcityhash_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-sign-compare - if TARGET_PPC -__top_builddir__bin_vsearch_LDADD = libcityhash.a libcpu.a diff --git a/gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch b/gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch deleted file mode 100644 index 345101bd3a..0000000000 --- a/gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch +++ /dev/null @@ -1,26 +0,0 @@ -This fixes the wxplot2d plotting issue found at -https://github.com/andrejv/wxmaxima/issues/973. - -From 5a0693c97ceaa4935b908f1e478126896952f399 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Gunter=20K=C3=B6nigsmann?= <gunter@peterpall.de> -Date: Mon, 19 Feb 2018 05:37:35 +0100 -Subject: [PATCH] Seems I accidentally made wxMaxima to default to parameters - for old gnuplots. Resolves #973 - ---- - data/wxmathml.lisp.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/wxmathml.lisp.in b/data/wxmathml.lisp.in -index a32e3fc3..4e19acaf 100644 ---- a/data/wxmathml.lisp.in -+++ b/data/wxmathml.lisp.in -@@ -43,7 +43,7 @@ - (defvar $wxsubscripts t - "Recognize TeX-style subscripts") - (defvar $wxplot_pngcairo nil "Use gnuplot's pngcairo terminal for new plots?") --(defmvar $wxplot_old_gnuplot t) -+(defmvar $wxplot_old_gnuplot nil) - - (defun $wxstatusbar (status) - (format t "<statusbar>~a</statusbar>~%" status)) diff --git a/gnu/packages/patches/x265-arm-flags.patch b/gnu/packages/patches/x265-arm-flags.patch new file mode 100644 index 0000000000..f17e26f6f1 --- /dev/null +++ b/gnu/packages/patches/x265-arm-flags.patch @@ -0,0 +1,36 @@ +https://sources.debian.org/src/x265/2.9-3/debian/patches/0001-Fix-arm-flags.patch/ + +From: Sebastian Ramacher <sramacher@debian.org> +Date: Wed, 26 Apr 2017 22:05:06 +0200 +Subject: Fix arm* flags + +--- + source/CMakeLists.txt | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 33b6523..25aecbb 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -72,7 +72,7 @@ elseif(ARMMATCH GREATER "-1") + endif() + message(STATUS "Detected ARM target processor") + set(ARM 1) +- add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) ++ # add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) + else() + message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown") + message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") +@@ -230,12 +230,8 @@ if(GCC) + if(ARM AND CROSS_COMPILE_ARM) + set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC) + elseif(ARM) +- find_package(Neon) + if(CPU_HAS_NEON) +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) + add_definitions(-DHAVE_NEON) +- else() +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) + endif() + endif() + add_definitions(${ARM_ARGS}) diff --git a/gnu/packages/patches/xapian-revert-5489fb2f8.patch b/gnu/packages/patches/xapian-revert-5489fb2f8.patch deleted file mode 100644 index 7b78e2abb5..0000000000 --- a/gnu/packages/patches/xapian-revert-5489fb2f8.patch +++ /dev/null @@ -1,23 +0,0 @@ -Revert this upstream commit which breaks a test case in "notmuch": - -https://git.xapian.org/?p=xapian;a=commitdiff;h=5489fb2f838c0f0b0a593b4c17df282a93a1fe5a - -See the notmuch FAQ entry: - -https://notmuchmail.org/faq/#index12h2 - -This should be fixed for later releases. - -diff --git a/backends/glass/glass_postlist.cc b/xapian-core/backends/glass/glass_postlist.cc -index 80e578b85..a47f14a68 100644 ---- a/backends/glass/glass_postlist.cc -+++ b/backends/glass/glass_postlist.cc -@@ -759,7 +759,7 @@ GlassPostList::open_nearby_postlist(const std::string & term_, - (void)need_pos; - if (term_.empty()) - RETURN(NULL); -- if (!this_db.get() || this_db->postlist_table.is_modified()) -+ if (!this_db.get() || this_db->postlist_table.is_writable()) - RETURN(NULL); - RETURN(new GlassPostList(this_db, term_, cursor->clone())); - } diff --git a/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch b/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch deleted file mode 100644 index 63e058bbef..0000000000 --- a/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Tobias Geerinckx-Rice <me@tobias.gr> -Date: Mon, 18 Jun 2018 02:37:41 +0200 -Subject: zathura-pdf-mupdf: Link to JPEG libraries. - -As of version 0.3.3, zathura-pdf-mupdf no longer links to some required -JPEG libraries, leading to such errors as: - - $ zathura foo.pdf - error: Could not load plugin '/gnu/store/...-profile/lib/zathura/libpdf-mupdf.so' (/gnu/store/...-profile/lib/zathura/libpdf-mupdf.so: undefined symbol: jpeg_resync_to_restart). - -The patch below, copied verbatim from Arch[0], fixes that. -Its description happens to match our reality, too. - -[0]: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/zathura-pdf-mupdf ---- -From 3fb0ff750373d45d4f5172ce1d41b74183cd07e8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes@kyriasis.com> -Date: Sat, 24 Mar 2018 14:31:18 +0100 -Subject: [PATCH] Explicitly link against jbig2dec, openjp2, and jpeg -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Normally these are statically linked into libmupdfthird, but we delete -those to make mupdf use the system libraries. Previously -zathura-pdf-mupdf explicitly linked against them, but this is -technically incorrect since they are supposed to be in libmupdfthird so -that was removed. This commit essentially reverts that in the new build -system. - -Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> ---- - meson.build | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 3b0d7b7..ae2fc9c 100644 ---- a/meson.build -+++ b/meson.build -@@ -22,7 +22,11 @@ cairo = dependency('cairo') - mupdf = cc.find_library('mupdf') - mupdfthird = cc.find_library('mupdfthird') - --build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird] -+jbig2dec = cc.find_library('jbig2dec') -+openjp2 = cc.find_library('openjp2') -+jpeg = cc.find_library('jpeg') -+ -+build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird, jbig2dec, openjp2, jpeg] - - # defines - defines = [ --- -2.16.3 - |