public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrew Ammerlaan" <andrewammerlaan@riseup.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-libs/libbpg/, media-libs/libbpg/files/
Date: Tue, 16 Mar 2021 10:49:02 +0000 (UTC)	[thread overview]
Message-ID: <1615833606.0b9dc090db00b9811b42bac865e7c8b30fd757cd.andrewammerlaan@gentoo> (raw)

commit:     0b9dc090db00b9811b42bac865e7c8b30fd757cd
Author:     Michele Santullo <m.santullo <AT> posteo <DOT> net>
AuthorDate: Mon Mar 15 18:40:06 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Mon Mar 15 18:40:06 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0b9dc090

media-libs/libbpg: new package

Package-Manager: Portage-3.0.13, Repoman-3.0.2
RepoMan-Options: --force
Signed-off-by: Michele Santullo <m.santullo <AT> posteo.net>

 media-libs/libbpg/Manifest                         |  1 +
 .../libbpg/files/libbpg-0.9.8-add-chost.patch      | 13 ++++
 .../files/libbpg-0.9.8-dont-strip-bins.patch       | 13 ++++
 .../files/libbpg-0.9.8-remove-forced-options.patch | 27 ++++++++
 media-libs/libbpg/libbpg-0.9.8.ebuild              | 72 ++++++++++++++++++++++
 media-libs/libbpg/metadata.xml                     | 18 ++++++
 6 files changed, 144 insertions(+)

diff --git a/media-libs/libbpg/Manifest b/media-libs/libbpg/Manifest
new file mode 100644
index 00000000..a8ff0b6c
--- /dev/null
+++ b/media-libs/libbpg/Manifest
@@ -0,0 +1 @@
+DIST libbpg-0.9.8.tar.gz 2029021 BLAKE2B 827d819d6e392a1a0186a58b16b9b69c41f4a0c94046ff2a1aab0e735e01aae8c10d06ad03c1bf9f0722a7620f50ae7da25bddda681e457ad4cdeec8cb922edc SHA512 2d5f7a035033d8b969c2765a4f1368e1a2c8c5ace12aec5d449ca5cc4ef5eb89431a75f2d6d03fd7117b548801b5554503411f499f497da69ff33ca6e714553d

diff --git a/media-libs/libbpg/files/libbpg-0.9.8-add-chost.patch b/media-libs/libbpg/files/libbpg-0.9.8-add-chost.patch
new file mode 100644
index 00000000..9b5054de
--- /dev/null
+++ b/media-libs/libbpg/files/libbpg-0.9.8-add-chost.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 8364e93..d3fc48f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -27,7 +27,7 @@ CROSS_PREFIX:=x86_64-w64-mingw32-
+ #CROSS_PREFIX=i686-w64-mingw32-
+ EXE:=.exe
+ else
+-CROSS_PREFIX:=
++CROSS_PREFIX:=${CHOST}-
+ EXE:=
+ endif
+ 

diff --git a/media-libs/libbpg/files/libbpg-0.9.8-dont-strip-bins.patch b/media-libs/libbpg/files/libbpg-0.9.8-dont-strip-bins.patch
new file mode 100644
index 00000000..486086ad
--- /dev/null
+++ b/media-libs/libbpg/files/libbpg-0.9.8-dont-strip-bins.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index a5ba63b..8364e93 100644
+--- a/Makefile
++++ b/Makefile
+@@ -214,7 +214,7 @@ size:
+ 	gzip < bpgdec | wc
+ 
+ install: bpgenc bpgdec
+-	install -s -m 755 $^ $(prefix)/bin
++	install -m 755 $^ $(prefix)/bin
+ 
+ CLEAN_DIRS=doc html libavcodec libavutil \
+      jctvc jctvc/TLibEncoder jctvc/TLibVideoIO jctvc/TLibCommon jctvc/libmd5

