commit:     6a76c8c2747a42f6d7e7df306f103c67febeb129
Author:     Michael Vetter <jubalh <AT> iodoru <DOT> org>
AuthorDate: Wed Apr 12 13:09:04 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Apr 12 13:09:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a76c8c2

media-libs/jasper: readd jasper library (4.0.0)

Closes: https://github.com/gentoo/gentoo/pull/30553
Bug: https://bugs.gentoo.org/734284
Signed-off-by: Michael Vetter <jubalh <AT> iodoru.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-libs/jasper/Manifest            |  1 +
 media-libs/jasper/jasper-4.0.0.ebuild | 56 +++++++++++++++++++++++++++++++++++
 media-libs/jasper/jasper-9999.ebuild  | 56 +++++++++++++++++++++++++++++++++++
 media-libs/jasper/metadata.xml        | 19 ++++++++++++
 4 files changed, 132 insertions(+)

diff --git a/media-libs/jasper/Manifest b/media-libs/jasper/Manifest
new file mode 100644
index 000000000000..cb9e39b4d412
--- /dev/null
+++ b/media-libs/jasper/Manifest
@@ -0,0 +1 @@
+DIST jasper-4.0.0.tar.gz 1975127 BLAKE2B 
d4d8ae3324f3753e999adee57c215b89fa0ddeb3d945f10de15459a7d6566f1de9cbcd27a418bcc3c128bc138fff7e3f1cc157b6750d2d7dc1216f8e8cbc8bea
 SHA512 
dc03434870e85b1fdbdf41a3e07ce5a8044c8d225717d3d7a5969d45e3bd716bfb2abc4b4e0b8cec2f4071a7520c5d3e48939dba0cabe6d192eacd593de0c563

diff --git a/media-libs/jasper/jasper-4.0.0.ebuild 
b/media-libs/jasper/jasper-4.0.0.ebuild
new file mode 100644
index 000000000000..3ebc6a27c799
--- /dev/null
+++ b/media-libs/jasper/jasper-4.0.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Implementation of the codec specified in the JPEG-2000 Part-1 
standard"
+HOMEPAGE="https://jasper-software.github.io/jasper";
+
+if [[ ${PV} == *9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/jasper-software/jasper.git";
+else
+       
SRC_URI="https://github.com/jasper-software/${PN}/archive/version-${PV}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+       S="${WORKDIR}/${PN}-version-${PV}"
+fi
+
+LICENSE="JasPer2.0"
+SLOT="0/7"
+IUSE="doc heif jpeg opengl"
+
+RDEPEND="
+       heif? ( media-libs/libheif:= )
+       jpeg? ( media-libs/libjpeg-turbo:= )
+       opengl? (
+               media-libs/freeglut
+               virtual/opengl
+               virtual/glu
+       )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       app-shells/bash
+       doc? ( app-doc/doxygen )
+"
+
+src_configure() {
+       local mycmakeargs=(
+               -DBASH_PROGRAM="${BROOT}"/bin/bash
+
+               # documentation
+               $(cmake_use_find_package doc Doxygen)
+               $(cmake_use_find_package doc LATEX)
+
+               # HEIF
+               -DJAS_ENABLE_LIBHEIF=$(usex heif)
+
+               # JPEG
+               -DJAS_ENABLE_LIBJPEG=$(usex jpeg)
+
+               # OpenGL
+               -DJAS_ENABLE_OPENGL=$(usex opengl)
+       )
+       cmake_src_configure
+}

diff --git a/media-libs/jasper/jasper-9999.ebuild 
b/media-libs/jasper/jasper-9999.ebuild
new file mode 100644
index 000000000000..3ebc6a27c799
--- /dev/null
+++ b/media-libs/jasper/jasper-9999.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Implementation of the codec specified in the JPEG-2000 Part-1 
standard"
+HOMEPAGE="https://jasper-software.github.io/jasper";
+
+if [[ ${PV} == *9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/jasper-software/jasper.git";
+else
+       
SRC_URI="https://github.com/jasper-software/${PN}/archive/version-${PV}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+       S="${WORKDIR}/${PN}-version-${PV}"
+fi
+
+LICENSE="JasPer2.0"
+SLOT="0/7"
+IUSE="doc heif jpeg opengl"
+
+RDEPEND="
+       heif? ( media-libs/libheif:= )
+       jpeg? ( media-libs/libjpeg-turbo:= )
+       opengl? (
+               media-libs/freeglut
+               virtual/opengl
+               virtual/glu
+       )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       app-shells/bash
+       doc? ( app-doc/doxygen )
+"
+
+src_configure() {
+       local mycmakeargs=(
+               -DBASH_PROGRAM="${BROOT}"/bin/bash
+
+               # documentation
+               $(cmake_use_find_package doc Doxygen)
+               $(cmake_use_find_package doc LATEX)
+
+               # HEIF
+               -DJAS_ENABLE_LIBHEIF=$(usex heif)
+
+               # JPEG
+               -DJAS_ENABLE_LIBJPEG=$(usex jpeg)
+
+               # OpenGL
+               -DJAS_ENABLE_OPENGL=$(usex opengl)
+       )
+       cmake_src_configure
+}

diff --git a/media-libs/jasper/metadata.xml b/media-libs/jasper/metadata.xml
new file mode 100644
index 000000000000..633050c64070
--- /dev/null
+++ b/media-libs/jasper/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person" proxied="yes">
+               <email>[email protected]</email>
+               <name>Michael Vetter</name>
+       </maintainer>
+       <maintainer type="project" proxied="proxy">
+               <email>[email protected]</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Science Project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">jasper-software/jasper</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to