commit:     8990f8a32cf506e4d47ae6c365ab121227a925da
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  1 13:51:31 2021 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Fri Oct  1 13:51:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8990f8a3

media-libs/libsixel: new upstream release

Bug: https://bugs.gentoo.org/717254
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>

 media-libs/libsixel/Manifest                   |  1 +
 media-libs/libsixel/files/libsixel-meson.patch | 65 ++++++++++++++++++++
 media-libs/libsixel/libsixel-1.10.3.ebuild     | 85 ++++++++++++++++++++++++++
 media-libs/libsixel/metadata.xml               |  1 +
 4 files changed, 152 insertions(+)

diff --git a/media-libs/libsixel/Manifest b/media-libs/libsixel/Manifest
index 0fae304e52a..de4f62e9023 100644
--- a/media-libs/libsixel/Manifest
+++ b/media-libs/libsixel/Manifest
@@ -1 +1,2 @@
+DIST libsixel-1.10.3.tar.gz 4272940 BLAKE2B 
f65d9a3bdd54917f5746b7b1650dfca7084c64b505ea9cae07863c476d1189114d9fb303ec01d8fa209542e891f1d359ec6dbdc9babc4313b06b709813fab020
 SHA512 
ef16f9ccecec8289728ec84ce9f24145648f8a38184c1ec3df8ead3499c6cf7d3e0a0c738f8bfcb1093e16ee8ae7ce5e46d3890707c8104752ce4ab7eb3bc7ac
 DIST libsixel-1.8.6.tar.gz 4791628 BLAKE2B 
5fa197d0d759eecd4040c4c1101e6d85fb9af7405ccdff75be571b3ac6b2b0aab6415bc3fdbb37157795f89190fcc1d0fea1bdf705e83a34762e2b05f5588c69
 SHA512 
460a5d46bada705b4a7ec2e250e2bde7f4b8ba155281fa5a102d1121f79c1c79145f042cd1f4bf93a2fc29e784e89afd539e963470663fc659d4fe72ea49fdaf

