# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= jbigkit VERSION= 2.1 REVISION= 1 KEYWORDS= graphics VARIANTS= standard SDESC[standard]= Lossless compression for bi-level images HOMEPAGE= http://www.cl.cam.ac.uk/~mgk25/jbigkit/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= http://www.cl.cam.ac.uk/~mgk25/download/ DISTFILE[1]= jbigkit-2.1.tar.gz:main DF_INDEX= 1 SPKGS[standard]= complete primary tools dev man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none EXRUN[tools]= primary LICENSE= GPLv2+:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv2+:{{WRKSRC}}/COPYING LICENSE_AWK= TERMS:"^$$" LICENSE_SOURCE= TERMS:{{WRKSRC}}/libjbig/jbig.c LICENSE_SCHEME= solo FPC_EQUIVALENT= graphics/jbigkit [FILE:1297:descriptions/desc.primary] JBIG-KIT implements a highly effective data compression algorithm for bi-level high-resolution images such as fax pages or scanned documents. This is a portable library of compression and decompression functions with a documented interface that can be included into your image or document processing software. Also provided are ready-to-use compression and decompression programs with a simple command line interface (similar to the converters found in Jef Poskanzer's PBM conversion package). JBIG-KIT implements the specification International Standard ISO/IEC 11544:1993 and ITU-T Recommendation T.82(1993), "Information technology - Coded representation of picture and audio information - progressive bi-level image compression", , which is commonly referred to as the "JBIG standard". JBIG (Joint Bi-level Image experts Group) is the committee which developed this international standard for the lossless compression of images using arithmetic coding. Like the well-known compression algorithms JPEG and MPEG, also JBIG has been developed and published by the International Organization for Standardization (ISO) and the International Telecommunication Union (ITU) (see also and ). [FILE:41:descriptions/desc.tools] This package contains the jbigkit tools. [FILE:97:distinfo] de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932 438710 jbigkit-2.1.tar.gz [FILE:35:manifests/plist.primary] lib/ libjbig.so.2 libjbig85.so.1 [FILE:49:manifests/plist.tools] bin/ jbgtopbm jbgtopbm85 pbmtojbg pbmtojbg85 [FILE:93:manifests/plist.dev] include/ jbig.h jbig85.h jbig_ar.h lib/ libjbig.a libjbig.so libjbig85.a libjbig85.so [FILE:46:manifests/plist.man] share/man/man1/ jbgtopbm.1.gz pbmtojbg.1.gz [FILE:842:patches/patch-Makefile] --- Makefile.orig 2014-03-27 18:47:15 UTC +++ Makefile @@ -1,24 +1,27 @@ # Unix makefile for JBIG-KIT -# Select an ANSI/ISO C compiler here, GNU gcc is recommended -CC = gcc - # Options for the compiler: A high optimization level is suggested -CFLAGS = -O2 -W -Wno-unused-result +CFLAGS += -W # -Wno-unused-result -- older compilers don't have this # CFLAGS = -O -g -W -Wall -Wno-unused-result -ansi -pedantic # -DDEBUG -export CC CFLAGS - VERSION=2.1 all: lib pbm @echo "Enter 'make test' in order to start some automatic tests." +install: install-pbm install-lib + lib: - cd libjbig && $(MAKE) -e + cd libjbig && $(MAKE) pbm: lib - cd pbmtools && $(MAKE) -e + cd pbmtools && $(MAKE) + +install-lib: + $(MAKE) -C libjbig install + +install-pbm: + $(MAKE) -C pbmtools install test: lib pbm cd libjbig && $(MAKE) test [FILE:2520:patches/patch-libjbig_Makefile] --- libjbig/Makefile.orig 2014-03-27 18:47:15 UTC +++ libjbig/Makefile @@ -1,12 +1,21 @@ # Unix makefile for the JBIG-KIT library -# Select an ANSI/ISO C compiler here, GNU gcc is recommended -CC = gcc - # 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 +.if "${OPSYS}" == "Darwin" +more_targets= libjbig.dylib libjbig85.dylib +more_install= libjbig.2.dylib libjbig85.1.dylib +.else +more_targets= libjbig.so libjbig85.so +more_install= libjbig.so.2 libjbig85.so.1 +.endif + +all: libjbig.a libjbig85.a tstcodec tstcodec85 ${more_targets} + +.SUFFIXES: .c .So +.c.So: + $(CC) -c -fpic -DPIC ${CFLAGS} ${.IMPSRC} -o ${.TARGET} tstcodec: tstcodec.o jbig.o jbig_ar.o $(CC) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o @@ -19,17 +28,52 @@ libjbig.a: jbig.o jbig_ar.o ar rc libjbig.a jbig.o jbig_ar.o -ranlib libjbig.a +libjbig.so.2: jbig.So jbig_ar.So + rm -f ${.TARGET} + $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC} + +libjbig.so: libjbig.so.2 + ln -sf ${.ALLSRC} ${.TARGET} + +libjbig.2.dylib: jbig.So jbig_ar.So + rm -f ${.TARGET} + $(CC) -o ${.TARGET} ${LDFLAGS} -dynamiclib -install_name ${PREFIX}/lib/${.TARGET} ${.ALLSRC} + +libjbig.dylib: libjbig.2.dylib + ln -sf ${.ALLSRC} ${.TARGET} + libjbig85.a: jbig85.o jbig_ar.o rm -f libjbig85.a ar rc libjbig85.a jbig85.o jbig_ar.o -ranlib libjbig85.a +libjbig85.so.1: jbig85.So jbig_ar.So + rm -f ${.TARGET} + $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC} + +libjbig85.so: libjbig85.so.1 + ln -sf ${.ALLSRC} ${.TARGET} + +libjbig85.1.dylib: jbig85.So jbig_ar.So + rm -f ${.TARGET} + $(CC) -o ${.TARGET} ${LDFLAGS} -dynamiclib -install_name ${PREFIX}/lib/${.TARGET} ${.ALLSRC} + +libjbig85.dylib: libjbig85.1.dylib + ln -sf ${.ALLSRC} ${.TARGET} + jbig.o: jbig.c jbig.h jbig_ar.h jbig85.o: jbig85.c jbig85.h jbig_ar.h jbig_ar.o: jbig_ar.c jbig_ar.h tstcodec.o: tstcodec.c jbig.h tstcodec85.o: tstcodec85.c jbig85.h +install: + ${BSD_INSTALL_DATA} *.h ${DESTDIR}${PREFIX}/include/ + ${BSD_INSTALL_DATA} libjbig.a ${DESTDIR}${PREFIX}/lib + ${BSD_INSTALL_DATA} libjbig85.a ${DESTDIR}${PREFIX}/lib + cp -pRP ${more_targets} ${DESTDIR}${PREFIX}/lib + ${BSD_INSTALL_LIB} ${more_install} ${DESTDIR}${PREFIX}/lib + update-po: jbig.c jbig85.c Makefile xgettext -ojbig.pot -k_ \ --copyright-holder='Markus Kuhn' \ [FILE:2265:patches/patch-pbmtools_Makefile] --- pbmtools/Makefile.orig 2014-03-27 18:47:15 UTC +++ pbmtools/Makefile @@ -1,30 +1,27 @@ # Unix makefile for the JBIG-KIT PBM tools -# Select an ANSI/ISO C compiler here, e.g. GNU gcc is recommended -CC = gcc - # Options for the compiler -CFLAGS = -g -O -W -Wall -Wno-unused-result -ansi -pedantic # --coverage -CPPFLAGS = -I../libjbig +CFLAGS += -W -Wall -ansi -pedantic # --coverage -Wno-unused-result +CFLAGS += -I../libjbig .SUFFIXES: .1 .5 .txt $(SUFFIXES) .PHONY: txt test test82 test85 clean -all: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 txt +all: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 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) $(CFLAGS) $(LDFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig jbgtopbm: jbgtopbm.o ../libjbig/libjbig.a - $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig + $(CC) $(CFLAGS) $(LDFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.a - $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85 + $(CC) $(CFLAGS) $(LDFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85 jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.a - $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85 + $(CC) $(CFLAGS) $(LDFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85 jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h pbmtojbg.o: pbmtojbg.c ../libjbig/jbig.h @@ -39,6 +36,14 @@ pbmtojbg85.o: pbmtojbg85.c ../libjbig/jb ../libjbig/jbig_ar.c ../libjbig/jbig_ar.h make -C ../libjbig libjbig85.a +install: +.for item in jbgtopbm pbmtojbg jbgtopbm85 pbmtojbg85 + ${BSD_INSTALL_PROGRAM} ${item} ${DESTDIR}${PREFIX}/bin/ +.endfor +.for item in jbgtopbm.1 pbmtojbg.1 + ${BSD_INSTALL_MAN} ${item} ${DESTDIR}${MANPREFIX}/man/man1/ +.endfor + analyze: clang $(CPPFLAGS) --analyze *.c @@ -143,8 +148,10 @@ dotest85b: test-$(IMG).pbm ./jbgtopbm85 -B 1 test-$(IMG).jbg85 test-$(IMG).pbm85 cmp test-$(IMG).pbm test-$(IMG).pbm85 -test-%.pbm: ../examples/%.jbg - ./jbgtopbm $< $@ +.for i in 1 2 3 +test-ccitt$i.pbm: ../examples/ccitt$i.jbg + ./jbgtopbm ${.ALLSRC} ${.TARGET} +.endfor test-t82.pbm: make -C ../libjbig tstcodec [FILE:881:patches/patch-warnings] --- pbmtools/pbmtojbg85.c 2014-03-27 14:47:15.000000000 -0400 +++ pbmtools/pbmtojbg85.c 2014-04-08 09:00:16.000000000 -0400 @@ -71,8 +71,12 @@ if (c != EOF) { ungetc(c, f); - fscanf(f, "%lu", &i); - } + if (fscanf(f, "%lu", &i) == 1) + return i; + else + fprintf(stderr, "%s: corrupt input", progname); + } else + fprintf(stderr, "%s: unexpected end of input", progname); - return i; + return -1; } --- pbmtools/pbmtojbg.c 2014-03-27 14:47:15.000000000 -0400 +++ pbmtools/pbmtojbg.c 2014-04-08 09:00:16.000000000 -0400 @@ -87,8 +87,12 @@ if (c != EOF) { ungetc(c, f); - fscanf(f, "%lu", &i); - } + if (fscanf(f, "%lu", &i) == 1) + return i; + else + fprintf(stderr, "%s: corrupt input", progname); + } else + fprintf(stderr, "%s: unexpected end of input", progname); - return i; + return -1; }