pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/libbpg add libbpg-0.9.2, an image formatting ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4ab36610e86d
branches:  trunk
changeset: 643227:4ab36610e86d
user:      agc <agc%pkgsrc.org@localhost>
date:      Fri Dec 12 22:05:04 2014 +0000

description:
add libbpg-0.9.2, an image formatting library designed to replace JPEG
when quality or file size is an issue, to the packages collection.

        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.  Its main advantages are:

        + High compression ratio.  Files are much smaller than JPEG for
        similar quality.

        + Supported by most Web browsers with a small Javascript decoder
        (gzipped size:  71 KB).

        + Based on a subset of the HEVC open video compression standard.

        + Supports the same chroma formats as JPEG (grayscale, YCbCr 4:2:0,
        4:2:2, 4:4:4) to reduce the losses during the conversion.  An alpha
        channel is supported.  The RGB, YCgCo and CMYK color spaces are also
        supported.

        + Native support of 8 to 14 bits per channel for a higher dynamic
        range.

        + Lossless compression is supported.

        + Various metadata (such as EXIF, ICC profile, XMP) can be included.

diffstat:

 graphics/libbpg/DESCR                  |  23 +++++++++++++++++++++++
 graphics/libbpg/Makefile               |  28 ++++++++++++++++++++++++++++
 graphics/libbpg/PLIST                  |   3 +++
 graphics/libbpg/distinfo               |   8 ++++++++
 graphics/libbpg/patches/patch-Makefile |  24 ++++++++++++++++++++++++
 graphics/libbpg/patches/patch-bpgenc.c |  15 +++++++++++++++
 graphics/libbpg/patches/patch-config.h |  17 +++++++++++++++++
 7 files changed, 118 insertions(+), 0 deletions(-)

diffs (146 lines):

