diff options
author | agc <agc@pkgsrc.org> | 2014-12-12 22:05:04 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2014-12-12 22:05:04 +0000 |
commit | fd9c19e8a27cb9910efb99281f9865ca57bb48c3 (patch) | |
tree | 2045bb73512a1ce2663f1b2b06cb91f6f1ff56d4 | |
parent | a4be0ea1dfba701eb19b08ddc094b8d8289dd597 (diff) | |
download | pkgsrc-fd9c19e8a27cb9910efb99281f9865ca57bb48c3.tar.gz |
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.
-rw-r--r-- | graphics/libbpg/DESCR | 23 | ||||
-rw-r--r-- | graphics/libbpg/Makefile | 28 | ||||
-rw-r--r-- | graphics/libbpg/PLIST | 3 | ||||
-rw-r--r-- | graphics/libbpg/distinfo | 8 | ||||
-rw-r--r-- | graphics/libbpg/patches/patch-Makefile | 24 | ||||
-rw-r--r-- | graphics/libbpg/patches/patch-bpgenc.c | 15 | ||||
-rw-r--r-- | graphics/libbpg/patches/patch-config.h | 17 |
7 files changed, 118 insertions, 0 deletions
diff --git a/graphics/libbpg/DESCR b/graphics/libbpg/DESCR new file mode 100644 index 00000000000..54d4cd92255 --- /dev/null +++ b/graphics/libbpg/DESCR @@ -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 --git a/graphics/libbpg/Makefile b/graphics/libbpg/Makefile new file mode 100644 index 00000000000..36699b00abb --- /dev/null +++ b/graphics/libbpg/Makefile @@ -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 +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 --git a/graphics/libbpg/PLIST b/graphics/libbpg/PLIST new file mode 100644 index 00000000000..ec14bf36d67 --- /dev/null +++ b/graphics/libbpg/PLIST @@ -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 --git a/graphics/libbpg/distinfo b/graphics/libbpg/distinfo new file mode 100644 index 00000000000..f4bef083fe7 --- /dev/null +++ b/graphics/libbpg/distinfo @@ -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 --git a/graphics/libbpg/patches/patch-Makefile b/graphics/libbpg/patches/patch-Makefile new file mode 100644 index 00000000000..1cdb2412c19 --- /dev/null +++ b/graphics/libbpg/patches/patch-Makefile @@ -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 --git a/graphics/libbpg/patches/patch-bpgenc.c b/graphics/libbpg/patches/patch-bpgenc.c new file mode 100644 index 00000000000..2ecf6521a8e --- /dev/null +++ b/graphics/libbpg/patches/patch-bpgenc.c @@ -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 --git a/graphics/libbpg/patches/patch-config.h b/graphics/libbpg/patches/patch-config.h new file mode 100644 index 00000000000..1802434eac9 --- /dev/null +++ b/graphics/libbpg/patches/patch-config.h @@ -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 "" |