diff --git a/media-libs/libbpg/files/libbpg-0.9.8-remove-forced-options.patch b/media-libs/libbpg/files/libbpg-0.9.8-remove-forced-options.patch
new file mode 100644
index 00000000..1ebf05fa
--- /dev/null
+++ b/media-libs/libbpg/files/libbpg-0.9.8-remove-forced-options.patch
@@ -0,0 +1,27 @@
+diff --git a/Makefile b/Makefile
+index 3a8db4c..a5ba63b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,11 +5,11 @@
+ # Enable compilation of Javascript decoder with Emscripten
+ #USE_EMCC=y
+ # Enable x265 for the encoder
+-USE_X265=y
++#USE_X265=y
+ # Enable the JCTVC code (best quality but slow) for the encoder
+ #USE_JCTVC=y
+ # Compile bpgview (SDL and SDL_image libraries needed)
+-USE_BPGVIEW=y
++#USE_BPGVIEW=y
+ # Enable it to use bit depths > 12 (need more tests to validate encoder)
+ #USE_JCTVC_HIGH_BIT_DEPTH=y
+ # Enable the cross compilation for Windows
+@@ -17,7 +17,7 @@ USE_BPGVIEW=y
+ # Enable for compilation on MacOS X
+ #CONFIG_APPLE=y
+ # Installation prefix
+-prefix=/usr/local
++#prefix=/usr/local
+ 
+ 
+ #################################

diff --git a/media-libs/libbpg/libbpg-0.9.8.ebuild b/media-libs/libbpg/libbpg-0.9.8.ebuild
new file mode 100644
index 00000000..e55afb24
--- /dev/null
+++ b/media-libs/libbpg/libbpg-0.9.8.ebuild
@@ -0,0 +1,72 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Better Portable Graphics reference implementation"
+HOMEPAGE="https://bellard.org/bpg/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+x265 bpgview jctvc emcc static-libs"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-remove-forced-options.patch
+	"${FILESDIR}"/${P}-dont-strip-bins.patch
+	"${FILESDIR}"/${P}-add-chost.patch
+)
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND="
+	media-video/ffmpeg
+	media-libs/libpng
+	virtual/jpeg
+	bpgview? ( media-libs/sdl-image )
+	bpgview? ( media-libs/libsdl )
+"
+
+src_prepare() {
+	default
+
+	cat <<EOF > ${PN}.pc
+prefix="${EPREFIX}/usr"
+libdir="\${prefix}/$(get_libdir)"
+includedir="\${prefix}/include"
+
+Name: ${PN}
+Description: ${DESCRIPTION}
+URL: ${HOMEPAGE}
+Version: ${PV}
+Libs: "-L\${libdir}" -lbpg
+Cflags: "-I\${includedir}"
+EOF
+}
+
+src_compile() {
+	emake \
+		$(usex x265 USE_X265=y '') \
+		$(usex bpgview USE_BPGVIEW=y '') \
+		$(usex jctvc USE_JCTVC=y '') \
+		$(usex emcc USE_EMCC=y '')
+}
+
+src_install() {
+	mkdir -p "${D}"/usr/bin
+	emake prefix="${D}"/usr install
+
+	if use bpgview; then
+		dobin bpgview
+	fi
+
+	if use static-libs; then
+		dolib.a libbpg.a
+		doheader libbpg.h
+		doheader bpgenc.h
+
+		insinto /usr/$(get_libdir)/pkgconfig
+		doins ${PN}.pc
+	fi
+}

diff --git a/media-libs/libbpg/metadata.xml b/media-libs/libbpg/metadata.xml
new file mode 100644
index 00000000..f0651d33
--- /dev/null
+++ b/media-libs/libbpg/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<longdescription lang="en">
+		BPG (Better Portable Graphics) is a new image format. Its purpose is
+		to replace the JPEG image format when quality or file size is an issue.
+	</longdescription>
+	<maintainer type="person">
+		<email>m.santullo@posteo.net</email>
+		<name>Michele Santullo</name>
+	</maintainer>
+	<upstream>
+		<maintainer>
+			<name>Fabrice Bellard</name>
+			<email>fabrice@bellard.org</email>
+		</maintainer>
+	</upstream>
+</pkgmetadata>


             reply	other threads:[~2021-03-16 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 10:49 Andrew Ammerlaan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-18 12:37 [gentoo-commits] repo/proj/guru:master commit in: media-libs/libbpg/, media-libs/libbpg/files/ Florian Schmaus
2023-09-18 12:37 Florian Schmaus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1615833606.0b9dc090db00b9811b42bac865e7c8b30fd757cd.andrewammerlaan@gentoo \
    --to=andrewammerlaan@riseup.net \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox