Debian Codegraph @

project/bundles/macports/config.sh

raw
1 #!/bin/bash
2
3 # SPDX-FileCopyrightText: 2013-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
4 #
5 # SPDX-License-Identifier: BSD-3-Clause
6 #
7
8 ########################################################################
9
10 # Absolute path where are downloaded all tarballs to compile.
11 DOWNLOAD_DIR="`pwd`/temp.dwnld"
12
13 # Absolute path where are compiled all tarballs
14 BUILDING_DIR="`pwd`/temp.build"
15
16 ########################################################################
17
18 # Build universal bundle (arm64 + Intel architecture). Work only with Silicon computer.
19 MP_UNIVERSAL=0
20
21 # Target macOS architecture: "x86_64" for Intel 64 bits, or "arm64" for Apple Silicon 64 bits.
22 # Used with the macport configuration.
23 HOST_ARCH="`uname -m`"
24
25 # Target bundle architecture. Used to configure CMake target and create prefix for the log files
26 # and the Macports install directory.
27 # Equal: "x86_64" for Intel 64 bits, "arm64" for Apple Silicon 64 bits, or "universal for both architectures.
28 TARGET_ARCH=$HOST_ARCH
29
30 if [[ $HOST_ARCH = "x86_64" ]] ; then
31
32 # Minimum MacOS target for backward binary compatibility with Intel CPU
33 # This require to install older MacOS SDKs with Xcode.
34 # See this url to download a older SDK archive :
35 #
36 # https://github.com/alexey-lysiuk/macos-sdk
37 #
38 # Uncompress the archive to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
39 # and adjust the property "MinimumSDKVersion" from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
40 # sudo /usr/libexec/PlistBuddy -c "Set MinimumSDKVersion 10.13" /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
41 #
42 # Possible values:
43 # 12.0 : Monterey : tested : Qt 5.13, 5.14, 5.15
44 # 11.0 : BigSur : tested : Qt 5.12, 5.13, 5.14, 5.15
45 # 10.15 : Catalina : tested : Qt 5.11, 5.12, 5.13, 5.14, 5.15
46 # 10.14 : Mojave : tested : Qt 5.9, 5.10, 5.11, 5.12, 5.13, 5.14, 5.15
47 # 10.13 : High Sierra : tested : Qt 5.9, 5.10, 5.11, 5.12, 5.13, 5.14, 5.15
48 # 10.12 : Sierra : tested : Qt 5.8, 5.9, 5.10, 5.11, 5.12, 5.13
49 # 10.11 : El Capitan : tested : Qt 5.5, 5.6, 5.7, 5.8, 5.9, 5.10, 5.11
50 # 10.10 : Yosemite : tested : Qt 5.5, 5.6, 5.7, 5.8, 5.9
51 # 10.9 : Mavericks : tested : Qt 5.5, 5.6, 5.7, 5.8
52 # 10.8 : MountainLion : tested : Qt 5.5, 5.6, 5.7
53 # 10.7 : Lion : untested : Qt 5.5, 5.6
54 # 10.6 : SnowLeopard : untested : ???
55 #
56 # Older values cannot be set as it do not support x86_64.
57 OSX_MIN_TARGET="10.15"
58
59 elif [[ $HOST_ARCH = "arm64" ]] ; then
60
61 # Apple Silicon is supported since macOS BigSur
62 OSX_MIN_TARGET="11.3"
63
64 if [[ $MP_UNIVERSAL = 1 ]] ; then
65
66 TARGET_ARCH=universal
67
68 fi
69
70 else
71
72 echo "Unsupported or invalid target architecture ($HOST_ARCH)..."
73 exit -1
74
75 fi
76
77 echo "Host Architecture : $HOST_ARCH"
78 echo "Target Architecture: $TARGET_ARCH"
79
80 # Directory to build and install Macports packages.
81 INSTALL_PREFIX="/opt/digikam.org.$TARGET_ARCH"
82 # Local install prefix which do not require sudo right
83 #INSTALL_PREFIX="`pwd`/digikam.org.$TARGET_DIR_SUF"
84
85 # Directory where target bundle contents will be installed.
86 RELOCATE_PREFIX="/Applications/digiKam.org"
87
88 # Macports configuration
89 MP_URL="https://distfiles.macports.org/MacPorts/"
90 MP_BUILDTEMP=~/mptemp
91
92 # Uncomment this line to force a specific version of Macports to use, else latest will be used.
93 #MP_VERSION="2.3.3"
94
95 ########################################################################
96
97 # URL to git repository to checkout digiKam source code
98 # git protocol version which require a developer account with ssh keys.
99 DK_GITURL="[email protected]:graphics/digikam.git"
100 # https protocol version which give annonyous access.
101 #DK_GITURL="https://invent.kde.org/graphics/digikam.git"
102
103 # digiKam tarball information
104 DK_URL="http://download.kde.org/stable/digikam"
105
106 # Location to build source code.
107 DK_BUILDTEMP=~/dktemp
108
109 # Qt version to use in bundle and provided by Macports.
110 if [[ $HOST_ARCH = "x86_64" ]] ; then
111
112 DK_QTVERSION="5"
113
114 else
115
116 DK_QTVERSION="6"
117
118 fi
119
120 # Mariadb version to install for Qt SQL plugin.
121 DK_MARIADB_VERSION="10.11"
122
123 MP_MARIADB_VARIANT="+mariadb$DK_MARIADB_VERSION"
124 MP_MARIADB_VARIANT=${MP_MARIADB_VARIANT//./_}
125 MARIADB_SUFFIX="-$DK_MARIADB_VERSION"
126
127 # digiKam tag version from git. Official tarball do not include extra shared libraries.
128 # The list of tags can be listed with this url: https://invent.kde.org/graphics/digikam/-/tags
129 # If you want to package current implementation from git, use "master" as tag.
130 #DK_VERSION=v8.4.0
131 DK_VERSION=master
132 #DK_VERSION=development/dplugins
133
134 # Installer sub version to differentiates newer updates of the installer itself, even if the underlying application hasn’t changed.
135 #DK_SUBVER="-01"
136
137 # needed to separate Macports from Homebrew
138 DK_APPLE_PACKAGE_MANAGER="macports"
139
140 # Installer will include or not digiKam debug symbols
141 DK_DEBUG=0
142
143 # Sign bundles with GPG. Passphrase must be hosted in ~/.gnupg/dkorg-gpg-pwd.txt
144 DK_SIGN=0
145
146 # Upload automatically bundle to files.kde.org (pre-release only).
147 DK_UPLOAD=1
148 DK_UPLOADURL="[email protected]"
149
150 # KDE frameworks version + Upload URL.
151 # See official release here: https://download.kde.org/stable/frameworks/
152
153 if [[ $DK_QTVERSION == 5 ]] ; then
154
155 # KDE KF5 frameworks version.
156 # See official release here: https://download.kde.org/stable/frameworks/
157 DK_KDE_VERSION="5.116"
158
159 # KDE Plasma version.
160 # See official release here: https://download.kde.org/stable/plasma/
161 DK_KP_VERSION="5.27.11"
162
163 # KDE Application version.
164 # See official release here: https://download.kde.org/stable/release-service/
165 DK_KA_VERSION="24.05.1"
166
167 DK_UPLOADDIR="/srv/archives/files/digikam/legacy"
168
169 else
170
171 # KDE KF6 frameworks version.
172 # See official release here: https://download.kde.org/stable/frameworks/
173 DK_KDE_VERSION="v6.26.0"
174
175 # KDE Plasma version.
176 # See official release here: https://download.kde.org/stable/plasma/
177 DK_KP_VERSION="v6.6.4"
178
179 # KDE Application version.
180 # See official release here: https://download.kde.org/stable/release-service/
181 DK_KA_VERSION="v26.04.1"
182
183 DK_UPLOADDIR="/srv/archives/files/digikam/"
184
185 fi