Source: libhdate Version: 1.6.02-2 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
Hi Tzafrir, you asked me for help with cross building libhdate. Unfortunately, I don't see any of your commits on salsa yet. Therefore I'm simply submitting my demo patch here as a reference for you to cherry pick from and as a marker that libhdate can be made cross buildable. Looking forward to see your fixes. Helmut
diff --minimal -Nru libhdate-1.6.02/debian/changelog libhdate-1.6.02/debian/changelog --- libhdate-1.6.02/debian/changelog 2018-07-30 05:49:11.000000000 +0200 +++ libhdate-1.6.02/debian/changelog 2020-01-29 20:08:08.000000000 +0100 @@ -1,3 +1,10 @@ +libhdate (1.6.02-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Wed, 29 Jan 2020 20:08:08 +0100 + libhdate (1.6.02-2) unstable; urgency=medium * Update maintainer address (Closes: #899576) diff --minimal -Nru libhdate-1.6.02/debian/control libhdate-1.6.02/debian/control --- libhdate-1.6.02/debian/control 2018-07-30 05:41:00.000000000 +0200 +++ libhdate-1.6.02/debian/control 2020-01-29 20:08:08.000000000 +0100 @@ -7,7 +7,9 @@ Vcs-Git: https://salsa.debian.org/hebrew-team/libhdate.git Build-Depends: debhelper (>= 9), swig, - python-dev (>= 2.6.6-3~), + perl-xs-dev, + libpython-dev (>= 2.6.6-3~), + python-dev:any (>= 2.6.6-3~), dh-python, dh-autoreconf, Standards-Version: 3.9.8 diff --minimal -Nru libhdate-1.6.02/debian/libhdate-perl.dirs libhdate-1.6.02/debian/libhdate-perl.dirs --- libhdate-1.6.02/debian/libhdate-perl.dirs 2018-07-30 05:28:32.000000000 +0200 +++ libhdate-1.6.02/debian/libhdate-perl.dirs 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -#!/usr/bin/perl -w -use Config; -print substr($Config{vendorarch}, 1) . "\n"; diff --minimal -Nru libhdate-1.6.02/debian/libhdate-perl.install libhdate-1.6.02/debian/libhdate-perl.install --- libhdate-1.6.02/debian/libhdate-perl.install 2018-07-30 05:28:32.000000000 +0200 +++ libhdate-1.6.02/debian/libhdate-perl.install 2020-01-29 20:08:08.000000000 +0100 @@ -1,3 +1,2 @@ -#!/usr/bin/perl -w -use Config; -print substr($Config{vendorarch}, 1) . "\n"; +#!/bin/sh +echo "${ARCHLIB#.}" diff --minimal -Nru libhdate-1.6.02/debian/patches/cross.patch libhdate-1.6.02/debian/patches/cross.patch --- libhdate-1.6.02/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ libhdate-1.6.02/debian/patches/cross.patch 2020-01-29 20:08:08.000000000 +0100 @@ -0,0 +1,36 @@ +--- libhdate-1.6.02.orig/bindings/python/Makefile.am ++++ libhdate-1.6.02/bindings/python/Makefile.am +@@ -11,8 +11,8 @@ + + + _hdate.so: hdate_wrap.cxx +- g++ -fpic -c hdate_wrap.cxx $(CPPFLAGS) $(CFLAGS) $(PY_CFLAGS) -I$(top_srcdir)/src +- g++ -shared hdate_wrap.o ../../src/.libs/libhdate.so -o _hdate.so $(LDFLAGS) ++ $(CXX) -fpic -c hdate_wrap.cxx $(CPPFLAGS) $(CFLAGS) $(PY_CFLAGS) -I$(top_srcdir)/src ++ $(CXX) -shared hdate_wrap.o ../../src/.libs/libhdate.so -o _hdate.so $(LDFLAGS) + + hdate_wrap.cxx: hdate.i + swig -python -c++ hdate.i +--- libhdate-1.6.02.orig/configure.in ++++ libhdate-1.6.02/configure.in +@@ -21,6 +21,7 @@ + AC_GNU_SOURCE + AC_USE_SYSTEM_EXTENSIONS + AC_PROG_CC ++AC_PROG_CXX + AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_MAKE_SET +--- libhdate-1.6.02.orig/bindings/perl/Makefile.am ++++ libhdate-1.6.02/bindings/perl/Makefile.am +@@ -11,8 +11,8 @@ + + + hdate.so: hdate_wrap.cxx +- g++ -fpic -c hdate_wrap.cxx $(CFLAGS) $(CPPFLAGS) $(PE_CFLAGS) -I$(top_srcdir)/src +- g++ -shared hdate_wrap.o ../../src/.libs/libhdate.so -o hdate.so $(LDFLAGS) ++ $(CXX) -fpic -c hdate_wrap.cxx $(CFLAGS) $(CPPFLAGS) $(PE_CFLAGS) -I$(top_srcdir)/src ++ $(CXX) -shared hdate_wrap.o ../../src/.libs/libhdate.so -o hdate.so $(LDFLAGS) + + hdate_wrap.cxx: hdate.i + swig -perl -c++ hdate.i diff --minimal -Nru libhdate-1.6.02/debian/patches/series libhdate-1.6.02/debian/patches/series --- libhdate-1.6.02/debian/patches/series 2018-07-30 05:28:32.000000000 +0200 +++ libhdate-1.6.02/debian/patches/series 2020-01-29 20:08:08.000000000 +0100 @@ -6,3 +6,4 @@ duplicate_gnu_source.patch size_t.patch clang.patch +cross.patch diff --minimal -Nru libhdate-1.6.02/debian/rules libhdate-1.6.02/debian/rules --- libhdate-1.6.02/debian/rules 2018-07-30 05:28:32.000000000 +0200 +++ libhdate-1.6.02/debian/rules 2020-01-29 20:08:08.000000000 +0100 @@ -1,6 +1,9 @@ #!/usr/bin/make -f -ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}') +PERLVER := $(shell perl -MConfig -e 'print $$Config{version}') +ARCHLIB := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print $$Config{vendorarch}') + +export ARCHLIB %: dh $* --with python2,autoreconf