Skip to content

Commit

Permalink
Test building
Browse files Browse the repository at this point in the history
  • Loading branch information
yousseb committed Oct 30, 2023
1 parent 82945f2 commit 4427e9b
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 47 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
working-directory: /
shell: 'bash'
run: |
brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool gnu-sed
brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool gnu-sed intltool
pwd
mkdir -p $HOME/Source
tar -xzf /Users/runner/work/meld/meld/Environment/environment.tar.gz
Expand All @@ -88,3 +88,7 @@ jobs:
- name: Install GTK Theme
run: |
cd osx && /bin/bash ./build_gtk_theme.sh
- name: Package
run: |
~/.new_local/bin/jhbuild run osx/build_app.sh
14 changes: 4 additions & 10 deletions osx/build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,16 @@ ln -sf /usr/local/opt/bison/bin/bison ~/gtk/inst/bin
ln -sf /usr/local/bin/itstool ~/gtk/inst/bin
ln -sf /usr/local/bin/xz ~/gtk/inst/bin

#brew install python3 ccache
#brew tap homebrew/cask
#brew cask install inkscape
#brew install sassc
#brew install optipng
#brew install imagemagick
#brew install librsvg

pushd . > /dev/null
#jhbuild bootstrap

export PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:$HOME/gtk/inst/share/pkgconfig
#export PKG_CONFIG_SYSROOT_DIR=$HOME/gtk/inst
export PKG_CONFIG_LIBDIR==$HOME/gtk/inst/lib/pkgconfig
export XDG_DATA_DIRS=$HOME/gtk/inst/share

jhbuild buildone libffi zlib

#jhbuild bootstrap || true

jhbuild buildone python3
#PYTHON=$HOME/gtk/inst/bin/python3 PYTHON_CFLAGS=-I$HOME/gtk/inst/include/python3.11
jhbuild buildone libxml2
Expand Down
98 changes: 62 additions & 36 deletions osx/jhbuildrc-custom
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,53 @@ print("Using Meld for OSX customization")
import os.path
from os import path

# Reference: https://gnome.pages.gitlab.gnome.org/jhbuild/config-reference.html


#prefix = "/tmp/meldroot"
checkoutroot = os.path.expanduser("~/Source/gtk")
#setup_sdk(target='native', sdk_version=None, architectures=["x86_64"])
setup_sdk()
setup_release()
os.environ['CONFIG_SHELL'] = '/bin/bash'
_gtk_osx_use_jhbuild_python = False

if path.exists("/usr/local/bin/ccache"):
print("Using ccache")
os.environ["CC"] = "/usr/local/bin/ccache /usr/bin/clang"
os.environ["CXX"] = "/usr/local/bin/ccache /usr/bin/clang++"
print("Using ccache")
os.environ["CC"] = "/usr/local/bin/ccache /usr/bin/clang"
os.environ["CXX"] = "/usr/local/bin/ccache /usr/bin/clang++"
else:
print("Not using ccache")
os.environ["CC"] = "/usr/bin/clang"
os.environ["CXX"] = "/usr/bin/clang++"
print("Not using ccache")
os.environ["CC"] = "/usr/bin/clang"
os.environ["CXX"] = "/usr/bin/clang++"

environ_prepend('CXXFLAGS', "-std=c++11 -stdlib=libc++")
environ_prepend('CXXFLAGS', '-std=c++11 -stdlib=libc++')

# From bootstrap (we only want gettext, xz)
skip.append('m4')
skip.append('m4-common')
skip.append('libxml2')
skip.append("cmake")
skip.append("autoconf-archive")
skip.append("libtool")
skip.append("autoconf")
skip.append("automake")
skip.append("pkg-config")
skip.append("bison")
skip.append("flex")
skip.append("gtk-osx-docbook")
skip.append("gnumake")
skip.append("intltool")