diff -r 38fb91dc0e3f -r 4ab36610e86d graphics/libbpg/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libbpg/DESCR     Fri Dec 12 22:05:04 2014 +0000
@@ -0,0 +1,23 @@
+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.  Its main advantages are:
+
++ High compression ratio.  Files are much smaller than JPEG for
+similar quality.
+
++ Supported by most Web browsers with a small Javascript decoder
+(gzipped size:  71 KB).
+
++ Based on a subset of the HEVC open video compression standard.
+
++ Supports the same chroma formats as JPEG (grayscale, YCbCr 4:2:0,
+4:2:2, 4:4:4) to reduce the losses during the conversion.  An alpha
+channel is supported.  The RGB, YCgCo and CMYK color spaces are also
+supported.
+
++ Native support of 8 to 14 bits per channel for a higher dynamic
+range.
+
++ Lossless compression is supported.
+
++ Various metadata (such as EXIF, ICC profile, XMP) can be included.
diff -r 38fb91dc0e3f -r 4ab36610e86d graphics/libbpg/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libbpg/Makefile  Fri Dec 12 22:05:04 2014 +0000
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1.1.1 2014/12/12 22:05:04 agc Exp $
+
+DISTNAME=      libbpg-0.9.2
+CATEGORIES=    graphics
+MASTER_SITES=  http://bellard.org/bpg/
+
+MAINTAINER=    agc%NetBSD.org@localhost
+HOMEPAGE=      http://bellard.org/bpg/
+COMMENT=       Better Portable Graphics image format library
+LICENSE=       modified-bsd
+
+USE_TOOLS+=    gmake
+USE_LANGUAGES+=        c c++
+
+AUTO_MKDIRS=   yes
+
+SUBST_CLASSES+= config
+SUBST_MESSAGE.config= config.h file substitutions
+SUBST_STAGE.config= pre-configure
+SUBST_FILES.config= config.h
+SUBST_SED.config=      -e "s,@PREFIX@,${PREFIX},g"
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 38fb91dc0e3f -r 4ab36610e86d graphics/libbpg/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libbpg/PLIST     Fri Dec 12 22:05:04 2014 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2014/12/12 22:05:04 agc Exp $
+bin/bpgenc
+bin/bpgdec
diff -r 38fb91dc0e3f -r 4ab36610e86d graphics/libbpg/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libbpg/distinfo  Fri Dec 12 22:05:04 2014 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2014/12/12 22:05:04 agc Exp $
+
+SHA1 (libbpg-0.9.2.tar.gz) = bec3a62198e23319b247d0efccb95ad4bf56bea5
+RMD160 (libbpg-0.9.2.tar.gz) = e3b7fea0e7d19bc4cfa6c6a883d8419328ee1a06
+Size (libbpg-0.9.2.tar.gz) = 962136 bytes
+SHA1 (patch-Makefile) = b9826b99237f3b5befe7826081905e1f7e78994c
+SHA1 (patch-bpgenc.c) = 2f920aeb7b1566fb1a12bd755bf7bc17ca4f51f8
+SHA1 (patch-config.h) = fdd3f6ec22e0347512e8553f68e4339ace575ff3
diff -r 38fb91dc0e3f -r 4ab36610e86d graphics/libbpg/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libbpg/patches/patch-Makefile    Fri Dec 12 22:05:04 2014 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-Makefile,v 1.1.1.1 2014/12/12 22:05:04 agc Exp $
+
+install into the right place
+
+--- Makefile   2014/12/12 21:39:59     1.1
++++ Makefile   2014/12/12 21:40:53
+@@ -15,7 +15,7 @@
+ # Enable for compilation on MacOS X
+ #CONFIG_APPLE=y
+ # Installation prefix
+-prefix=/usr/local
++prefix=${DESTDIR}${PREFIX}
+ 
+ 
+ #################################
+@@ -133,7 +133,7 @@
+ LIBS+=-lm -lpthread
+ endif # !CONFIG_WIN32
+ 
+-BPGENC_LIBS+=-lpng -ljpeg $(LIBS)
++BPGENC_LIBS+=-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib -lpng -ljpeg $(LIBS)
+ 
+ bpgenc.o: CFLAGS+=-Wno-unused-but-set-variable
+ 
diff -r 38fb91dc0e3f -r 4ab36610e86d graphics/libbpg/patches/patch-bpgenc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libbpg/patches/patch-bpgenc.c    Fri Dec 12 22:05:04 2014 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-bpgenc.c,v 1.1.1.1 2014/12/12 22:05:04 agc Exp $
+
+Just use getopt_long(3) for now
+
+--- bpgenc.c   2014/12/12 21:34:04     1.1
++++ bpgenc.c   2014/12/12 21:34:20
+@@ -1862,7 +1862,7 @@
+     encoder_type = 0;
+ 
+     for(;;) {
+-        c = getopt_long_only(argc, argv, "q:o:hf:c:vm:b:e:", long_opts, &option_index);
++        c = getopt_long(argc, argv, "q:o:hf:c:vm:b:e:", long_opts, &option_index);
+         if (c == -1)
+             break;
+         switch(c) {
diff -r 38fb91dc0e3f -r 4ab36610e86d graphics/libbpg/patches/patch-config.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libbpg/patches/patch-config.h    Fri Dec 12 22:05:04 2014 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-config.h,v 1.1.1.1 2014/12/12 22:05:04 agc Exp $
+
+point to the right directory
+
+--- config.h   2014/12/12 21:39:48     1.1
++++ config.h   2014/12/12 21:42:20
+@@ -4,8 +4,8 @@
+ #define FFMPEG_CONFIGURATION "--disable-asm --enable-small --disable-pthreads --disable-everything --enable-decoder=hevc --enable-demuxer=hevc --enable-protocol=file --disable-ffserver 
--disable-ffprobe --disable-doc --enable-parser=hevc"
+ #define FFMPEG_LICENSE "LGPL version 2.1 or later"
+ #define CONFIG_THIS_YEAR 2014
+-#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
+-#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
++#define FFMPEG_DATADIR "@PREFIX@/share/ffmpeg"
++#define AVCONV_DATADIR "@PREFIX@/share/ffmpeg"
+ #define CC_IDENT "gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2)"
+ #define av_restrict restrict
+ #define EXTERN_PREFIX ""



Home | Main Index | Thread Index | Old Index