summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2012-03-13 11:21:10 +0000
committerJeroen Roovers <jer@gentoo.org>2012-03-13 11:21:10 +0000
commit472346481d32ed0308145c3777303d7b3b698761 (patch)
tree58a1ccbcc21dc036ac4fcbe963f218f612a284f3 /app-misc/nut
parentVersion bump. (diff)
downloadgentoo-2-472346481d32ed0308145c3777303d7b3b698761.tar.gz
gentoo-2-472346481d32ed0308145c3777303d7b3b698761.tar.bz2
gentoo-2-472346481d32ed0308145c3777303d7b3b698761.zip
Version bump.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/nut')
-rw-r--r--app-misc/nut/ChangeLog8
-rw-r--r--app-misc/nut/files/nut-17.5-makefile.patch86
-rw-r--r--app-misc/nut/nut-17.5.ebuild48
3 files changed, 141 insertions, 1 deletions
diff --git a/app-misc/nut/ChangeLog b/app-misc/nut/ChangeLog
index 88be72e55792..e1ca418865f1 100644
--- a/app-misc/nut/ChangeLog
+++ b/app-misc/nut/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-misc/nut
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/nut/ChangeLog,v 1.35 2012/02/27 00:51:22 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/nut/ChangeLog,v 1.36 2012/03/13 11:21:10 jer Exp $
+
+*nut-17.5 (13 Mar 2012)
+
+ 13 Mar 2012; Jeroen Roovers <jer@gentoo.org> +nut-17.5.ebuild,
+ +files/nut-17.5-makefile.patch:
+ Version bump.
*nut-17.4-r1 (27 Feb 2012)
diff --git a/app-misc/nut/files/nut-17.5-makefile.patch b/app-misc/nut/files/nut-17.5-makefile.patch
new file mode 100644
index 000000000000..0adb492fc764
--- /dev/null
+++ b/app-misc/nut/files/nut-17.5-makefile.patch
@@ -0,0 +1,86 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,4 @@
+-prefix = /usr/local
++prefix = /usr
+ libdir = $(prefix)/lib/nut
+ bindir = $(prefix)/bin
+ mandir = $(prefix)/man/man1
+@@ -8,15 +8,6 @@
+ 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)
+ CC = cc
+@@ -26,7 +17,7 @@
+ OPT = -O1
+ endif
+
+-CFLAGS := $(OPT) -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
++CFLAGS += -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
+ ifeq ($(CC),gcc)
+ CFLAGS += $(OPT) -Wall -fno-inline -ansi
+ endif
+@@ -36,10 +27,10 @@
+ SOURCE := $(wildcard *.c)
+ OBJS := $(patsubst %.c,%.o,$(SOURCE))
+
+-all: nut $(FLTK_NUT)
++all: nut
+
+ nut: $(OBJS)
+- $(CC) $(OPT) -o $(EXECUTABLE) $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXECUTABLE) $(OBJS) $(LIBS)
+
+ ifeq ($(HAVE_FLTK),1)
+ $(FLTK_NUT):
+--- a/fltk/Makefile
++++ b/fltk/Makefile
+@@ -5,24 +5,24 @@
+ NUTDIR := \".nutdb\"
+ FOODDIR := \"$(libdir)\"
+ EXECUTABLE := Nut
+-LIBS := `fltk-config --ldstaticflags` -lXpm
++LIBS := $(shell fltk-config --ldflags) -lXpm
+
+ OS := $(shell uname -s)
+ ifeq ($(OS),HP-UX)
+ CC = cc
+ CXX = /opt/aCC/bin/aCC
+ OPT = -O
+-LIBS := `fltk-config --ldflags` -lXpm
++LIBS := $(shell fltk-config --ldflags) -lXpm
+ else
+ CC = gcc
+ CXX = g++
+ OPT = -Os
+ endif
+
+-CFLAGS := -I.. `fltk-config --optim --cflags` $(OPT) -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
++CFLAGS += -I.. $(shell fltk-config --optim --cflags) -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
+
+ ifeq ($(CXX),g++)
+-CFLAGS := -I.. `fltk-config --optim --cflags` -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR) -Wall -fno-inline -ansi
++CFLAGS := -I.. $(shell fltk-config --optim --cflags) -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR) -Wall -fno-inline -ansi
+ endif
+
+ CXXFLAGS := $(CFLAGS)
+@@ -31,7 +31,7 @@
+ OBJS := ../anameal.o ../db.o ../food.o ../meal.o ../options.o ../prtmenu.o ../recmeal.o ../util.o $(patsubst %.cc,%.o,$(SOURCE))
+
+ nut: $(OBJS)
+- $(CXX) $(OPT) -o $(EXECUTABLE) $(OBJS) $(LIBS)
++ $(CXX) $(CFLAGS) $(LDFLAGS) -o $(EXECUTABLE) $(OBJS) $(LIBS)
+
+ deps:
+ makedepend -Y.. ../anameal.c ../db.c ../food.c ../meal.c ../options.c ../prtmenu.c ../recmeal.c ../util.c *.cc >/dev/null 2>&1
diff --git a/app-misc/nut/nut-17.5.ebuild b/app-misc/nut/nut-17.5.ebuild
new file mode 100644
index 000000000000..f8249399092c
--- /dev/null
+++ b/app-misc/nut/nut-17.5.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/nut/nut-17.5.ebuild,v 1.1 2012/03/13 11:21:10 jer Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Record what you eat and analyze your nutrient levels"
+HOMEPAGE="http://nut.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86"
+IUSE="fltk"
+
+RDEPEND="
+ fltk? (
+ x11-libs/fltk:1
+ x11-libs/libXpm
+ )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-17.5-makefile.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) FOODDIR=\\\"/usr/share/nut\\\"
+ if use fltk; then
+ cd fltk
+ emake CXX=$(tc-getCXX) FOODDIR=\\\"/usr/share/nut\\\"
+ fi
+}
+
+src_install() {
+ insinto /usr/share/nut
+ doins raw.data/*
+ dobin nut
+ doman nut.1
+ if use fltk; then
+ dobin fltk/Nut
+ doicon nut.xpm
+ make_desktop_entry Nut nut nut Education
+ fi
+}