Code

Add fixed path for tcllib
[pkg-rrdtool.git] / debian / rules
index af701133d18702d586f632c4e336d96e9cbb53b1..4be5bfa6d23ef3af1a436dd9b8117f7227341f49 100755 (executable)
@@ -26,8 +26,8 @@ PY_VERS := $(shell set -e; \
                    done)
 
 #tcl version we're building for
-TCL_VERS := $(shell dpkg -s tcl | grep ^Depends | sed 's,.*tcl\([0-9.]*\).*,\1,')
-
+#TCL_VERS := $(shell dpkg -s tcl | grep ^Depends | sed 's,.*tcl\([0-9.]*\).*,\1,')
+TCL_VERS := 8.4
 
 #let's help configure to figure out our host/build system
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -50,16 +50,22 @@ CONFFLAGS += --with-perl-options=INSTALLDIRS=vendor
 #path to our ttf font
 CONFFLAGS += --with-rrd-default-font=/usr/share/rrdtool/librrd$(LIB_major)/DejaVuSansMono-Roman.ttf
 
+#path to tcl
+CONFFLAGS += --with-tcllib=/usr/lib/tcl$(TCL_VERS)
 
 #let's take care of optimization + debug builds
 CFLAGS += -Wall -g
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
         CFLAGS += -O0
 else
+#don't optimize on arm for now - #447041
+ifneq ($(DEB_HOST_GNU_TYPE), arm)
         CFLAGS += -O2
 endif
+endif
 
-LDFLAGS="-Wl,-z,defs"
+# work-around for a broken dpkg - do not rename this to LDFLAGS :-/
+LINKER_FLAGS=-Wl,-z,defs
 
 configure: config.status
 config.status: $(QUILT_STAMPFN)
@@ -71,7 +77,7 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" ""
        cp -f /usr/share/misc/config.guess config.guess
 endif
 
-       LDFLAGS="$(LDFLAGS)"
+       LDFLAGS="$(LINKER_FLAGS)" \
        CFLAGS="$(CFLAGS)" \
        RRDDOCDIR=/usr/share/doc/rrdtool \
          ./configure $(CONFFLAGS)