push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff -Naur x264-snapshot-20190517-2245-stable-orig/configure x264-snapshot-20190517-2245-stable/configure
--- x264-snapshot-20190517-2245-stable-orig/configure 2020-01-03 19:51:03.041037657 -0500
+++ x264-snapshot-20190517-2245-stable/configure 2020-01-03 19:52:15.075034609 -0500
@@ -930,9 +930,6 @@
fi
if [ $asm = auto -a $ARCH = ARM ] ; then
- # set flags so neon is built by default
- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
-
cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
define HAVE_ARMV6

View File

@@ -0,0 +1,71 @@
{
stdenv,
lib,
fetchFromGitLab,
nasm,
enableShared ? !stdenv.hostPlatform.isStatic,
}:
stdenv.mkDerivation {
pname = "x264";
version = "0-unstable-2025-01-03";
src = fetchFromGitLab {
domain = "code.videolan.org";
owner = "videolan";
repo = "x264";
rev = "373697b467f7cd0af88f1e9e32d4f10540df4687";
hash = "sha256-WWtS/UfKA4i1yakHErUnyT/3/+Wy2H5F0U0CmxW4ick=";
};
patches = [
# Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix
# is put in the cc wrapper anyway.
./disable-arm-neon-default.patch
];
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile --replace '$(if $(STRIP), $(STRIP) -x $@)' '$(if $(STRIP), $(STRIP) -S $@)'
'';
enableParallelBuilding = true;
outputs = [
"out"
"lib"
"dev"
];
preConfigure =
lib.optionalString stdenv.hostPlatform.isx86 ''
# `AS' is set to the binutils assembler, but we need nasm
unset AS
''
+ lib.optionalString (stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isLoongArch64) ''
export AS=$CC
'';
configureFlags =
lib.optional enableShared "--enable-shared"
++ lib.optional (!stdenv.hostPlatform.isi686) "--enable-pic"
++ lib.optional (
stdenv.buildPlatform != stdenv.hostPlatform
) "--cross-prefix=${stdenv.cc.targetPrefix}";
makeFlags = [
"BASHCOMPLETIONSDIR=$(out)/share/bash-completion/completions"
"install-bashcompletion"
"install-lib-shared"
];
nativeBuildInputs = lib.optional stdenv.hostPlatform.isx86 nasm;
meta = with lib; {
description = "Library for encoding H264/AVC video streams";
mainProgram = "x264";
homepage = "http://www.videolan.org/developers/x264.html";
license = licenses.gpl2Plus;
platforms = platforms.unix ++ platforms.windows;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,29 @@
From 5ad351f7d271d0be0611797542c831898b2f531c Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Sun, 11 Aug 2024 22:09:34 +0100
Subject: [PATCH] source/test/testharness.h: don't redefine `__rdtsc()` builtin
On darwin clang-16 provides `__rdtsc()` builtin. As a result the build
fails in `nixpkgs` as:
source/test/testharness.h:78:24: error: static declaration of '__rdtsc' follows non-static declaration
static inline uint32_t __rdtsc(void)
^
x265_3.6/source/test/testharness.h:78:24: note: '__rdtsc' is a builtin with type 2
The change avoid redefinition on targets that define `__rdtsc()` builtin.
---
source/test/testharness.h | 2 ++
1 file changed, 2 insertions(+)
--- a/test/testharness.h
+++ b/test/testharness.h
@@ -69,6 +69,8 @@ protected:
#include <intrin.h>
#elif HAVE_RDTSC
#include <intrin.h>
+#elif defined(__has_builtin) && __has_builtin(__rdtsc)
+/* compiler-provided builtin */
#elif (!defined(__APPLE__) && (defined (__GNUC__) && (defined(__x86_64__) || defined(__i386__))))
#include <x86intrin.h>
#elif ( !defined(__APPLE__) && defined (__GNUC__) && defined(__ARM_NEON__))

View File

@@ -0,0 +1,24 @@
From 43e696a388ddf4ce5f4b9f756e726544b6310092 Mon Sep 17 00:00:00 2001
From: ReenigneArcher <reenignearcher@gmail.com>
Date: Wed, 9 Jul 2025 14:41:33 +0000
Subject: [PATCH] fix(dynamicHDR10): undefined-uint8_t
---
source/dynamicHDR10/json11/json11.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/source/dynamicHDR10/json11/json11.cpp b/source/dynamicHDR10/json11/json11.cpp
index 762577735..c111ebb82 100644
--- a/dynamicHDR10/json11/json11.cpp
+++ b/dynamicHDR10/json11/json11.cpp
@@ -22,6 +22,7 @@
#include "json11.h"
#include <cassert>
#include <cmath>
+#include <cstdint>
#include <cstdlib>
#include <cstdio>
#include <limits>
--
2.49.0

View File

@@ -0,0 +1,208 @@
{
lib,
gccStdenv,
stdenv,
fetchurl,
cmake,
nasm,
fetchpatch,
fetchpatch2,
# NUMA support enabled by default on NUMA platforms:
numaSupport ? (
stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64)
),
numactl,
# Multi bit-depth support (8bit+10bit+12bit):
multibitdepthSupport ? (
stdenv.hostPlatform.is64bit && !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux)
),
# Other options:
cliSupport ? true, # Build standalone CLI application
custatsSupport ? false, # Internal profiling of encoder work
debugSupport ? false, # Run-time sanity checks (debugging)
ppaSupport ? false, # PPA profiling instrumentation
unittestsSupport ? stdenv.hostPlatform.isx86_64, # Unit tests - only testing x64 assembly
vtuneSupport ? false, # Vtune profiling instrumentation
werrorSupport ? false, # Warnings as errors
# NEON support is always enabled for aarch64
# this flag is only needed for armv7.
neonSupport ? false, # force enable the NEON fpu support for arm v7 CPUs
}:
let
mkFlag = optSet: flag: if optSet then "-D${flag}=ON" else "-D${flag}=OFF";
isCross = stdenv.buildPlatform != stdenv.hostPlatform;
in
stdenv.mkDerivation rec {
pname = "x265";
version = "4.1";
outputs = [
"out"
"dev"
];
# Check that x265Version.txt contains the expected version number
# whether we fetch a source tarball or a tag from the git repo
src = fetchurl {
url = "https://bitbucket.org/multicoreware/x265_git/downloads/x265_${version}.tar.gz";
hash = "sha256-oxaZxqiYBrdLAVHl5qffZd5LSQUEgv5ev4pDedevjyk=";
};
patches = [
./darwin-__rdtsc.patch
# fix compilation with gcc15
# https://bitbucket.org/multicoreware/x265_git/pull-requests/36
./gcc15-fixes.patch
# Fix the build with CMake 4.
(fetchpatch {
name = "x265-fix-cmake-4-1.patch";
url = "https://bitbucket.org/multicoreware/x265_git/commits/b354c009a60bcd6d7fc04014e200a1ee9c45c167/raw";
stripLen = 1;
hash = "sha256-kS+hYZb5dnIlNoZ8ABmNkLkPx+NqCPy+DonXktBzJAE=";
})
(fetchpatch {
name = "x265-fix-cmake-4-2.patch";
url = "https://bitbucket.org/multicoreware/x265_git/commits/51ae8e922bcc4586ad4710812072289af91492a8/raw";
stripLen = 1;
hash = "sha256-ZrpyfSnijUgdyVscW73K48iEXa9k85ftNaQdr0HWSYg=";
})
(fetchpatch {
name = "x265-fix-cmake-4-3.patch";
url = "https://bitbucket.org/multicoreware/x265_git/commits/78e5ac35c13c5cbccc5933083edceb0d3eaeaa21/raw";
stripLen = 1;
hash = "sha256-qEihgUKGEdthbKz67s+/hS/qdpzl+3tEB3gx2tarax4=";
})
]
# TODO: remove after update to version 4.2
++ lib.optionals (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isLinux) [
(fetchpatch2 {
url = "https://bitbucket.org/multicoreware/x265_git/commits/ddb1933598736394b646cb0f78da4a4201ffc656/raw";
hash = "sha256-ZH+jbVtfNJ+CwRUEgsnzyPVzajR/+4nDnUDz5RONO6c=";
stripLen = 1;
})
];
sourceRoot = "x265_${version}/source";
postPatch = ''
substituteInPlace cmake/Version.cmake \
--replace-fail "unknown" "${version}" \
--replace-fail "0.0" "${version}"
''
# There is broken and complicated logic when setting X265_LATEST_TAG for
# mingwW64 builds. This bypasses the logic by setting it at the end of the
# file
+ lib.optionalString stdenv.hostPlatform.isMinGW ''
echo 'set(X265_LATEST_TAG "${version}")' >> ./cmake/Version.cmake
'';
nativeBuildInputs = [
cmake
nasm
]
++ lib.optionals numaSupport [ numactl ];
cmakeFlags = [
"-DENABLE_ALPHA=ON"
"-DENABLE_MULTIVIEW=ON"
"-DENABLE_SCC_EXT=ON"
"-Wno-dev"
(mkFlag custatsSupport "DETAILED_CU_STATS")
(mkFlag debugSupport "CHECKED_BUILD")
(mkFlag ppaSupport "ENABLE_PPA")
(mkFlag vtuneSupport "ENABLE_VTUNE")
(mkFlag werrorSupport "WARNINGS_AS_ERRORS")
]
# Clang does not support the endfunc directive so use GCC.
++ lib.optional (
stdenv.cc.isClang && !stdenv.targetPlatform.isDarwin && !stdenv.targetPlatform.isFreeBSD
) "-DCMAKE_ASM_COMPILER=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc"
# Neon support
++ lib.optionals (neonSupport && stdenv.hostPlatform.isAarch32) [
"-DENABLE_NEON=ON"
"-DCPU_HAS_NEON=ON"
"-DENABLE_ASSEMBLY=ON"
];
cmakeStaticLibFlags = [
"-DHIGH_BIT_DEPTH=ON"
"-DENABLE_CLI=OFF"
"-DENABLE_SHARED=OFF"
"-DEXPORT_C_API=OFF"
]
++ lib.optionals stdenv.hostPlatform.isPower [
"-DENABLE_ALTIVEC=OFF" # https://bitbucket.org/multicoreware/x265_git/issues/320/fail-to-build-on-power8-le
]
++ lib.optionals isCross [
(mkFlag stdenv.hostPlatform.isAarch32 "CROSS_COMPILE_ARM")
(mkFlag stdenv.hostPlatform.isAarch64 "CROSS_COMPILE_ARM64")
];
preConfigure =
lib.optionalString multibitdepthSupport ''
cmake -B build-10bits $cmakeFlags "''${cmakeFlagsArray[@]}" $cmakeStaticLibFlags
cmake -B build-12bits $cmakeFlags "''${cmakeFlagsArray[@]}" $cmakeStaticLibFlags -DMAIN12=ON
cmakeFlagsArray+=(
-DEXTRA_LIB="x265-10.a;x265-12.a"
-DEXTRA_LINK_FLAGS=-L.
-DLINKED_10BIT=ON
-DLINKED_12BIT=ON
)
''
+ ''
cmakeFlagsArray+=(
-DGIT_ARCHETYPE=1 # https://bugs.gentoo.org/814116
${mkFlag (!stdenv.hostPlatform.isStatic) "ENABLE_SHARED"}
-DHIGH_BIT_DEPTH=OFF
-DENABLE_HDR10_PLUS=ON
${mkFlag cliSupport "ENABLE_CLI"}
${mkFlag unittestsSupport "ENABLE_TESTS"}
)
'';
# Builds 10bits and 12bits static libs on the side if multi bit-depth is wanted
# (we are in x265_<version>/source/build)
preBuild = lib.optionalString multibitdepthSupport ''
make -C ../build-10bits -j $NIX_BUILD_CORES
make -C ../build-12bits -j $NIX_BUILD_CORES
ln -s ../build-10bits/libx265.a ./libx265-10.a
ln -s ../build-12bits/libx265.a ./libx265-12.a
'';
doCheck = unittestsSupport;
checkPhase = ''
runHook preCheck
./test/TestBench
runHook postCheck
'';
postInstall = ''
rm -f ${placeholder "out"}/lib/*.a
''
# For mingw, libs are located in $out/bin not $out/lib
+ lib.optionalString stdenv.hostPlatform.isMinGW ''
ln -s $out/bin/*.dll $out/lib
'';
meta = {
description = "Library for encoding H.265/HEVC video streams";
mainProgram = "x265";
homepage = "https://www.x265.org";
changelog = "https://x265.readthedocs.io/en/master/releasenotes.html#version-${
lib.strings.replaceStrings [ "." ] [ "-" ] version
}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ codyopel ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,87 @@
{
lib,
stdenv,
fetchurl,
libsForQt5,
pkg-config,
bash,
cups,
libXpm,
libssh,
nx-libs,
openldap,
openssh,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "x2goclient";
version = "4.1.2.3";
src = fetchurl {
url = "https://code.x2go.org/releases/source/x2goclient/x2goclient-${finalAttrs.version}.tar.gz";
hash = "sha256-q4uzx40xYlx0nkLxX4EP49JCknoVKYMIwT3qO5Fayjw=";
};
buildInputs = [
cups
libXpm
libssh
libsForQt5.phonon
libsForQt5.qtbase
libsForQt5.qtsvg
libsForQt5.qttools
libsForQt5.qtx11extras
nx-libs
openldap
openssh
];
nativeBuildInputs = [
pkg-config
libsForQt5.wrapQtAppsHook
];
postPatch = ''
substituteInPlace src/onmainwindow.cpp \
--replace-fail "/usr/sbin/sshd" "${lib.getExe' openssh "sshd"}"
substituteInPlace Makefile \
--replace-fail "SHELL=/bin/bash" "SHELL ?= ${lib.getExe bash}" \
--replace-fail "lrelease-qt4" "${lib.getExe' libsForQt5.qttools.dev "lrelease"}" \
--replace-fail "qmake-qt4" "${lib.getExe' libsForQt5.qtbase.dev "qmake"}" \
--replace-fail "-o root -g root" ""
'';
makeFlags = [
"PREFIX=$(out)"
"ETCDIR=$(out)/etc"
"build_client"
"build_man"
# No rule to make target 'SHELL'
"MAKEOVERRIDES="
".MAKEOVERRIDES="
".MAKEFLAGS="
];
installTargets = [
"install_client"
"install_man"
];
qtWrapperArgs = [
"--suffix PATH : ${nx-libs}/bin:${openssh}/libexec"
"--set QT_QPA_PLATFORM xcb"
];
meta = {
description = "Graphical NoMachine NX3 remote desktop client";
mainProgram = "x2goclient";
homepage = "http://x2go.org/";
maintainers = [ ];
license = with lib.licenses; [
agpl3Plus
mit
free
]; # Some X2Go components are licensed under some license (MIT X11, BSD, etc.)
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,161 @@
{
stdenv,
lib,
fetchurl,
perlPackages,
makeWrapper,
perl,
which,
nx-libs,
util-linux,
coreutils,
glibc,
gawk,
gnused,
gnugrep,
findutils,
xorg,
net-tools,
iproute2,
bc,
procps,
psmisc,
lsof,
pwgen,
openssh,
sshfs,
bash,
}:
let
pname = "x2goserver";
version = "4.1.0.3";
src = fetchurl {
url = "https://code.x2go.org/releases/source/${pname}/${pname}-${version}.tar.gz";
sha256 = "Z3aqo1T1pE40nws8F21JiMiKYYwu30bJijeuicBp3NA=";
};
x2go-perl = perlPackages.buildPerlPackage {
pname = "X2Go";
inherit version src;
makeFlags = [
"-f"
"Makefile.perl"
];
patchPhase = ''
substituteInPlace X2Go/Config.pm --replace '/etc/x2go' '/var/lib/x2go/conf'
substituteInPlace X2Go/Server/DB.pm \
--replace '$x2go_lib_path/libx2go-server-db-sqlite3-wrapper' \
'/run/wrappers/bin/x2gosqliteWrapper'
substituteInPlace X2Go/Server/DB/SQLite3.pm --replace "user='x2gouser'" "user='x2go'"
'';
};
perlEnv = perl.withPackages (
p: with p; [
x2go-perl
DBI
DBDSQLite
FileBaseDir
TryTiny
CaptureTiny
ConfigSimple
Switch
FileWhich
]
);
binaryDeps = [
perlEnv
which
nx-libs
util-linux
coreutils
glibc.bin
gawk
gnused
gnugrep
findutils
net-tools
iproute2
bc
procps
psmisc
lsof
pwgen
openssh
sshfs
xorg.xauth
xorg.xinit
xorg.xrandr
xorg.xmodmap
xorg.xwininfo
xorg.fontutil
xorg.xkbcomp
xorg.setxkbmap
];
in
stdenv.mkDerivation {
inherit pname version src;
buildInputs = [
perlEnv
bash
];
nativeBuildInputs = [ makeWrapper ];
prePatch = ''
patchShebangs .
sed -i '/Makefile.PL\|Makefile.perl/d' Makefile
for i in */Makefile; do
substituteInPlace "$i" --replace "-o root -g root " ""
done
substituteInPlace libx2go-server-db-perl/Makefile --replace "chmod 2755" "chmod 755"
for i in x2goserver/sbin/x2godbadmin x2goserver/bin/x2go*
do
substituteInPlace $i --replace '/etc/x2go' '/var/lib/x2go/conf'
done
substituteInPlace x2goserver/Makefile \
--replace-fail "\$(DESTDIR)/etc" "\$(DESTDIR)/\$(ETCDIR)"
substituteInPlace x2goserver/sbin/x2gocleansessions \
--replace '/var/run/x2goserver.pid' '/var/run/x2go/x2goserver.pid'
substituteInPlace x2goserver/sbin/x2godbadmin --replace 'user="x2gouser"' 'user="x2go"'
substituteInPlace x2goserver-xsession/etc/Xsession \
--replace "SSH_AGENT /bin/bash -c" "SSH_AGENT ${bash}/bin/bash -c" \
--replace "[ -f /etc/redhat-release ]" "[ -d /etc/nix ] || [ -f /etc/redhat-release ]"
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
"ETCDIR=${placeholder "out"}/etc/x2go"
"NXLIBDIR=${placeholder "out"}"
];
postInstall = ''
mv $out/etc/x2go/x2goserver.conf{,.example}
mv $out/etc/x2go/x2goagent.options{,.example}
ln -sf ${nx-libs}/bin/nxagent $out/bin/x2goagent
ln -sf ${nx-libs}/share/nx/VERSION.nxagent $out/share/x2go/versions/VERSION.x2goserver-x2goagent
for i in $out/sbin/x2go* $(find $out/bin -type f) \
$(ls $out/lib/x2go/x2go* | grep -v x2gocheckport)
do
wrapProgram $i --prefix PATH : ${lib.makeBinPath binaryDeps}:$out
done
# We're patching @INC of the setgid wrapper, because we can't mix
# the perl wrapper (for PERL5LIB) with security.wrappers (for setgid)
sed -i -e "s,.\+bin/perl,#!${perl}/bin/perl -I ${perlEnv}/lib/perl5/site_perl," \
$out/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Remote desktop application, server component";
homepage = "http://x2go.org/";
platforms = lib.platforms.linux;
license = licenses.gpl2;
maintainers = with maintainers; [ averelld ];
};
}

