tag 564399 patch kthxbye On Sat, Jan 9, 2010 at 11:42:00 +0100, Lucas Nussbaum wrote:
> Relevant part: > > make[1]: Entering directory > > `/build/user-psqlodbc_08.03.0200-1-amd64-amoO7c/psqlodbc-08.03.0200' > > test -x debian/rules > > dh_testroot > > dh_clean -k > > dh_installdirs -A > > mkdir -p "build-W" > > chmod a+x > > /build/user-psqlodbc_08.03.0200-1-amd64-amoO7c/psqlodbc-08.03.0200/debian/odbc_config_dummy > > if test -e /usr/share/misc/config.guess ; then \ > > for i in ./config/config.guess ; do \ > > if ! test -e $i.cdbs-orig ; then \ > > mv $i $i.cdbs-orig ; \ > > cp --remove-destination > > /usr/share/misc/config.guess $i ; \ > > fi ; \ > > done ; \ > > fi > > if test -e /usr/share/misc/config.sub ; then \ > > for i in ./config/config.sub ; do \ > > if ! test -e $i.cdbs-orig ; then \ > > mv $i $i.cdbs-orig ; \ > > cp --remove-destination > > /usr/share/misc/config.sub $i ; \ > > fi ; \ > > done ; \ > > fi > > DEB_MAKE_CHECK_TARGET unset, not running checks > > /usr/bin/make -C build-W install > > DESTDIR=/build/user-psqlodbc_08.03.0200-1-amd64-amoO7c/psqlodbc-08.03.0200/debian/temp > > make[2]: *** No rule to make target `install'. Stop. This looks like an issue with new cdbs, configure/make never get run in the build-W directory because the stamp files are there from the build-A variant. Following patch uses cdbs' support for multiple flavor builds and seems to fix this issue: diff -u psqlodbc-08.03.0200/debian/rules psqlodbc-08.03.0200/debian/rules --- psqlodbc-08.03.0200/debian/rules +++ psqlodbc-08.03.0200/debian/rules @@ -3,25 +3,18 @@ tempdir = debian/temp # (not debian/tmp, which dh_clean removes too automatically) -ifndef VARIANT - -build build-arch build-indep binary binary-arch binary-indep clean:: - debian/rules VARIANT=A $@ - debian/rules VARIANT=W $@ +DEB_MAKE_FLAVORS = A W +DEB_BUILDDIR = build +DEB_DESTDIR = $(CURDIR)/$(tempdir) +DEB_DH_INSTALL_SOURCEDIR = $(tempdir) clean:: - rm -rf $(tempdir) build-A build-W - -else # VARIANT + rm -rf $(tempdir) include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/simple-patchsys.mk -DEB_BUILDDIR = build-$(VARIANT) -DEB_DESTDIR = $(CURDIR)/$(tempdir) -DEB_DH_INSTALL_SOURCEDIR = $(tempdir) - DEB_CONFIGURE_EXTRA_FLAGS = --libdir=/usr/lib/odbc --with-unixodbc pre-build:: @@ -32,8 +25,5 @@ -ifeq ($(VARIANT),A) -DEB_CONFIGURE_EXTRA_FLAGS += --disable-unicode -endif +DEB_CONFIGURE_EXTRA_FLAGS_A = --disable-unicode +DEB_CONFIGURE_EXTRA_FLAGS += $(DEB_CONFIGURE_EXTRA_FLAGS_$(cdbs_make_curflavor)) install/odbc-postgresql:: install -D -m 644 debian/odbcinst.ini.template $(DEB_DESTDIR)/usr/share/psqlodbc/odbcinst.ini.template - -endif # VARIANT The next issue is an API change in unixodbc, which is fixed by: --- psqlodbc-08.03.0200.orig/odbcapi30.c +++ psqlodbc-08.03.0200/odbcapi30.c @@ -118,13 +118,7 @@ SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, -#if defined(_WIN64) SQLLEN *NumericAttribute -#elif defined(WITH_UNIXODBC) || defined(WIN32) - SQLPOINTER NumericAttribute -#else - SQLLEN *NumericAttribute -#endif ) { CSTR func = "SQLColAttribute"; --- psqlodbc-08.03.0200.orig/odbcapi30w.c +++ psqlodbc-08.03.0200/odbcapi30w.c @@ -255,11 +255,7 @@ SQLPOINTER pCharAttr, SQLSMALLINT cbCharAttrMax, SQLSMALLINT *pcbCharAttr, -#if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64)) - SQLPOINTER pNumAttr -#else SQLLEN *pNumAttr -#endif ) { CSTR func = "SQLColAttributeW"; This part is also fixed upstream in ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-08.04.0200.tar.gz with a more comprehensive patch including a configure check. Cheers, Julien
signature.asc
Description: Digital signature