summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2014-06-21 21:44:45 +0000
committermi <mi@FreeBSD.org>2014-06-21 21:44:45 +0000
commitc715d73dd505b3e37cd86ba31d627d2e3abd1620 (patch)
tree18a67d5ca6d76ccd52c63288bf66a4e9ef66c5d8
parent5e0f07e78b973875989adbdc83ec1706884b4c2f (diff)
downloadFreeBSD-ports-c715d73dd505b3e37cd86ba31d627d2e3abd1620.zip
FreeBSD-ports-c715d73dd505b3e37cd86ba31d627d2e3abd1620.tar.gz
Upgrade from 1.8 to 2.1
PR: 184585 Submitted by: Adam Weinberger
-rw-r--r--graphics/jbigkit/Makefile28
-rw-r--r--graphics/jbigkit/distinfo4
-rw-r--r--graphics/jbigkit/files/patch-aa62
-rw-r--r--graphics/jbigkit/files/patch-ab58
-rw-r--r--graphics/jbigkit/files/patch-ac34
-rw-r--r--graphics/jbigkit/files/patch-warnings36
-rw-r--r--graphics/jbigkit/pkg-plist13
7 files changed, 131 insertions, 104 deletions
diff --git a/graphics/jbigkit/Makefile b/graphics/jbigkit/Makefile
index c3570da..63f1791 100644
--- a/graphics/jbigkit/Makefile
+++ b/graphics/jbigkit/Makefile
@@ -2,23 +2,39 @@
# $FreeBSD$
PORTNAME= jbigkit
-PORTVERSION= 1.6
+PORTVERSION= 2.1
CATEGORIES= graphics
MASTER_SITES= http://www.cl.cam.ac.uk/~mgk25/download/
MAINTAINER= mi@aldan.algebra.com
COMMENT= Lossless compression for bi-level images such as scanned pages, faxes
-WRKSRC= ${WRKDIR}/${PORTNAME}
USE_LDCONFIG= yes
-
+MAN1= jbgtopbm.1 pbmtojbg.1
+BINS= jbgtopbm pbmtojbg jbgtopbm85 pbmtojbg85
+LIBS= libjbig.a libjbig.so.2 libjbig85.a libjbig85.so.1
DOCSDIR?= ${PREFIX}/share/doc/jbig
-post-install:
+do-install:
+ ${INSTALL_PROGRAM} \
+ ${BINS:S|^|${WRKSRC}/pbmtools/|} ${STAGEDIR}${PREFIX}/bin
+
+ ${INSTALL_MAN} \
+ ${MAN1:S|^|${WRKSRC}/pbmtools/|} ${STAGEDIR}${MANPREFIX}/man/man1
+
+ ${INSTALL_DATA} ${WRKSRC}/libjbig/*.h ${STAGEDIR}${PREFIX}/include
+
+ ${INSTALL_DATA} \
+ ${LIBS:S|^|${WRKSRC}/libjbig/|} ${STAGEDIR}${PREFIX}/lib
+ ${LN} -sf libjbig.so.1 ${STAGEDIR}${PREFIX}/lib/libjbig.so
+ ${LN} -sf libjbig85.so.1 ${STAGEDIR}${PREFIX}/lib/libjbig85.so
+
+.if !defined(NOPORTDOCS)
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/libjbig/jbig.doc ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/libjbig/jbig.txt ${STAGEDIR}${DOCSDIR}
+.endif
-post-build test:
+regression-test test:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} LD_LIBRARY_PATH=${WRKSRC}/libjbig ${MAKE} test
.include <bsd.port.mk>
diff --git a/graphics/jbigkit/distinfo b/graphics/jbigkit/distinfo
index d64c2bb..6e06b3c 100644
--- a/graphics/jbigkit/distinfo
+++ b/graphics/jbigkit/distinfo
@@ -1,2 +1,2 @@
-SHA256 (jbigkit-1.6.tar.gz) = d841b6d0723c1082450967f3ea500be01810a34ec4a97ad10985ae7071a6150b
-SIZE (jbigkit-1.6.tar.gz) = 405712
+SHA256 (jbigkit-2.1.tar.gz) = de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932
+SIZE (jbigkit-2.1.tar.gz) = 438710
diff --git a/graphics/jbigkit/files/patch-aa b/graphics/jbigkit/files/patch-aa
index 8421b11..9e7cd31 100644
--- a/graphics/jbigkit/files/patch-aa
+++ b/graphics/jbigkit/files/patch-aa
@@ -1,61 +1,17 @@
---- Makefile.orig Tue Apr 9 19:37:13 2002
-+++ Makefile Tue Apr 9 22:45:53 2002
-@@ -2,13 +2,13 @@
- # $Id: Makefile,v 1.12 2002-04-09 11:37:13+01 mgk25 Exp $
+--- Makefile 2014-03-27 14:47:15.000000000 -0400
++++ Makefile 2014-04-08 08:37:59.000000000 -0400
+@@ -2,12 +2,10 @@
# 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
--CCFLAGS = -O2 -W
-+#CCFLAGS = -O2 -W
- #CCFLAGS = -O -g -W -Wall -ansi -pedantic #-DDEBUG # developer only
+-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
--CFLAGS = $(CCFLAGS) -I../libjbig
-+CFLAGS += -I../libjbig
+-export CC CFLAGS
+-
+ VERSION=2.1
- VERSION=1.4
-
-@@ -16,14 +16,14 @@
- @echo "Enter 'make test' in order to start some automatic tests."
-
- lib:
-- (cd libjbig; make "CC=$(CC)" "CFLAGS=$(CFLAGS)")
-+ (cd libjbig; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)")
-
- pbm: lib
-- (cd pbmtools; make "CC=$(CC)" "CFLAGS=$(CFLAGS)")
-+ (cd pbmtools; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)")
-
- test: lib pbm
-- (cd libjbig; make "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
-- (cd pbmtools; make "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
-+ (cd libjbig; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
-+ (cd pbmtools; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
-
- clean:
- rm -f *~ core
-@@ -36,3 +36,22 @@
- gzip -9f jbigkit-$(VERSION).tar )
- mv ../jbigkit-$(VERSION).tar.gz $(HOME)/public_html/download/
- cp CHANGES $(HOME)/public_html/jbigkit/
-+
-+install:
-+ mkdir -p $(DESTDIR)${PREFIX}/bin
-+ ${BSD_INSTALL_PROGRAM} pbmtools/jbgtopbm pbmtools/pbmtojbg \
-+ $(DESTDIR)${PREFIX}/bin
-+ mkdir -p $(DESTDIR)${PREFIX}/man/man1
-+ ${BSD_INSTALL_MAN} pbmtools/pbmtojbg.1 pbmtools/jbgtopbm.1 \
-+ $(DESTDIR)${PREFIX}/man/man1
-+ # mkdir -p $(DESTDIR)${PREFIX}/man/man5
-+ # Not installing the pbm(5) man page, because BSD has its own
-+ # install -c -m 644 -o bin -g bin pbmtools/pbm.5 ${PREFIX}/man/man5
-+ # Not installing the pgm(5) man page for it comes with netpbm port
-+ # install -c -m 644 -o bin -g bin pbmtools/pgm.5 ${PREFIX}/man/man5
-+ mkdir -p $(DESTDIR)${PREFIX}/include
-+ ${BSD_INSTALL_DATA} libjbig/jbig.h $(DESTDIR)${PREFIX}/include
-+ mkdir -p $(DESTDIR)${PREFIX}/lib
-+ ${BSD_INSTALL_DATA} libjbig/libjbig.a $(DESTDIR)${PREFIX}/lib
-+ ${BSD_INSTALL_DATA} libjbig/libjbig.so.1 $(DESTDIR)${PREFIX}/lib
-+ ln -sf libjbig.so.1 $(DESTDIR)${PREFIX}/lib/libjbig.so
diff --git a/graphics/jbigkit/files/patch-ab b/graphics/jbigkit/files/patch-ab
index cd58dfe..fd98f69 100644
--- a/graphics/jbigkit/files/patch-ab
+++ b/graphics/jbigkit/files/patch-ab
@@ -1,40 +1,38 @@
---- libjbig/Makefile Fri Apr 10 20:33:27 1998
-+++ libjbig/Makefile Wed Sep 16 11:57:16 1998
-@@ -5,9 +5,11 @@
+--- libjbig/Makefile 2014-03-27 14:47:15.000000000 -0400
++++ libjbig/Makefile 2014-04-08 08:43:57.000000000 -0400
+@@ -2,10 +2,14 @@
+
+ # 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 = -O -Wall -ansi -pedantic
-+CFLAGS += -Wall -ansi -pedantic
+-CFLAGS = -g -O -W -Wall -ansi -pedantic # --coverage
++CFLAGS += -W -Wall -ansi -pedantic # --coverage
--all: libjbig.a tstcodec
-+JBIGLIB=libjbig.a
-+SOJBIGLIB=libjbig.so.1
+-all: libjbig.a libjbig85.a tstcodec tstcodec85
++all: libjbig.a libjbig85.a tstcodec tstcodec85 libjbig.so.2 libjbig85.so.1
+
-+all: libjbig.a $(SOJBIGLIB)
++.SUFFIXES: .c .So
++.c.So:
++ $(CC) -c -fpic -DPIC ${CFLAGS} ${.IMPSRC} -o ${.TARGET}
- tstcodec: tstcodec.c jbig.c jbig.h jbig_tab.o
- $(CC) $(CFLAGS) -o tstcodec -DTEST_CODEC tstcodec.c jbig.c \
-@@ -18,10 +25,21 @@
- ar rc libjbig.a jbig.o jbig_tab.o
- ranlib libjbig.a
+ tstcodec: tstcodec.o jbig.o jbig_ar.o
+@@ -20,4 +24,8 @@
+ -ranlib libjbig.a
-+$(SOJBIGLIB): jbig.so jbig_tab.so
++libjbig.so.2: jbig.So jbig_ar.So
+ rm -f ${.TARGET}
-+ $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC}
-+ ln -sf ${.TARGET} `echo ${.TARGET} | sed 's/\.so.*$$/.so/'`
-+
- jbig.o: jbig.c jbig.h
-
-+.SUFFIXES: .c .so
-+.c.so:
-+ ${CC} -c -fpic -DPIC ${CFLAGS} ${.IMPSRC} -o ${.TARGET}
-+jbig.so: jbig.c jbig.h
-+jbig_tab.so: jbig_tab.c
++ $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC}
+
- test: tstcodec
- ./tstcodec
+ libjbig85.a: jbig85.o jbig_ar.o
+ rm -f libjbig85.a
+@@ -25,4 +33,8 @@
+ -ranlib libjbig85.a
- clean:
-- rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec
-+ rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec *.so libjbig.so.1 libjbig.so.1.1 libjbig.a
++libjbig85.so.1: jbig85.So jbig_ar.So
++ rm -f ${.TARGET}
++ $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC}
++
+ jbig.o: jbig.c jbig.h jbig_ar.h
+ jbig85.o: jbig85.c jbig85.h jbig_ar.h
diff --git a/graphics/jbigkit/files/patch-ac b/graphics/jbigkit/files/patch-ac
index 579cbf5..747f8fa 100644
--- a/graphics/jbigkit/files/patch-ac
+++ b/graphics/jbigkit/files/patch-ac
@@ -1,16 +1,32 @@
---- pbmtools/Makefile.orig Thu Jun 25 13:30:38 1998
-+++ pbmtools/Makefile Thu Jun 25 13:31:00 1998
-@@ -5,11 +5,10 @@
+--- pbmtools/Makefile 2014-03-27 14:47:15.000000000 -0400
++++ pbmtools/Makefile 2014-04-08 09:18:42.000000000 -0400
+@@ -2,14 +2,14 @@
+
+ # Select an ANSI/ISO C compiler here, e.g. GNU gcc is recommended
-CC = gcc
++#CC = gcc
# Options for the compiler
--CFLAGS = -g -Wall -ansi -pedantic -I../libjbig
-+CFLAGS += -Wall -ansi -pedantic -I../libjbig
+-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
+@@ -144,6 +144,8 @@
+ cmp test-$(IMG).pbm test-$(IMG).pbm85
--all: pbmtojbg jbgtopbm pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt
-+all: pbmtojbg jbgtopbm
+-test-%.pbm: ../examples/%.jbg
+- ./jbgtopbm $< $@
++.for i in 1 2 3
++test-ccitt$i.pbm: ../examples/ccitt$i.jbg
++ ./jbgtopbm ${.ALLSRC} ${.TARGET}
++.endfor
- pbmtojbg: pbmtojbg.o ../libjbig/libjbig.a
- $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
+ test-t82.pbm:
diff --git a/graphics/jbigkit/files/patch-warnings b/graphics/jbigkit/files/patch-warnings
new file mode 100644
index 0000000..760c0d7
--- /dev/null
+++ b/graphics/jbigkit/files/patch-warnings
@@ -0,0 +1,36 @@
+--- 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;
+ }
+
diff --git a/graphics/jbigkit/pkg-plist b/graphics/jbigkit/pkg-plist
index 8813296..5a68363 100644
--- a/graphics/jbigkit/pkg-plist
+++ b/graphics/jbigkit/pkg-plist
@@ -1,10 +1,15 @@
bin/jbgtopbm
+bin/jbgtopbm85
bin/pbmtojbg
+bin/pbmtojbg85
include/jbig.h
+include/jbig85.h
+include/jbig_ar.h
lib/libjbig.a
lib/libjbig.so
-lib/libjbig.so.1
-man/man1/jbgtopbm.1.gz
-man/man1/pbmtojbg.1.gz
-%%PORTDOCS%%%%DOCSDIR%%/jbig.doc
+lib/libjbig.so.2
+lib/libjbig85.a
+lib/libjbig85.so
+lib/libjbig85.so.1
+%%PORTDOCS%%%%DOCSDIR%%/jbig.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%
OpenPOWER on IntegriCloud