Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update to KDE 5.14 #31

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 72 additions & 77 deletions net.ankiweb.Anki.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
app-id: net.ankiweb.Anki

runtime: org.kde.Platform
runtime-version: '5.12'
runtime-version: '5.14'
sdk: org.kde.Sdk

base: io.qt.qtwebengine.BaseApp
base-version: '5.14'

command: anki
rename-desktop-file: anki.desktop
rename-icon: anki
Expand All @@ -23,92 +26,88 @@ finish-args:

modules:
- name: sip
config-opts:
- --no-dist-info
- --no-stubs
- --bindir=/app/bin
- --destdir=/app/lib/python3.7/site-packages
- --incdir=/app/include
- --pyidir=/app/lib/python3.7/site-packages
- --sipdir=/app/share/sip
- --sip-module=PyQt5.sip
buildsystem: simple
build-commands:
- python3 setup.py install --prefix="${FLATPAK_DEST}" --root=/ --optimize=1
sources:
- type: archive
url: https://www.riverbankcomputing.com/static/Downloads/sip/4.19.17/sip-4.19.17.tar.gz
sha256: 12bcd8f4d5feefc105bc075d12c5090ee783f7380728563c91b8b95d0ec45df3
- type: script
commands:
- processed=`sed -e 's|--prefix=/app||' <<< $@`
- python3 configure.py $processed
dest-filename: configure
url: https://pypi.python.org/packages/source/s/sip/sip-5.2.0.tar.gz
sha256: 3d3f279a61d54d832b12496409811ee062dab1ac05a1e7b40824f63b423fb0e7
cleanup:
- /bin
- /include
modules:
- python3-toml.json
- python3-packaging.json

- name: PyQt5_sip
buildsystem: simple
build-commands:
- python3 setup.py install --prefix="${FLATPAK_DEST}" --root=/ --optimize=1
sources:
- type: archive
url: https://pypi.python.org/packages/source/P/PyQt5_sip/PyQt5_sip-12.7.2.tar.gz
sha256: 16a19b9f36985b8bff30b89fb8859d831713dd528fba5600563e36ff077960a2

- python3-pyqt-builder.json

- name: pyqt5
config-opts:
- --assume-shared
- --concatenate
- --confirm-license
- --no-designer-plugin
- --no-dist-info
- --no-docstrings
- --no-qml-plugin
- --no-qsci-api
- --no-stubs
- --no-tools
- QMAKE_CFLAGS_RELEASE='-I/usr/include/python3.7m/'
- QMAKE_CXXFLAGS_RELEASE='-I/usr/include/python3.7m/'
# FIXME: we should do this on ARM too, but for some reason it fails to build
buildsystem: simple
build-options:
arch:
i386:
config-opts:
- --enable=QtCore
- --enable=QtGui
- --enable=QtNetwork
- --enable=QtPrintSupport
- --enable=QtWebChannel
- --enable=QtWidgets
x86_64:
config-opts:
- --enable=QtCore
- --enable=QtGui
- --enable=QtNetwork
- --enable=QtPrintSupport
- --enable=QtWebChannel
- --enable=QtWidgets
env:
- ANKI_BINDINGS=--enable=QtCore --enable=QtGui --enable=QtNetwork --enable=QtPrintSupport --enable=QtWebChannel --enable=QtWidgets
env:
- QMAKEPATH=/app/lib
build-commands:
- sip-install
--verbose
--build-dir ${FLATPAK_BUILDER_BUILDDIR}/build
--target-dir ${FLATPAK_DEST}/lib/python$(python3 -c 'import sys; print(sys.version[:3])')/site-packages
$ANKI_BINDINGS
--confirm-license
--qt-share
--no-designer-plugin
--no-qml-plugin
--no-dbus-python
--no-tools
--qmake-setting QMAKE_CFLAGS_RELEASE="$CFLAGS"
--qmake-setting QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS"
--qmake-setting QMAKE_LFLAGS_RELEASE="$LDFLAGS"
--concatenate 1
--debug
--no-docstrings
sources:
- type: archive
url: https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.12.2/PyQt5_gpl-5.12.2.tar.gz
sha256: c565829e77dc9c281aa1a0cdf2eddaead4e0f844cbaf7a4408441967f03f5f0f
- type: script
commands:
- processed=`sed -e 's|prefix|sysroot|' <<< $@`
- python3 configure.py $processed
dest-filename: configure
url: https://pypi.python.org/packages/source/P/PyQt5/PyQt5-5.14.2.tar.gz
sha256: bd230c6fd699eabf1ceb51e13a8b79b74c00a80272c622427b80141a22269eb0
cleanup:
- /share/sip