diff --git a/media-libs/libsixel/files/libsixel-meson.patch 
b/media-libs/libsixel/files/libsixel-meson.patch
new file mode 100644
index 00000000000..b912288e2e6
--- /dev/null
+++ b/media-libs/libsixel/files/libsixel-meson.patch
@@ -0,0 +1,65 @@
+--- a/meson.build
++++ b/meson.build
+@@ -27,7 +27,7 @@
+     #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+     __attribute__((deprecated)) void test(void) {}
+ ''')
+-  conf_data.set('HAVE_DIAGNOSTIC_DEPRECATED_DECLARATIONS', true)
++  conf_data.set('HAVE_DIAGNOSTIC_DEPRECATED_DECLARATIONS', 1)
+ endif
+ 
+ c_args = [
+@@ -101,24 +101,24 @@
+ python2_installation = pymod.find_installation('python2', required: 
get_option('python2'))
+ 
+ if get_option('libcurl').enabled() and curl_found.found()
+-  conf_data.set('HAVE_LIBCURL', true)
++  conf_data.set('HAVE_LIBCURL', 1)
+   libsixel_deps += [curl_found]
+ endif
+ 
+-if get_option('jpeg').enabled() and jpeg_found
+-  conf_data.set('HAVE_JPEG', true)
++if get_option('jpeg').enabled() and jpeg_found.found()
++  conf_data.set('HAVE_JPEG', 1)
+   libsixel_deps += [jpeg_found]
+ endif
+ 
+-if get_option('png').enabled() and png_found
+-  conf_data.set('HAVE_PNG', true)
++if get_option('png').enabled() and png_found.found()
++  conf_data.set('HAVE_PNG', 1)
+   libsixel_deps += [png_found]
+ endif
+ 
+ loaders = ['stb-image']
+ 
+ if get_option('gd').enabled() and gd_found.found()
+-  conf_data.set('HAVE_GD', true)
++  conf_data.set('HAVE_GD', 1)
+   libsixel_deps += [gd_found]
+   loaders += ['gd']
+ 
+@@ -132,19 +132,19 @@
+ 
+   foreach f : gd_funcs
+     if cc.has_function(f, dependencies: gd_found)
+-      conf_data.set('HAVE_DECL_@0@'.format(f.to_upper()), true)
++      conf_data.set('HAVE_DECL_@0@'.format(f.to_upper()), 1)
+     endif
+   endforeach
+ endif
+ 
+ if get_option('gdk-pixbuf2').enabled() and gdkpixbuf2_found.found()
+-  conf_data.set('HAVE_GDK_PIXBUF2', true)
++  conf_data.set('HAVE_GDK_PIXBUF2', 1)
+   libsixel_deps += [gdkpixbuf2_found]
+   loaders += ['gdk-pixbuf2']
+ endif
+ 
+ if have_getopt_long
+-  conf_data.set('HAVE_GETOPT_LONG', true)
++  conf_data.set('HAVE_GETOPT_LONG', 1)
+ endif
+ 
+ configure_file(output: 'config.h', configuration: conf_data)

diff --git a/media-libs/libsixel/libsixel-1.10.3.ebuild 
b/media-libs/libsixel/libsixel-1.10.3.ebuild
new file mode 100644
index 00000000000..d9e158874cf
--- /dev/null
+++ b/media-libs/libsixel/libsixel-1.10.3.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+PYTHON_COMPAT=( python3_{7..10} )
+DISTUTILS_OPTIONAL="1"
+
+inherit bash-completion-r1 distutils-r1 meson
+
+DESCRIPTION="A lightweight, fast implementation of DEC SIXEL graphics codec"
+HOMEPAGE="https://github.com/libsixel/libsixel";
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="curl gd gtk jpeg png python test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="curl? ( net-misc/curl )
+       gd? ( media-libs/gd )
+       gtk? ( x11-libs/gdk-pixbuf:2 )
+       jpeg? ( virtual/jpeg:0 )
+       png? ( media-libs/libpng:0 )
+       python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="python? (
+               ${PYTHON_DEPS}
+               dev-python/setuptools[${PYTHON_USEDEP}]
+       )"
+
+PATCHES=( "${FILESDIR}"/${PN}-meson.patch )
+
+src_prepare() {
+       default
+       if use python; then
+               cd python || die
+               distutils-r1_src_prepare
+               cd - >/dev/null || die
+       fi
+}
+
+src_configure() {
+       emesonargs=(
+               $(meson_feature curl libcurl)
+               $(meson_feature gd)
+               $(meson_feature gtk gdk-pixbuf2)
+               $(meson_feature jpeg)
+               $(meson_feature png)
+               $(meson_feature test tests)
+               -Dbashcompletiondir="$(get_bashcompdir)"
+       )
+       meson_src_configure
+       if use python; then
+               cd python || die
+               distutils-r1_src_configure
+               cd - >/dev/null || die
+       fi
+}
+
+src_compile() {
+       meson_src_compile
+       if use python; then
+               cd python || die
+               distutils-r1_src_compile
+               cd - >/dev/null || die
+       fi
+}
+
+src_install() {
+       meson_src_install
+
+       cd images || die
+       docompress -x /usr/share/doc/${PF}/images
+       docinto images
+       dodoc egret.jpg map{8,16}.png snake.jpg vimperator3.png
+       cd - >/dev/null || die
+
+       if use python; then
+               cd python || die
+               distutils-r1_src_install
+               cd - >/dev/null || die
+       fi
+}

diff --git a/media-libs/libsixel/metadata.xml b/media-libs/libsixel/metadata.xml
index 457207a9bc1..3bd897a7c98 100644
--- a/media-libs/libsixel/metadata.xml
+++ b/media-libs/libsixel/metadata.xml
@@ -7,5 +7,6 @@
        </maintainer>
        <upstream>
                <remote-id type="github">saitoha/libsixel</remote-id>
+               <remote-id type="github">libsixel/libsixel</remote-id>
        </upstream>
 </pkgmetadata>

Reply via email to