public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/libbpg/files/, media-libs/libbpg/
@ 2021-03-15 18:40 Michele Santullo
  0 siblings, 0 replies; 4+ messages in thread
From: Michele Santullo @ 2021-03-15 18:40 UTC (permalink / raw
  To: gentoo-commits

commit:     0b9dc090db00b9811b42bac865e7c8b30fd757cd
Author:     Michele Santullo <m.santullo <AT> posteo <DOT> net>
AuthorDate: Mon Mar 15 18:40:06 2021 +0000
Commit:     Michele Santullo <m.santullo <AT> posteo <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>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/libbpg/files/, media-libs/libbpg/
@ 2021-03-15 20:14 Michele Santullo
  0 siblings, 0 replies; 4+ messages in thread
From: Michele Santullo @ 2021-03-15 20:14 UTC (permalink / raw
  To: gentoo-commits

commit:     b55c5a7e8f100a6d7a095753525a0e3bb6f122b2
Author:     Michele Santullo <m.santullo <AT> posteo <DOT> net>
AuthorDate: Mon Mar 15 20:13:56 2021 +0000
Commit:     Michele Santullo <m.santullo <AT> posteo <DOT> net>
CommitDate: Mon Mar 15 20:13:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b55c5a7e

media-libs/libbpg: add fPIC or lib doesn't link to other libs

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/files/libbpg-0.9.8-add-fpic.patch | 13 +++++++++++++
 media-libs/libbpg/libbpg-0.9.8.ebuild               |  1 +
 2 files changed, 14 insertions(+)

diff --git a/media-libs/libbpg/files/libbpg-0.9.8-add-fpic.patch b/media-libs/libbpg/files/libbpg-0.9.8-add-fpic.patch
new file mode 100644
index 00000000..2cc64766
--- /dev/null
+++ b/media-libs/libbpg/files/libbpg-0.9.8-add-fpic.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 3a8db4c..eaccfd8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -86,7 +86,7 @@ LIBBPG_JS8_OBJS:=$(patsubst %.o, %.js8.o, $(LIBBPG_OBJS)) tmalloc.js8.o
+ 
+ LIBBPG_JS8A_OBJS:=$(patsubst %.o, %.js8a.o, $(LIBBPG_OBJS)) tmalloc.js8a.o
+ 
+-$(LIBBPG_OBJS): CFLAGS+=-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH -DUSE_PRED
++$(LIBBPG_OBJS): CFLAGS+=-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH -DUSE_PRED -fPIC
+ 
+ $(LIBBPG_JS_OBJS): EMCFLAGS+=-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH
+ 

diff --git a/media-libs/libbpg/libbpg-0.9.8.ebuild b/media-libs/libbpg/libbpg-0.9.8.ebuild
index e55afb24..6092cdf7 100644
--- a/media-libs/libbpg/libbpg-0.9.8.ebuild
+++ b/media-libs/libbpg/libbpg-0.9.8.ebuild
@@ -16,6 +16,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-remove-forced-options.patch
 	"${FILESDIR}"/${P}-dont-strip-bins.patch
 	"${FILESDIR}"/${P}-add-chost.patch
+	"${FILESDIR}"/${P}-add-fpic.patch
 )
 
 DEPEND=""


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/libbpg/files/, media-libs/libbpg/
@ 2023-09-17 22:40 Lucio Sauer
  0 siblings, 0 replies; 4+ messages in thread
From: Lucio Sauer @ 2023-09-17 22:40 UTC (permalink / raw
  To: gentoo-commits

commit:     772108d69dcde0ad8cf8590fb1f3e359fe349574
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Sun Sep 17 21:50:46 2023 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Sun Sep 17 22:39:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=772108d6

media-libs/libbpg: Honor AR, CC and CXX from the user environment

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

 .../libbpg/files/libbpg-0.9.8-add-chost.patch      | 13 ------------
 .../libbpg-0.9.8-respect-compiler-driver.patch     | 23 ++++++++++++++++++++++
 media-libs/libbpg/libbpg-0.9.8-r1.ebuild           |  7 +++----
 3 files changed, 26 insertions(+), 17 deletions(-)

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
deleted file mode 100644
index 9b5054de1a..0000000000
--- a/media-libs/libbpg/files/libbpg-0.9.8-add-chost.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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-respect-compiler-driver.patch b/media-libs/libbpg/files/libbpg-0.9.8-respect-compiler-driver.patch
new file mode 100644
index 0000000000..c253dadd5f
--- /dev/null
+++ b/media-libs/libbpg/files/libbpg-0.9.8-respect-compiler-driver.patch
@@ -0,0 +1,23 @@
+Honor AR, CC and CXX from the user enviroment instead of relying on
+${CHOST}-driver though it may be correct most of the time.
+Author: Lucio Sauer <watermanpaint@posteo.net>
+--- a/Makefile
++++ b/Makefile
+@@ -27,13 +27,13 @@ CROSS_PREFIX:=x86_64-w64-mingw32-
+ #CROSS_PREFIX=i686-w64-mingw32-
+ EXE:=.exe
+ else
+-CROSS_PREFIX:=
++CROSS_PREFIX:=${CHOST}-
+ EXE:=
+ endif
+ 
+-CC=$(CROSS_PREFIX)gcc
+-CXX=$(CROSS_PREFIX)g++
+-AR=$(CROSS_PREFIX)ar
++CC ?= $(CROSS_PREFIX)gcc
++CXX ?= $(CROSS_PREFIX)g++
++AR ?= $(CROSS_PREFIX)ar
+ EMCC=emcc
+ 
+ PWD:=$(shell pwd)

diff --git a/media-libs/libbpg/libbpg-0.9.8-r1.ebuild b/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
index 484760e6fe..83f70801da 100644
--- a/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
+++ b/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
@@ -34,12 +34,12 @@ KEYWORDS="~amd64 ~x86"
 IUSE="bpgview jctvc"
 
 PATCHES=(
-	"${FILESDIR}"/${P}-add-chost.patch
 	"${FILESDIR}"/${P}-add-fpic.patch
 	"${FILESDIR}"/${P}-backport-GNU-stack-note-fix.patch
 	"${FILESDIR}"/${P}-dont-strip-bins.patch
 	"${FILESDIR}"/${P}-remove-forced-options.patch
 	"${FILESDIR}"/${P}-remove-unused-cmake-var.patch
+	"${FILESDIR}"/${P}-respect-compiler-driver.patch
 	"${FILESDIR}"/${P}-respect-user-flags.patch
 )
 
@@ -81,12 +81,11 @@ EOF
 }
 
 src_compile() {
+	tc-export AR CC CXX
 	emake \
 		USE_X265=y \
 		$(usex bpgview USE_BPGVIEW=y '') \
-		$(usex jctvc USE_JCTVC=y '') \
-		CXX="$(tc-getCXX)" \
-		CC="$(tc-getCC)"
+		$(usex jctvc USE_JCTVC=y '')
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/libbpg/files/, media-libs/libbpg/
@ 2023-09-17 22:40 Lucio Sauer
  0 siblings, 0 replies; 4+ messages in thread
From: Lucio Sauer @ 2023-09-17 22:40 UTC (permalink / raw
  To: gentoo-commits

commit:     8b8998ecfc2cae88b2cb68e4d2efd2f8b4850bb3
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Sun Sep 17 22:00:40 2023 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Sun Sep 17 22:39:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8b8998ec

media-libs/libbpg: fix implicit declaration of string function

The patch has not yet upstreamed.

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

 .../files/libbpg-0.9.8-fix-implicit-declaration.patch       | 13 +++++++++++++
 media-libs/libbpg/libbpg-0.9.8-r1.ebuild                    |  1 +
 2 files changed, 14 insertions(+)

diff --git a/media-libs/libbpg/files/libbpg-0.9.8-fix-implicit-declaration.patch b/media-libs/libbpg/files/libbpg-0.9.8-fix-implicit-declaration.patch
new file mode 100644
index 0000000000..899c926c21
--- /dev/null
+++ b/media-libs/libbpg/files/libbpg-0.9.8-fix-implicit-declaration.patch
@@ -0,0 +1,13 @@
+The strrchr function prototype may have been provided transitively in the past.
+Not yet upstreamed as of 2023-09-17.
+Author: Lucio Sauer <watermanpaint@posteo.net>
+--- a/bpgdec.c
++++ b/bpgdec.c
+@@ -33,6 +33,7 @@
+ 
+ #ifdef USE_PNG
+ #include <png.h>
++#include <string.h>
+ #endif
+ 
+ #include "libbpg.h"

diff --git a/media-libs/libbpg/libbpg-0.9.8-r1.ebuild b/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
index 83f70801da..5e4b64708b 100644
--- a/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
+++ b/media-libs/libbpg/libbpg-0.9.8-r1.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-add-fpic.patch
 	"${FILESDIR}"/${P}-backport-GNU-stack-note-fix.patch
 	"${FILESDIR}"/${P}-dont-strip-bins.patch
+	"${FILESDIR}"/${P}-fix-implicit-declaration.patch
 	"${FILESDIR}"/${P}-remove-forced-options.patch
 	"${FILESDIR}"/${P}-remove-unused-cmake-var.patch
 	"${FILESDIR}"/${P}-respect-compiler-driver.patch


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-17 22:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-15 18:40 [gentoo-commits] repo/proj/guru:dev commit in: media-libs/libbpg/files/, media-libs/libbpg/ Michele Santullo
  -- strict thread matches above, loose matches on Subject: below --
2021-03-15 20:14 Michele Santullo
2023-09-17 22:40 Lucio Sauer
2023-09-17 22:40 Lucio Sauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox