mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 13:33:32 -04:00
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@posteo.net>
This commit is contained in:
1
media-libs/libbpg/Manifest
Normal file
1
media-libs/libbpg/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST libbpg-0.9.8.tar.gz 2029021 BLAKE2B 827d819d6e392a1a0186a58b16b9b69c41f4a0c94046ff2a1aab0e735e01aae8c10d06ad03c1bf9f0722a7620f50ae7da25bddda681e457ad4cdeec8cb922edc SHA512 2d5f7a035033d8b969c2765a4f1368e1a2c8c5ace12aec5d449ca5cc4ef5eb89431a75f2d6d03fd7117b548801b5554503411f499f497da69ff33ca6e714553d
|
||||
13
media-libs/libbpg/files/libbpg-0.9.8-add-chost.patch
Normal file
13
media-libs/libbpg/files/libbpg-0.9.8-add-chost.patch
Normal file
@@ -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
|
||||
|
||||
13
media-libs/libbpg/files/libbpg-0.9.8-dont-strip-bins.patch
Normal file
13
media-libs/libbpg/files/libbpg-0.9.8-dont-strip-bins.patch
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
#################################
|
||||
72
media-libs/libbpg/libbpg-0.9.8.ebuild
Normal file
72
media-libs/libbpg/libbpg-0.9.8.ebuild
Normal file
@@ -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
|
||||
}
|
||||
18
media-libs/libbpg/metadata.xml
Normal file
18
media-libs/libbpg/metadata.xml
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user