# From modulesets
skip.append("libiconv")
skip.append("icu")
skip.append("cups")
skip.append("gnome-themes-standard")
skip.append("berkeleydb")
skip.append("berkeleydb-nonsrctree")
skip.append("gnome-user-docs")
skip.append("cmake")
skip.append("openssl") # We'll install it manually
skip.append("openssl")
skip.append("python")
skip.append("python3") # We'll install it manually
skip.append("itstool")
Expand All @@ -43,8 +65,8 @@ skip.append('mozilla')
skip.append('pulseaudio')
skip.append('gtk-mac-integration')
skip.append('gtk-mac-integration-python')
#skip.append('adwaita-icon-theme')
skip.append('gtk-4') # gtksourceview4 attempts to grab gtk-4
skip.append('adwaita-icon-theme')
skip.append('gtk-4') # only for gtksourceview4

#sourceview4
# graphene
Expand Down Expand Up @@ -78,35 +100,36 @@ modules = [
"adwaita-icon-theme"
]

global autogenargs
autogenargs = autogenargs + ' --disable-documentation --disable-docs --enable-introspection --enable-gtk-doc=no --enable-gtk-doc-html=no --enable-gtk-doc-pdf=no'
# autogenargs += ' --cache-file=' + checkoutroot + '/autoconf-cache '
# global autogenargs
# autogenargs = autogenargs + ' --disable-documentation --disable-docs --enable-introspection --enable-gtk-doc=no --enable-gtk-doc-html=no --enable-gtk-doc-pdf=no'

# Temporarily until modulesets are fixed...
branches["openssl"] = "https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1c.tar.gz"

module_autogenargs['gettext-tools'] = 'CFLAGS=-O'
module_autogenargs['gettext'] = '--disable-rpath --disable-option-checking --disable-nls --enable-relocatable --disable-java --disable-native-java --disable-curses --without-emacs --without-bzip2 CFLAGS=-O2'
module_autogenargs['yelp'] = '--disable-Werror'
module_autogenargs['zlib']= ''# + autogenargs
module_autogenargs['librsvg'] = '--disable-Bsymbolic --enable-pixbuf-loader --enable-shared=yes --enable-static=yes ' + autogenargs
module_autogenargs['cairo'] = '--disable-full-testing --disable-trace --enable-ft --enable-fc --enable-quartz-image --enable-quartz-font --enable-quartz --enable-png --enable-svg --enable-tee --enable-xml --enable-gobject --enable-pthread --disable-valgrind --disable-gtk-doc --disable-gtk-doc-html --disable-dependency-tracking ' + autogenargs
module_autogenargs['gobject-introspection']= '--with-cairo=yes ' + autogenargs
module_autogenargs['tango-icon-theme']='--disable-nls --disable-icon-framing ' + autogenargs
#module_autogenargs['gtk+-3.0'] = '--enable-quartz-backend --enable-quartz-relocation --disable-Bsymbolic --disable-cloudprint --with-included-immodules=am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr --disable-modules --disable-rpath --disable-cups --disable-papi --disable-cloudprint --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --enable-debug=no ' + autogenargs #--disable-schemas-compile ?
module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs
module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs
module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts ' + autogenargs
module_autogenargs['python3'] = '--enable-optimizations --with-system-expat --disable-ipv6 --with-ensurepip=yes --with-system-expat '
module_autogenargs['libxml2'] = '--with-zlib --enable-ipv6=no '

