Skip to content

Commit

Permalink
Merge pull request #24 from auouymous/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
auouymous authored Oct 4, 2023
2 parents faa8b4c + d961662 commit 0aedaf1
Show file tree
Hide file tree
Showing 58 changed files with 3,580 additions and 2,078 deletions.
23 changes: 0 additions & 23 deletions .circleci/config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch tags
- run: ./bootstrap.sh
Expand Down
10 changes: 6 additions & 4 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

source env.sh
source pins.sh

# to allow bootstrapping again, try to delete everything first
rm -Rf "_gtk-osx"
Expand All @@ -13,12 +14,13 @@ rm -f "$HOME/.config/jhbuildrc-custom"

mkdir -p "$HOME/.config"
cp misc/jhbuildrc-custom "$HOME/.config/jhbuildrc-custom"

git clone https://gitlab.gnome.org/GNOME/gtk-osx.git _gtk-osx
# try latest commit (2023-01-03)
(cd _gtk-osx && git checkout 78bd3324)
# fix boostrap failure: error message on pip download
sed -i '' s,https://bootstrap.pypa.io/2.7/get-pip.py,https://bootstrap.pypa.io/pip/2.7/get-pip.py, _gtk-osx/gtk-osx-setup.sh
(cd _gtk-osx && git checkout $PIN_GTK_OSX_COMMIT)
# don't silence curl errors when bootstrapping
sed -i '' 's:curl -ks :curl -ksS :' _gtk-osx/gtk-osx-setup.sh
./_gtk-osx/gtk-osx-setup.sh

git clone https://gitlab.gnome.org/GNOME/gtk-mac-bundler.git _bundler
(cd _bundler && git checkout $PIN_GTK_MAC_BUNDLER_COMMIT)
(cd _bundler && make install bindir=$HOME/.new_local/bin)
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ source env.sh
jhbuild bootstrap-gtk-osx
jhbuild build meta-gtk-osx-bootstrap
jhbuild build meta-gpodder-native

jhbuild run ./install-pip.sh
10 changes: 5 additions & 5 deletions bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ for cmd in ${CMDS}; do
done

# kill some useless files
rm -Rf "$APP_PREFIX"/lib/python3.9/test
rm -Rvf "$APP_PREFIX"/lib/python3.9/*/test
rm -f "$APP_PREFIX"/lib/python3.9/config/libpython3.9.a
find "$APP_PREFIX"/lib/python3.9 -name '*.pyc' -delete
find "$APP_PREFIX"/lib/python3.9 -name '*.pyo' -delete
rm -Rf "$APP_PREFIX"/lib/python3.11/test
rm -Rvf "$APP_PREFIX"/lib/python3.11/*/test
rm -f "$APP_PREFIX"/lib/python3.11/config/libpython3.11.a
find "$APP_PREFIX"/lib/python3.11 -name '*.pyc' -delete
find "$APP_PREFIX"/lib/python3.11 -name '*.pyo' -delete

echo checking for dynamic linking consistency : nothing should reference gtk/inst
find "$APP_PREFIX" -name '*.so' -and -print -and -exec sh -c 'otool -L $1 | grep /gtk/inst' '{}' '{}' ';'
Expand Down
2 changes: 0 additions & 2 deletions env.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/sh

DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
cd "$DIR"

Expand Down
7 changes: 7 additions & 0 deletions fetch_modules.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/sh

source pins.sh

git clone https://gitlab.gnome.org/GNOME/gtk-osx.git _gtk-osx-modules
(cd _gtk-osx-modules && git checkout $PIN_GTK_OSX_COMMIT)

rsync -vrb --delete --exclude gpodder.modules --exclude patches/gpodder* _gtk-osx-modules/modulesets-stable/ modulesets/
rsync -vrb --delete _gtk-osx-modules/patches modulesets/
(cd _gtk-osx-modules/ && git log -1) > modulesets/upstream-ref
rm -Rf _gtk-osx-modules

# Disable check for brotli when building freetype
(cd modulesets && patch -p1 < ../github-brotli.patch)
24 changes: 24 additions & 0 deletions github-brotli.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- modulesets/gtk-osx.modules
+++ modulesets/gtk-osx.modules
@@ -127,8 +127,9 @@
then build harfbuzz without cairo because cairo requires
harfbuzz.
-->
+ <!-- gpodder github action needs to disable BrotliDec -->
<cmake id="freetype-no-harfbuzz"
- cmakeargs="-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release">
+ cmakeargs="-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release -DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE">

