aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2013-12-22 02:04:53 +0800
committertijl <tijl@FreeBSD.org>2013-12-22 02:04:53 +0800
commit8b1e66102d54fb10281bb0f9a682e60bfcd68500 (patch)
treeb465e2a421c82c9d00310b37717f304d682ef8af /graphics
parent402ae5096c6967a18f6a08c305bc8992b113ed6a (diff)
downloadfreebsd-ports-gnome-8b1e66102d54fb10281bb0f9a682e60bfcd68500.tar.gz
freebsd-ports-gnome-8b1e66102d54fb10281bb0f9a682e60bfcd68500.tar.zst
freebsd-ports-gnome-8b1e66102d54fb10281bb0f9a682e60bfcd68500.zip
- 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.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/dataplot/Makefile37
-rw-r--r--graphics/dataplot/files/Makefile.tmpl9
2 files changed, 25 insertions, 21 deletions
diff --git a/graphics/dataplot/Makefile b/graphics/dataplot/Makefile
index 13cc77422252..0501c85422d8 100644
--- a/graphics/dataplot/Makefile
+++ b/graphics/dataplot/Makefile
@@ -9,25 +9,26 @@ MASTER_SITES= ftp://ftp.nist.gov/pub/dataplot/unix/:source \
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 -fdefault-double-8
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>
diff --git a/graphics/dataplot/files/Makefile.tmpl b/graphics/dataplot/files/Makefile.tmpl
index ba9006aa0927..80908220f041 100644
--- a/graphics/dataplot/files/Makefile.tmpl
+++ b/graphics/dataplot/files/Makefile.tmpl
@@ -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/_types.h \
all: $(PROGRAM)
-$(PROGRAM): $(OBJS) $(LIBS)
+$(PROGRAM): $(OBJS)
@echo "Linking $(PROGRAM) ..."
@$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
@echo "done"