Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2014 15:16:46 GMT
From:      Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/186243: [MAINTAINER] Staging and taking maintainance of math/ndiff
Message-ID:  <201401291516.s0TFGkwE069073@oldred.freebsd.org>
Resent-Message-ID: <201401291520.s0TFK0qu081637@freefall.freebsd.org>

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

>Number:         186243
>Category:       ports
>Synopsis:       [MAINTAINER] Staging and taking maintainance of math/ndiff
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 29 15:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Luca Pizzamiglio
>Release:        FreeBSD 9.2-RELEASE
>Organization:
>Environment:
FreeBSD pizzamig 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Staging support added
Taking maintainance
Binaries stripped
Moving knobs to options (DOCS and GMP)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 341729)
+++ Makefile	(working copy)
@@ -6,51 +6,43 @@
 PORTREVISION=	4
 CATEGORIES=	math
 MASTER_SITES=	ftp://ftp.math.utah.edu/pub/misc/
-PKGNAMEPREFIX=
 
-MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Compare putatively similar files, ignoring small numeric differences
+MAINTAINER=	luca.pizzammiglio@gmail.com
+COMMENT=	Compare files, ignoring numeric differences
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+#LICENSE=
 
-.if !defined(WITHOUT_GMP)
-LIB_DEPENDS=	gmp.10:${PORTSDIR}/math/gmp
-CFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-CONFIGURE_ARGS=	--with-gmp
-.else
+GNU_CONFIGURE=	yes
+USES=	gmake
+
+OPTIONS_DEFINE=	DOCS GMP
+
+OPTIONS_DEFAULT=
+
+GMP_LIB_DEPENDS=	libgmp.so:${PORTSDIR}/math/gmp
+GMP_CFLAGS=	-I${LOCALBASE}/include
+GMP_LDFLAGS=	-L${LOCALBASE}/lib
+GMP_CONFIGURE_ON=	--with-gmp
+
+.include <bsd.port.options.mk>
+
+.if ! ${PORT_OPTIONS:MGMP}
 .if ${ARCH} == sparc64
-CONFIGURE_ARGS= --with-long-double
+CONFIGURE_ARGS+=	--with-long-double
 .else
-CONFIGURE_ARGS= --with-double
+CONFIGURE_ARGS+=	--with-double
 .endif
 .endif
 
-GNU_CONFIGURE=	yes
-ALL_TARGET=	all check-runs
+pre-install:
+	${STRIP_CMD} ${WRKSRC}/${PORTNAME}
 
-MAN1=		ndiff.1
-.if !defined(NOPORTDOCS)
-PORTDOCS=	*
-.endif
-
-post-patch:
-	@${REINPLACE_CMD} -e "s:%%DATADIR%%:${DATADIR}:g" ${WRKSRC}/Makefile.in
-
-post-build:
-	@${ECHO_MSG} "If there were no errors in the above checks then type"
-	@${ECHO_MSG}
-	@${ECHO_MSG} "	${MAKE} install"
-	@${ECHO_MSG}
-	@${ECHO_MSG} "to install ${PORTNAME}-${PORTVERSION}"
-
 post-install:
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.pdf  ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.ps   ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.html ${DOCSDIR}
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+. for f in ${PORTNAME}.html ${PORTNAME}.pdf ${PORTNAME}.ps
+	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
+. endfor
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: files/patch-Makefile.in
===================================================================
--- files/patch-Makefile.in	(revision 341729)
+++ files/patch-Makefile.in	(working copy)
@@ -1,12 +1,12 @@
---- Makefile.in.orig	Tue Dec 12 11:11:11 2000
-+++ Makefile.in	Wed Dec 15 23:53:21 2004
+--- Makefile.in.orig	2000-12-12 19:11:11.000000000 +0100
++++ Makefile.in	2014-01-28 16:47:14.438359135 +0100
 @@ -64,8 +64,7 @@
  catdir		= $(prefix)/man/cat$(manext)
  mandir		= $(prefix)/man/man$(manext)
  manext		= 1
 -shrlibdir	= $(shrlibtop)/$(PROGNAME)-$(VERSION)
 -shrlibtop       = $(prefix)/share/lib/$(PROGNAME)
-+shrlibdir	= %%DATADIR%%
++shrlibdir	= $(prefix)/share/ndiff
  
  FTPDIR		= /u/ftp/pub/misc
  
@@ -22,46 +22,84 @@
  
  LIBS		= @LIBS@ $(XLIBS)
  
-@@ -602,14 +601,12 @@
+@@ -601,15 +600,13 @@
+ install-exe:	uninstall-exe
  	if test -f $(PROGNAME) ; \
  	then \
- 		$(CP) $(PROGNAME) $(bindir)/$(PROGNAME) ; \
+-		$(CP) $(PROGNAME) $(bindir)/$(PROGNAME) ; \
 -		$(LN) $(bindir)/$(PROGNAME) $(bindir)/$(PROGNAME)-$(VERSION) ; \
++		$(CP) $(PROGNAME) $(DESTDIR)$(bindir)/$(PROGNAME) ; \
  	else \
  		for f in $(SHFILES) ; \
  		do \
  			g=`basename $$f .sh` ; \
- 			$(SEDCMD) $$f | $(CHECKSUM) > $(bindir)/$$g ; \
+-			$(SEDCMD) $$f | $(CHECKSUM) > $(bindir)/$$g ; \
 -			$(LN) $(bindir)/$$g $(bindir)/$$g-$(VERSION) ; \
 -			$(CHMOD) 775 $(bindir)/$$g $(bindir)/$$g-$(VERSION) ; \
