git: 4979149746a6 - main - graphics/ocrad: Update 0.27 -> 0.28

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 12 Mar 2022 07:16:46 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4979149746a6e64c1113ec0f7f8863b592278895

commit 4979149746a6e64c1113ec0f7f8863b592278895
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-03-12 07:15:59 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-03-12 07:16:39 +0000

    graphics/ocrad: Update 0.27 -> 0.28
    
    Reported by:    portscout
---
 graphics/ocrad/Makefile                | 16 +++++++++++++---
 graphics/ocrad/distinfo                |  6 +++---
 graphics/ocrad/files/patch-Makefile.in | 19 ++++++++++---------
 3 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/graphics/ocrad/Makefile b/graphics/ocrad/Makefile
index fb141c516162..761c97378d85 100644
--- a/graphics/ocrad/Makefile
+++ b/graphics/ocrad/Makefile
@@ -1,7 +1,7 @@
 # Created by: Ulrich Spoerlein <q@uni.de>
 
 PORTNAME=	ocrad
-DISTVERSION=	0.27
+DISTVERSION=	0.28
 CATEGORIES=	graphics
 MASTER_SITES=	GNU
 
@@ -11,10 +11,15 @@ COMMENT=	OCR program implemented as filter
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		tar:lz
+LIB_DEPENDS=	libpng16.so:graphics/png
+
+USES=		localbase:ldflags tar:lz
+USE_LDCONFIG=	yes
+
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--prefix=${PREFIX} CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -fPIC" --mandir=${PREFIX}/man --infodir=${PREFIX}/info
-USE_LDCONFIG=	yes
+
+MAKE_ARGS=	LDFLAGS="${LDFLAGS}"
 
 PLIST_FILES=	bin/${PORTNAME} \
 		include/ocradlib.h \
@@ -27,6 +32,11 @@ OPTIONS_DEFINE=	DOCS EXAMPLES
 PORTDOCS=	AUTHORS ChangeLog NEWS README
 PORTEXAMPLES=	*
 
+post-install: # strip
+	@${STRIP_CMD} \
+		${STAGEDIR}${PREFIX}/bin/ocrad \
+		${STAGEDIR}${PREFIX}/lib/libocrad.so
+
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
diff --git a/graphics/ocrad/distinfo b/graphics/ocrad/distinfo
index 524af5baea55..8f1d3996d9bb 100644
--- a/graphics/ocrad/distinfo
+++ b/graphics/ocrad/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1548483477
-SHA256 (ocrad-0.27.tar.lz) = a9bfe67e9a040907aff5640dca56392476b6a89e48e37dc94ba846c5b6733b36
-SIZE (ocrad-0.27.tar.lz) = 91709
+TIMESTAMP = 1647068311
+SHA256 (ocrad-0.28.tar.lz) = 34ccea576dbdadaa5979e6202344c3ff68737d829ca7b66f71c8497d36bbbf2e
+SIZE (ocrad-0.28.tar.lz) = 95567
diff --git a/graphics/ocrad/files/patch-Makefile.in b/graphics/ocrad/files/patch-Makefile.in
index 4daf1543f2e3..bec61c951e6f 100644
--- a/graphics/ocrad/files/patch-Makefile.in
+++ b/graphics/ocrad/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig	2019-01-26 06:20:29 UTC
+--- Makefile.in.orig	2022-01-16 01:25:58 UTC
 +++ Makefile.in
-@@ -23,16 +23,16 @@ objs     = arg_parser.o main.o
+@@ -22,16 +22,16 @@ objs     = arg_parser.o main.o
           uninstall uninstall-bin uninstall-info uninstall-man \
           doc info man check dist clean distclean
  
@@ -8,17 +8,18 @@
 +all : $(progname) lib$(libname).so
  
 -lib$(libname).a: $(ocr_objs) $(lib_objs)
--	$(AR) -crs $@ $(ocr_objs) $(lib_objs)
+-	$(AR) $(ARFLAGS) $@ $(ocr_objs) $(lib_objs)
 +lib$(libname).so: $(ocr_objs) $(lib_objs)
-+	$(CXX) -shared -fPIC -o $@ $(ocr_objs) $(lib_objs)
++	$(CXX) -shared -fPIC -o $@ $(LDFLAGS) $(ocr_objs) $(lib_objs)
  
  $(progname) : $(ocr_objs) $(objs)
- 	$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $(ocr_objs) $(objs)
+-	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(ocr_objs) $(objs) $(LIBS)
++	$(CXX) $(CXXFLAGS) -o $@ $(ocr_objs) $(objs) $(LDFLAGS) $(LIBS)
  
--ocradcheck : ocradcheck.o lib$(libname).a
--	$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ ocradcheck.o lib$(libname).a
-+ocradcheck : ocradcheck.o lib$(libname).so
-+	$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ ocradcheck.o lib$(libname).so
+-ocradcheck : arg_parser.o ocradcheck.o lib$(libname).a
+-	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ arg_parser.o ocradcheck.o lib$(libname).a $(LIBS)
++ocradcheck : arg_parser.o ocradcheck.o lib$(libname).so
++	$(CXX) $(CXXFLAGS) -o $@ arg_parser.o ocradcheck.o lib$(libname).so $(LDFLAGS) $(LIBS)
  
  ocradcheck.o : ocradcheck.cc
  	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<