module_mesonargs['atk'] = '--buildtype release --optimization 3 -Ddocs=false -Dintrospection=true'
module_mesonargs['gdk-pixbuf'] = '--buildtype release --optimization 3 -Dbuiltin_loaders=all -Drelocatable=true -Ddocs=false'
module_mesonargs['glib'] = '--buildtype release --optimization 3 -Dbsymbolic_functions=false -Dgtk_doc=false -Db_bitcode=true -Db_ndebug=true'
module_mesonargs['pango'] = '--buildtype release --optimization 3 -Dintrospection=enabled'
module_mesonargs['pygobject3'] = '--buildtype release --optimization 3 -Dtests=false -Dpycairo=enabled'
module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11_backend=false -Dwayland_backend=false -Dbroadway_backend=false -Dwin32_backend=false -Dquartz_backend=true -Dxinerama=no -Dcloudproviders=false -Dprofiler=false -Dtracker3=false -Dcolord=no -Dgtk_doc=false -Dman=false -Dintrospection=true -Ddemos=false -Dexamples=false -Dtests=false -Dinstalled_tests=false -Dbuiltin_immodules=yes'
module_mesonargs['gtksourceview4'] = '--buildtype release --optimization 3 -Dvapi=false'
module_extra_env['gettext-tools'] = 'CC=/usr/bin/clang CFLAGS=-O LDFLAGS=-L/usr/lib'
module_autogenargs['gettext'] = ' --disable-rpath --enable-relocatable --disable-c++ --disable-java --disable-native-java --disable-curses --without-emacs --without-bzip2 --disable-nls '

#module_autogenargs['zlib'] = ''
module_autogenargs['yelp'] = '--disable-Werror'
module_autogenargs['librsvg'] = '--disable-Bsymbolic --enable-pixbuf-loader --enable-shared=yes --enable-static=yes '# + autogenargs
module_autogenargs['gobject-introspection'] = '--with-cairo=yes '# + autogenargs
module_autogenargs['tango-icon-theme'] ='--disable-nls --disable-icon-framing '# + autogenargs
module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu '# + autogenargs
module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu '# + autogenargs
module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts '# + autogenargs
module_autogenargs['python3'] = '--enable-optimizations --disable-ipv6 --with-ensurepip=yes --with-system-expat --without-readline --with-pkg-config --disable-test-modules '
module_extra_env['python3'] = 'LIBS=""'

module_autogenargs['libxml2'] = '--with-zlib --enable-ipv6=no '
module_autogenargs['cairo'] = '--disable-full-testing --disable-trace --enable-ft --enable-fc --enable-quartz-image --enable-quartz-font --enable-quartz --enable-png --enable-svg --enable-tee --enable-xml --enable-gobject --enable-pthread --disable-valgrind --disable-gtk-doc --disable-gtk-doc-html --disable-dependency-tracking '# + autogenargs

module_mesonargs['atk'] = '--buildtype release --optimization 3 -Ddocs=false -Dintrospection=true'
module_mesonargs['gdk-pixbuf'] = '--buildtype release --optimization 3 -Dbuiltin_loaders=all -Drelocatable=true -Ddocs=false'
module_mesonargs['glib'] = '--buildtype release --optimization 3 -Dbsymbolic_functions=false -Dgtk_doc=false -Db_bitcode=true -Db_ndebug=true'
module_mesonargs['pango'] = '--buildtype release --optimization 3 -Dintrospection=enabled'
module_mesonargs['pygobject3'] = '--buildtype release --optimization 3 -Dtests=false -Dpycairo=enabled'
module_mesonargs['gtksourceview4'] = '--buildtype release --optimization 3 -Dvapi=false'
module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11_backend=false -Dwayland_backend=false -Dbroadway_backend=false -Dwin32_backend=false -Dquartz_backend=true -Dxinerama=no -Dcloudproviders=false -Dprofiler=false -Dtracker3=false -Dcolord=no -Dgtk_doc=false -Dman=false -Dintrospection=true -Ddemos=false -Dexamples=false -Dtests=false -Dinstalled_tests=false -Dbuiltin_immodules=yes'


# Can be usefull when tweaking modulesets to avoid jhbuild overwriting:
Expand All @@ -115,3 +138,6 @@ module_mesonargs['gtksourceview4'] = '--buildtype release --optimization 3 -Dva
# quiet_mode=True
# Don't respect suggests
ignore_suggests = True
exit_on_error = True # For CI
interact = False # For CI
shallow_clone = True

0 comments on commit 4427e9b

Please sign in to comment.