summaryrefslogtreecommitdiff
path: root/math/ndiff
diff options
context:
space:
mode:
authorRusmir Dusko <nemysis@FreeBSD.org>2014-02-03 11:09:44 +0000
committerRusmir Dusko <nemysis@FreeBSD.org>2014-02-03 11:09:44 +0000
commitf81a2160b9f47e63f17c686e3ad35e76f6df0888 (patch)
tree12d1b08f5f5e89629b0a9202bf4d4b1da6dd31cd /math/ndiff
parent- STAGE-clean (diff)
- Remove PKGNAMEPREFIX
- Change comment - Pass maintainership to submitter - Add license (GPLv2) - Support STAGEDIR - Simplify Option handling, change GMP Option - Add USES desthack, change REINPLACE and patch-Makefile.in - Use PLIST_FILES and PLIST_DIRS instead of pkg-plist - Change DOCS and add DOCS Option PR: ports/186243 Submitted by: Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
Notes
Notes: svn path=/head/; revision=342419
Diffstat (limited to 'math/ndiff')
-rw-r--r--math/ndiff/Makefile70
-rw-r--r--math/ndiff/files/patch-Makefile.in31
-rw-r--r--math/ndiff/pkg-plist3
3 files changed, 40 insertions, 64 deletions
diff --git a/math/ndiff/Makefile b/math/ndiff/Makefile
index 9d583fdc3f96..f75f2cd1b37b 100644
--- a/math/ndiff/Makefile
+++ b/math/ndiff/Makefile
@@ -6,51 +6,49 @@ PORTVERSION= 2.00
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= GPLv2
-.if !defined(WITHOUT_GMP)
-LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp
-CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ARGS= --with-gmp
-.else
+USES= desthack
+GNU_CONFIGURE= yes
+
+PLIST_FILES= bin/${PORTNAME} \
+ man/man1/${PORTNAME}.1.gz \
+ %%DATADIR%%/${PORTNAME}.awk
+PLIST_DIRS= %%DATADIR%%
+
+PORTDOCS= *.html *.pdf *.ps *.txt
+
+OPTIONS_DEFINE= DOCS GMP
+
+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
-
-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}"
+ ${REINPLACE_CMD} -e \
+ 's|$$(shrlibtop)/$$(PROGNAME)-$$(VERSION)|$${DESTDIR}${DATADIR}|; \
+ s|.*shrlibtop.*||; \
+ s|664|644|' ${WRKSRC}/Makefile.in
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}
-.endif
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/math/ndiff/files/patch-Makefile.in b/math/ndiff/files/patch-Makefile.in
index 97f77a17614b..dbfb54277387 100644
--- a/math/ndiff/files/patch-Makefile.in
+++ b/math/ndiff/files/patch-Makefile.in
@@ -1,24 +1,14 @@
---- Makefile.in.orig Tue Dec 12 11:11:11 2000
-+++ Makefile.in Wed Dec 15 23:53:21 2004
-@@ -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%%
-
- FTPDIR = /u/ftp/pub/misc
-
+--- Makefile.in.orig 2000-12-12 19:11:11.000000000 +0100
++++ Makefile.in 2014-02-02 11:56:29.000000000 +0100
@@ -191,9 +190,9 @@
DEFINES = -DVERSION='"@VERSION@"' -DDATE='"@DATE@"' $(XDEFINES)
-INCLUDES = -I. -I$(prefix)/include $(XINCLUDES)
-+INCLUDES = -I. $(XINCLUDES)
++INCLUDES ?= -I. $(XINCLUDES)
-LDFLAGS = @LDFLAGS@ -L$(prefix)/lib $(XLDFLAGS)
-+LDFLAGS = @LDFLAGS@ $(XLDFLAGS)
++LDFLAGS ?= @LDFLAGS@ $(XLDFLAGS)
LIBS = @LIBS@ $(XLIBS)
@@ -34,11 +24,11 @@
$(SEDCMD) $$f | $(CHECKSUM) > $(bindir)/$$g ; \
- $(LN) $(bindir)/$$g $(bindir)/$$g-$(VERSION) ; \
- $(CHMOD) 775 $(bindir)/$$g $(bindir)/$$g-$(VERSION) ; \
-+ $(CHMOD) 775 $(bindir)/$$g ; \
++ $(CHMOD) 755 $(bindir)/$$g ; \
done ; \
fi
-@@ -635,15 +632,13 @@
+@@ -635,7 +632,7 @@
install-show:
@echo ''
@echo Installed files...
@@ -47,15 +37,6 @@
@$(LS) -l $(mandir)/$(PROGNAME).$(manext)
@if test -d $(shrlibdir) ; then $(LS) -lR $(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
- for f in $(SHRLIBFILES) ; \
- do \
@@ -703,7 +698,7 @@
uninstall-exe:
-for f in $(PROGRAMS) ; \
diff --git a/math/ndiff/pkg-plist b/math/ndiff/pkg-plist
deleted file mode 100644
index 0177eb1c16e8..000000000000
--- a/math/ndiff/pkg-plist
+++ /dev/null
@@ -1,3 +0,0 @@
-bin/ndiff
-%%DATADIR%%/ndiff.awk
-@dirrm %%DATADIR%%