-+			$(CHMOD) 775 $(bindir)/$$g ; \
++			$(SEDCMD) $$f | $(CHECKSUM) > $(DESTDIR)$(bindir)/$$g ; \
++			$(CHMOD) 775 $(DESTDIR)$(bindir)/$$g ; \
  		done ; \
  	fi
  
-@@ -635,15 +632,13 @@
+@@ -628,28 +625,26 @@
+ 	for f in $(MANFILES) ; \
+ 	do \
+ 		g=`basename $$f .man` ; \
+-		$(SEDCMD) $$f | $(CHECKSUM) > $(mandir)/$$g.$(manext) ; \
+-		$(CHMOD) 664 $(mandir)/$$g.$(manext) ; \
++		$(SEDCMD) $$f | $(CHECKSUM) > $(DESTDIR)$(mandir)/$$g.$(manext) ; \
++		$(CHMOD) 664 $(DESTDIR)$(mandir)/$$g.$(manext) ; \
+ 	done
+ 
  install-show:
  	@echo ''
  	@echo Installed files...
 -	@$(LS) -l $(bindir)/$(PROGNAME) $(bindir)/$(PROGNAME)-$(VERSION)
-+	@$(LS) -l $(bindir)/$(PROGNAME)
- 	@$(LS) -l $(mandir)/$(PROGNAME).$(manext)
- 	@if test -d $(shrlibdir) ; then $(LS) -lR $(shrlibdir)/* ; fi
+-	@$(LS) -l $(mandir)/$(PROGNAME).$(manext)
+-	@if test -d $(shrlibdir) ; then $(LS) -lR $(shrlibdir)/* ; fi
++	@$(LS) -l $(DESTDIR)$(bindir)/$(PROGNAME)
++	@$(LS) -l $(DESTDIR)$(mandir)/$(PROGNAME).$(manext)
++	@if test -d $(DESTDIR)$(shrlibdir) ; then $(LS) -lR $(DESTDIR)$(shrlibdir)/* ; fi
  	@echo ''
  
  install-shrlib:	uninstall-shrlib
 -	-$(MKDIR) $(shrlibtop)
 -	@if test -d $(shrlibtop) ; then true ; else echo Cannot create $(shrlibtop) ; exit 1 ; fi
 -	-$(MKDIR) $(shrlibdir)
-+	-$(MKDIR) -p $(shrlibdir)
- 	@if test -d $(shrlibdir) ; then true ; else echo Cannot create $(shrlibdir) ; exit 1 ; fi
+-	@if test -d $(shrlibdir) ; then true ; else echo Cannot create $(shrlibdir) ; exit 1 ; fi
++	-$(MKDIR) -p $(DESTDIR)$(shrlibdir)
++	@if test -d $(DESTDIR)$(shrlibdir) ; then true ; else echo Cannot create $(DESTDIR)$(shrlibdir) ; exit 1 ; fi
  	for f in $(SHRLIBFILES) ; \
  	do \
-@@ -703,7 +698,7 @@
+-		$(SEDCMD) < $$f > $(shrlibdir)/$$f ; \
++		$(SEDCMD) < $$f > $(DESTDIR)$(shrlibdir)/$$f ; \
+ 	done
+-	$(CHMOD) 664 $(shrlibdir)/*
++	$(CHMOD) 664 $(DESTDIR)$(shrlibdir)/*
+ 
+ maintainer-clean:	distclean cleandocs
+ 	@echo "This command is intended for maintainers to use;"
+@@ -703,19 +698,19 @@
  uninstall-exe:
  	-for f in $(PROGRAMS) ; \
  	do \
 -		$(RM) $(bindir)/$$f $(bindir)/$$f-$(VERSION) 2>/dev/null; \
-+		$(RM) $(bindir)/$$f 2>/dev/null; \
++		$(RM) $(DISTDIR)$(bindir)/$$f 2>/dev/null; \
  	done
  
  uninstall-man:
+ 	-for f in $(MANFILES) ; \
+ 	do \
+ 		g=`basename $$f .man` ; \
+-		$(RM) $(mandir)/$$g.$(manext) 2>/dev/null; \
+-		$(RM) $(catdir)/$$g.$(manext) 2>/dev/null; \
++		$(RM) $(DISTDIR)$(mandir)/$$g.$(manext) 2>/dev/null; \
++		$(RM) $(DISTDIR)$(catdir)/$$g.$(manext) 2>/dev/null; \
+ 	done
+ 
+ uninstall-shrlib:
+-	-$(RM) -r $(shrlibdir) 2>/dev/null
++	-$(RM) -r $(DISTDIR)$(shrlibdir) 2>/dev/null
+ 
+ $(PROGNAME).o:	$(PROGNAME).c awklib.h ndiff.h
+ awklib.o:	awklib.c awklib.h
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 341729)
+++ pkg-plist	(working copy)
@@ -1,3 +1,8 @@
 bin/ndiff
 %%DATADIR%%/ndiff.awk
-@dirrm %%DATADIR%%
+man/man1/ndiff.1.gz
+%%PORTDOCS%%%%DOCSDIR%%/ndiff.html
+%%PORTDOCS%%%%DOCSDIR%%/ndiff.pdf
+%%PORTDOCS%%%%DOCSDIR%%/ndiff.ps
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrmtry %%DATADIR%%


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



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