<branch module="freetype/freetype-2.11.1.tar.gz"
version="2.11.1"
@@ -153,8 +154,9 @@
</dependencies>
</meson>
<!---->
+ <!-- gpodder github action needs to disable BrotliDec -->
<cmake id="freetype"
- cmakeargs="-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release">
+ cmakeargs="-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release -DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE">

<branch module="freetype/freetype-2.11.1.tar.gz"
version="2.11.1"
4 changes: 4 additions & 0 deletions install-pip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

unset PYTHONUSERBASE
python3 -E -m ensurepip --default-pip
8 changes: 4 additions & 4 deletions misc/bundle/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ set_python_path(void)
CFStringRef str = make_filesystem_string(bundle_url);
CFRelease(bundle_url);
mstr = CFStringCreateMutableCopy(NULL, 5 * PATH_MAX, str);
CFStringAppendCString(mstr, "/lib/python3.9:",
CFStringAppendCString(mstr, "/lib/python3.11:",
kCFStringEncodingUTF8);
CFStringAppend(mstr, str);
CFStringAppendCString(mstr, "/lib/python3.9/plat-darwin:",
CFStringAppendCString(mstr, "/lib/python3.11/plat-darwin:",
kCFStringEncodingUTF8);
CFStringAppend(mstr, str);
CFStringAppendCString(mstr, "/lib/python3.9/lib-dynload:",
CFStringAppendCString(mstr, "/lib/python3.11/lib-dynload:",
kCFStringEncodingUTF8);
CFStringAppend(mstr, str);
CFStringAppendCString(mstr, "/lib/python3.9/site-packages",
CFStringAppendCString(mstr, "/lib/python3.11/site-packages",
kCFStringEncodingUTF8);
CFRelease(str);
path = widen_cfstring(mstr);
Expand Down
2 changes: 1 addition & 1 deletion misc/bundle/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# for forked python
os.environ['PYTHONHOME'] = bundle_res
#Set $PYTHON to point inside the bundle
PYVER = 'python3.9'
PYVER = 'python3.11'
sys.path.append(bundle_res)
print('System Path:\n','\n'.join(sys.path))

Expand Down
87 changes: 46 additions & 41 deletions misc/bundle/pythonbase.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -99,59 +99,66 @@

<!-- standard install minus unused -->
<data>
${prefix}/lib/python3.9/*.py
${prefix}/lib/python3.11/*.py
</data>
<data>${prefix}/lib/python3.9/asyncio</data>
<data>${prefix}/lib/python3.9/collections</data>
<data>${prefix}/lib/python3.9/concurrent</data>
<data>${prefix}/lib/python3.9/config-3.9-darwin</data>
<data>${prefix}/lib/python3.9/ctypes</data>
<data>${prefix}/lib/python3.9/curses</data>
<!--<data>${prefix}/lib/python3.9/dbm</data>-->
<data>${prefix}/lib/python3.9/email</data>
<data>${prefix}/lib/python3.9/encodings</data>
<data>${prefix}/lib/python3.9/html</data>
<data>${prefix}/lib/python3.9/http</data>
<!--<data>${prefix}/lib/python3.9/idlelib</data>-->
<data>${prefix}/lib/python3.9/importlib</data>
<data>${prefix}/lib/python3.9/json</data>
<binary>${prefix}/lib/python3.9/lib-dynload</binary>
<!--<data>${prefix}/lib/python3.9/lib2to3</data>-->
<data>${prefix}/lib/python3.9/logging</data>
<data>${prefix}/lib/python3.9/multiprocessing</data>
<!--<data>${prefix}/lib/python3.9/pydoc_data</data>-->
<data>${prefix}/lib/python3.9/sqlite3</data>
<!--<data>${prefix}/lib/python3.9/test</data>-->
<!--<data>${prefix}/lib/python3.9/tkinter</data>-->
<!--<data>${prefix}/lib/python3.9/turtledemo</data>-->
<data>${prefix}/lib/python3.9/unittest</data>
<data>${prefix}/lib/python3.9/urllib</data>
<!--<data>${prefix}/lib/python3.9/venv</data>-->
<data>${prefix}/lib/python3.9/wsgiref</data>
<data>${prefix}/lib/python3.9/xml</data>
<data>${prefix}/lib/python3.11/asyncio</data>
<data>${prefix}/lib/python3.11/collections</data>
<data>${prefix}/lib/python3.11/concurrent</data>
<data>${prefix}/lib/python3.11/config-3.11-darwin</data>
<data>${prefix}/lib/python3.11/ctypes</data>
<data>${prefix}/lib/python3.11/curses</data>
<!--<data>${prefix}/lib/python3.11/dbm</data>-->
<!--<data>${prefix}/lib/python3.11/distutils</data>-->
<data>${prefix}/lib/python3.11/email</data>
<data>${prefix}/lib/python3.11/encodings</data>
<!--<data>${prefix}/lib/python3.11/ensurepip</data>-->
<data>${prefix}/lib/python3.11/html</data>
<data>${prefix}/lib/python3.11/http</data>
<!--<data>${prefix}/lib/python3.11/idlelib</data>-->
<data>${prefix}/lib/python3.11/importlib</data>
<data>${prefix}/lib/python3.11/json</data>
<binary>${prefix}/lib/python3.11/lib-dynload</binary>
<!--<data>${prefix}/lib/python3.11/lib2to3</data>-->
<data>${prefix}/lib/python3.11/logging</data>
<data>${prefix}/lib/python3.11/multiprocessing</data>
<!--<data>${prefix}/lib/python3.11/pydoc_data</data>-->
<data>${prefix}/lib/python3.11/re</data>
<data>${prefix}/lib/python3.11/sqlite3</data>
<!--<data>${prefix}/lib/python3.11/test</data>-->
<!--<data>${prefix}/lib/python3.11/tkinter</data>-->
<data>${prefix}/lib/python3.11/tomllib</data>
<!--<data>${prefix}/lib/python3.11/turtledemo</data>-->
<data>${prefix}/lib/python3.11/unittest</data>
<data>${prefix}/lib/python3.11/urllib</data>
<!--<data>${prefix}/lib/python3.11/venv</data>-->
<data>${prefix}/lib/python3.11/wsgiref</data>
<data>${prefix}/lib/python3.11/xml</data>
<data>${prefix}/lib/python3.11/xmlrpc</data>
<data>${prefix}/lib/python3.11/zoneinfo</data>
<data>${prefix}/lib/python3.11/__phello__</data>

<!-- only required extra modules (no dbus, for instance) -->
<data recurse="True">
${prefix}/lib/python3.9/site-packages/gi/*.py
${prefix}/lib/python3.11/site-packages/gi/*.py
</data>
<data>${prefix}/lib/python3.9/site-packages/cairo/*.py</data>
<data>${prefix}/lib/python3.11/site-packages/cairo/*.py</data>

<binary>
${prefix}/lib/python3.9/lib-dynload/*.so
${prefix}/lib/python3.11/lib-dynload/*.so
</binary>

<!-- every bundled .so must have its dynamic links rewritten to point to the bundle.
Can't specify site-packages/*/*.so, so list them based on the output of postproc.sh.
-->
<binary>
${prefix}/lib/python3.9/site-packages/cairo/*.so
${prefix}/lib/python3.11/site-packages/cairo/*.so
</binary>
<binary>
${prefix}/lib/python3.9/site-packages/gi/*.so
${prefix}/lib/python3.11/site-packages/gi/*.so
</binary>

<data>
${prefix}/include/python3.9
${prefix}/include/python3.11
</data>


Expand All @@ -177,9 +184,6 @@
needed for the "hicolor" base theme.
-->
<!-- must say all to get file-dependent icons (e.g. music note if it's an audio file) -->
<icon-theme icons="all">
Tango
</icon-theme>
<icon-theme icons="all">
Adwaita
</icon-theme>
Expand Down Expand Up @@ -218,8 +222,9 @@

<!-- pip support -->
<data>${prefix}/bin/pip3*</data>
<data>${prefix}/lib/python3.9/distutils</data>
<data>${prefix}/lib/python3.9/site-packages/pip</data>
<data>${prefix}/lib/python3.9/xmlrpc</data>
<data>${prefix}/lib/python3.11/distutils</data>
<data>${prefix}/lib/python3.11/ensurepip</data>
<data>${prefix}/lib/python3.11/site-packages/pip</data>
<data>${prefix}/lib/python3.11/xmlrpc</data>

</app-bundle>
Loading

0 comments on commit 0aedaf1

Please sign in to comment.