Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Dec 2013 18:04:53 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337157 - in head/graphics/dataplot: . files
Message-ID:  <201312211804.rBLI4rK1044626@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Sat Dec 21 18:04:53 2013
New Revision: 337157
URL: http://svnweb.freebsd.org/changeset/ports/337157

Log:
  - New LIB_DEPENDS syntax.
  - Add DOCS option.
  - USES=fortran.
  - Staging.
  - Substitute CFLAGS, FFLAGS and LDFLAGS in the source Makefile like a
    configure script would do.  Otherwise flags defined in make.conf can
    override flags defined in the port Makefile.
  - Remove LIBS from a Makefile target list of dependencies to fix building
    with bmake.

Modified:
  head/graphics/dataplot/Makefile   (contents, props changed)
  head/graphics/dataplot/files/Makefile.tmpl   (contents, props changed)

Modified: head/graphics/dataplot/Makefile
==============================================================================
--- head/graphics/dataplot/Makefile	Sat Dec 21 17:02:30 2013	(r337156)
+++ head/graphics/dataplot/Makefile	Sat Dec 21 18:04:53 2013	(r337157)
@@ -9,25 +9,26 @@ MASTER_SITES=	ftp://ftp.nist.gov/pub/dat
 		LOCAL/beech:source \
 		http://www.itl.nist.gov/div898/software/dataplot.html/:doc \
 		LOCAL/beech:doc
-DISTFILES=	dpsrc${EXTRACT_SUFX}:source \
-		dpsnapsh.pdf:doc
+DISTFILES=	dpsrc${EXTRACT_SUFX}:source
 DIST_SUBDIR=	dataplot
 EXTRACT_ONLY=	dpsrc${EXTRACT_SUFX}
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A free software system for statistical visualization
+COMMENT=	Free software system for statistical visualization
 
-LIB_DEPENDS=	gd:${PORTSDIR}/graphics/gd \
-		png15:${PORTSDIR}/graphics/png \
-		jpeg:${PORTSDIR}/graphics/jpeg
+LIB_DEPENDS=	libgd.so:${PORTSDIR}/graphics/gd \
+		libpng15.so:${PORTSDIR}/graphics/png \
+		libjpeg.so:${PORTSDIR}/graphics/jpeg
 
-USE_FORTRAN=	yes
+OPTIONS_DEFINE=	DOCS
+DOCS_DISTFILES=	dpsnapsh.pdf:doc
+
+USES=		fortran
 USE_XORG=	x11 xi
 NO_WRKSUBDIR=	yes
 MAXOBV?=	400000	# Change if you need more observations/variable
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .if ((${ARCH}=="amd64") || (${ARCH}=="sparc64") || (${ARCH}=="ia64"))
 FFLAGS+= -DDD -DI32 -fdefault-real-8 -fdefault-double-8
@@ -37,9 +38,11 @@ FFLAGS+= -DSD -DI32 -fdefault-real-8 -fd
 
 post-extract:
 	@${INSTALL_DATA} ${FILESDIR}/Makefile.tmpl ${WRKSRC}/Makefile
-	@${REINPLACE_CMD} -e 's;%%LOCALBASE%%;${LOCALBASE};g ; \
-	s;%%LOCALBASE%%;${LOCALBASE};g' \
-	${WRKSRC}/Makefile
+	@${REINPLACE_CMD} \
+		-e 's;%%CFLAGS%%;${CFLAGS};' \
+		-e 's;%%FFLAGS%%;${FFLAGS};' \
+		-e 's;%%LDFLAGS%%;${LDFLAGS};' \
+		-e 's;%%LOCALBASE%%;${LOCALBASE};g' ${WRKSRC}/Makefile
 # Ensure preprocessing is done
 	@${CP} ${WRKSRC}/dp1_linux.f ${WRKSRC}/dp1_linux.F
 # Turn off some dependencies
@@ -53,10 +56,10 @@ pre-patch:
 	${WRKSRC}/DPCOPA.INC
 
 post-install:
-.if !defined(NOPORTDOCS)
-	@${INSTALL} -d  ${DOCSDIR}
-	@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/dpsnapsh.pdf \
-		${DOCSDIR}
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/dpsnapsh.pdf \
+		${STAGEDIR}${DOCSDIR}
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/graphics/dataplot/files/Makefile.tmpl
==============================================================================
--- head/graphics/dataplot/files/Makefile.tmpl	Sat Dec 21 17:02:30 2013	(r337156)
+++ head/graphics/dataplot/files/Makefile.tmpl	Sat Dec 21 18:04:53 2013	(r337157)
@@ -1,6 +1,7 @@
-CFLAGS	     += -I%%LOCALBASE%%/include
+CFLAGS	      = %%CFLAGS%% -I/usr/local/include
+FFLAGS	      = %%FFLAGS%%
 
-DEST	      = ${PREFIX}/bin
+DEST	      = ${DESTDIR}${PREFIX}/bin
 
 EXTHDRS	      = %%LOCALBASE%%/include/X11/X.h \
 		%%LOCALBASE%%/include/X11/Xfuncproto.h \
@@ -17,7 +18,7 @@ INSTALL	      = install
 
 LD	      = $(F77)
 
-LDFLAGS	      = -L%%LOCALBASE%%/lib
+LDFLAGS	      = %%LDFLAGS%% -L%%LOCALBASE%%/lib
 
 LIBS	      = -lgd -lpng -ljpeg -lX11 -lz -lfreetype -lpthread
 
@@ -181,7 +182,7 @@ SYSHDRS	      = /usr/include/machine/_ty
 
 all:		$(PROGRAM)
 
-$(PROGRAM):     $(OBJS) $(LIBS)
+$(PROGRAM):     $(OBJS)
 		@echo "Linking $(PROGRAM) ..."
 		@$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
 		@echo "done"



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