Skip to content

Commit 1a41ece

Browse files
committed
Apply updates from gtk-osx
1 parent de385c2 commit 1a41ece

3 files changed

Lines changed: 58 additions & 27 deletions

File tree

etc/jhbuildrc

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ class _cmd_bootstrap_gtk_osx(jhbuild.commands.base.cmd_build):
7575
def run(self, config, options, args, help=None):
7676
global use_local_modulesets
7777
moduleset="bootstrap"
78-
modulesets_dir = os.path.dirname(config.moduleset)
78+
modulesets_dir = os.path.join(os.path.dirname(os.path.dirname(config.moduleset)), 'modulesets-stable')
79+
print(f"Modulests Dir: ${modulesets_dir}")
7980
if (use_local_modulesets and
8081
os.path.exists(os.path.join(modulesets_dir,
8182
moduleset + '.modules'))):
@@ -209,7 +210,7 @@ def setup_debug():
209210
# autogenargs = autogenargs + " --enable-debug=yes"
210211

211212
# Gtk+ crashes in gdk_window_quartz_raise() -- in a call to [NSWindow
212-
# orderFront:] if gcc is passed -O0 for 64-bit compilation. The old
213+
# orderFront:] if clang is passed -O0 for 64-bit compilation. The old
213214
# stabs+ debug format also doesn't work. See Snow Leopard in the Wiki
214215
# for more information about debugging.
215216
environ_prepend('CFLAGS', "-O0 -g")
@@ -251,11 +252,6 @@ def setup_sdk(target=_target, sdk_version=None, architectures=[_default_arch]):
251252
sdkdir = _popen("xcrun --show-sdk-path")
252253

253254
if sdkdir:
254-
environ_prepend("LDFLAGS", "-L" + sdkdir + "/usr/lib")
255-
environ_prepend("CFLAGS", "-I" + sdkdir + "/usr/include")
256-
environ_prepend("CXXFLAGS", "-I" + sdkdir + "/usr/include")
257-
environ_prepend("OBJCFLAGS", "-I" + sdkdir + "/usr/include")
258-
environ_prepend("CPPFLAGS", "-I" + sdkdir + "/usr/include")
259255
environ_prepend("CMAKE_PREFIX_PATH", os.path.join(sdkdir, 'usr'), ':')
260256
environ_prepend("LIBRARY_PATH", sdkdir + "/usr/lib", ':')
261257

@@ -296,12 +292,12 @@ def setup_sdk(target=_target, sdk_version=None, architectures=[_default_arch]):
296292
print("WARNING: Universal builds are neither prohibited nor supported. It might work, but if it doesn't you're on your own.")
297293
# For unknown reasons, iconv is not picked up correctly without this
298294
#
299-
gcc = _popen("xcrun -f gcc")
300-
gpp = _popen("xcrun -f g++")
295+
cc = _popen("xcrun -f clang")
296+
cxx = _popen("xcrun -f clang++")
301297
ld = _popen("xcrun -f ld")
302-
os.environ["CC"] = gcc
303-
os.environ["OBJC"] = gcc
304-
os.environ["CXX"] = gpp
298+
os.environ["CC"] = cc
299+
os.environ["OBJC"] = cc
300+
os.environ["CXX"] = cxx
305301
os.environ['LD'] = ld
306302

307303
# Set the -arch flags for everything we're building.
@@ -348,7 +344,7 @@ def setup_sdk(target=_target, sdk_version=None, architectures=[_default_arch]):
348344
# gettext-fw rebuilds gettext with an in-tree libiconv to get
349345
# around the Apple-provided one not defining _libiconv_init for
350346
# x86_64
351-
append_autogenargs("gettext-fw", "--with-libiconv-prefix=" + prefix)
347+
append_autogenargs("gettext", "--with-libiconv-prefix=" + prefix)
352348

353349
environ_append("CFLAGS", "-mmacosx-version-min=" + target)
354350
environ_append("CXXFLAGS", "-mmacosx-version-min=" + target)
@@ -361,7 +357,6 @@ def setup_sdk(target=_target, sdk_version=None, architectures=[_default_arch]):
361357
append_autogenargs("gnutls", '--disable-guile CXXFLAGS="$CXXFLAGS -std=c++11"')
362358
append_autogenargs("guile", 'CFLAGS="$CFLAGS -O1"')
363359
#Some packages require special arguments or flags to compile with Clang:
364-
module_extra_env["pkg-config"] = {'CFLAGS': os.environ['CFLAGS'] + ' -std=gnu89'}
365360
append_autogenargs('libgcrypt', 'CFLAGS="$CFLAGS -fheinous-gnu-extensions"')
366361
module_makeargs['liboil'] = 'CFLAGS="$CFLAGS -DHAVE_SYMBOL_UNDERSCORE -fheinous-gnu-extensions"'
367362

@@ -603,10 +598,10 @@ if not _ran_recursively and _gtk_osx_prompt_prefix:
603598
os.environ["JHBUILD_PROMPT"] = "[" + _gtk_osx_prompt_prefix + "] "
604599

605600
os.environ["PYTHON"] = os.path.join(prefix, 'bin', 'python3')
606-
module_extra_env['pkg-config'] = {'PYTHON':sys.executable}
607601
module_extra_env["python3"] = {'LIBS':'-lintl'}
608602

609-
module_extra_env["spidermonkey"] = {'AUTOCONF':'autoconf'}
603+
module_extra_env["harfbuzz-no-cairo"] = {"CXXFLAGS":"-std=c++17"}
604+
module_extra_env["harfbuzz"] = {"CXXFLAGS":"-std=c++17"}
610605
# Unset this so we don't mess with the check for not starting
611606
# recursively.
612607
os.unsetenv("JHB")

