mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Make the macOS SDK release a configure option
Write the Release to LSMinimumSystemVersion Pick the macos animal-name and add it as extra version Re-add building OpenSSL and libtool with the correct macos SDK version. Now after having called build-mac.sh script, building with "make" in the xca-macbuild dir works as expected.
This commit is contained in:
parent
7a05d5623d
commit
7af3ffee25
@ -9,6 +9,7 @@ export HOST=@HOST@
|
||||
CPPFLAGS+=-Wall -Wextra -DXCA_PREFIX=\"${xca_prefix}\" -DETC=\"@sysconfdir@\" -DDOCDIR=\"@docdir@\"
|
||||
CFLAGS+=-O2 -ggdb -std=c++11 @CXXFLAGS@
|
||||
LIBS=@LIBS@
|
||||
EXTRA_VERSION=@EXTRA_VERSION@
|
||||
|
||||
MOC=@QT_MOC@
|
||||
UIC=@QT_UIC@
|
||||
|
||||
@ -1 +1 @@
|
||||
openssl-1.1.1g
|
||||
openssl-1.1.1k
|
||||
|
||||
20
configure.ac
20
configure.ac
@ -19,6 +19,26 @@ AC_CHECK_TOOL(WINDRES, [windres], [:])
|
||||
VERSIONHASH="$(echo "${PACKAGE_VERSION}" | shasum | cut -b -12)"
|
||||
AC_SUBST([VERSIONHASH])
|
||||
|
||||
AC_ARG_WITH([macos-version],
|
||||
AS_HELP_STRING([--with-macos-version], [Select macOS minimum SDK version]),
|
||||
[ MACOS_VERSION="$withval"
|
||||
CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=$MACOS_VERSION"
|
||||
case "$withval" in
|
||||
10.10) EXTRA_VERSION=-Yosemite ;;
|
||||
10.11) EXTRA_VERSION=-El-Capitan ;;
|
||||
10.12) EXTRA_VERSION=-Sierra ;;
|
||||
10.13) EXTRA_VERSION=-High-Sierra ;;
|
||||
10.14) EXTRA_VERSION=-Mojave ;;
|
||||
10.15) EXTRA_VERSION=-Catalina ;;
|
||||
11.00) EXTRA_VERSION=-Big-Sur ;;
|
||||
*) echo "Unknown macOS Version $withval"
|
||||
exit 1 ;;
|
||||
esac
|
||||
]
|
||||
)
|
||||
AC_SUBST([EXTRA_VERSION])
|
||||
AC_SUBST([MACOS_VERSION])
|
||||
|
||||
if test -d "$INSTALL_DIR"; then
|
||||
AC_MSG_NOTICE([Using INSTALL_DIR $INSTALL_DIR])
|
||||
test -d "${INSTALL_DIR}/include" && CXXFLAGS="${CXXFLAGS} -I${INSTALL_DIR}/include"
|
||||
|
||||
@ -28,6 +28,8 @@
|
||||
</array>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>@MACOS_VERSION@.0</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@ -1,10 +1,51 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
do_openssl()
|
||||
{
|
||||
set -x
|
||||
read openssl < "`dirname $0`/../OpenSSL.version"
|
||||
test -f "$openssl".tar.gz || curl https://www.openssl.org/source/"$openssl".tar.gz > "$openssl".tar.gz
|
||||
tar zxf "$openssl".tar.gz
|
||||
(cd $openssl
|
||||
./Configure darwin64-x86_64-cc shared --prefix=$INSTALL_DIR $CFLAGS
|
||||
#./config shared --prefix=$INSTALL_DIR
|
||||
make && make install_sw
|
||||
)
|
||||
chmod 755 $INSTALL_DIR/lib/*.dylib
|
||||
}
|
||||
|
||||
do_libtool()
|
||||
{(
|
||||
read libtool < "`dirname $0`/../Libtool.version"
|
||||
test -f "$libtool".tar.gz || curl http://ftp.gnu.org/gnu/libtool/"$libtool".tar.gz > "$libtool".tar.gz
|
||||
tar zxf "$libtool".tar.gz
|
||||
cd "$libtool"
|
||||
#export CFLAGS="-arch i386"
|
||||
./configure --prefix ${INSTALL_DIR}
|
||||
make && make install
|
||||
)}
|
||||
|
||||
XCA_DIR="`dirname $0`"
|
||||
XCA_DIR="`cd $XCA_DIR/.. && pwd`"
|
||||
|
||||
# define the installation dir and the path to the new library
|
||||
# it will be installed locally in the home directory
|
||||
export INSTALL_DIR="`pwd`"/install
|
||||
export DYLD_LIBRARY_PATH=$INSTALL_DIR/lib
|
||||
export CPPFLAGS="$CPPFLAGS -I${INSTALL_DIR}/include"
|
||||
export LDFLAGS="-L${INSTALL_DIR}/lib"
|
||||
|
||||
export CFLAGS="-mmacosx-version-min=10.13"
|
||||
export EXTRA_VERSION="-High-Sierra"
|
||||
|
||||
if test -f build-libs; then
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
do_libtool
|
||||
do_openssl
|
||||
fi
|
||||
unset CFLAGS
|
||||
|
||||
XCA_DIR="`dirname $0`"
|
||||
XCA_DIR="`cd $XCA_DIR/.. && pwd`"
|
||||
|
||||
XCA_BUILD="xca-macbuild"
|
||||
#rm -rf "$XCA_BUILD"
|
||||
@ -12,7 +53,7 @@ mkdir -p "$XCA_BUILD"
|
||||
cd "$XCA_BUILD"
|
||||
|
||||
(cd $XCA_DIR && ./bootstrap)
|
||||
$XCA_DIR/configure
|
||||
$XCA_DIR/configure --with-macos-version=10.13 --with-openssl="$INSTALL_DIR"
|
||||
make -j5
|
||||
cp *.dmg ..
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user