git: e91198da77a6 - main - comms/linrad: Unbreak on current

From: Diane Bruce <db_at_FreeBSD.org>
Date: Thu, 23 Dec 2021 18:14:45 UTC
The branch main has been updated by db:

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

commit e91198da77a6215d6ef7730cc16004b8e44bb58b
Author:     Diane Bruce <db@FreeBSD.org>
AuthorDate: 2021-12-23 18:01:04 +0000
Commit:     Diane Bruce <db@FreeBSD.org>
CommitDate: 2021-12-23 18:01:04 +0000

    comms/linrad: Unbreak on current
    
    Unbreak on head of tree.
    The port itself needs a major update. Patches welcome.
---
 comms/linrad/Makefile               |  8 ++------
 comms/linrad/files/patch-help.c     | 12 ++++++------
 comms/linrad/files/patch-libfind1.c | 20 ++++++++++----------
 3 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/comms/linrad/Makefile b/comms/linrad/Makefile
index f9230fa1bc30..2a1ffaf13358 100644
--- a/comms/linrad/Makefile
+++ b/comms/linrad/Makefile
@@ -50,18 +50,14 @@ BINFILE=	xlinrad64
 ALL_TARGET=	${BINFILE}
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}/|' \
-		${WRKSRC}/help.c
-	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}/|' \
-		${WRKSRC}/libfind1.c
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}/|' \
+		${WRKSRC}/libfind1.c ${WRKSRC}/help.c
 
 do-install:
 	${MKDIR} ${STAGEDIR}${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/errors.lir ${STAGEDIR}${DATADIR}/errors.lir
 	${INSTALL_DATA} ${WRKSRC}/help.lir ${STAGEDIR}${DATADIR}/help.lir
 	${INSTALL_SCRIPT} -m0555 ${FILESDIR}/linrad ${STAGEDIR}${PREFIX}/bin/linrad
-# Some day we may want the svga version as well.
-#	${INSTALL_PROGRAM} -m0555 ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}.svga
 	${INSTALL_PROGRAM} -m0555 ${WRKSRC}/${BINFILE} ${STAGEDIR}${PREFIX}/bin/x${PORTNAME}
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for f in ${LINRAD_DOCFILES}
diff --git a/comms/linrad/files/patch-help.c b/comms/linrad/files/patch-help.c
index a1a678a9c3c4..cff872107ebd 100644
--- a/comms/linrad/files/patch-help.c
+++ b/comms/linrad/files/patch-help.c
@@ -1,20 +1,20 @@
---- help.c.orig	2014-11-04 05:25:00.000000000 -0500
-+++ help.c	2020-08-28 11:17:46.820070000 -0400
-@@ -720,7 +720,7 @@
+--- help.c.orig	2014-11-04 10:25:00 UTC
++++ help.c
+@@ -720,7 +720,7 @@ else
    printf("\n%s",s);
    DEB"\n%s",s);
    }  
 -msg_filename="errors.lir";
-+msg_filename="%%DATADIR%%errors.lir";
++msg_filename="%%PREFIX%%/share/linrad/errors.lir";
  line=3;
  write_from_msg_file(&line, lir_errcod, screen_mode, ERROR_VERNR);
  }  
-@@ -730,7 +730,7 @@
+@@ -730,7 +730,7 @@ void help_message(int msg_no)
  {
  int i, line;
  if(msg_no < 0)return;
 -msg_filename="help.lir";
-+msg_filename="%%DATADIR%%help.lir";
++msg_filename="%%PREFIX%%/share/linrad/help.lir";
  line=0;
  settextcolor(15);
  clear_screen();
diff --git a/comms/linrad/files/patch-libfind1.c b/comms/linrad/files/patch-libfind1.c
index b5e59f52940f..63f7baff1885 100644
--- a/comms/linrad/files/patch-libfind1.c
+++ b/comms/linrad/files/patch-libfind1.c
@@ -1,12 +1,12 @@
 --- libfind1.c.orig	2014-11-04 10:25:00 UTC
 +++ libfind1.c
-@@ -38,7 +38,8 @@ char *dirs[]={"/lib/i386-linux-gnu",
-               "/usr/lib64/lib",
-               "/usr/lib32",
-               "/usr/lib64",
--              "/usr/local/lib",
-+              "%%LOCALBASE%%lib",
-+              "%%LOCALBASE%%lib32",
-               "/usr/local/lib64",
-               "/usr/local32/lib",
-               "/usr/lib",
+@@ -30,7 +30,8 @@
+ char *dirs[]={"/lib/i386-linux-gnu",
+               "/lib/x86_64-linux-gnu",
+               "/lib",
+-              "/lib32",
++              "%%PREFIX%%/lib",
++	      "/lib32",
+               "/lib64",
+               "/usr/lib/i386-linux-gnu",
+               "/usr/lib/x86_64-linux-gnu",