On Tue, Mar 20, 2012 at 12:59:46PM +0100, Agustin Martin wrote:
> lua include path is not properly passed. I am doing some work with this
> (dealing with #503269 patch upgrade). Hope to update the patch today, will
> send a followup to #503269.
> 
> I was also playing with enabling dpkg-buildflags, but I get some errors like
> error: format not a string literal and no format arguments 
> [-Werror=format-security]
> 
> because of things like
> 
> fprintf(stderr, display_error_text_after);

On Tue, Mar 20, 2012 at 06:45:45PM +0100, Anton Gladky wrote:
> I have fixed that:
> 
> http://anonscm.debian.org/gitweb/?p=debian-science/packages/gnuplot.git;a=commit;h=17e3fffe45bf8f5bc5446a023e656378dc52bb3c
> 
> http://anonscm.debian.org/gitweb/?p=debian-science/packages/gnuplot.git;a=commit;h=a4741ac9b48d9c851a34e680b95a135ca0d1c1f0

Wow, this was really quick, thanks,

I have re-adapted patch enabling lua/tikz (#503269) to your just committed
changes, please find it attached.

Note that I pass CFLAGS and LDFLAGS after configure. IIRC that makes their
contents be passed and hardcoded into the autogenerated files while the
other way just keep them in environment. I admit it is not totally clear to
me if the above is fully correct and which way is better, so feel free to
adapt it to your taste.

Regards,

-- 
Agustin
>From 4efce29ea4a8c3e0daa48e8048df8a9d26a5570a Mon Sep 17 00:00:00 2001
From: Agustin Martin Domingo <[email protected]>
Date: Tue, 20 Mar 2012 12:47:31 +0100
Subject: [PATCH] Add liblua5.1-dev dependency and set include path to enable
 lua (closes #503269).

gnuplot 4.6 enables lua terminal by default if lua is available.
Add liblua5.1-dev dependency to make sure that happens.

Setting explicit path to lua includes is still needed, so is added
to CFLAGS.
---
 debian/control |    2 +-
 debian/rules   |   11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/debian/control b/debian/control
index b72f75a..aa771a3 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.8.4
 DM-Upload-Allowed: yes
 Build-Depends: debhelper (>= 7), libpng-dev, libx11-dev, libxt-dev, 
  pkg-config, texinfo (>= 4.8), texlive-latex-base, texlive-latex-recommended, 
- texlive-latex-extra,
+ texlive-latex-extra, liblua5.1-dev,
  zlib1g-dev, libgd2-noxpm-dev, quilt, libwxgtk2.8-dev, libcairo2-dev, 
  libpango1.0-dev, libedit-dev (>= 2.11-20080614-2), autoconf, automake
 Homepage: http://gnuplot.sourceforge.net/
diff --git a/debian/rules b/debian/rules
index 38f252b..8d2910a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,9 @@ export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 export CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS)
 export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
+# Tell compiler where should find lua headers
+CFLAGS += -I/usr/include/lua5.1
+
 BUILDDIR_NOX = $(CURDIR)/debian/build-nox
 BUILDDIR_X11 = $(CURDIR)/debian/build-x11
 
@@ -22,8 +25,8 @@ configure-nox: configure-nox-stamp
 configure-nox-stamp: autoreconf-stamp
 	dh_testdir
 	mkdir -p $(BUILDDIR_NOX)
-	cd $(BUILDDIR_NOX); CFLAGS="$(CFLAGS)" \
-		LDFLAGS="$(LDFLAGS)" ../../configure \
+	cd $(BUILDDIR_NOX);  ../../configure \
+		CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
 		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 		--prefix=/usr --mandir=\$${prefix}/share/man \
 	  	--infodir=\$${prefix}/share/info \
@@ -39,8 +42,8 @@ configure-x11: configure-x11-stamp
 configure-x11-stamp: autoreconf-stamp
 	dh_testdir
 	mkdir -p $(BUILDDIR_X11)
-	cd $(BUILDDIR_X11); CFLAGS="$(CFLAGS)" \
-		LDFLAGS="$(LDFLAGS)" ../../configure \
+	cd $(BUILDDIR_X11); ../../configure \
+		CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
 		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 	  	--prefix=/usr --mandir=\$${prefix}/share/man \
 	  	--infodir=\$${prefix}/share/info \
-- 
1.7.9.1

Reply via email to