View File

@@ -0,0 +1,47 @@
diff --git a/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/StringPtgParser.cpp b/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/StringPtgParser.cpp
index 08f56fb64e..dfbc4e4e15 100644
--- a/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/StringPtgParser.cpp
+++ b/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/StringPtgParser.cpp
@@ -73,7 +73,6 @@ const bool StringPtgParser::parseToPtgs(const std::wstring& assembled_formula, R
for(std::wstring::const_iterator it = assembled_formula.begin(), itEnd = assembled_formula.end(); it != itEnd;)
{
- #pragma region Operators
if(SyntaxPtg::is_operators(it, itEnd) || SyntaxPtg::is_PtgIsect(it, itEnd))
{
OperatorPtgPtr found_operator;
@@ -182,8 +181,6 @@ const bool StringPtgParser::parseToPtgs(const std::wstring& assembled_formula, R
ptg_stack.push(found_operator);
last_ptg = found_operator;
}
- #pragma endregion
- #pragma region Parenthesis
else if(SyntaxPtg::extract_LeftParenthesis(it, itEnd))
{
PtgFuncPtr func;
@@ -246,8 +243,6 @@ const bool StringPtgParser::parseToPtgs(const std::wstring& assembled_formula, R
rgce.addPtg(last_ptg);
operand_expected = false;
}
- #pragma endregion
- #pragma region Comma and PtgUnion
else if(SyntaxPtg::extract_comma(it, itEnd))
{
PtgParenPtr left_p;
@@ -271,8 +266,6 @@ const bool StringPtgParser::parseToPtgs(const std::wstring& assembled_formula, R
last_ptg = left_p; // PtgParen. Mostly to differ unary and binary minuses and pluses
operand_expected = true;
}
- #pragma endregion
- #pragma region Operands
else
{
OperandPtgPtr found_operand;
@@ -401,7 +394,6 @@ const bool StringPtgParser::parseToPtgs(const std::wstring& assembled_formula, R
last_ptg = found_operand;
operand_expected = false;
}
- #pragma endregion
}
while(ptg_stack.size())

View File

@@ -0,0 +1,13 @@
diff --git a/Common/base.pri b/Common/base.pri
index e8dc81b132..a1049b8af1 100644
--- a/Common/base.pri
+++ b/Common/base.pri
@@ -414,7 +414,7 @@ core_windows:CONFIG += no_batch
message($$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX)
# COMPILER
-CONFIG += c++11
+CONFIG += c++20
!core_windows {
QMAKE_CXXFLAGS += -Wno-register

View File

@@ -0,0 +1,35 @@
diff --git a/Common/3dParty/pole/pole.cpp b/Common/3dParty/pole/pole.cpp
index fbbd2a4b3d..d229e9cf31 100644
--- a/Common/3dParty/pole/pole.cpp
+++ b/Common/3dParty/pole/pole.cpp
@@ -1283,19 +1283,19 @@ void DirTree::debug()
DirEntry* e = entry( i );
if( !e ) continue;
std::cout << i << ": ";
- if( !e->valid ) std::cout << L"INVALID ";
+ if( !e->valid ) std::wcout << L"INVALID ";
std::wcout << e->name << L" ";
- if( e->dir ) std::cout << L"(Dir) ";
- else std::cout << L"(File) ";
- std::cout << e->size << L" ";
- std::cout << L"s:" << e->start << L" ";
- std::cout << L"(";
- if( e->child == End ) std::cout << L"-"; else std::cout << e->child;
+ if( e->dir ) std::wcout << L"(Dir) ";
+ else std::wcout << L"(File) ";
+ std::wcout << e->size << L" ";
+ std::wcout << L"s:" << e->start << L" ";
+ std::wcout << L"(";
+ if( e->child == End ) std::wcout << L"-"; else std::cout << e->child;
std::cout << " ";
- if( e->prev == End ) std::cout << L"-"; else std::cout << e->prev;
- std::cout << L":";
- if( e->next == End ) std::cout << L"-"; else std::cout << e->next;
- std::cout << L")";
+ if( e->prev == End ) std::wcout << L"-"; else std::cout << e->prev;
+ std::wcout << L":";
+ if( e->next == End ) std::wcout << L"-"; else std::cout << e->next;
+ std::wcout << L")";
std::cout << std::endl;
}
}

View File

@@ -0,0 +1,23 @@
diff --git a/Common/3dParty/v8/v8.pri b/Common/3dParty/v8/v8.pri
index 11c7c72d1b..b945146161 100644
--- a/Common/3dParty/v8/v8.pri
+++ b/Common/3dParty/v8/v8.pri
@@ -15,7 +15,8 @@ v8_version_89 {
isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_x86):CONFIG += build_platform_32
}
- !build_platform_32:DEFINES += V8_COMPRESS_POINTERS
+ # seems v8 from nodejs is built without compressed pointers
+ #!build_platform_32:DEFINES += V8_COMPRESS_POINTERS
CORE_V8_PATH_OVERRIDE = $$PWD/../v8_89
}
@@ -57,7 +58,7 @@ core_windows {
core_linux {
use_v8_monolith {
- LIBS += -L$$CORE_V8_PATH_LIBS -lv8_monolith
+ LIBS += -L$$CORE_V8_PATH_LIBS -lv8
} else {
SNAPSHOT_LIB=v8_snapshot
!exists($$CORE_V8_PATH_LIBS/libv8_snapshot.a) {

View File

@@ -0,0 +1,12 @@
diff --git a/Common/3dParty/v8/v8.pri b/Common/3dParty/v8/v8.pri
index 11c7c72d1b..d4a55daa2f 100644
--- a/Common/3dParty/v8/v8.pri
+++ b/Common/3dParty/v8/v8.pri
@@ -5,7 +5,6 @@ v8_version_89 {
CONFIG += c++14
CONFIG += use_v8_monolith
DEFINES += V8_VERSION_89_PLUS
- DEFINES += V8_SUPPORT_SNAPSHOTS
core_win_32:CONFIG += build_platform_32
core_linux_32:CONFIG += build_platform_32

View File

@@ -0,0 +1,76 @@
diff --git a/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.c b/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.c
index 00d406d948..afe7283373 100644
--- a/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.c
+++ b/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.c
@@ -83,6 +83,7 @@
#include "jasper/jas_malloc.h"
#include "jasper/jas_math.h"
+#include "jpc_fix.h"
#include "jpc_qmfb.h"
#include "jpc_tsfb.h"
#include "jpc_math.h"
@@ -96,7 +97,7 @@
int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
int stride);
-int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height,
+int jpc_ft_synthesize(jpc_fix_t *a, int xstart, int ystart, int width, int height,
int stride);
int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
@@ -1592,7 +1593,7 @@ int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
}
-int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height,
+int jpc_ft_synthesize(jpc_fix_t *a, int xstart, int ystart, int width, int height,
int stride)
{
int numrows = height;
diff --git a/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.h b/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.h
index 4f43440bca..eb431d4213 100644
--- a/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.h
+++ b/DesktopEditor/cximage/jasper/jpc/jpc_qmfb.h
@@ -76,6 +76,8 @@
#include "jasper/jas_seq.h"
+#include "jpc_fix.h"
+
/******************************************************************************\
* Constants.
\******************************************************************************/
@@ -101,8 +103,8 @@ any particular platform. Hopefully, it is not too unreasonable, however. */
#endif
typedef struct {
- int (*analyze)(int *, int, int, int, int, int);
- int (*synthesize)(int *, int, int, int, int, int);
+ int (*analyze)(jpc_fix_t *, int, int, int, int, int);
+ int (*synthesize)(jpc_fix_t *, int, int, int, int, int);
double *lpenergywts;
double *hpenergywts;
} jpc_qmfb2d_t;
diff --git a/DesktopEditor/cximage/jasper/jpc/jpc_tsfb.c b/DesktopEditor/cximage/jasper/jpc/jpc_tsfb.c
index 2a4eaee670..f5ac889c21 100644
--- a/DesktopEditor/cximage/jasper/jpc/jpc_tsfb.c
+++ b/DesktopEditor/cximage/jasper/jpc/jpc_tsfb.c
@@ -119,7 +119,7 @@ void jpc_tsfb_destroy(jpc_tsfb_t *tsfb)
free(tsfb);
}
-int jpc_tsfb_analyze2(jpc_tsfb_t *tsfb, int *a, int xstart, int ystart,
+int jpc_tsfb_analyze2(jpc_tsfb_t *tsfb, jpc_fix_t *a, int xstart, int ystart,
int width, int height, int stride, int numlvls)
{
if (width > 0 && height > 0) {
@@ -150,7 +150,7 @@ int jpc_tsfb_analyze(jpc_tsfb_t *tsfb, jas_seq2d_t *a)
#endif
}
-int jpc_tsfb_synthesize2(jpc_tsfb_t *tsfb, int *a, int xstart, int ystart,
+int jpc_tsfb_synthesize2(jpc_tsfb_t *tsfb, jpc_fix_t *a, int xstart, int ystart,
int width, int height, int stride, int numlvls)
{
if (numlvls > 0) {

View File

@@ -0,0 +1,13 @@
diff --git a/DesktopEditor/doctrenderer/doctrenderer.cpp b/DesktopEditor/doctrenderer/doctrenderer.cpp
index ac24efa8b2..f6de72cc2a 100644
--- a/DesktopEditor/doctrenderer/doctrenderer.cpp
+++ b/DesktopEditor/doctrenderer/doctrenderer.cpp
@@ -238,7 +238,7 @@ namespace NSDoctRenderer
public:
CDoctRenderer_Private(const std::wstring& sAllFontsPath = L"") : CDoctRendererConfig()
{
- LoadConfig(NSFile::GetProcessDirectory(), sAllFontsPath);
+ LoadConfig(NSFile::GetProcessDirectory() + L"/../etc", sAllFontsPath);
m_pDrawingFile = NULL;
}
~CDoctRenderer_Private()

View File

@@ -0,0 +1,26 @@
diff --git a/DesktopEditor/doctrenderer/docbuilder_p.h b/DesktopEditor/doctrenderer/docbuilder_p.h
index d955b3fb33..64ece3555a 100644
--- a/DesktopEditor/doctrenderer/docbuilder_p.h
+++ b/DesktopEditor/doctrenderer/docbuilder_p.h
@@ -1400,7 +1400,7 @@ namespace NSDoctRenderer
FILE* pFile = oFile.OpenFileNative(sFile, append ? L"a+" : L"a");
if (pFile)
{
- fprintf(pFile, sValueA.c_str());
+ fprintf(pFile, "%s", sValueA.c_str());
fclose(pFile);
}
}
diff --git a/DesktopEditor/doctrenderer/js_internal/js_logger.cpp b/DesktopEditor/doctrenderer/js_internal/js_logger.cpp
index b59ce98b0d..795dcb9ec0 100644
--- a/DesktopEditor/doctrenderer/js_internal/js_logger.cpp
+++ b/DesktopEditor/doctrenderer/js_internal/js_logger.cpp
@@ -21,7 +21,7 @@ namespace NSJSBase
if (g_logger_file.length() == 1)
{
- printf(details);
+ printf("%s", details);
printf(": %d\n", (int)(dwCur - g_logger_time));
}
else

View File

@@ -0,0 +1,13 @@
diff --git a/DesktopEditor/fontengine/MemoryStream.h b/DesktopEditor/fontengine/MemoryStream.h
index 4abebc1290..9f4a61ee5d 100644
--- a/DesktopEditor/fontengine/MemoryStream.h
+++ b/DesktopEditor/fontengine/MemoryStream.h
@@ -59,7 +59,7 @@ static void LOGGING(const std::string& strFile, const std::wstring& strMessage)
NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strMessage.c_str(), (LONG)strMessage.length(), pData, lLen);
pData[lLen] = 0;
- fprintf(f, (char*)pData);
+ fprintf(f, "%s", (char*)pData);
fprintf(f, "\n");
fclose(f);

View File

@@ -0,0 +1,780 @@
{
autoconf,
automake,
boost,
buildNpmPackage,
closurecompiler,
fetchFromGitHub,
glibc,
harfbuzz,
icu,
jdk,
lib,
nodejs,
nodePackages,
# needs to be static and built with MD2 support!
openssl,
pkg-config,
qt5,
runCommand,
stdenv,
writeScript,
x2t,
}:
let
qmake = qt5.qmake;
libv8 = nodejs.libv8;
fixIcu = writeScript "fix-icu.sh" ''
substituteInPlace \
$BUILDRT/Common/3dParty/icu/icu.pri \
--replace-fail "ICU_MAJOR_VER = 58" "ICU_MAJOR_VER = ${lib.versions.major icu.version}"
mkdir $BUILDRT/Common/3dParty/icu/linux_64
ln -s ${icu}/lib $BUILDRT/Common/3dParty/icu/linux_64/build
'';
icuQmakeFlags = [
"QMAKE_LFLAGS+=-Wl,--no-undefined"
"QMAKE_LFLAGS+=-licuuc"
"QMAKE_LFLAGS+=-licudata"
"QMAKE_LFLAGS+=-L${icu}/lib"
];
# see core/Common/3dParty/html/fetch.sh
katana-parser-src = fetchFromGitHub {
owner = "jasenhuang";
repo = "katana-parser";
rev = "be6df458d4540eee375c513958dcb862a391cdd1";
hash = "sha256-SYJFLtrg8raGyr3zQIEzZDjHDmMmt+K0po3viipZW5c=";
};
# see build_tools scripts/core_common/modules/googletest.py
googletest-src = fetchFromGitHub {
owner = "google";
repo = "googletest";
tag = "v1.13.0";
hash = "sha256-LVLEn+e7c8013pwiLzJiiIObyrlbBHYaioO/SWbItPQ=";
};
# 'latest' version
# (see build_tools scripts/core_common/modules/hyphen.py)
hyphen-src = fetchFromGitHub {
owner = "hunspell";
repo = "hyphen";
rev = "73dd2967c8e1e4f6d7334ee9e539a323d6e66cbd";
hash = "sha256-WIHpSkOwHkhMvEKxOlgf6gsPs9T3xkzguD8ONXARf1U=";
};
# see core/Common/3dParty/html/fetch.py
gumbo-parser-src = fetchFromGitHub {
owner = "google";
repo = "gumbo-parser";
rev = "aa91b27b02c0c80c482e24348a457ed7c3c088e0";
hash = "sha256-+607iXJxeWKoCwb490pp3mqRZ1fWzxec0tJOEFeHoCs=";
};
# core/Common/3dParty/apple/fetch.py
libodfgen-src = fetchFromGitHub {
owner = "DistroTech";
repo = "libodfgen";
rev = "8ef8c171ebe3c5daebdce80ee422cf7bb96aa3bc";
hash = "sha256-Bv/smZFmZn4PEAcOlXD2Z4k96CK7A7YGDHFDsqZpuiE=";
};
mdds-src = fetchFromGitHub {
owner = "kohei-us";
repo = "mdds";
rev = "0783158939c6ce4b0b1b89e345ab983ccb0f0ad0";
hash = "sha256-HMGMxMRO6SadisUjZ0ZNBGQqksNDFkEh3yaQGet9rc0=";
};
glm-src = fetchFromGitHub {
owner = "g-truc";
repo = "glm";
rev = "33b4a621a697a305bc3a7610d290677b96beb181";
hash = "sha256-wwGI17vlQzL/x1O0ANr5+KgU1ETnATpLw3njpKfjnKQ=";
};
librevenge-src = fetchFromGitHub {
owner = "DistroTech";
repo = "librevenge";
rev = "becd044b519ab83893ad6398e3cbb499a7f0aaf4";
hash = "sha256-2YRxuMYzKvvQHiwXH08VX6GRkdXnY7q05SL05Vbn0Vs=";
};
libetonyek-src = fetchFromGitHub {
owner = "LibreOffice";
repo = "libetonyek";
rev = "cb396b4a9453a457469b62a740d8fb933c9442c3";
hash = "sha256-nFYI7PbcLyquhAWVGkjNLHp+tymv+Pzvfa5DNPeqZiw=";
};
#qmakeFlags = [ "CONFIG+=debug" ];
qmakeFlags = [ ];
dontStrip = false;
core-rev = "d257c68d5fdd71a33776a291914f2c856426c259";
core = fetchFromGitHub {
owner = "ONLYOFFICE";
repo = "core";
# rev that the 'core' submodule in documentserver points at
rev = core-rev;
hash = "sha256-EXeqG8MJWS1asjFihnuMnDSHeKt2x+Ui+8MYK50AnSY=";
};
web-apps = buildNpmPackage (finalAttrs: {
name = "onlyoffice-core-webapps";
#src = /home/aengelen/d/onlyoffice/documentserver/web-apps;
#sourceRoot = "/build/web-apps/build";
src = fetchFromGitHub {
owner = "ONLYOFFICE";
repo = "web-apps";
# rev that the 'web-apps' submodule in documentserver points at
rev = "5255c27b1af64f6edf08d1aba20a23b8149e338c";
hash = "sha256-49v2h+ILQ0X/gNHny6LQcj94A6h7nS99liUAnLRNxzw=";
};
sourceRoot = "${finalAttrs.src.name}/build";
patches = [
./web-apps-avoid-phantomjs.patch
];
npmDepsHash = "sha256-Uen7gl6w/0A4MDk+7j+exkdwfCYqMSPJidad8AM60eQ=";
nativeBuildInputs = [
autoconf
automake
nodePackages.grunt-cli
];
dontNpmBuild = true;
postBuild = ''
chmod u+w ..
mkdir ../deploy
chmod u+w -R ../apps
grunt --force
'';
installPhase = ''
runHook preInstall
cp -r ../deploy/web-apps $out
runHook postInstall
'';
});
sdkjs = buildNpmPackage (finalAttrs: {
name = "onlyoffice-core-sdkjs";
src = fetchFromGitHub {
owner = "ONLYOFFICE";
repo = "sdkjs";
# rev that the 'sdkjs' submodule in documentserver points at
rev = "0e50652cb08c7753a9ab72d0558560ada5d43046";
hash = "sha256-fApr34aT0X8ffPwbsUEWnA3SK8pT5RKNan3YxzhvtAU=";
};
sourceRoot = "${finalAttrs.src.name}/build";
postPatch = ''
cp npm-shrinkwrap.json package-lock.json
'';
npmDepsHash = "sha256-Hpf+z3RGqZ1LTdow6xP00hNmWf4xs+KnVBj4NbPW4uM=";
dontNpmBuild = true;
nativeBuildInputs = [
nodePackages.grunt-cli
jdk
];
postBuild = ''
chmod u+w ..
# the one from node_modules seems a weird hybrid between dynamic and static linking
cp ${closurecompiler}/bin/closure-compiler node_modules/google-closure-compiler-linux/compiler
grunt
'';
installPhase = ''
runHook preInstall
cp -r ../deploy/sdkjs $out
runHook postInstall
'';
});
dictionaries = fetchFromGitHub {
owner = "ONLYOFFICE";
repo = "dictionaries";
tag = "v8.2.0.103";
hash = "sha256-3BwWAvnw0RCD6fxTCRstJSrF5QgfVNVBe8rN1hHhCoU=";
};
buildCoreComponent =
rootdir: attrs:
stdenv.mkDerivation (
finalAttrs:
{
pname = "onlyoffice-core-${rootdir}";
# Could be neater, but these are intermediate derivations anyway
version = core-rev;
src = core;
sourceRoot = "${finalAttrs.src.name}/${rootdir}";
dontWrapQtApps = true;
nativeBuildInputs = [
qmake
];
inherit dontStrip qmakeFlags;
prePatch = ''
export SRCRT=$(pwd)
cd $(echo "${rootdir}" | sed -s "s/[^/]*/../g")
export BUILDRT=$(pwd)
ln -s $(pwd)/../source ../core
chmod -R u+w .
'';
postPatch = ''
cd $SRCRT
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
# debug builds are a level deeper than release builds
find $BUILDRT/build -type f -exec cp {} $out/lib \;
runHook postInstall
'';
}
// attrs
);
buildCoreTests =
rootdir: attrs:
(buildCoreComponent rootdir (
{
doCheck = true;
qmakeFlags = qmakeFlags ++ icuQmakeFlags;
checkPhase = ''
runHook preCheck
TEST=$(find . -type f -name test)
if [ -f "$TEST" ]; then
$TEST
else
echo "Test executable not found"
find .
exit 1
fi
runHook postCheck
'';
installPhase = ''
touch $out
'';
}
// attrs
));
unicodeConverter = buildCoreComponent "UnicodeConverter" {
patches = [
# icu needs c++20 for include/unicode/localpointer.h
./common-cpp20.patch
];
qmakeFlags = qmakeFlags ++ icuQmakeFlags;
preConfigure = ''
source ${fixIcu}
# https://github.com/ONLYOFFICE/core/pull/1637
# (but not as patch because line endings)
substituteInPlace \
UnicodeConverter.cpp \
--replace-fail "TRUE" "true"
'';
passthru.tests = buildCoreTests "UnicodeConverter/test" {
buildInputs = [
unicodeConverter
kernel
];
qmakeFlags = qmakeFlags ++ icuQmakeFlags;
preConfigure = ''
source ${fixIcu}
echo -e "\ninclude(../../Common/3dParty/icu/icu.pri)" >> test.pro
'';
checkPhase = ''
# Many of the tests do not appear to produce the 'expected' output,
# but it's not obvious whether this an error in the behaviour
# or in the test expectations:
TESTS=$(ls testfiles/*_utf8.txt | grep -v "/0_" | grep -v "/11_" | grep -v "/17_" | grep -v "/18_" | grep -v "/20_" | grep -v "/21_" | grep -v "/22_" | grep -v "/23_" | grep -v "/24_" | grep -v "/25_" | grep -v "/26_" | grep -v "/27_" | grep -v "/29_" | grep -v "/30_" | grep -v "/31_" | grep -v "/33_" | grep -v "/35_" | grep -v "/41_" | grep -v "/42_" | grep -v "/43_" | cut -d "/" -f 2 | cut -d "_" -f 1 | sort | uniq)
# This test expects the test input exactly here:
mkdir -p $out/bin
cp $(find ./core_build -name test) $out/bin
cp -r testfiles $out
$out/bin/test
for test in $TESTS; do
echo "Checking test $test"
diff $out/testfiles/''${test}_utf8.txt $out/testfiles/''${test}_test_utf8.txt >/dev/null
done
'';
installPhase = ''
# TODO: this produces files in $out/testfiles. It looks like this should
# test that the files are identical, which they are not - but it is not
# obvious the test is 'wrong' :/
#md5sum $out/testfiles/*
'';
};
};
kernel = buildCoreComponent "Common" {
patches = [
./zlib-cstd.patch
];
buildInputs = [
unicodeConverter
];
qmakeFlags = qmakeFlags ++ icuQmakeFlags;
};
graphics = buildCoreComponent "DesktopEditor/graphics/pro" {
patches = [
./cximage-types.patch
];
buildInputs = [
unicodeConverter
kernel
];
preConfigure = ''
ln -s ${katana-parser-src} $BUILDRT/Common/3dParty/html/katana-parser
# Common/3dParty/harfbuzz/make.py
cat >$BUILDRT/Common/3dParty/harfbuzz/harfbuzz.pri <<EOL
INCLUDEPATH += ${harfbuzz.dev}/include/harfbuzz
LIBS += -L${harfbuzz}/lib -lharfbuzz
EOL
ln -s ${hyphen-src} $BUILDRT/Common/3dParty/hyphen/hyphen
'';
passthru.tests = lib.attrsets.genAttrs [ "alphaMask" "graphicsLayers" "TestPICT" ] (
test:
buildCoreTests "DesktopEditor/graphics/tests/${test}" {
preConfigure = ''
source ${fixIcu}
'';
buildInputs = [
graphics
kernel
unicodeConverter
];
}
);
};
network = buildCoreComponent "Common/Network" {
buildInputs = [
kernel
];
};
docxformatlib = buildCoreComponent "OOXML/Projects/Linux/DocxFormatLib" {
patches = [
# Interestingly only seems to pop up when debug mode is enabled
./xlsx-missing-import.patch
];
buildInputs = [ boost ];
};
cryptopp = buildCoreComponent "Common/3dParty/cryptopp/project" {
buildInputs = [ boost ];
};
xlsbformatlib = buildCoreComponent "OOXML/Projects/Linux/XlsbFormatLib" {
buildInputs = [ boost ];
};
xlsformatlib = buildCoreComponent "MsBinaryFile/Projects/XlsFormatLib/Linux" {
patches = [
./MsBinaryFile-pragma-regions.patch
];
buildInputs = [ boost ];
};
docformatlib = buildCoreComponent "MsBinaryFile/Projects/DocFormatLib/Linux" {
buildInputs = [ boost ];
};
pptformatlib = buildCoreComponent "MsBinaryFile/Projects/PPTFormatLib/Linux" {
buildInputs = [ boost ];
};
rtfformatlib = buildCoreComponent "RtfFile/Projects/Linux" {
buildInputs = [ boost ];
};
txtxmlformatlib = buildCoreComponent "TxtFile/Projects/Linux" {
buildInputs = [ boost ];
};
bindocument = buildCoreComponent "OOXML/Projects/Linux/BinDocument" {
buildInputs = [ boost ];
};
pptxformatlib = buildCoreComponent "OOXML/Projects/Linux/PPTXFormatLib" {
buildInputs = [ boost ];
};
compoundfilelib = buildCoreComponent "Common/cfcpp" { };
iworkfile = buildCoreComponent "Apple" {
patches = [
./zlib-cstd.patch
];
# mdds uses bool_constant which needs a newer c++
qmakeFlags = qmakeFlags ++ [ "CONFIG+=c++1z" ];
buildInputs = [
kernel
unicodeConverter
boost
];
preConfigure = ''
ln -s ${glm-src} $BUILDRT/Common/3dParty/apple/glm
ln -s ${mdds-src} $BUILDRT/Common/3dParty/apple/mdds
ln -s ${libodfgen-src} $BUILDRT/Common/3dParty/apple/libodfgen
ln -s ${librevenge-src} $BUILDRT/Common/3dParty/apple/librevenge
cp -r ${libetonyek-src} $BUILDRT/Common/3dParty/apple/libetonyek
substituteInPlace \
$BUILDRT/Common/3dParty/apple/libetonyek/src/lib/IWORKTable.cpp \
--replace-fail "is_tree_valid" "valid_tree"
chmod u+w $BUILDRT/Common/3dParty/apple/libetonyek/src/lib
cp $BUILDRT/Common/3dParty/apple/headers/* $BUILDRT/Common/3dParty/apple/libetonyek/src/lib
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
mv ../build/lib/*/* $out/lib
runHook postInstall
'';
doCheck = true;
passthru.tests = buildCoreTests "Apple/test" {
buildInputs = [
unicodeConverter
kernel
iworkfile
];
qmakeFlags = qmakeFlags ++ icuQmakeFlags;
preConfigure = ''
source ${fixIcu}
'';
};
};
vbaformatlib = buildCoreComponent "MsBinaryFile/Projects/VbaFormatLib/Linux" {
buildInputs = [ boost ];
};
odfformatlib = buildCoreComponent "OdfFile/Projects/Linux" {
buildInputs = [ boost ];
};
hwpfile = buildCoreComponent "HwpFile" {
buildInputs = [
cryptopp
kernel
unicodeConverter
graphics
];
};
pdffile = buildCoreComponent "PdfFile" {
buildInputs = [
graphics
kernel
unicodeConverter
cryptopp
network
];
};
djvufile = buildCoreComponent "DjVuFile" {
buildInputs = [
unicodeConverter
kernel
graphics
pdffile
];
};
docxrenderer = buildCoreComponent "DocxRenderer" {
buildInputs = [
unicodeConverter
kernel
graphics
];
passthru.tests = buildCoreTests "DocxRenderer/test" {
buildInputs = [
unicodeConverter
kernel
network
graphics
pdffile
djvufile
xpsfile
docxrenderer
];
preConfigure = ''
# (not as patch because of line endings)
sed -i '47 a #include <limits>' $BUILDRT/Common/OfficeFileFormatChecker2.cpp
source ${fixIcu}
'';
};
};
xpsfile = buildCoreComponent "XpsFile" {
buildInputs = [
unicodeConverter
graphics
kernel
pdffile
];
};
doctrenderer = buildCoreComponent "DesktopEditor/doctrenderer" {
buildInputs = [
graphics
boost
kernel
unicodeConverter
network
pdffile
djvufile
xpsfile
docxrenderer
];
patches = [
# https://github.com/ONLYOFFICE/core/pull/1631
./doctrenderer-format-security.patch
./doctrenderer-config-dir.patch
./fontengine-format-security.patch
./v8_updates.patch
./common-v8-no-compress-pointers.patch
# we can enable snapshots again once we
# compile sdkjs from source as well
./common-v8-no-snapshots.patch
# needed for c++ 20 for nodejs_23
./common-pole-c20.patch
];
qmakeFlags =
qmakeFlags
++ icuQmakeFlags
++ [
# c++1z for nodejs_22.libv8 (20 seems to produce errors around 'is_void_v' there)
# c++ 20 for nodejs_23.libv8
"CONFIG+=c++2a"
# v8_base.h will set nMaxVirtualMemory to 4000000000/5000000000
# which is not page-aligned, so disable memory limitation for now
"QMAKE_CXXFLAGS+=-DV8_VERSION_121_PLUS"
"QMAKE_CXXFLAGS+=-DDISABLE_MEMORY_LIMITATION"
"QMAKE_LFLAGS+=-licui18n"
];
preConfigure = ''
cd $BUILDRT
substituteInPlace \
DesktopEditor/doctrenderer/nativecontrol.h \
--replace-fail "fprintf(f, strVal.c_str());" "fprintf(f, \"%s\", strVal.c_str());" \
--replace-fail "fprintf(_file, sParam.c_str());" "fprintf(_file, \"%s\", sParam.c_str());"
# (not as patch because of line endings)
sed -i '47 a #include <limits>' Common/OfficeFileFormatChecker2.cpp
echo "== openssl =="
mkdir -p Common/3dParty/openssl/build/linux_64/lib
echo "Including openssl from ${openssl.dev}"
ln -s ${openssl.dev}/include Common/3dParty/openssl/build/linux_64/include
for i in ${openssl.out}/lib/*; do
ln -s $i Common/3dParty/openssl/build/linux_64/lib/$(basename $i)
done
echo "== v8 =="
mkdir -p Common/3dParty/v8_89/v8/out.gn/linux_64
ln -s ${libv8}/lib Common/3dParty/v8_89/v8/out.gn/linux_64/obj
tar xf ${libv8.src} --one-top-level=/tmp/xxxxx
for i in /tmp/xxxxx/*/deps/v8/*; do
cp -r $i Common/3dParty/v8_89/v8/
done
cd $BUILDRT/DesktopEditor/doctrenderer
'';
passthru.tests = lib.attrsets.genAttrs [ "embed/external" "embed/internal" "js_internal" "json" ] (
test:
buildCoreTests "DesktopEditor/doctrenderer/test/${test}" {
buildInputs = [ doctrenderer ];
preConfigure = ''
ln -s ${googletest-src} $BUILDRT/Common/3dParty/googletest/googletest
'';
}
);
};
htmlfile2 = buildCoreComponent "HtmlFile2" {
buildInputs = [
boost
kernel
network
graphics
unicodeConverter
];
preConfigure = ''
ln -s ${katana-parser-src} $BUILDRT/Common/3dParty/html/katana-parser
ln -s ${gumbo-parser-src} $BUILDRT/Common/3dParty/html/gumbo-parser
'';
};
epubfile = buildCoreComponent "EpubFile" {
buildInputs = [
kernel
graphics
htmlfile2
];
};
fb2file = buildCoreComponent "Fb2File" {
buildInputs = [
unicodeConverter
kernel
graphics
boost
];
qmakeFlags = qmakeFlags ++ [
"QMAKE_LFLAGS+=-Wl,--no-undefined"
];
preConfigure = ''
ln -s ${gumbo-parser-src} $BUILDRT/Common/3dParty/html/gumbo-parser
'';
passthru.tests.run = buildCoreTests "Fb2File/test" {
buildInputs = [
fb2file
kernel
];
preConfigure = ''
source ${fixIcu}
'';
checkPhase = ''
for i in ../examples/*.fb2; do
cp $i build/linux_64/res.fb2
./build/linux_64/test
done
'';
};
};
allfontsgen = buildCoreComponent "DesktopEditor/AllFontsGen" {
buildInputs = [
unicodeConverter
kernel
graphics
];
qmakeFlags = qmakeFlags ++ icuQmakeFlags;
preConfigure = ''
source ${fixIcu}
'';
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp $BUILDRT/build/bin/*/* $BUILDRT/build/bin/*/*/* $out/bin
runHook postInstall
'';
};
core-fonts = fetchFromGitHub {
owner = "ONLYOFFICE";
repo = "core-fonts";
rev = "d5d80e6ae15800ccf31e1c4dbb1ae3385992e0c2";
hash = "sha256-daJG/4tcdRVVmlMCUW4iuoUkEEfY7sx5icYWMva4o+c=";
};
allfonts = runCommand "allfonts" { } ''
mkdir -p $out/web
mkdir -p $out/converter
mkdir -p $out/images
mkdir -p $out/fonts
${allfontsgen}/bin/allfontsgen \
--input=${core-fonts} \
--allfonts-web=$out/web/AllFonts.js \
--allfonts=$out/converter/AllFonts.js \
--images=$out/images \
--selection=$out/converter/font_selection.bin \
--output-web=$out/fonts
'';
in
buildCoreComponent "X2tConverter/build/Qt" {
pname = "x2t";
# x2t is not 'directly' versioned, so we version it after the version
# of documentserver it's pulled into as a submodule
version = "8.3.2";
buildInputs = [
unicodeConverter
kernel
graphics
network
boost
docformatlib
pptformatlib
rtfformatlib
txtxmlformatlib
bindocument
pptxformatlib
docxformatlib
xlsbformatlib
xlsformatlib
compoundfilelib
cryptopp
fb2file
pdffile
htmlfile2
epubfile
xpsfile
djvufile
doctrenderer
docxrenderer
iworkfile
hwpfile
vbaformatlib
odfformatlib
];
qmakeFlags = qmakeFlags ++ icuQmakeFlags ++ [ "X2tConverter.pro" ];
preConfigure = ''
source ${fixIcu}
# (not as patch because of line endings)
sed -i '47 a #include <limits>' $BUILDRT/Common/OfficeFileFormatChecker2.cpp
substituteInPlace \
$BUILDRT/Test/Applications/TestDownloader/mainwindow.h \
--replace-fail "../core" ""
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
find $BUILDRT/build -type f -exec cp {} $out/bin \;
mkdir -p $out/etc
cat >$out/etc/DoctRenderer.config <<EOF
<Settings>
<file>${sdkjs}/common/Native/native.js</file>
<file>${sdkjs}//common/Native/jquery_native.js</file>
<allfonts>${allfonts}/converter/AllFonts.js</allfonts>
<file>${web-apps}/vendor/xregexp/xregexp-all-min.js</file>
<sdkjs>${sdkjs}</sdkjs>
<dictionaries>${dictionaries}</dictionaries>
</Settings>
EOF
runHook postInstall
'';
passthru.tests = {
unicodeConverter = unicodeConverter.tests;
fb2file = fb2file.tests;
graphics = graphics.tests;
iworkfile = iworkfile.tests;
docxrenderer = docxrenderer.tests;
doctrenderer = doctrenderer.tests;
x2t = runCommand "x2t-test" { } ''
(${x2t}/bin/x2t || true) | grep "OOX/binary file converter." && mkdir -p $out
'';
};
passthru.components = {
inherit
allfontsgen
allfonts
unicodeConverter
kernel
graphics
network
docxformatlib
cryptopp
xlsbformatlib
xlsformatlib
doctrenderer
htmlfile2
epubfile
fb2file
iworkfile
web-apps
sdkjs
dictionaries
;
};
meta = {
description = "Convert files from one format to another";
homepage = "https://github.com/ONLYOFFICE/core/tree/master/X2tConverter";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ raboof ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,28 @@
diff --git a/Common/3dParty/v8/v8.pri b/Common/3dParty/v8/v8.pri
index 11c7c72d1b..eef42d3fc5 100644
--- a/Common/3dParty/v8/v8.pri
+++ b/Common/3dParty/v8/v8.pri
@@ -57,7 +57,7 @@ core_windows {
core_linux {
use_v8_monolith {
- LIBS += -L$$CORE_V8_PATH_LIBS -lv8_monolith
+ LIBS += -L$$CORE_V8_PATH_LIBS -lv8
} else {
SNAPSHOT_LIB=v8_snapshot
!exists($$CORE_V8_PATH_LIBS/libv8_snapshot.a) {
diff --git a/DesktopEditor/doctrenderer/js_internal/v8/inspector/v8_inspector_client.cpp b/DesktopEditor/doctrenderer/js_internal/v8/inspector/v8_inspector_client.cpp
index dbfda9807c..78af9a4e3a 100644
--- a/DesktopEditor/doctrenderer/js_internal/v8/inspector/v8_inspector_client.cpp
+++ b/DesktopEditor/doctrenderer/js_internal/v8/inspector/v8_inspector_client.cpp
@@ -22,7 +22,9 @@ namespace NSJSBase
// initialize all V8 inspector stuff
m_pChannel.reset(new CV8InspectorChannelImpl(m_pIsolate, fOnResponse));
m_pInspector = v8_inspector::V8Inspector::create(m_pIsolate, this);
- m_pSession = m_pInspector->connect(m_nContextGroupId, m_pChannel.get(), v8_inspector::StringView());
+ m_pSession = m_pInspector->connect(m_nContextGroupId, m_pChannel.get(), v8_inspector::StringView(),
+ v8_inspector::V8Inspector::kFullyTrusted,
+ v8_inspector::V8Inspector::kNotWaitingForDebugger);
context->SetAlignedPointerInEmbedderData(1, this);
v8_inspector::StringView oContextName = convertToStringView("inspector" + std::to_string(nContextGroupId));

View File

@@ -0,0 +1,12 @@
diff --git a/build/package.json b/build/package.json
index 96b35b328a..f8ec8397b4 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,6 @@
},
"devDependencies": {
"chai": "^5.1.0",
- "grunt-mocha": "^1.2.0",
"mocha": "^10.2.0"
}
}

View File

@@ -0,0 +1,12 @@
diff --git a/OOXML/XlsxFormat/Worksheets/SheetData.cpp b/OOXML/XlsxFormat/Worksheets/SheetData.cpp
index b808b46cb7..c90eb4e254 100644
--- a/OOXML/XlsxFormat/Worksheets/SheetData.cpp
+++ b/OOXML/XlsxFormat/Worksheets/SheetData.cpp
@@ -71,6 +71,7 @@
#include <boost/regex.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
+#include <cfloat>
#ifndef MININT32
#define MAXUINT32 ((uint32_t)~((uint32_t)0))

View File

@@ -0,0 +1,23 @@
diff --git a/OfficeUtils/OfficeUtils.pri b/OfficeUtils/OfficeUtils.pri
index b4e1f497a8..6d99014ddd 100644
--- a/OfficeUtils/OfficeUtils.pri
+++ b/OfficeUtils/OfficeUtils.pri
@@ -1,5 +1,6 @@
core_linux {
QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
+ QMAKE_CFLAGS += -DSTDC
}
core_mac {
QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
diff --git a/OfficeUtils/src/zlib-1.2.11/gzguts.h b/OfficeUtils/src/zlib-1.2.11/gzguts.h
index 990a4d2514..aefbbd8879 100644
--- a/OfficeUtils/src/zlib-1.2.11/gzguts.h
+++ b/OfficeUtils/src/zlib-1.2.11/gzguts.h
@@ -24,6 +24,7 @@
# include <string.h>
# include <stdlib.h>
# include <limits.h>
+# include <unistd.h>
#endif
#ifndef _POSIX_SOURCE

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchurl,
xorg,
}:
stdenv.mkDerivation rec {
pname = "x2vnc";
version = "1.7.2";
src = fetchurl {
url = "https://fredrik.hubbe.net/x2vnc/x2vnc-${version}.tar.gz";
sha256 = "00bh9j3m6snyd2fgnzhj5vlkj9ibh69gfny9bfzlxbnivb06s1yw";
};
env.NIX_CFLAGS_COMPILE = "-std=gnu89";
buildInputs = with xorg; [
libX11
xorgproto
libXext
libXrandr
];
hardeningDisable = [ "format" ];
meta = with lib; {
homepage = "http://fredrik.hubbe.net/x2vnc.html";
description = "Program to control a remote VNC server";
platforms = platforms.unix;
license = licenses.gpl2Plus;
mainProgram = "x2vnc";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
libX11,
libXtst,
libXext,
fetchFromGitHub,
autoreconfHook,
pkg-config,
libXi,
}:
stdenv.mkDerivation {
pname = "x2x";
version = "unstable-2023-04-30";
src = fetchFromGitHub {
owner = "dottedmag";
repo = "x2x";
rev = "53692798fa0e991e0dd67cdf8e8126158d543d08";
hash = "sha256-FUl2z/Yz9uZlUu79LHdsXZ6hAwSlqwFV35N+GYDNvlQ=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
libX11
libXtst
libXext
libXi
];
meta = with lib; {
description = "Allows the keyboard, mouse on one X display to be used to control another X display";
homepage = "https://github.com/dottedmag/x2x";
license = licenses.bsd3;
platforms = platforms.linux;
mainProgram = "x2x";
};
}