tags 557391 + patch
thanks
Hi!
The simple fix for this bug is to pass the PYTHON environment variable
to the configure script, so that it figures out the exact Python
version to depend on. The attached patch does that, and, in addition,
fixes crossbuild detection, so that gcc and g++ are used, as opposed
to x86_64-linux-gnu-gcc etc. when not cross building. Should you
dislike that change, just ignore the patch and merely add a
PYTHON=/usr/bin/python$* to the ./configure call in the rules file.
HTH, and thanks.
Kumar
diff -Nru --exclude changelog opensync-0.22/debian/rules opensync-0.22/debian/rules
--- opensync-0.22/debian/rules 2009-11-22 18:13:07.000000000 -0600
+++ opensync-0.22/debian/rules 2009-11-22 18:13:07.000000000 -0600
@@ -19,6 +19,12 @@
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+CROSS= --build $(DEB_BUILD_GNU_TYPE)
+endif
+
CFLAGS = -Werror -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
@@ -46,8 +52,8 @@
chmod u+x configure
chmod u+x py-compile
[ -d $(BUILD)-python$* ] || mkdir $(BUILD)-python$*
- cd $(BUILD)-python$* && CFLAGS="$(CFLAGS)" $(SRC)/configure --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
+ cd $(BUILD)-python$* && PYTHON=/usr/bin/python$* CFLAGS="$(CFLAGS)" $(SRC)/configure $(CROSS) \
+ --prefix=/usr \
--mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
--enable-static --enable-python=$* --libexecdir=\$${prefix}/lib/opensync \
--enable-tracing