summaryrefslogtreecommitdiff
path: root/libre/mcomix
diff options
context:
space:
mode:
Diffstat (limited to 'libre/mcomix')
-rw-r--r--libre/mcomix/PKGBUILD15
-rw-r--r--libre/mcomix/libre.patch85
2 files changed, 52 insertions, 48 deletions
diff --git a/libre/mcomix/PKGBUILD b/libre/mcomix/PKGBUILD
index 1729fe341..d360d184e 100644
--- a/libre/mcomix/PKGBUILD
+++ b/libre/mcomix/PKGBUILD
@@ -2,13 +2,14 @@
# Contributor (Arch): Ray Powell <ray_al@xphoniexx.net>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+# Contributor: bill-auger <bill-auger@programmer.net>
pkgname=mcomix
pkgver=1.3.0.dev0
-pkgrel=2
+pkgrel=3
pkgrel+=.parabola1
pkgdesc="A user-friendly, customizable image viewer specifically designed to handle comic books"
-pkgdesc+=", without nonfree libunrar support"
+pkgdesc+=", without non-free RAR support"
arch=('any')
url="https://github.com/multiSnow/mcomix3"
license=('GPL')
@@ -16,19 +17,17 @@ depends=('gtk3' 'python-cairo' 'python-gobject' 'python-pillow')
makedepends=('git')
optdepends=('mupdf-tools: for pdf comics'
'p7zip: for 7zip compressed comics')
-conflicts=('mcomix-libre')
-replaces=('mcomix-libre')
-_commit=2f82616f34154624c78fb6eca3bc0cc5cdef0cf3 # gtk3
+_commit=a95f08140fc8850890f283bc06e3e2615477d736 # HEAD as of 20200528.
source=("git+https://github.com/multiSnow/mcomix3.git#commit=$_commit"
'libre.patch')
sha256sums=('SKIP'
- '24f8302cc6d7b969c44883bb361137f59d13b21c959ed9c88918bc370c70351a')
+ '8566f979b4d56866074f22a44ee31f6904dac6ef802fa88413cedd82ee752721')
prepare() {
cd mcomix3
+
# Remove nonfree unRAR support
rm -v mcomix/mcomix/archive/rar{,_external}.py
- rm -v mime/icons/*/application-x-cbr.png
patch -Np1 -i ${srcdir}/libre.patch
}
@@ -43,7 +42,6 @@ package() {
install -Dm644 mime/mcomix.desktop "$pkgdir"/usr/share/applications/mcomix.desktop
install -Dm644 mime/mcomix.appdata.xml "$pkgdir"/usr/share/metainfo/mcomix.appdata.xml
- install -Dm644 mime/mcomix.xml "$pkgdir"/usr/share/mime/packages/mcomix.xml
install -Dm644 mime/comicthumb.thumbnailer "$pkgdir"/usr/share/thumbnailers/comicthumb.thumbnailer
for size in 16x16 22x22 24x24 32x32 48x48
@@ -52,7 +50,6 @@ package() {
install -Dm644 mcomix/mcomix/images/$size/mcomix.png "$pkgdir"/usr/share/icons/hicolor/$size/apps/mcomix.png
install -Dm644 mime/icons/$size/application-x-cb7.png "$pkgdir"/usr/share/icons/hicolor/$size/mimetypes/application-x-cb7.png
install -Dm644 mime/icons/$size/application-x-cbt.png "$pkgdir"/usr/share/icons/hicolor/$size/mimetypes/application-x-cbt.png
- install -Dm644 mime/icons/$size/application-x-cbz.png "$pkgdir"/usr/share/icons/hicolor/$size/mimetypes/application-x-cbz.png
done
install -Dm644 man/mcomix.1 "$pkgdir"/usr/share/man/man1/mcomix.1
diff --git a/libre/mcomix/libre.patch b/libre/mcomix/libre.patch
index cedb7700c..20b0c3ca1 100644
--- a/libre/mcomix/libre.patch
+++ b/libre/mcomix/libre.patch
@@ -51,7 +51,7 @@ index ba64a40..0160ed9 100644
license = \
diff --git a/mcomix/mcomix/archive_tools.py b/mcomix/mcomix/archive_tools.py
-index 6583a7f..00c37f4 100644
+index c121f59..1f48aa8 100644
--- a/mcomix/mcomix/archive_tools.py
+++ b/mcomix/mcomix/archive_tools.py
@@ -15,8 +15,6 @@ from mcomix.archive import (
@@ -63,7 +63,7 @@ index 6583a7f..00c37f4 100644
sevenzip_external,
squashfs,
tar,
-@@ -47,12 +45,6 @@ _HANDLERS = {
+@@ -47,16 +45,6 @@ _HANDLERS = {
constants.XZ: (
tar.TarArchive,
),
@@ -73,10 +73,14 @@ index 6583a7f..00c37f4 100644
- # Last resort: some versions of 7z support RAR.
- sevenzip_external.SevenZipArchive,
- ),
+- constants.RAR5: (
+- rar.RarArchive,
+- rar_external.RarArchive,
+- ),
constants.LHA: (
# Prefer 7z over lha executable for Unicode support.
sevenzip_external.SevenZipArchive,
-@@ -86,9 +78,6 @@ def _is_available(archive_type):
+@@ -90,9 +78,6 @@ def _is_available(archive_type):
def szip_available():
return _is_available(constants.SEVENZIP)
@@ -86,25 +90,35 @@ index 6583a7f..00c37f4 100644
def lha_available():
return _is_available(constants.LHA)
-@@ -164,9 +153,6 @@ def archive_mime_type(path):
+@@ -109,7 +94,6 @@ def init_supported_formats():
+ for name, formats, is_available in (
+ ('ZIP', constants.ZIP_FORMATS , True ),
+ ('Tar', constants.TAR_FORMATS , True ),
+- ('RAR', constants.RAR_FORMATS , rar_available() ),
+ ('7z' , constants.SZIP_FORMATS, szip_available()),
+ ('LHA', constants.LHA_FORMATS , lha_available() ),
+ ('PDF', constants.PDF_FORMATS , pdf_available() ),
+@@ -168,11 +152,6 @@ def archive_mime_type(path):
else:
return constants.TAR
- if magic.startswith(b'Rar!\x1a\x07'):
-- return constants.RAR
--
+- if sevenzip_external.is_7z_support_rar():
+- return constants.RAR
+- else:
+- return constants.RAR5
+
if magic[0:6] == b'7z\xbc\xaf\x27\x1c':
return constants.SEVENZIP
-
diff --git a/mcomix/mcomix/constants.py b/mcomix/mcomix/constants.py
-index 470acdc..04fd006 100644
+index 414f65c..e068218 100644
--- a/mcomix/mcomix/constants.py
+++ b/mcomix/mcomix/constants.py
@@ -49,7 +49,7 @@ ANIMATION_NORMAL = 1 # loop as animation setting
ANIMATION_ONCE = 1<<1 # loop only once
ANIMATION_INF = 1<<2 # loop infinity
--ZIP, RAR, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL, SQUASHFS = range(11)
+-ZIP, RAR, RAR5, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL, SQUASHFS = range(12)
+ZIP, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL, SQUASHFS = range(10)
NORMAL_CURSOR, GRAB_CURSOR, WAIT_CURSOR, NO_CURSOR = range(4)
LIBRARY_DRAG_EXTERNAL_ID, LIBRARY_DRAG_BOOK_ID, LIBRARY_DRAG_COLLECTION_ID = range(3)
@@ -123,6 +137,15 @@ index 470acdc..04fd006 100644
TAR_FORMATS = (
# not registed in IANA
('.tar', 'application/x-tar'),
+@@ -143,7 +136,7 @@ SQUASHFS_FORMATS = (
+ ('.sqsh', 'application/vnd.squashfs'),
+ )
+
+-ARCHIVE_FORMATS = ZIP_FORMATS + RAR_FORMATS + TAR_FORMATS + SQUASHFS_FORMATS
++ARCHIVE_FORMATS = ZIP_FORMATS + TAR_FORMATS + SQUASHFS_FORMATS
+ ARCHIVE_FORMATS += SZIP_FORMATS + LHA_FORMATS + PDF_FORMATS
+
+ # vim: expandtab:sw=4:ts=4
diff --git a/mcomix/mcomix/messages/mcomix.pot b/mcomix/mcomix/messages/mcomix.pot
index e622347..02528c3 100644
--- a/mcomix/mcomix/messages/mcomix.pot
@@ -165,15 +188,15 @@ index 0eb2ea7..c534f5f 100644
GZIP : _('Gzip compressed tar archive'),
BZIP2 : _('Bzip2 compressed tar archive'),
diff --git a/mime/comicbook.schemas b/mime/comicbook.schemas
-index 94a8395..07f14c0 100644
+index d8ab034..3bf2711 100644
--- a/mime/comicbook.schemas
+++ b/mime/comicbook.schemas
@@ -1,27 +1,5 @@
<gconfschemafile>
<schemalist>
- <schema>
-- <key>/schemas/desktop/gnome/thumbnailers/application@x-cbr/enable</key>
-- <applyto>/desktop/gnome/thumbnailers/application@x-cbr/enable</applyto>
+- <key>/schemas/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/enable</key>
+- <applyto>/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/enable</applyto>
- <owner>comicthumb</owner>
- <type>bool</type>
- <default>true</default>
@@ -183,8 +206,8 @@ index 94a8395..07f14c0 100644
- </locale>
- </schema>
- <schema>
-- <key>/schemas/desktop/gnome/thumbnailers/application@x-cbr/command</key>
-- <applyto>/desktop/gnome/thumbnailers/application@x-cbr/command</applyto>
+- <key>/schemas/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/command</key>
+- <applyto>/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/command</applyto>
- <owner>comicthumb</owner>
- <type>string</type>
- <default>comicthumb %i %o %s</default>
@@ -194,18 +217,18 @@ index 94a8395..07f14c0 100644
- </locale>
- </schema>
<schema>
- <key>/schemas/desktop/gnome/thumbnailers/application@x-cbz/enable</key>
- <applyto>/desktop/gnome/thumbnailers/application@x-cbz/enable</applyto>
+ <key>/schemas/desktop/gnome/thumbnailers/application@vnd.comicbook+zip/enable</key>
+ <applyto>/desktop/gnome/thumbnailers/application@vnd.comicbook+zip/enable</applyto>
diff --git a/mime/comicthumb.thumbnailer b/mime/comicthumb.thumbnailer
-index b536ddf..a0761c9 100644
+index e357fe0..88cc59f 100644
--- a/mime/comicthumb.thumbnailer
+++ b/mime/comicthumb.thumbnailer
@@ -1,4 +1,4 @@
[Thumbnailer Entry]
TryExec=comicthumb
- Exec=comicthumb %u %o %s
--MimeType=application/x-cb7;application/x-cbr;application/x-cbt;application/x-cbz;application/x-ext-cb7;application/x-ext-cbr;application/x-ext-cbt;application/x-ext-cbz;
-+MimeType=application/x-cb7;application/x-cbt;application/x-cbz;application/x-ext-cb7;application/x-ext-cbt;application/x-ext-cbz;
+ Exec=comicthumb %i %o %s
+-MimeType=application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf
++MimeType=application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf
diff --git a/mime/mcomix.appdata.xml b/mime/mcomix.appdata.xml
index 514f95d..b07b474 100644
--- a/mime/mcomix.appdata.xml
@@ -220,28 +243,12 @@ index 514f95d..b07b474 100644
<p>
MComix is a fork of the Comix project, and aims to add bug fixes and
diff --git a/mime/mcomix.desktop b/mime/mcomix.desktop
-index eb2ec8f..240ac0e 100644
+index 0bb8315..1d46cdf 100644
--- a/mime/mcomix.desktop
+++ b/mime/mcomix.desktop
@@ -19,4 +19,4 @@ Terminal=false
Type=Application
StartupNotify=true
Categories=Graphics;Viewer;
--MimeType=application/x-cb7;application/x-ext-cb7;application/x-cbr;application/x-ext-cbr;application/x-cbt;application/x-ext-cbt;application/x-cbz;application/x-ext-cbz;application/pdf;application/x-pdf;application/x-ext-pdf;image/bmp;image/x-MS-bmp;image/x-bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;
-+MimeType=application/x-cb7;application/x-ext-cb7;application/x-cbt;application/x-ext-cbt;application/x-cbz;application/x-ext-cbz;application/pdf;application/x-pdf;application/x-ext-pdf;image/bmp;image/x-MS-bmp;image/x-bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;
-diff --git a/mime/mcomix.xml b/mime/mcomix.xml
-index ec2a28e..c4c61da 100644
---- a/mime/mcomix.xml
-+++ b/mime/mcomix.xml
-@@ -5,11 +5,6 @@
- <comment xml:lang="en">Comic Book Archive (Zip compressed)</comment>
- <glob pattern="*.cbz"/>
- </mime-type>
-- <mime-type type="application/x-cbr">
-- <sub-class-of type="application/x-rar"/>
-- <comment xml:lang="en">Comic Book Archive (RAR compressed)</comment>
-- <glob pattern="*.cbr"/>
-- </mime-type>
- <mime-type type="application/x-cbt">
- <sub-class-of type="application/x-compressed-tar"/>
- <sub-class-of type="application/x-bzip-compressed-tar"/>
+-MimeType=application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf;image/bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;
++MimeType=application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf;image/bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;