[LyX/master] Automate Qt major version detection in macOS build script

2021-12-05 Thread Stephan Witt
commit 53ed3dc0627d925500db20594af301052b785378
Author: Stephan Witt 
Date:   Mon Dec 6 07:51:26 2021 +0100

Automate Qt major version detection in macOS build script
---
 development/LyX-Mac-binary-release.sh |7 ++-
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 04da1f3..25b1c7a 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -47,7 +47,7 @@ LyXConfigureOptions="${LyXConfigureOptions} 
--disable-stdlib-debug"
 AspellConfigureOptions="--enable-warnings --enable-optimization=-O0 
--enable-debug --disable-nls --enable-compile-in-filters 
--disable-pspell-compatibility"
 HunspellConfigureOptions="--with-warnings --disable-nls --disable-static"
 
-QtMajorVersion=qt4
+QtMajorVersion=$(echo "${QtVersion}"|cut -d. -f1)
 QtConfigureOptions="${QtConfigureOptions} -opensource -silent -shared 
-confirm-license"
 # stupid special case...
 case "${QtVersion}:${QtAPI}" in
@@ -63,7 +63,6 @@ case "${QtVersion}:${QtAPI}" in
QtConfigureOptions="${QtConfigureOptions} -fast -no-strip"
QtConfigureOptions="${QtConfigureOptions} -no-javascript-jit 
-no-pkg-config"
QtConfigureOptions="${QtConfigureOptions} -nomake examples -nomake 
demos -nomake docs -nomake tools"
-   QtMajorVersion=qt5
;;
 5.6*|5.7*)
QtConfigureOptions="${QtConfigureOptions} -no-strip"
@@ -73,7 +72,6 @@ case "${QtVersion}:${QtAPI}" in
QtConfigureOptions="${QtConfigureOptions} -skip qtquickcontrols"
QtConfigureOptions="${QtConfigureOptions} -skip qttools"
QtConfigureOptions="${QtConfigureOptions} -skip qtdeclarative"
-   QtMajorVersion=qt5
;;
 5.*)
QtConfigureOptions="${QtConfigureOptions} -no-strip"
@@ -82,7 +80,6 @@ case "${QtVersion}:${QtAPI}" in
for component in ${QtSkipComponents} ; do
QtConfigureOptions="${QtConfigureOptions} -skip ${component}"
done
-   QtMajorVersion=qt5
;;
 *)
