recoll: fix darwin build

This commit is contained in:
annalee 2023-12-08 08:19:09 +00:00
parent aa4e6947d2
commit 2dfa764fba
No known key found for this signature in database
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,48 @@
From 9a0102fe1da038ebe08107ead991964df11b0271 Mon Sep 17 00:00:00 2001
From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
Date: Mon, 19 Feb 2024 03:31:20 +0000
Subject: [PATCH] no qtgui darwin bundle
---
qtgui/recoll.pro.in | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/qtgui/recoll.pro.in b/qtgui/recoll.pro.in
index a0ef314..6dbc3b5 100644
--- a/qtgui/recoll.pro.in
+++ b/qtgui/recoll.pro.in
@@ -180,7 +180,7 @@ windows {
}
}
-macx: {
+if (false) {
QCBUILDLOC=Qt_6_4_2_for_macOS
# QT += webkit webkitwidgets
@@ -375,7 +375,7 @@ macx: {
QMAKE_BUNDLE_DATA = APP_EXAMPLES APP_EXAMPLES_MAC APP_FILTERS APP_IMAGES APP_DOC
}
-unix:!macx {
+unix {
VPATH = @srcdir@
@@ -400,6 +400,13 @@ VPATH = @srcdir@
SOURCES += crontool.cpp \
rtitool.cpp
+ macx {
+ SOURCES += ../utils/closefrom.cpp \
+ ../utils/execmd.cpp \
+ ../utils/netcon.cpp \
+ ../utils/rclionice.cpp
+ }
+
FORMS += crontool.ui \
rtitool.ui
--
2.43.0

View File

@ -105,6 +105,8 @@ mkDerivation rec {
patches = [
# fix "No/bad main configuration file" error
./fix-datadir.patch
# use the same configure based build for darwin as linux
./0001-no-qtgui-darwin-bundle.patch
];
nativeBuildInputs = [
@ -150,7 +152,6 @@ mkDerivation rec {
substituteInPlace $f --replace /usr/bin/perl ${lib.getBin (perl.passthru.withPackages (p: [ p.ImageExifTool ]))}/bin/perl
fi
done
wrapProgram $out/bin/recoll --prefix PATH : "${filterPath}"
wrapProgram $out/bin/recollindex --prefix PATH : "${filterPath}"
wrapProgram $out/share/recoll/filters/rclaudio.py \
--prefix PYTHONPATH : $PYTHONPATH
@ -158,9 +159,12 @@ mkDerivation rec {
--prefix PERL5LIB : "${with perlPackages; makeFullPerlPath [ ImageExifTool ]}"
'' + lib.optionalString stdenv.isLinux ''
substituteInPlace $f --replace '"lyx"' '"${lib.getBin lyx}/bin/lyx"'
wrapProgram $out/bin/recoll --prefix PATH : "${filterPath}"
'' + lib.optionalString (stdenv.isDarwin && withGui) ''
mkdir $out/Applications
mv $out/bin/recoll.app $out/Applications
wrapProgram $out/Applications/recoll.app/Contents/MacOS/recoll --prefix PATH : "${filterPath}"
ln -s ../Applications/recoll.app/Contents/MacOS/recoll $out/bin/recoll
'';
enableParallelBuilding = true;