From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1555375-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 360FD158089
	for <garchives@archives.gentoo.org>; Sun, 17 Sep 2023 22:40:30 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 6A16D2BC017;
	Sun, 17 Sep 2023 22:40:29 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 532B62BC017
	for <gentoo-commits@lists.gentoo.org>; Sun, 17 Sep 2023 22:40:29 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 8A093335C87
	for <gentoo-commits@lists.gentoo.org>; Sun, 17 Sep 2023 22:40:28 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B232B11CC
	for <gentoo-commits@lists.gentoo.org>; Sun, 17 Sep 2023 22:40:26 +0000 (UTC)
From: "Lucio Sauer" <watermanpaint@posteo.net>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Lucio Sauer" <watermanpaint@posteo.net>
Message-ID: <1694990355.989921567507d9b8a7c2f949ee8ca980b40f162b.watermanpaint@gentoo>
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-libs/libbpg/
X-VCS-Repository: repo/proj/guru
X-VCS-Files: media-libs/libbpg/libbpg-0.9.8-r1.ebuild
X-VCS-Directories: media-libs/libbpg/
X-VCS-Committer: watermanpaint
X-VCS-Committer-Name: Lucio Sauer
X-VCS-Revision: 989921567507d9b8a7c2f949ee8ca980b40f162b
X-VCS-Branch: dev
Date: Sun, 17 Sep 2023 22:40:26 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 7bb84381-46cf-4d4e-a459-cec57539d1f7
X-Archives-Hash: fc5f340f045303cc59a08d3fed82b4d9

commit:     989921567507d9b8a7c2f949ee8ca980b40f162b
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Sun Sep 17 20:20:59 2023 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Sun Sep 17 22:39:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=98992156

media-libs/libbpg: update dependencies

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 media-libs/libbpg/libbpg-0.9.8-r1.ebuild | 85 ++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/media-libs/libbpg/libbpg-0.9.8-r1.ebuild b/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
new file mode 100644
index 0000000000..14cf564803
--- /dev/null
+++ b/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Better Portable Graphics reference implementation"
+HOMEPAGE="https://bellard.org/bpg/"
+SRC_URI="https://bellard.org/bpg/${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
+	"${FILESDIR}"/${P}-add-fpic.patch
+)
+DEPEND="
+	media-libs/libjpeg-turbo:=
+	media-libs/libpng:=
+	x265? ( sys-process/numactl )
+	bpgview? (
+				media-libs/sdl-image
+				media-libs/libsdl
+			 )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	x265? (
+			dev-lang/yasm
+			dev-util/cmake
+		  )
+"
+
+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
+
+	sed -Ei 's/^(X265_LIBS:=.+\.a)$/\1 -lnuma/' Makefile || die
+}
+
+src_compile() {
+	emake \
+		$(usex x265 USE_X265=y '') \
+		$(usex bpgview USE_BPGVIEW=y '') \
+		$(usex jctvc USE_JCTVC=y '') \
+		$(usex emcc USE_EMCC=y '') \
+		CXX="$(tc-getCXX)" \
+		CC="$(tc-getCC)"
+}
+
+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
+}