QtConfigureOptions="${QtConfigureOptions} -fast -no-exceptions"
@@ -1055,7 +1052,7 @@ build_package() {
for arch in ${ARCH_LIST} ; do
DMGARCH="${DMGARCH}-${arch}"
done
-   QtDmgArchSuffix=${QtMajorVersion}${DMGARCH}${QtAPI}.dmg
+   QtDmgArchSuffix="qt"${QtMajorVersion}${DMGARCH}${QtAPI}.dmg
 
test -n "${DMGLocation}" && (
make_dmg "${DMGLocation}"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Care for consistent compiler flag values of macosx-version-min with ObjC and C++

2021-12-05 Thread Stephan Witt
commit b48620dff17f69e8fd8dd9344ef49007b6c28c32
Author: Stephan Witt 
Date:   Mon Dec 6 07:46:35 2021 +0100

Care for consistent compiler flag values of macosx-version-min with ObjC 
and C++
---
 config/lyxinclude.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index 40f86ab..e6cab08 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -694,7 +694,7 @@ AC_DEFUN([LYX_CHECK_MACOS_DEPLOYMENT_TARGET],[
   ;;
 esac
   fi
-  AM_CXXFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_CXXFLAGS"
+  AM_CPPFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_CPPFLAGS"
   AM_LDFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_LDFLAGS"
   AC_SUBST(macos_deployment_target,"${macos_deployment_target}")
   AC_MSG_CHECKING([the macos deployment target for LyX])
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] ctests: log a fixed issue

2021-12-05 Thread Scott Kostyshak
commit d4678a734acdf57fce243769a5245583554ccf59
Author: Scott Kostyshak 
Date:   Sun Dec 5 22:07:06 2021 -0500

ctests: log a fixed issue
---
 development/autotests/ctests-costs-benefits.txt |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/development/autotests/ctests-costs-benefits.txt 
b/development/autotests/ctests-costs-benefits.txt
index 3865ee1..f502ddf 100644
--- a/development/autotests/ctests-costs-benefits.txt
+++ b/development/autotests/ctests-costs-benefits.txt
@@ -58,6 +58,9 @@ Note1  : We are still not sure what to do regarding how to 
make it more user-fri
  for users to realize that "-dALLOWPSTRANSPARENCY" is needed for the 
ps2pdf converter.
 Benefit: 14 days (https://www.lyx.org/trac/ticket/12303)
 
+Report : 
https://www.mail-archive.com/search?l=mid&q=20211205190238.edrtqmg3fkdr7gbo%40poole
+Fix: 489bf46a, e3489d54
+
 
 Examples where upstream (e.g., LaTeX packages) bugs were fixed (more quickly)
 because of ctests:
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook: recognise Tufte's float types (margin*).

2021-12-05 Thread Thibaut Cuvelier
commit 489bf46a0345216f1a281617ec2a1ae6019c189f
Author: Thibaut Cuvelier 
Date:   Sun Dec 5 22:44:17 2021 +0100

DocBook: recognise Tufte's float types (margin*).
---
 src/Floating.cpp |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Floating.cpp b/src/Floating.cpp
index 6a532aa..9a20d7c 100644
--- a/src/Floating.cpp
+++ b/src/Floating.cpp
@@ -57,11 +57,11 @@ Floating::Floating(string const & type, string const & 
placement,
// If some type is predetermined in the layout, use it.
if (!docbookFloatType.empty() && 
allowedFloatTypes.find(docbookFloatType) != allowedFloatTypes.end())
docbook_float_type_ = docbookFloatType;
-   // Otherwise, try to guess the type.
-   else if (floattype_ == "figure" || floattype_ == "graph" ||
-   floattype_ == "chart" || floattype_ == "scheme") {
+   // Otherwise, try to guess the DocBook type based on the float 
type.
+   else if (floattype_ == "figure" || floattype_ == "graph" || 
floattype_ == "chart" || floattype_ == "scheme" ||
+   floattype_ == "marginfigure") {
docbook_float_type_ = "figure";
-   } else if (floattype_ == "table" || floattype_ == "tableau") {
+   } else if (floattype_ == "table" || floattype_ == "tableau" || 
floattype_ == "margintable") {
docbook_float_type_ = "table";
} else if (floattype_ == "algorithm") {
docbook_float_type_ = "algorithm";
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook: implement margin/sidenotes in Tufte.

2021-12-05 Thread Thibaut Cuvelier
commit e3489d54e3485ef186eb70b06d4372eaa400db98
Author: Thibaut Cuvelier 
Date:   Sun Dec 5 22:53:36 2021 +0100

DocBook: implement margin/sidenotes in Tufte.
---
 autotests/export/docbook/Tufte_Book.xml |   13 +
 lib/layouts/tufte-book.layout   |6 ++
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/autotests/export/docbook/Tufte_Book.xml 
b/autotests/export/docbook/Tufte_Book.xml
index 3289cfd..0c1cd57 100644
--- a/autotests/export/docbook/Tufte_Book.xml
+++ b/autotests/export/docbook/Tufte_Book.xml
@@ -1,6 +1,6 @@
 
 
+  See https://www.lyx.org/ for more information -->
 http://docbook.org/ns/docbook"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:m="http://www.w3.org/1998/Math/MathML"; 
xmlns:xi="http://www.w3.org/2001/XInclude"; version="5.2">
 
 Tufte Examples
@@ -19,10 +19,15 @@ Working with Text
 
 One of the most prominent and distinctive features of this style is the 
extensive use of sidenotes. There is a wide margin to provide ample room for 
sidenotes and small figures. Any footnotes will automatically be converted to 
sidenotes.
 This is a sidenote that was entered using a footnote.
- Alternatively, you can also use the Sidenote inset 
directly; you'll find it in the Insert⇒Custom 
Insets menu.This is a sidenote that was entered using a 
sidenote.
-If you like to place ancillary information in the margin without the 
sidenote mark (the superscript number), you can use the Marginnote 
inset. This is Tufte's margin note. Notice that there isn't a number preceding 
the note, and there is no number in the main text where this note was written. 
The normal margin note will work as well, but it will look rather odd.
+ Alternatively, you can also use the Sidenote inset 
directly; you'll find it in the Insert⇒Custom 
Insets menu.
+This is a sidenote that was entered using a sidenote.
+
+If you like to place ancillary information in the margin without the 
sidenote mark (the superscript number), you can use the Marginnote 
inset. 
+This is Tufte's margin note. Notice that there isn't a number preceding 
the note, and there is no number in the main text where this note was 
written.
+ The normal margin note will work as well, but it will look rather 
odd.
 
-This is a normal margin note. Don't use it.
+This is a normal margin note. Don't use it.
+
 Another useful innovation is 
Tufte's NewThought character style (Edit⇒TextStyle⇒NewThought). It introduces 
new thoughts by means of small caps, as demonstrated in this paragraph. 
 The Tufte document classes include two new character styles and some 
improvements on existing commands for letterspacing.
 When setting strings of ALL CAPS or 
small caps, the letterspacing—that is, 
the spacing between the letters—should be increased slightly. The AllCaps character style 
(Edit⇒TextStyle⇒AllCaps) has 
proper letterspacing for strings of FULL CAPITAL 
LETTERS, and the SmallCaps character style 
(Edit⇒TextStyle⇒SmallCaps) has 
letterspacing for small capital letters. 
These commands will also automatically convert the case of the text to upper- 
or lowercase, respectively.
diff --git a/lib/layouts/tufte-book.layout b/lib/layouts/tufte-book.layout
index f36f395..bc79f5d 100644
--- a/lib/layouts/tufte-book.layout
+++ b/lib/layouts/tufte-book.layout
@@ -170,6 +170,10 @@ InsetLayout Flex:Sidenote
  Color marginlabel
  Size  Small
EndFont
+DocBookTag  footnote
+DocBookAttr role='sidenote'
+   DocBookItemTag  para
+DocBookTagType  inline
ResetsFont  true
 End
 
@@ -183,6 +187,7 @@ InsetLayout Flex:Marginnote
  Shape Up
  SeriesMedium
EndFont
+DocBookAttr role='marginnote'
MultiPartrue
 End
 
@@ -201,6 +206,7 @@ InsetLayout Flex:NewThought
ResetsFont  true
DocBookTag  emphasis
DocBookAttr role='newthought'
+DocBookTagType  inline
 End
 
 InsetLayout Flex:AllCaps
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Amend change d1d22a1433e503c3f36aa982c2a7ec9d1f79273d - configure Mac compiler flags on Mac only

2021-12-05 Thread Stephan Witt
commit f700aa98d45f019d4cf875009dc684bbda32a5ec
Author: Stephan Witt 
Date:   Sun Dec 5 22:36:36 2021 +0100

Amend change d1d22a1433e503c3f36aa982c2a7ec9d1f79273d  - configure Mac 
compiler flags on Mac only
---
 configure.ac |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 02a89a8..eabbcf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,7 +193,9 @@ AC_CHECK_FUNCS(chmod close _close fork getpid _getpid lockf 
lstat mkfifo open _o
 AC_FUNC_MKDIR
 AC_FUNC_SELECT_ARGTYPES
 
-LYX_CHECK_MACOS_DEPLOYMENT_TARGET
+if test "$lyx_use_packaging" = "macosx" ; then
+  LYX_CHECK_MACOS_DEPLOYMENT_TARGET
+fi
 
 LYX_CHECK_SPELL_ENGINES
 LYX_USE_INCLUDED_MYTHES
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Qt 5.12.x requires at least MacOS 10.12

2021-12-05 Thread Stephan Witt
commit 495cde1aca42fb94050f9aea2186e165bb2ead06
Author: Stephan Witt 
Date:   Sun Dec 5 22:38:42 2021 +0100

Qt 5.12.x requires at least MacOS 10.12
---
 config/lyxinclude.m4 |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index e4acd7b..40f86ab 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -686,6 +686,9 @@ AC_DEFUN([LYX_CHECK_MACOS_DEPLOYMENT_TARGET],[
   if test "${macos_deployment_target}" = "auto" ; then
 macos_deployment_target="10.10"
 case "$QTLIB_VERSION" in
+5.12.*)
+  macos_deployment_target="10.12"
+  ;;
 6.*)
   macos_deployment_target="10.14"
   ;;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] MathStream: better order for the calls to tab() and cr().

2021-12-05 Thread Thibaut Cuvelier
commit a81dd6518af8ab9b2fc9cf09f38dea5746c2375e
Author: Thibaut Cuvelier 
Date:   Sun Dec 5 19:15:06 2021 +0100

MathStream: better order for the calls to tab() and cr().

Part of 
https://www.lyx.org/trac/attachment/ticket/12221/0006-amends-to-a579128c-a68e9793-a68e9793.patch
 by lynx.
---
 src/mathed/MathStream.cpp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp
index a6d160c..a05e54a 100644
--- a/src/mathed/MathStream.cpp
+++ b/src/mathed/MathStream.cpp
@@ -361,8 +361,8 @@ MathMLStream & operator<<(MathMLStream & ms, char_type c)
 
 MathMLStream & operator<<(MathMLStream & ms, MTag const & t)
 {
-   ++ms.tab();
ms.cr();
+   ++ms.tab();
ms.os() << '<' << from_ascii(ms.namespacedTag(t.tag_));
if (!t.attr_.empty())
ms.os() << " " << from_ascii(t.attr_);
@@ -384,9 +384,9 @@ MathMLStream & operator<<(MathMLStream & ms, MTagInline 
const & t)
 
 MathMLStream & operator<<(MathMLStream & ms, ETag const & t)
 {
-   ms.cr();
if (ms.tab() > 0)
--ms.tab();
+   ms.cr();
ms.os() << "";
return ms;
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] InsetMathHull: fix column alignment for MathML.

2021-12-05 Thread Thibaut Cuvelier
commit bea2abf6ebe3138508a87787b5abb522cf93cbe4
Author: Thibaut Cuvelier 
Date:   Sun Dec 5 20:11:47 2021 +0100

InsetMathHull: fix column alignment for MathML.


https://www.lyx.org/trac/attachment/ticket/12221/0005-mathmlize-mathhull-checks-for-alignment.patch
 by lynx
---
 src/mathed/InsetMathHull.cpp |   26 +++---
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 97d95da..b33813b 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -2537,22 +2537,26 @@ void InsetMathHull::htmlize(HtmlStream & os) const
 // and we simply do not have that in InsetMathGrid.
 void InsetMathHull::mathmlize(MathMLStream & ms) const
 {
-   bool const havenumbers = haveNumbers();
-   bool const havetable = havenumbers || nrows() > 1 || ncols() > 1;
+   bool const havetable = haveNumbers() || nrows() > 1 || ncols() > 1;
 
 if (havetable) {
-if (getType() == hullSimple)
-ms << MTag("mtable");
-else if (getType() >= hullAlign && getType() <= hullXXAlignAt)
-ms << MTag("mtable", "displaystyle='true' columnalign='right 
left'");
-else
-ms << MTag("mtable", "displaystyle='true'");
+if (getType() == hullSimple) {
+   ms << MTag("mtable");
+} else if (getType() >= hullAlign && getType() <= hullXXAlignAt) {
+string alignment;
+for (col_type col = 0; col < ncols(); ++col) {
+alignment += (col % 2) ? "left " : "right ";
+}
+ms << MTag("mtable", "displaystyle='true' columnalign='" + 
alignment + "'");
+   } else {
+   ms << MTag("mtable", "displaystyle='true'");
+}
 }
 
char const * const celltag = havetable ? "mtd" : "mrow";
// FIXME There does not seem to be wide support at the moment
// for mlabeledtr, so we have to use just mtr for now.
-   // char const * const rowtag = havenumbers ? "mlabeledtr" : "mtr";
+   // char const * const rowtag = haveNumbers() ? "mlabeledtr" : "mtr";
char const * const rowtag = "mtr";
for (row_type row = 0; row < nrows(); ++row) {
if (havetable)
@@ -2563,12 +2567,12 @@ void InsetMathHull::mathmlize(MathMLStream & ms) const
   << ETag(celltag);
}
// fleqn?
-   if (havenumbers) {
+   if (haveNumbers()) {
ms << MTag("mtd");
docstring const & num = numbers_[row];
if (!num.empty())
ms << MTagInline("mtext") << '(' << num << ')' 
<< ETagInline("mtext");
- ms << ETag("mtd");
+   ms << ETag("mtd");
}
if (havetable)
ms << ETag(rowtag);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Similar fixes as 946ba7781c179752e450e98a0c356372323100a6

2021-12-05 Thread Thibaut Cuvelier
commit 115ff2fa3c55ff18da3792b8129990c80dbdc1ed
Author: Thibaut Cuvelier 
Date:   Sun Dec 5 18:54:05 2021 +0100

Similar fixes as 946ba7781c179752e450e98a0c356372323100a6
---
 src/mathed/InsetMathBig.cpp|2 +-
 src/mathed/InsetMathBoldSymbol.cpp |2 +-
 src/mathed/InsetMathDelim.cpp  |4 +---
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/mathed/InsetMathBig.cpp b/src/mathed/InsetMathBig.cpp
index 180af9b..0ddb6c8 100644
--- a/src/mathed/InsetMathBig.cpp
+++ b/src/mathed/InsetMathBig.cpp
@@ -137,7 +137,7 @@ void InsetMathBig::normalize(NormalStream & os) const
 
 void InsetMathBig::mathmlize(MathMLStream & ms) const
 {
-   ms << MTagInline("mo", "fence='true' stretchy='true' symmetric='true'>")
+   ms << MTagInline("mo", "fence='true' stretchy='true' symmetric='true'")
   << convertDelimToXMLEscape(delim_, ms.xmlMode())
   << ETagInline("mo");
 }
diff --git a/src/mathed/InsetMathBoldSymbol.cpp 
b/src/mathed/InsetMathBoldSymbol.cpp
index a0651ea..4dd1871 100644
--- a/src/mathed/InsetMathBoldSymbol.cpp
+++ b/src/mathed/InsetMathBoldSymbol.cpp
@@ -109,7 +109,7 @@ void InsetMathBoldSymbol::write(TeXMathStream & os) const
 
 void InsetMathBoldSymbol::mathmlize(MathMLStream & ms) const
 {
-   ms << MTagInline("mstyle", "mathvariant='bold'>")
+   ms << MTagInline("mstyle", "mathvariant='bold'")
   << cell(0)
   << ETagInline("mstyle");
 }
diff --git a/src/mathed/InsetMathDelim.cpp b/src/mathed/InsetMathDelim.cpp
index f5efc43..cd4f8aa 100644
--- a/src/mathed/InsetMathDelim.cpp
+++ b/src/mathed/InsetMathDelim.cpp
@@ -185,10 +185,8 @@ void InsetMathDelim::mathmlize(MathMLStream & ms) const
   << MTagInline("mo", "form='prefix' fence='true' stretchy='true' 
symmetric='true'")
   << convertDelimToXMLEscape(left_, ms.xmlMode())
   << ETagInline("mo")
-  << "\n"
   << cell(0)
-  << "\n"
-  << MTagInline("mo", "form='postfix' fence='true' stretchy='true' 
symmetric='true'>")
+  << MTagInline("mo", "form='postfix' fence='true' stretchy='true' 
symmetric='true'")
   << convertDelimToXMLEscape(right_, ms.xmlMode())
   << ETagInline("mo")
   << ETag("mrow");
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Amend a68e9793: duplicate tag delimiter end.

2021-12-05 Thread Thibaut Cuvelier
commit 946ba7781c179752e450e98a0c356372323100a6
Author: Thibaut Cuvelier 
Date:   Sun Dec 5 18:48:27 2021 +0100

Amend a68e9793: duplicate tag delimiter end.
---
 src/mathed/InsetMathDelim.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mathed/InsetMathDelim.cpp b/src/mathed/InsetMathDelim.cpp
index e2bd5ac..f5efc43 100644
--- a/src/mathed/InsetMathDelim.cpp
+++ b/src/mathed/InsetMathDelim.cpp
@@ -182,7 +182,7 @@ void InsetMathDelim::mathematica(MathematicaStream & os) 
const
 void InsetMathDelim::mathmlize(MathMLStream & ms) const
 {
ms << MTag("mrow")
-  << MTagInline("mo", "form='prefix' fence='true' stretchy='true' 
symmetric='true'>")
+  << MTagInline("mo", "form='prefix' fence='true' stretchy='true' 
symmetric='true'")
   << convertDelimToXMLEscape(left_, ms.xmlMode())
   << ETagInline("mo")
   << "\n"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


Re: [LyX/master] introduce LSMinimumSystemVersion for Mac package with automatic Qt-version based detection plus configure option to choose it manually

2021-12-05 Thread Jean-Marc Lasgouttes

Le 05/12/2021 à 10:43, Stephan Witt a écrit :

commit d1d22a1433e503c3f36aa982c2a7ec9d1f79273d
Author: Stephan Witt 
Date:   Sun Dec 5 11:10:11 2021 +0100

 introduce LSMinimumSystemVersion for Mac package with automatic Qt-version 
based detection plus configure option to choose it manually


I can't compile on Linux anymore...

JMarc

Making all in hunspell
  CXX  1.7.0/src/hunspell/affentry.o
  CXX  1.7.0/src/hunspell/affixmgr.o
  CXX  1.7.0/src/hunspell/csutil.o
  CXX  1.7.0/src/hunspell/filemgr.o
  CXX  1.7.0/src/hunspell/hashmgr.o
  CXX  1.7.0/src/hunspell/hunspell.o
  CXX  1.7.0/src/hunspell/hunzip.o
  CXX  1.7.0/src/hunspell/phonet.o
g++: error: unrecognized command-line option ‘-mmacosx-version-min=10.10’
make[3]: *** [Makefile:570 : 1.7.0/src/hunspell/affentry.o] Erreur 1
make[3]: *** Attente des tâches non terminées

--
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] introduce LSMinimumSystemVersion for Mac package with automatic Qt-version based detection plus configure option to choose it manually

2021-12-05 Thread Stephan Witt
commit d1d22a1433e503c3f36aa982c2a7ec9d1f79273d
Author: Stephan Witt 
Date:   Sun Dec 5 11:10:11 2021 +0100

introduce LSMinimumSystemVersion for Mac package with automatic Qt-version 
based detection plus configure option to choose it manually
---
 config/lyxinclude.m4  |   25 +
 configure.ac  |2 ++
 development/LyX-Mac-binary-release.sh |8 
 development/MacOSX/Info.plist.in  |2 ++
 4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index afad2bd..e4acd7b 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -674,6 +674,31 @@ AC_DEFUN([LYX_USE_INCLUDED_MYTHES],[
 ])
 
 
+dnl Usage: LYX_CHECK_MACOS_DEPLOYMENT_TARGET : select the macos deployment 
target
+dnl   [default-auto-value])
+dnl  Assign the macosx-version-min value for compiler, linker and Info.plist.
+dnl  Default is dynamic - depends on used Qt library version.
+AC_DEFUN([LYX_CHECK_MACOS_DEPLOYMENT_TARGET],[
+  AC_ARG_WITH(macos-deployment-target,
+[AS_HELP_STRING([--with-macos-deployment-target], [force the macos 
deployment target for LyX])],
+[macos_deployment_target=$withval],
+[macos_deployment_target=auto])
+  if test "${macos_deployment_target}" = "auto" ; then
+macos_deployment_target="10.10"
+case "$QTLIB_VERSION" in
+6.*)
+  macos_deployment_target="10.14"
+  ;;
+esac
+  fi
+  AM_CXXFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_CXXFLAGS"
+  AM_LDFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_LDFLAGS"
+  AC_SUBST(macos_deployment_target,"${macos_deployment_target}")
+  AC_MSG_CHECKING([the macos deployment target for LyX])
+  AC_MSG_RESULT([$macos_deployment_target])
+])
+
+
 dnl Usage: LYX_WITH_DIR(dir-name,desc,dir-var-name,default-value,
 dnl   [default-yes-value])
 dnl  Adds a --with-'dir-name' option (described by 'desc') and puts the
diff --git a/configure.ac b/configure.ac
index 785d5c9..02a89a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,6 +193,8 @@ AC_CHECK_FUNCS(chmod close _close fork getpid _getpid lockf 
lstat mkfifo open _o
 AC_FUNC_MKDIR
 AC_FUNC_SELECT_ARGTYPES
 
+LYX_CHECK_MACOS_DEPLOYMENT_TARGET
+
 LYX_CHECK_SPELL_ENGINES
 LYX_USE_INCLUDED_MYTHES
 
diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 30233cc..04da1f3 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -146,7 +146,6 @@ usage() {
echo " --aspell-deployment=yes|no ." default yes
echo " --with-qt-frameworks=yes|no." default no
echo " --qt-deployment=yes|no ." default yes
-   echo " --with-macosx-target=TARGET " default 10.4 "(Tiger)"
echo " --with-sdkroot=SDKROOT ." default 10.5 "(Leopard)"
echo " --with-arch=ARCH ..." default ppc,i386
echo " --with-build-path=PATH ." default 
\${lyx-src-dir}/../lyx-build
@@ -190,8 +189,9 @@ while [ $# -gt 0 ]; do
QTDIR=$(echo ${1}|cut -d= -f2)
shift
;;
-   --with-macosx-target=*)
+   --with-macos-deployment-target=*)
MACOSX_DEPLOYMENT_TARGET=$(echo ${1}|cut -d= -f2)
+   LyXConfigureOptions="${LyXConfigureOptions} ${1}"
shift
;;
--with-sdkroot=*)
@@ -690,8 +690,8 @@ build_lyx() {
if [ -d "${LyxBuildDir}" ];  then rm -r "${LyxBuildDir}"; fi
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
 
-   CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"
+   CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch}"
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch}"
 
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
diff --git a/development/MacOSX/Info.plist.in b/development/MacOSX/Info.plist.in
index 64f12ae..e8d3b09 100644
--- a/development/MacOSX/Info.plist.in
+++ b/development/MacOSX/Info.plist.in
@@ -41,6 +41,8 @@
YES
OSAScriptingDefinition
LyX.sdef
+   LSMinimumSystemVersion
+   @macos_deployment_target@
NSHighResolutionCapable

NSPrincipalClass
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs