summaryrefslogtreecommitdiff
path: root/media-libs/jbigkit
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/jbigkit
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/jbigkit')
-rw-r--r--media-libs/jbigkit/Manifest1
-rw-r--r--media-libs/jbigkit/files/jbigkit-2.1-build.patch239
-rw-r--r--media-libs/jbigkit/jbigkit-2.1.ebuild50
-rw-r--r--media-libs/jbigkit/metadata.xml10
4 files changed, 300 insertions, 0 deletions
diff --git a/media-libs/jbigkit/Manifest b/media-libs/jbigkit/Manifest
new file mode 100644
index 00000000000..2c997004a66
--- /dev/null
+++ b/media-libs/jbigkit/Manifest
@@ -0,0 +1 @@
+DIST jbigkit-2.1.tar.gz 438710 SHA256 de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932 SHA512 c4127480470ef90db1ef3bd2caa444df10b50ed8df0bc9997db7612cb48b49278baf44965028f1807a21028eb965d677e015466306b44683c4ec75a23e1922cf WHIRLPOOL fa904bf84d8854a8d0ced7214ce1c3c74de7441b6c612643509bd844e599685ab9380cdef3fc8d6d77b8810194d3c1c70165e4cc69ee7e177a5345d6f0cf7fcd
diff --git a/media-libs/jbigkit/files/jbigkit-2.1-build.patch b/media-libs/jbigkit/files/jbigkit-2.1-build.patch
new file mode 100644
index 00000000000..4d0ebd38134
--- /dev/null
+++ b/media-libs/jbigkit/files/jbigkit-2.1-build.patch
@@ -0,0 +1,239 @@
+This patch has been mailed to upstream. No reply at this time. Status unknown.
+
+--- libjbig/Makefile
++++ libjbig/Makefile
+@@ -1,28 +1,58 @@
+ # Unix makefile for the JBIG-KIT library
+
+ # Select an ANSI/ISO C compiler here, GNU gcc is recommended
+-CC = gcc
++AR ?= ar
++CC ?= gcc
++RANLIB ?= ranlib
+
+ # Options for the compiler: A high optimization level is suggested
+-CFLAGS = -g -O -W -Wall -ansi -pedantic # --coverage
++CFLAGS += -W -Wall -ansi -pedantic # --coverage
+
+-all: libjbig.a libjbig85.a tstcodec tstcodec85
++ifeq ($(shell uname),Darwin)
++ SONAME = dylib
++ LIBDIR ?= /usr/lib
++else
++ SONAME = so
++endif
++
++all: libjbig.$(SONAME) libjbig85.$(SONAME) tstcodec tstcodec85
++
++static: libjbig.a libjbig85.a
+
+ tstcodec: tstcodec.o jbig.o jbig_ar.o
+- $(CC) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o
++ $(CC) $(LDFLAGS) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o
+
+ tstcodec85: tstcodec85.o jbig85.o jbig_ar.o
+- $(CC) $(CFLAGS) -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o
++ $(CC) $(LDFLAGS) $(CFLAGS) -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o
+
+ libjbig.a: jbig.o jbig_ar.o
+ rm -f libjbig.a
+- ar rc libjbig.a jbig.o jbig_ar.o
+- -ranlib libjbig.a
++ $(AR) rc libjbig.a jbig.o jbig_ar.o
++ -$(RANLIB) libjbig.a
++
++SOBJS = jbig.lo jbig_ar.lo
++
++libjbig.so: $(SOBJS)
++ $(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ -Wl,-soname -Wl,$@ $(SOBJS)
++
++libjbig.dylib: $(SOBJS)
++ $(CC) $(CFLAGS) -dynamic $(LDFLAGS) -o $@ -dynamiclib -install_name $(LIBDIR)/$@ $(SOBJS)
++
++SOBJS85 = jbig85.lo jbig_ar.lo
++
++libjbig85.so: $(SOBJS85)
++ $(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ -Wl,-soname -Wl,$@ $(SOBJS85)
++
++libjbig85.dylib: $(SOBJS85)
++ $(CC) $(CFLAGS) -dynamic $(LDFLAGS) -o $@ -dynamiclib -install_name $(LIBDIR)/$@ $(SOBJS85)
++
++%.lo: %.c jbig.h jbig85.h jbig_ar.h
++ $(CC) $(CFLAGS) -fPIC -c $< -o $@
+
+ libjbig85.a: jbig85.o jbig_ar.o
+ rm -f libjbig85.a
+- ar rc libjbig85.a jbig85.o jbig_ar.o
+- -ranlib libjbig85.a
++ $(AR) rc libjbig85.a jbig85.o jbig_ar.o
++ -$(RANLIB) libjbig85.a
+
+ jbig.o: jbig.c jbig.h jbig_ar.h
+ jbig85.o: jbig85.c jbig85.h jbig_ar.h
+--- Makefile
++++ Makefile
+@@ -1,10 +1,10 @@
+ # Unix makefile for JBIG-KIT
+
+ # Select an ANSI/ISO C compiler here, GNU gcc is recommended
+-CC = gcc
++CC ?= gcc
+
+ # Options for the compiler: A high optimization level is suggested
+-CFLAGS = -O2 -W -Wno-unused-result
++CFLAGS += -W
+ # CFLAGS = -O -g -W -Wall -Wno-unused-result -ansi -pedantic # -DDEBUG
+
+ export CC CFLAGS
+@@ -36,7 +36,7 @@
+ distribution:
+ rm -rf jbigkit-$(VERSION)
+ git archive v$(VERSION) --prefix jbigkit-$(VERSION)/ | tar xvf -
+- make -C jbigkit-$(VERSION)/pbmtools txt
++ $(MAKE) -C jbigkit-$(VERSION)/pbmtools txt
+ tar cvaf jbigkit-$(VERSION).tar.gz jbigkit-$(VERSION)
+
+ release:
+--- pbmtools/Makefile
++++ pbmtools/Makefile
+@@ -1,11 +1,11 @@
+ # Unix makefile for the JBIG-KIT PBM tools
+
+ # Select an ANSI/ISO C compiler here, e.g. GNU gcc is recommended
+-CC = gcc
++CC ?= gcc
+
+ # Options for the compiler
+-CFLAGS = -g -O -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
+-CPPFLAGS = -I../libjbig
++CFLAGS += -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
++CPPFLAGS += -I../libjbig
+
+ .SUFFIXES: .1 .5 .txt $(SUFFIXES)
+ .PHONY: txt test test82 test85 clean
+@@ -15,16 +15,16 @@
+ txt: pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt
+
+ pbmtojbg: pbmtojbg.o ../libjbig/libjbig.a
+- $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
++ $(CC) $(LDFLAGS) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
+
+ jbgtopbm: jbgtopbm.o ../libjbig/libjbig.a
+- $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
++ $(CC) $(LDFLAGS) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
+
+ pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.a
+- $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
++ $(CC) $(LDFLAGS) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
+
+ jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.a
+- $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
++ $(CC) $(LDFLAGS) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
+
+ jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h
+ pbmtojbg.o: pbmtojbg.c ../libjbig/jbig.h
+@@ -33,11 +33,11 @@
+
+ ../libjbig/libjbig.a: ../libjbig/jbig.c ../libjbig/jbig.h \
+ ../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
+- make -C ../libjbig libjbig.a
++ $(MAKE) -C ../libjbig libjbig.a
+
+ ../libjbig/libjbig85.a: ../libjbig/jbig85.c ../libjbig/jbig85.h \
+ ../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
+- make -C ../libjbig libjbig85.a
++ $(MAKE) -C ../libjbig libjbig85.a
+
+ analyze:
+ clang $(CPPFLAGS) --analyze *.c
+@@ -45,22 +45,22 @@
+ test: test82 test85
+
+ test82: pbmtojbg jbgtopbm
+- make IMG=ccitt1 OPTIONSP= dotest1
+- make IMG=ccitt2 OPTIONSP= dotest1
+- make IMG=ccitt3 OPTIONSP= dotest1
+- make IMG=xvlogo "OPTIONSP=-d 3" dotest1
+- make IMG=sandra OPTIONSP= OPTIONSJ= dotest2g
+- make IMG=sandra OPTIONSP=-b OPTIONSJ=-b dotest2g
+- make IMG=sandra OPTIONSP=-q OPTIONSJ= dotest2g
+- make IMG=sandra "OPTIONSP=-o 0" OPTIONSJ= dotest2g
+- make IMG=sandra "OPTIONSP=-o 2" OPTIONSJ= dotest2g
+- make IMG=multi OPTIONSP= OPTIONSJ= dotest2g
+- make IMG=multi OPTIONSP=-b OPTIONSJ=-b dotest2g
+- make IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest1
+- make IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest2b
+- make IMG=mx "OPTIONSP=-q -s 3 -m 128 -p 92" dotest2b
+- make IMG=mx "OPTIONSP=-q -Y -1" dotest2b
+- make IMG=mx "OPTIONSP=-Y -1" dotest2b
++ $(MAKE) IMG=ccitt1 OPTIONSP= dotest1
++ $(MAKE) IMG=ccitt2 OPTIONSP= dotest1
++ $(MAKE) IMG=ccitt3 OPTIONSP= dotest1
++ $(MAKE) IMG=xvlogo "OPTIONSP=-d 3" dotest1
++ $(MAKE) IMG=sandra OPTIONSP= OPTIONSJ= dotest2g
++ $(MAKE) IMG=sandra OPTIONSP=-b OPTIONSJ=-b dotest2g
++ $(MAKE) IMG=sandra OPTIONSP=-q OPTIONSJ= dotest2g
++ $(MAKE) IMG=sandra "OPTIONSP=-o 0" OPTIONSJ= dotest2g
++ $(MAKE) IMG=sandra "OPTIONSP=-o 2" OPTIONSJ= dotest2g
++ $(MAKE) IMG=multi OPTIONSP= OPTIONSJ= dotest2g
++ $(MAKE) IMG=multi OPTIONSP=-b OPTIONSJ=-b dotest2g
++ $(MAKE) IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest1
++ $(MAKE) IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest2b
++ $(MAKE) IMG=mx "OPTIONSP=-q -s 3 -m 128 -p 92" dotest2b
++ $(MAKE) IMG=mx "OPTIONSP=-q -Y -1" dotest2b
++ $(MAKE) IMG=mx "OPTIONSP=-Y -1" dotest2b
+ rm -f test-*.jbg test-*.pbm test-*.pgm
+ ./jbgtopbm ../examples/ccitt1.jbg | ./pbmtojbg > test-ccitt1.jbg
+ cmp ../examples/ccitt1.jbg test-ccitt1.jbg
+@@ -96,24 +96,24 @@
+ cmp test-$(IMG).pgm ../examples/$(IMG).pgm
+
+ test85: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 test-t82.pbm
+- make IMG=t82 "OPTIONSP=-p 0" dotest85
+- make IMG=t82 "OPTIONSP=-p 8" dotest85
+- make IMG=t82 "OPTIONSP=-p 8 -r" dotest85b
+- make IMG=t82 "OPTIONSP=-p 64" dotest85
+- make IMG=t82 "OPTIONSP=-p 72" dotest85
+- make IMG=t82 "OPTIONSP=-s 2 -C c" dotest85
+- make IMG=t82 "OPTIONSP=-s 99999" dotest85
+- make IMG=t82 "OPTIONSP=-Y 9999 0" dotest85
+- make IMG=t82 "OPTIONSP=-Y 1951 0" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 127" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 128" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1919" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1920" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1949" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1950" dotest85
+- make IMG=ccitt1 dotest85
+- make IMG=ccitt2 dotest85
+- make IMG=ccitt3 dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 0" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 8" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 8 -r" dotest85b
++ $(MAKE) IMG=t82 "OPTIONSP=-p 64" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 72" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-s 2 -C c" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-s 99999" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y 9999 0" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y 1951 0" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 127" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 128" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1919" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1920" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1949" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1950" dotest85
++ $(MAKE) IMG=ccitt1 dotest85
++ $(MAKE) IMG=ccitt2 dotest85
++ $(MAKE) IMG=ccitt3 dotest85
+ rm -f test-*.jbg test-*.jbg85 test-*.pbm
+ @echo
+ @echo "The T.85 pbmtools have PASSED the functional tests. Good!"
+@@ -147,7 +147,7 @@
+ ./jbgtopbm $< $@
+
+ test-t82.pbm:
+- make -C ../libjbig tstcodec
++ $(MAKE) -C ../libjbig tstcodec
+ ../libjbig/tstcodec $@
+
+ FOPT=-c 1000 -p 300000 -m 3
diff --git a/media-libs/jbigkit/jbigkit-2.1.ebuild b/media-libs/jbigkit/jbigkit-2.1.ebuild
new file mode 100644
index 00000000000..db72bc36c39
--- /dev/null
+++ b/media-libs/jbigkit/jbigkit-2.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="data compression algorithm for bi-level high-resolution images"
+HOMEPAGE="http://www.cl.cam.ac.uk/~mgk25/jbigkit/"
+SRC_URI="http://www.cl.cam.ac.uk/~mgk25/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/2.1" # Since we install libjbig.so and libjbig85.so without version, use ${PV} like 2.1
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+DOCS="ANNOUNCE CHANGES TODO libjbig/*.txt pbmtools/*.txt"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+ multilib_copy_sources
+ tc-export AR CC RANLIB
+}
+
+multilib_src_compile() {
+ emake \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ $(multilib_is_native_abi || echo lib)
+
+ if use static-libs; then
+ cd libjbig && emake static
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH=${BUILD_DIR}/libjbig emake -j1 test
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ dobin pbmtools/jbgtopbm{,85} pbmtools/pbmtojbg{,85}
+ doman pbmtools/jbgtopbm.1 pbmtools/pbmtojbg.1
+ fi
+
+ insinto /usr/include
+ doins libjbig/*.h
+ dolib libjbig/libjbig{,85}$(get_libname)
+ use static-libs && dolib libjbig/libjbig{,85}.a
+}
diff --git a/media-libs/jbigkit/metadata.xml b/media-libs/jbigkit/metadata.xml
new file mode 100644
index 00000000000..58327d37fac
--- /dev/null
+++ b/media-libs/jbigkit/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription lang="en">Provides a library implementing a
+ highly effective data compression algorithm for bi-level
+ high-resolution images such as fax pages or scanned documents.
+ </longdescription>
+</pkgmetadata>
+