Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2014 17:02:07 +0100 (CET)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/186592: [patch] editors/nvi-devel: fix for FreeBSD 10+
Message-ID:  <201402091602.s19G27GB001224@kalimero.tijl.coosemans.org>
Resent-Message-ID: <201402091610.s19GA0P1096386@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186592
>Category:       ports
>Synopsis:       [patch] editors/nvi-devel: fix for FreeBSD 10+
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 09 16:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
>Environment:
>Description:
- Convert USE_AUTOTOOLS=libtool to USES=libtool.
- Fix build on FreeBSD 10 where libiconv isn't used.
- Remove post-install.  Not needed with staging.
>How-To-Repeat:
>Fix:

--- nvi-devel.patch begins here ---
Index: editors/nvi-devel/Makefile
===================================================================
--- editors/nvi-devel/Makefile	(revision 343455)
+++ editors/nvi-devel/Makefile	(working copy)
@@ -3,7 +3,7 @@
 
 PORTNAME=	nvi
 PORTVERSION=	1.81.6
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	editors
 MASTER_SITES=	http://garage.linux.student.kuleuven.be/~skimo/nvi/devel/ \
 		http://www.kotnet.org/~skimo/nvi/devel/
@@ -19,9 +19,9 @@ WIDECHAR_DESC=	Enable wide-character sup
 
 USE_BZIP2=		yes
 WRKSRC=			${WRKDIR}/${DISTNAME}/build.unix
-USE_AUTOTOOLS=		libtool
+GNU_CONFIGURE=		yes
 USE_LDCONFIG=		yes
-USES=			iconv pkgconfig
+USES=			iconv libtool pkgconfig
 USE_BDB=		42+
 CONFIGURE_ARGS+=	--with-db-prefix=${LOCALBASE} \
 			--program-prefix=n
@@ -38,15 +38,10 @@ LDFLAGS+=		-L${BDB_LIB_DIR} -L${LOCALBAS
 
 # configure is 555, so you can't do a "make configure" as non-root.
 post-patch:
-	${REINPLACE_CMD} -e 's,%%LIBTOOL%%,${LIBTOOL},g ; \
-		s,%%LTMAIN%%,${LTMAIN},g ; \
-		s,-ldb,-l${BDB_LIB_NAME},g' ${WRKSRC}/../dist/configure
+	@${REINPLACE_CMD} -e '/libvi_la_LIBADD =/s,$$, ${ICONV_LIB},' \
+		${WRKSRC}/../dist/Makefile.in
+	@${REINPLACE_CMD} -e 's,-ldb,-l${BDB_LIB_NAME},g' \
+		${WRKSRC}/../dist/configure
 	@${CHMOD} 755 ${WRKSRC}/../dist/configure
 
-post-install:
-.for __p in nex nvi nview
-#	XXX: Hack the Makefile in the distribution so this isn't necessary.
-	${RM} ${STAGEDIR}${PREFIX}/man/cat1/${__p}.0
-.endfor
-
 .include <bsd.port.mk>
Index: editors/nvi-devel/files/patch-configure
===================================================================
--- editors/nvi-devel/files/patch-configure	(revision 343455)
+++ editors/nvi-devel/files/patch-configure	(working copy)
@@ -1,27 +1,6 @@
 --- ../dist/configure.orig	2007-11-18 08:43:54.000000000 -0800
 +++ ../dist/configure	2008-06-15 11:35:32.000000000 -0700
-@@ -19433,10 +19433,10 @@ fi
- 
- 
- # This can be used to rebuild libtool when needed
--LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-+LIBTOOL_DEPS=" %%LTMAIN%%"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) %%LIBTOOL%%'
- 
- # Prevent multiple expansion
- 
-@@ -22335,6 +22335,7 @@
- #define USE_ICONV 1
- _ACEOF
- 
-+LIBS="${LIBS} -liconv"
- 
- for ac_func in iswblank
- do
-@@ -27631,6 +27632,8 @@
+@@ -27631,6 +27631,8 @@
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
@@ -30,7 +9,7 @@
  main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);}
  _ACEOF
  rm -f conftest$ac_exeext
-@@ -28624,7 +28627,7 @@
+@@ -28624,7 +28626,7 @@
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  #include <stdio.h>
@@ -39,10 +18,10 @@
  
  int
  main ()
-@@ -28755,5 +28758,6 @@
+@@ -28755,5 +28757,6 @@
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
-+#include <sys/stddef.h>
++#include <stddef.h>
  #include <db.h>
  int
  main ()
Index: editors/nvi-devel/pkg-plist
===================================================================
--- editors/nvi-devel/pkg-plist	(revision 343455)
+++ editors/nvi-devel/pkg-plist	(working copy)
@@ -5,6 +5,7 @@ lib/libvi.a
 lib/libvi.la
 lib/libvi.so
 lib/libvi.so.0
+lib/libvi.so.0.0.0
 man/man1/nex.1.gz
 man/man1/nvi.1.gz
 man/man1/nview.1.gz
--- nvi-devel.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402091602.s19G27GB001224>