summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2024-05-03 09:25:14 -0600
committerMark Wagie2024-05-03 09:25:14 -0600
commitd3bf6764c9b03f17c48f005d384ee4d59679b38a (patch)
tree12991c12dfd5fef3700bd1c336c6c27199f67b64
parent69b70f0fbc571bdad4a6214ecb4c2f08f7d64270 (diff)
downloadaur-d3bf6764c9b03f17c48f005d384ee4d59679b38a.tar.gz
Fixes & improvements ...
- Add patch to build with reveal.js - Restore hardcoded Fira fonts
-rw-r--r--.SRCINFO14
-rw-r--r--0001-Use-system-font.patch34
-rw-r--r--2-rm-reveal-check.patch13
-rw-r--r--PKGBUILD36
-rw-r--r--embed-reveal.patch11
5 files changed, 33 insertions, 75 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f0bd2a343e83..5ebe21da8a0b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = apostrophe
pkgdesc = A distraction free Markdown editor for GNU/Linux made with GTK+
pkgver = 3.0
- pkgrel = 1
+ pkgrel = 2
url = https://world.pages.gitlab.gnome.org/apostrophe
arch = any
license = GPL-3.0-or-later
@@ -18,16 +18,16 @@ pkgbase = apostrophe
depends = python-pypandoc
depends = python-regex
depends = python-setuptools
+ depends = ttf-fira-mono
+ depends = ttf-fira-sans
depends = webkitgtk-6.0
optdepends = mathjax: for formula preview
optdepends = texlive-bin: for the pdftex module
- optdepends = ttf-fira-mono: recommended Mono font
- optdepends = ttf-fira-sans: recommended Sans font
source = https://gitlab.gnome.org/World/apostrophe/-/archive/v3.0/apostrophe-v3.0.tar.gz
- source = 0001-Use-system-font.patch
- source = 2-rm-reveal-check.patch
+ source = https://github.com/hakimel/reveal.js/archive/5.1.0/reveal.js-5.1.0.tar.gz
+ source = embed-reveal.patch
sha256sums = 5f06a923ab2bffa16ba623f05b7ac67ea75b49891cee99048c157a15dae29f19
- sha256sums = e909c05f259a874afd5e414fd13b0f162972e59c61c23e6d619e502254fcd4fe
- sha256sums = a3e2eea5fca084f53fd6d0f9e61ace8e14b4c83d9c2f1d5ea74c8589c8c10b8f
+ sha256sums = ddc83539ec50583eac9a972e88f892971b37c44e70dd0c08be069e2688684b71
+ sha256sums = d9f140a58a2f65395450a4907263b8c925d6186f90c59e37cc378141be695f5c
pkgname = apostrophe
diff --git a/0001-Use-system-font.patch b/0001-Use-system-font.patch
deleted file mode 100644
index d8ffdd50f708..000000000000
--- a/0001-Use-system-font.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2bda071943a224ac424b1c46828acd35ee04f3e7 Mon Sep 17 00:00:00 2001
-From: Kimiblock <pn3535@icloud.com>
-Date: Tue, 29 Aug 2023 20:38:16 +0800
-Subject: [PATCH] Use system font
-
----
- data/media/css/gtk/style.css | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/data/media/css/gtk/style.css b/data/media/css/gtk/style.css
-index 9b6840d..c0357ec 100644
---- a/data/media/css/gtk/style.css
-+++ b/data/media/css/gtk/style.css
-@@ -32,7 +32,7 @@
- }
-
- .apostrophe-editor {
-- font-family: 'Fira Mono', monospace;
-+ font-family: monospace;
- font-size: 1.091em;
- /*text-decoration-color: @error_color;
- background: @base_color;
-@@ -88,7 +88,7 @@
- }
-
- .lexikon {
-- font-family: serif;
-+ font-family: sans-serif;
- font-size: 12px;
- background: @theme_selected_bg_color;
- border: 4px solid @theme_selected_bg_color;
---
-2.42.0
-
diff --git a/2-rm-reveal-check.patch b/2-rm-reveal-check.patch
deleted file mode 100644
index a040b52ebb1d..000000000000
--- a/2-rm-reveal-check.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- meson.build 2024-01-12 14:18:57.598799803 +0800
-+++ meson.build 2024-01-12 14:38:59.351937376 +0800
-@@ -60,9 +60,7 @@
- #bindir = join_paths(get_option('prefix'), get_option('bindir'))
- podir = meson.source_root() / 'po'
-
--if not fs.exists(join_paths(pkgdatadir, 'libs/reveal.js'))
-- error('No valid reveal.js installation found')
--endif
-+
-
- subdir('data')
- #subdir('help')
diff --git a/PKGBUILD b/PKGBUILD
index 133f91be7813..fc86ce4b36f6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=apostrophe
pkgver=3.0
-pkgrel=1
+pkgrel=2
+_reveal_ver=5.1.0
pkgdesc="A distraction free Markdown editor for GNU/Linux made with GTK+"
arch=('any')
url="https://world.pages.gitlab.gnome.org/apostrophe"
@@ -18,6 +19,8 @@ depends=(
'python-pypandoc'
'python-regex'
'python-setuptools'
+ 'ttf-fira-mono'
+ 'ttf-fira-sans'
'webkitgtk-6.0'
)
makedepends=(
@@ -27,33 +30,21 @@ makedepends=(
optdepends=(
'mathjax: for formula preview'
'texlive-bin: for the pdftex module'
- 'ttf-fira-mono: recommended Mono font'
- 'ttf-fira-sans: recommended Sans font'
)
source=("https://gitlab.gnome.org/World/apostrophe/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz"
- '0001-Use-system-font.patch'
- '2-rm-reveal-check.patch')
+ "https://github.com/hakimel/reveal.js/archive/${_reveal_ver}/reveal.js-${_reveal_ver}.tar.gz"
+ 'embed-reveal.patch')
sha256sums=('5f06a923ab2bffa16ba623f05b7ac67ea75b49891cee99048c157a15dae29f19'
- 'e909c05f259a874afd5e414fd13b0f162972e59c61c23e6d619e502254fcd4fe'
- 'a3e2eea5fca084f53fd6d0f9e61ace8e14b4c83d9c2f1d5ea74c8589c8c10b8f')
+ 'ddc83539ec50583eac9a972e88f892971b37c44e70dd0c08be069e2688684b71'
+ 'd9f140a58a2f65395450a4907263b8c925d6186f90c59e37cc378141be695f5c')
prepare() {
cd "$pkgname-v$pkgver"
+ mkdir -p "$pkgname/libs/reveal.js"
+ cp -r "$srcdir/reveal.js-${_reveal_ver}"/* "$pkgname/libs/reveal.js"
- # Bug 1953395 - Apostrophe can't export to HTML
- sed -i 's|/app/share/fonts/FiraSans-Regular.ttf|/usr/share/fonts/OTF/FiraSans-Regular.otf|' \
- data/media/css/web/base.css
- sed -i 's|/app/share/fonts/FiraMono-Regular.ttf|/usr/share/fonts/OTF/FiraMono-Regular.otf|' \
- data/media/css/web/base.css
-
- # W: hidden-file-or-dir
- rm apostrophe/.pylintrc
-
- # Use system monospace & sans font instead of hard dependency on Fira Mono / Fira Sans
- patch -Np1 -i "$srcdir/0001-Use-system-font.patch"
-
- ## TODO Find a way to package reveal.js
- patch meson.build < "$srcdir/2-rm-reveal-check.patch"
+ # Point Meson to the reveal.js files
+ patch meson.build < "$srcdir/embed-reveal.patch"
}
build() {
@@ -67,4 +58,7 @@ check() {
package() {
meson install -C build --destdir "$pkgdir"
+
+ install -d "$pkgdir/usr/share/$pkgname/libs/reveal.js"
+ cp -r "reveal.js-${_reveal_ver}"/* "$pkgdir/usr/share/$pkgname/libs/reveal.js"
}
diff --git a/embed-reveal.patch b/embed-reveal.patch
new file mode 100644
index 000000000000..ece2ef4d4c1e
--- /dev/null
+++ b/embed-reveal.patch
@@ -0,0 +1,11 @@
+--- meson.build.reveal 2024-05-02 12:06:31.019408494 +0300
++++ meson.build 2024-05-02 12:10:17.583277672 +0300
+@@ -60,7 +60,7 @@
+ #bindir = join_paths(get_option('prefix'), get_option('bindir'))
+ podir = meson.source_root() / 'po'
+
+-if not fs.exists(join_paths(pkgdatadir, 'libs/reveal.js'))
++if not fs.exists(meson.source_root() / meson.project_name() / 'libs/reveal.js')
+ error('No valid reveal.js installation found')
+ endif
+