]> git.lyx.org Git - lyx.git/commitdiff
introduce LSMinimumSystemVersion for Mac package with automatic Qt-version based...
authorStephan Witt <switt@lyx.org>
Sun, 5 Dec 2021 10:10:11 +0000 (11:10 +0100)
committerStephan Witt <switt@lyx.org>
Sun, 5 Dec 2021 10:10:37 +0000 (11:10 +0100)
config/lyxinclude.m4
configure.ac
development/LyX-Mac-binary-release.sh
development/MacOSX/Info.plist.in

index afad2bd9197cd3a3c105aa545c2369e1c750634b..e4acd7b9ec089f818d26483c197157b6c76f7b87 100644 (file)
@@ -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
index 785d5c96cd3a878da24918e8c310794053bba03f..02a89a8ba436f867181c8993ca57587b97a24e32 100644 (file)
@@ -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
 
index 30233cc1ab262c332aa60d5ec11a7e2931aff8e8..04da1f3d6e64c3626b2b5668d3143a97ecf451dc 100644 (file)
@@ -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"
index 64f12ae26596332f0290aaca55dcfdd5c2af0788..e8d3b09000fe44b659124e64e8d3b9c709cb9638 100644 (file)
@@ -41,6 +41,8 @@
        <string>YES</string>
        <key>OSAScriptingDefinition</key>
        <string>LyX.sdef</string>
+       <key>LSMinimumSystemVersion</key>
+       <string>@macos_deployment_target@</string>
        <key>NSHighResolutionCapable</key>
        <true/>
        <key>NSPrincipalClass</key>