- 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>
This commit is contained in:
Rusmir Dusko 2014-02-03 11:09:44 +00:00
parent e5bca3323f
commit f81a2160b9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=342419
3 changed files with 41 additions and 65 deletions

View file

@ -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>
.if !defined(WITHOUT_GMP)
LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --with-gmp
.else
.if ${ARCH} == sparc64
CONFIGURE_ARGS= --with-long-double
.else
CONFIGURE_ARGS= --with-double
.endif
.endif
LICENSE= GPLv2
USES= desthack
GNU_CONFIGURE= yes
ALL_TARGET= all check-runs
MAN1= ndiff.1
.if !defined(NOPORTDOCS)
PORTDOCS= *
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
.else
CONFIGURE_ARGS+= --with-double
.endif
.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}
.include <bsd.port.post.mk>
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View file

@ -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) ; \

View file

@ -1,3 +0,0 @@
bin/ndiff
%%DATADIR%%/ndiff.awk
@dirrm %%DATADIR%%