- name: pyqt5-webengine
config-opts:
- --concatenate
- --no-dist-info
- --no-docstrings
- --no-qsci-api
- --no-sip-files
- --no-stubs
- QMAKE_CFLAGS_RELEASE='-I/usr/include/python3.7m/'
- QMAKE_CXXFLAGS_RELEASE='-I/usr/include/python3.7m/'
buildsystem: simple
build-options:
env:
- QMAKEPATH=/app/lib
build-commands:
- sip-install
--verbose
--build-dir ${FLATPAK_BUILDER_BUILDDIR}/build
--target-dir ${FLATPAK_DEST}/lib/python$(python3 -c 'import sys; print(sys.version[:3])')/site-packages
--qmake-setting QMAKE_CFLAGS_RELEASE="$CFLAGS"
--qmake-setting QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS"
--qmake-setting QMAKE_LFLAGS_RELEASE="$LDFLAGS"
--qmake-setting QMAKE_INCDIR+=/app/include/QtWebEngine
--qmake-setting QMAKE_INCDIR+=/app/include/QtWebEngineCore
--qmake-setting QMAKE_INCDIR+=/app/include/QtWebEngineWidgets
--concatenate 1
--debug
--no-docstrings
sources:
- type: archive
url: https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/5.12.1/PyQtWebEngine_gpl-5.12.1.tar.gz
sha256: 860704672ea1b616e1347be1f347bc1c749e64ed378370863fe209e84e9bd473
- type: script
commands:
- processed=`sed -e 's|prefix|sysroot|' <<< $@`
- python3 configure.py $processed
dest-filename: configure
url: https://pypi.python.org/packages/source/P/PyQtWebEngine/PyQtWebEngine-5.14.0.tar.gz
sha256: e11595051f8bfbfa49175d899b2c8c2eea3a3deac4141edf4db68c3555221c92

- name: mpv
buildsystem: simple
Expand Down Expand Up @@ -172,20 +171,16 @@ modules:
- install -Dm644 -t /app/share/icons/hicolor/scalable/apps anki.svg
- install -Dm644 -t /app/share/metainfo net.ankiweb.Anki.appdata.xml
- install -Dm644 anki.xml /app/share/mime/packages/net.ankiweb.Anki.xml
# .mo files are in a non-standard directory, work-around that,
# so that Flatpak and Appstream can find the files
- mv /app/share/anki/locale /app/share/locale
- ln -s /app/share/locale /app/share/anki/locale
sources:
- type: archive
url: https://apps.ankiweb.net/downloads/current/anki-2.1.15-source.tgz
sha256: 5a53760164c77d619f55107a13099cffe620566a7f610b61b6c4b52487f3bb89
url: https://github.com/ankitects/anki/archive/2.1.15.tar.gz
sha256: 16fc2986accf545412884a8a938c5600c4740e87403580553573a05133cc86f9
- type: file
path: anki.svg
- type: file
path: net.ankiweb.Anki.appdata.xml
- type: script
- type: shell
commands:
- sed -i -e 's/cp -a/cp -dR/' Makefile
- sed -i '/xdg-mime/d' Makefile
cleanup:
- /share/pixmaps
24 changes: 24 additions & 0 deletions python3-packaging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "python3-packaging",
"buildsystem": "simple",
"build-commands": [
"pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} packaging"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl",
"sha256": "ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl",
"sha256": "8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/62/0a/34641d2bf5c917c96db0ded85ae4da25b6cd922d6b794648d4e7e07c88e5/packaging-20.3-py2.py3-none-any.whl",
"sha256": "82f77b9bee21c1bafbf35a84905d604d5d1223801d639cf3ed140bd651c08752"
}
]
}
64 changes: 64 additions & 0 deletions python3-pyqt-builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "python3-pyqt-builder",
"buildsystem": "simple",
"build-commands": [
"pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} pyqt-builder"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz",
"sha256": "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz",
"sha256": "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/b9/19/5cbd78eac8b1783671c40e34bb0fa83133a06d340a38b55c645076d40094/toml-0.10.0.tar.gz",
"sha256": "229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/65/37/83e3f492eb52d771e2820e88105f605335553fe10422cba9d256faeb1702/packaging-20.3.tar.gz",
"sha256": "3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/bc/dd/aa60ae73bc213466fd158e3d8b91d55ac00a248b14a98919bfe0e12c5d74/sip-5.2.0.tar.gz",
"sha256": "3d3f279a61d54d832b12496409811ee062dab1ac05a1e7b40824f63b423fb0e7"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/08/19/21cc98594bdb11ee6abe91522c79cedb9fa8b0119aa64a364fae0dec073c/PyQt-builder-1.3.2.tar.gz",
"sha256": "d4c93c95d737fb654f0c7e824c668357003c744529a39df6c4456d5627a64b66"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl",
"sha256": "ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl",
"sha256": "8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl",
"sha256": "235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/62/0a/34641d2bf5c917c96db0ded85ae4da25b6cd922d6b794648d4e7e07c88e5/packaging-20.3-py2.py3-none-any.whl",
"sha256": "82f77b9bee21c1bafbf35a84905d604d5d1223801d639cf3ed140bd651c08752"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/3d/a8/89ace1cbf56cfc8dfcabeb02730ce0330173e020e3cd9d844d2c959cc39e/PyQt_builder-1.3.2-py3-none-any.whl",
"sha256": "c52d4ea9339ad4b8bc734a8520561939ec4c067a47fabf0002890f3358e3c634"
}
]
}
14 changes: 14 additions & 0 deletions python3-toml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "python3-toml",
"buildsystem": "simple",
"build-commands": [
"pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} toml"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl",
"sha256": "235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e"
}
]
}