From 4d11fd64f50024f67ae6a451cf9ca0bcdf244031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 18 Aug 2020 23:30:44 +0700 Subject: [PATCH] apostrophe: rename from uberwriter --- srcpkgs/apostrophe/template | 16 +++++++ .../patches/uberwriter-localesdb.patch | 37 -------------- .../patches/uberwriter-no-apt.patch | 48 ------------------- srcpkgs/uberwriter/template | 26 ++++------ 4 files changed, 24 insertions(+), 103 deletions(-) create mode 100644 srcpkgs/apostrophe/template delete mode 100644 srcpkgs/uberwriter/patches/uberwriter-localesdb.patch delete mode 100644 srcpkgs/uberwriter/patches/uberwriter-no-apt.patch diff --git a/srcpkgs/apostrophe/template b/srcpkgs/apostrophe/template new file mode 100644 index 00000000000..6fce53d37e0 --- /dev/null +++ b/srcpkgs/apostrophe/template @@ -0,0 +1,16 @@ +# Template file for 'apostrophe' +pkgname=apostrophe +version=2.2.0.3 +revision=1 +wrksrc=apostrophe-v$version +build_style=meson +build_helper=gir +hostmakedepends="python3 glib-devel appstream-glib pkg-config gettext glade3-devel" +makedepends="libglib-devel gtk+3-devel" +depends="python3-regex python3-pypandoc libgladeui3 gspell iso-codes" +short_desc="GTK+ based distraction free Markdown editor" +maintainer="Đoàn Trần Công Danh " +license="GPL-3.0-only" +homepage="https://gitlab.gnome.org/somas/apostrophe" +distfiles="$homepage/-/archive/v$version/apostrophe-v$version.tar.bz2" +checksum=e37d71f2a053e32c0af72672a0cdd318ba3d8ed3f7f673ed0ea2ab0e88f63f52 diff --git a/srcpkgs/uberwriter/patches/uberwriter-localesdb.patch b/srcpkgs/uberwriter/patches/uberwriter-localesdb.patch deleted file mode 100644 index 657387c5dfb..00000000000 --- a/srcpkgs/uberwriter/patches/uberwriter-localesdb.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up uberwriter_bugfixes/setup.py.orig uberwriter_bugfixes/setup.py ---- uberwriter_bugfixes/setup.py.orig 2012-12-10 23:22:28.168386230 -0600 -+++ uberwriter_bugfixes/setup.py 2012-12-10 23:24:50.598256044 -0600 -@@ -159,7 +159,4 @@ DistUtilsExtra.auto.setup( - "uberwriter_lib", - "uberwriter" - ], -- package_data={ -- 'pylocales' : ['locales.db'] -- } - ) -\ No newline at end of file -diff -up uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py ---- uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig 2012-12-10 23:25:11.512379118 -0600 -+++ uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py 2012-12-10 23:26:03.519678793 -0600 -@@ -38,20 +38,8 @@ __all__ = ['Country', 'Language', 'Langu - _translator_language = gettext.translation('iso_639', fallback=True).gettext - _translator_country = gettext.translation('iso_3166', fallback=True).gettext - --# Decides where the database is located. If an application provides an --# os.path.get_module_path monkey patch to determine the path where the module --# is located it uses this. If not it searches in the directory of this source --# code file. --__path__ = None --if hasattr(os.path, 'get_module_path'): -- __path__ = os.path.get_module_path(__file__) -- if not os.path.isfile(os.path.join(__path__, 'locales.db')): -- __path__ = None --if __path__ is None: -- __path__ = os.path.abspath(os.path.realpath(os.path.dirname(__file__))) -- - # Loading the Database --_database = sqlite3.connect(os.path.join(__path__, 'locales.db')) -+_database = sqlite3.connect('/usr/share/uberwriter/locales.db') - - logger = logging.getLogger(__name__) - diff --git a/srcpkgs/uberwriter/patches/uberwriter-no-apt.patch b/srcpkgs/uberwriter/patches/uberwriter-no-apt.patch deleted file mode 100644 index 29c37ef51ff..00000000000 --- a/srcpkgs/uberwriter/patches/uberwriter-no-apt.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -up uberwriter_bugfixes/uberwriter/UberwriterWindow.py.orig uberwriter_bugfixes/uberwriter/UberwriterWindow.py ---- uberwriter_bugfixes/uberwriter/UberwriterWindow.py.orig 2012-12-10 13:24:22.947869013 -0600 -+++ uberwriter_bugfixes/uberwriter/UberwriterWindow.py 2012-12-10 13:24:38.839927266 -0600 -@@ -19,7 +19,6 @@ import subprocess - import os - import codecs - import webbrowser --import apt - import urllib - - from locale import gettext as _ -@@ -528,25 +527,6 @@ class UberwriterWindow(Window): - self.export("html") - - def export_as_pdf(self, widget, data=None): -- if self.texlive_installed == False: -- try: -- cache = apt.Cache() -- inst = cache["texlive"].is_installed -- except: -- inst = True -- -- if inst == False: -- dialog = Gtk.MessageDialog(self, -- Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, -- Gtk.MessageType.INFO, -- None, -- _("You can not export to PDF.") -- ) -- dialog.format_secondary_markup(_("Please install texlive from the software center.")) -- response = dialog.run() -- return -- else: -- self.texlive_installed = True - self.export("pdf") - - def copy_html_to_clipboard(self, widget, date=None): -@@ -851,10 +831,6 @@ class UberwriterWindow(Window): - self.UberwriterAdvancedExportDialog = UberwriterAdvancedExportDialog - - # Code for other initialization actions should be added here. -- -- # Texlive checker -- -- self.texlive_installed = False - - # Draw background - self.background_image = helpers.get_media_path('bg_light.png') diff --git a/srcpkgs/uberwriter/template b/srcpkgs/uberwriter/template index aa00c32f261..a02b4dc992e 100644 --- a/srcpkgs/uberwriter/template +++ b/srcpkgs/uberwriter/template @@ -1,22 +1,12 @@ # Template file for 'uberwriter' +# Separated package because apostrophe is at version 2.x now pkgname=uberwriter version=12.11.02 -revision=1 -_subversion=public1-beta -wrksrc=uberwriter_bugfixes -build_style=python2-module -pycompile_module=$pkgname +revision=2 +build_style=meta archs=noarch -patch_args='-p1' -hostmakedepends="python-distutils-extra intltool" -depends="python-enchant python-gobject pandoc ttf-ubuntu-font-family" -short_desc="The simplest writing application" -maintainer="Andrea Brancaleoni " -license="GPL-3" -homepage="http://uberwriter.wolfvollprecht.de" -distfiles="https://launchpad.net/$pkgname/trunk/${version%.*}/+download/${pkgname}_${version}-${_subversion}.tar.gz" -checksum=1cfedcac0c76200cf2d1de2c34574646d9fb5100e48a8c99994aef1906a0f598 - -post_install() { - vinstall uberwriter_lib/pylocales/locales.db 644 usr/share/uberwriter -} +depends="apostrophe" +short_desc="Original fork of apostrophe" +maintainer="Orphaned " +license="Public Domain" +homepage="http://voidlinux.org"