Root/gnuplot-gfx/Makefile

1#
2# Gnuplot package for OpenWrt.
3#
4# Adapted to support LibGGI video output by
5# David Kuehling <dvdkhlng TA gmx TOD de>
6#
7# License GPLv2 or later. NO WARRANTY.
8#
9
10# Todo for GGI support (svgalib works, so GGI is disabled for now)
11#
12# - After 21acf8eb423af24ca00835192239d50f2e4570a8 I once had proper plot
13# display from Octave (but didn't came back to the console afterwards).
14# Even after building again with mouse support, this isn't working any more.
15# Why? Must be related to the 050-ggi-close.patch but that patch is doing
16# close to nothing.
17#
18# - Somebody seems to mess with the console/stdin. Even when using
19# GGI_FBDEV_OPTIONS=-noinput and setting GGI_NEWVT. Can be easily tested
20# when launching from ssh.
21#
22# - When using GGI_NEWVT in Octave, it seems like somebody is injecting text
23# or something into Octave's stdin or into the file handles Octave uses. It
24# would abort with some strange error message noting that it doesn't know
25# some corrupted command name (stuff like "setset"). Very frightening.
26
27include $(TOPDIR)/rules.mk
28
29PKG_NAME:=gnuplot-gfx
30PKG_ORIG_NAME=gnuplot
31PKG_VERSION:=4.4.2
32PKG_RELEASE:=2
33PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_ORIG_NAME)-$(PKG_VERSION)
34HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_ORIG_NAME)-$(PKG_VERSION)
35PKG_SOURCE:=$(PKG_ORIG_NAME)-$(PKG_VERSION).tar.gz
36PKG_SOURCE_URL:=@SF/gnuplot
37PKG_MD5SUM:=a4f0dd89f9b9334890464f687ddd9f50
38
39PKG_INSTALL=1
40PKG_BUILD_DEPENDS:= gnuplot-gfx/host libtool/host
41
42include $(INCLUDE_DIR)/host-build.mk
43include $(INCLUDE_DIR)/package.mk
44include $(INCLUDE_DIR)/nls.mk
45
46define Package/gnuplot-gfx/Default
47  SECTION:=utils
48  CATEGORY:=Utilities
49  TITLE:=A portable command-line driven graphing utility
50  URL:=http://sourceforge.net/projects/gnuplot/
51endef
52
53define Package/gnuplot-gfx/Default/description
54  Gnuplot is a portable command-line driven graphing utility for linux, OS/2,
55  MS Windows, OSX, VMS, and many other platforms. This version is compiled
56  to use LibGGI as default terminal, allowing gnuplot to draw directly to
57  the Linux framebuffer.
58endef
59
60define Package/gnuplot-gfx
61$(call Package/gnuplot-gfx/Default)
62  DEPENDS:=+libncurses +zlib +libpng +libfreetype +libgd $(INTL_DEPENDS) $(ICONV_DEPENDS) +svgalib
63  TITLE+=
64endef
65
66define Package/gnuplot-gfx-gih
67$(call Package/gnuplot-gfx/Default)
68  DEPENDS:=+gnuplot-gfx
69  TITLE+=(integrated help)
70endef
71
72define Package/gnuplot-gfx-gih/description
73$(call Package/gnuplot-gfx/Default/description)
74This package contains the documentation files needed for GNUplot\'s internal
75help system.
76endef
77
78##
79## Compile for the host
80##
81
82# We need the doc2gih tool compiled on the *host* to get GNUplot's online
83# documentation when compiling for the target.
84
85HOST_CONFIGURE_ARGS += \
86    --without-x \
87    --without-tutorial \
88    --without-lisp-files \
89    --without-ggi \
90    --without-cairo \
91    --disable-wxwidgets \
92    --disable-rgip \
93    --disable-mgr \
94    --without-latex \
95    --without-lisp-files \
96    --without-row-help \
97    --without-tutorial
98HOST_CONFIGURE_VARS += DIST_CONTACT="David Kuehling <dvdkhlng TA gmx TOD de>"
99
100define Host/Configure
101    $(call Host/Configure/Default)
102endef
103
104define Host/Compile
105    $(MAKE) -C $(HOST_BUILD_DIR)/docs doc2gih alldoc2gih
106endef
107
108define Host/Install
109    $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
110    $(INSTALL_BIN) $(HOST_BUILD_DIR)/docs/{doc2gih,alldoc2gih} \
111        $(STAGING_DIR_HOST)/bin/
112endef
113
114##
115## Compile for the target
116##
117
118CONFIGURE_ARGS += \
119    --without-x \
120    --without-tutorial \
121    --without-lisp-files \
122    --without-ggi \
123    --without-cairo \
124    --disable-wxwidgets \
125    --disable-rgip \
126    --disable-mgr \
127    --without-latex \
128    --without-lisp-files \
129    --without-tutorial \
130    --without-row-help \
131    --without-lisp-files \
132    --without-ggi \
133    --with-linux-vga \
134    --with-gihdir=/usr/share/gnuplot
135
136# Without mouse, gnuplot works in console mode where it closes the graphics
137# device after keypress to get into text mode. This makes it impossible to
138# use Octave which relies on proper suspend/resume behaviour with multiplot.
139
140#--disable-mouse
141
142CONFIGURE_VARS += DIST_CONTACT="David Kuehling <dvdkhlng TA gmx TOD de>"
143
144
145TARGET_CPPFLAGS += -DDEFAULTTERM=\\\"linux\\\"
146
147# todo: insto cppflags
148
149TARGET_LDFLAGS+= \
150    -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
151
152# todo: remove that when stable
153MAKE_FLAGS += -j2
154
155# cannot disable mouse for ggi: compilation fails. (todo: fix)
156# --disable-mouse
157
158# Use via 'set terminal ggi S320x240x[C24/32]V320x240F1' (?)
159# how to set this as default?
160
161#TARGET_LDFLAGS += -Wl,-rpath-link -Wl,$(STAGING_DIR)/usr/lib
162
163define Package/gnuplot-gfx/install
164    $(INSTALL_DIR) $(1)/usr/bin
165    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnuplot $(1)/usr/bin/
166endef
167
168define Package/gnuplot-gfx-gih/install
169    $(INSTALL_DIR) $(1)/usr/share/gnuplot/
170    $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnuplot/gnuplot.gih \
171        $(1)/usr/share/gnuplot/
172endef
173
174$(eval $(call HostBuild))
175$(eval $(call BuildPackage,gnuplot-gfx))
176$(eval $(call BuildPackage,gnuplot-gfx-gih))
177
178
179# The following comments configure the Emacs editor. Just ignore them.
180# Local Variables:
181# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/gnuplot-gfx/compile -j2 V=99"
182# End:
183

Archive Download this file



interactive