aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2011-08-01 16:41:20 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2011-08-01 16:41:20 +0000
commit3692403637599188b80ae5748aa68c215f9e9130 (patch)
tree1cc1b5d373729fb20136a6ef6d31a520aae74c34 /misc
parent5db8cc56b82428763bd80f7002c90f7ae2c1f23c (diff)
downloadports-3692403637599188b80ae5748aa68c215f9e9130.tar.gz
ports-3692403637599188b80ae5748aa68c215f9e9130.zip
Notes
Diffstat (limited to 'misc')
-rw-r--r--misc/nut/Makefile55
-rw-r--r--misc/nut/distinfo4
-rw-r--r--misc/nut/files/extra-patch-Makefile17
3 files changed, 59 insertions, 17 deletions
diff --git a/misc/nut/Makefile b/misc/nut/Makefile
index c59273d1a2e3..5848ca1801c6 100644
--- a/misc/nut/Makefile
+++ b/misc/nut/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= nut
-PORTVERSION= 15.7
+PORTVERSION= 16.13
CATEGORIES= misc
MASTER_SITES= SF
PKGNAMEPREFIX= health-
@@ -14,28 +14,53 @@ PKGNAMEPREFIX= health-
MAINTAINER= ports@FreeBSD.org
COMMENT= Nutrition software to record what you eat
+LICENSE= GPLv2 GPLv3
+LICENSE_COMB= dual
+
+OPTIONS= GUI "Build FLTK-based GUI" off
+
USE_GMAKE= yes
-PORTDOCS= CREDITS LICENSE README nut.html README.DOS
+MAKE_JOBS_SAFE= yes
+
DOCSDIR= ${PREFIX}/share/doc/${UNIQUENAME}
-ALL_TARGET= ${PORTNAME}
+
+MAN1= ${PORTNAME}.1
+PORTDOCS= CREDITS README nut.html
PLIST_FILES= bin/${PORTNAME} %%DATADIR%%/FOOD_DES.txt \
%%DATADIR%%/NUT_DATA.txt %%DATADIR%%/WEIGHT.lib \
- %%DATADIR%%/WEIGHT.txt %%DATADIR%%/sr22.nut
+ %%DATADIR%%/WEIGHT.txt %%DATADIR%%/sr23.nut
PLIST_DIRS= %%DATADIR%%
-MAN1= ${PORTNAME}.1
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_GUI)
+LIB_DEPENDS+= fltk.1:${PORTSDIR}/x11-toolkits/fltk
+PLIST_FILES+= bin/Nut
+.else
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-Makefile
+.endif
post-patch:
- @${REINPLACE_CMD} -e "s|/usr/local/lib/nut|${DATADIR}|" \
- -e 's|^CFLAGS=|CFLAGS+=|g;s|-Os||;s|gcc|$${CC}|' ${WRKSRC}/Makefile
+ @${FIND} ${WRKSRC} -name "Makefile" | ${XARGS} ${REINPLACE_CMD} -e \
+ 's|$$(prefix)/lib/nut|${DATADIR}| ; \
+ s|^CC =|CC ?=| ; \
+ s|^CXX =|CXX ?=| ; \
+ s|^CFLAGS :=|CFLAGS +=| ; \
+ s| -O | |'
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
- @${INSTALL} -d ${DATADIR}/
- @cd ${WRKSRC}/raw.data/ && ${COPYTREE_SHARE} . ${DATADIR}/
- @${INSTALL_MAN} ${WRKSRC}/${MAN1} ${MAN1PREFIX}/man/man1/
-.ifndef NOPORTDOCS
- @${INSTALL} -d ${DOCSDIR}/
- @${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1
+.if defined(WITH_GUI)
+ ${INSTALL_PROGRAM} ${WRKSRC}/fltk/Nut ${PREFIX}/bin
+.endif
+ @${MKDIR} ${DATADIR}
+ @(cd ${WRKSRC}/raw.data && ${COPYTREE_SHARE} . ${DATADIR})
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for file in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+.endfor
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/misc/nut/distinfo b/misc/nut/distinfo
index 8fd5a8f183ff..cc70d2caccfe 100644
--- a/misc/nut/distinfo
+++ b/misc/nut/distinfo
@@ -1,2 +1,2 @@
-SHA256 (nut-15.7.tar.gz) = e7578d585c1d62b66e5ccf5c648260965f39722d159d71ae097e20e791064cf8
-SIZE (nut-15.7.tar.gz) = 1193423
+SHA256 (nut-16.13.tar.gz) = 86491bae45d75a670f719db7d7053f1d2f18bd0eb171630728ac4d2b183e36d6
+SIZE (nut-16.13.tar.gz) = 1258796
diff --git a/misc/nut/files/extra-patch-Makefile b/misc/nut/files/extra-patch-Makefile
new file mode 100644
index 000000000000..bace5099e53e
--- /dev/null
+++ b/misc/nut/files/extra-patch-Makefile
@@ -0,0 +1,17 @@
+--- ./Makefile.orig 2011-07-28 20:48:34.000000000 -0400
++++ ./Makefile 2011-07-28 20:49:01.000000000 -0400
+@@ -8,14 +8,8 @@
+ EXECUTABLE := nut
+ LIBS := -lm
+
+-FLTK_CONFIG := $(shell fltk-config --version 2>/dev/null)
+-ifeq ($(FLTK_CONFIG),)
+ HAVE_FLTK = 0
+ FLTK_NUT =
+-else
+-HAVE_FLTK = 1
+-FLTK_NUT = fltk/Nut
+-endif
+
+ OS := $(shell uname -s)
+ ifeq ($(OS),HP-UX)