etc/modulesets/jhb/bootstrap.modules

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<autotools id="xz"
2727
autogen-sh="configure"
2828
bootstrap="true">
29-
<branch module="tukaani-project/xz/releases/download/v5.4.6/xz-5.4.6.tar.bz2"
30-
version="5.4.6"
31-
hash="sha256:913851b274e8e1d31781ec949f1c23e8dbcf0ecf6e73a2436dc21769dd3e6f49"
29+
<branch module="tukaani-project/xz/releases/download/v5.6.2/xz-5.6.2.tar.bz2"
30+
version="5.6.2"
31+
hash="sha256:e12aa03cbd200597bd4ce11d97be2d09a6e6d39a9311ce72c91ac7deacde3171"
3232
repo="github" />
3333
</autotools>
3434
<!--
@@ -44,26 +44,47 @@
4444
repo="ftp.gnu.org" />
4545
</autotools>
4646
<!---->
47+
<autotools id="libiconv"
48+
autogen-sh="configure"
49+
autogenargs="--disable-debug --disable-dependency-tracking --enable-extra-encodings">
50+
51+
<branch module="libiconv/libiconv-1.17.tar.gz"
52+
version="1.17"
53+
hash="sha256:8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313"
54+
repo="ftp.gnu.org" />
55+
</autotools>
56+
<!---->
57+
<autotools id="libunistring"
58+
autogen-sh="configure">
59+
<branch module="libunistring/libunistring-1.2.tar.gz"
60+
version="1.2"
61+
repo="ftp.gnu.org" />
62+
</autotools>
63+
<!---->
4764
<autotools id="gettext"
4865
autogen-sh="configure"
4966
autogenargs="--without-emacs --disable-java --disable-native-java --disable-libasprintf --disable-csharp --with-included-glib --with-included-libcroco">
5067

51-
<branch module="gettext/gettext-0.21.1.tar.xz"
52-
version="0.21.1"
53-
hash="sha256:50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6"
68+
<branch module="gettext/gettext-0.22.5.tar.xz"
69+
version="0.22.5"
70+
hash="sha256:fe10c37353213d78a5b83d48af231e005c4da84db5ce88037d88355938259640"
5471
repo="ftp.gnu.org" />
72+
<dependencies>
73+
<dep package="libiconv" />
74+
<dep package="libunistring" />
75+
</dependencies>
5576
</autotools>
5677
<!--
5778
cmakes ./configure is picky about invalid flags so we manually set it
5879
-->
5980
<autotools id="cmake"
6081
autogen-sh="bootstrap"
6182
autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s %(autogenargs)s"
62-
autogenargs="--docdir=share/doc/cmake-3.26"
83+
autogenargs="--docdir=share/doc/cmake-3.29"
6384
bootstrap="true">
64-
<branch module="v3.26/cmake-3.26.4.tar.gz"
65-
version="3.26.4"
66-
hash="sha256:313b6880c291bd4fe31c0aa51d6e62659282a521e695f30d5cc0d25abbd5c208"
85+
<branch module="v3.29/cmake-3.29.3.tar.gz"
86+
version="3.29.3"
87+
hash="sha256:252aee1448d49caa04954fd5e27d189dd51570557313e7b281636716a238bccb"
6788
repo="cmake" />
6889
</autotools>
6990
<!--
@@ -84,7 +105,7 @@
84105
bootstrap="true">
85106
<branch module="autoconf/autoconf-2.72.tar.xz"
86107
version="2.72"
87-
hash="shas56:ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a"
108+
hash="sha256:ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a"
88109
repo="ftp.gnu.org" />
89110
<dependencies>
90111
<dep package="m4" />
@@ -173,6 +194,7 @@
173194
<metamodule id="meta-bootstrap">
174195
<dependencies>
175196
<dep package="xz" />
197+
<dep package="libiconv" />
176198
<dep package="gettext" />
177199
<dep package="cmake" />
178200
<dep package="autoconf-archive" />

etc/modulesets/jhb/gtk-osx-bootstrap.modules

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
<repository name="github"
2424
href="https://github.com/"
2525
type="tarball" />
26+
<repository name="nasm"
27+
href="https://www.nasm.us/pub/nasm/releasebuilds/"
28+
type="tarball" />
2629
<!---->
2730
<autotools id="libpng"
2831
autogen-sh="configure"
@@ -36,6 +39,14 @@
3639
</dependencies>
3740
</autotools>
3841
<!---->
42+
<autotools id="nasm"
43+
autogen-sh="configure">
44+
<branch module="2.16.03/nasm-2.16.03.tar.xz"
45+
version="2.16.03"
46+
hash="sha256:1412a1c760bbd05db026b6c0d1657affd6631cd0a63cddb6f73cc6d4aa616148"
47+
repo="nasm" />
48+
</autotools>
49+
<!---->
3950
<if condition-unset="noturbojpeg">
4051
<cmake id="libjpeg"
4152
cmakeargs="-DWITH_JPEG8=ON -DCMAKE_INSTALL_LIBDIR=$JHBUILD_PREFIX/lib">
@@ -47,6 +58,9 @@
4758
<patch file="turbojpeg-remove_rpath.patch"
4859
strip="1" />
4960
</branch>
61+
<dependencies>
62+
<dep package="nasm" />
63+
</dependencies>
5064
</cmake>
5165
</if>
5266
<!---->

0 commit comments

Comments
 (0)