Package: freefoam
Version: 0.1.0+dfsg-1
Severity: important
Tags: sid patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch

After the bug number 735248 
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735248) has been resolved,
following errors were found while building package freefoam on mips(el):

--------------------------------

cd 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/doc/Doxygen
 && /usr/bin/python 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/doc/Doxygen/fixupDoxygen.py
Fixing up Doxygen generated API documentation
- Parsing *_source.html
- Computing mangled file names
- Fixing #include linkes in the *_source.html files
- Fixing remaining #include links and expanding placeholders
make[3]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
/usr/bin/cmake -E cmake_progress_report 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/CMakeFiles
[ 47%] Built target apidoc-all
make[2]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
Makefile:119: recipe for target 'all' failed
make[1]: *** [all] Error 2

--------------------------------

[ 92%] Building CXX object 
applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/writeFuns.C.o
cd 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/applications/utilities/mesh/manipulation/setSet
 && /usr/bin/g++   -DDP -DNoRepository -DREADLINE=1 -DSiCortex64 -g -O2 
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fpermissive 
-D_FORTIFY_SOURCE=2 
-I/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/include
    -o CMakeFiles/setSet.dir/writeFuns.C.o -c 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/applications/utilities/mesh/manipulation/setSet/writeFuns.C
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/applications/utilities/mesh/manipulation/setSet/writeFuns.C:29:23:
 fatal error: standards.h: No such file or directory
 #include <standards.h>
                       ^
compilation terminated.
applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/build.make:106:
 recipe for target 
'applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/writeFuns.C.o'
 failed
make[3]: *** 
[applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/writeFuns.C.o]
 Error 1
make[3]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
CMakeFiles/Makefile2:12815: recipe for target 
'applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/all' 
failed
make[2]: *** 
[applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/all] 
Error 2
make[2]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
Makefile:119: recipe for target 'all' failed
make[1]: *** [all] Error 2

--------------------------------

I have attached a patch resolving these issues.
Patch freefoam-doc-and-mips.diff is attached.
Most of this patch is taken from upstream.
With it, freefoam package builds without an error on mips and mipsel.
libxml2-utils is added as dependency (for package asciidoc) to a 
Build-Depends-Indep group in order to override issue 692274
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692274)


Regards,
Jurica
diff -upNr freefoam-0.1.0+dfsg-orig/debian/control freefoam-0.1.0+dfsg/debian/control
--- freefoam-0.1.0+dfsg-orig/debian/control	2012-07-30 05:28:49.000000000 +0000
+++ freefoam-0.1.0+dfsg/debian/control	2014-05-23 13:01:12.000000000 +0000
@@ -9,11 +9,12 @@ Vcs-Git: git://git.debian.org/git/debian
 Vcs-Browser: http://git.debian.org/?p=debian-science/packages/freefoam.git
 DM-Upload-Allowed: yes
 Homepage: http://freefoam.wiki.sourceforge.net/
-Build-Depends: cdbs, debhelper (>= 5.0.24), python-support, cmake, flex, 
- gawk, python, libreadline6-dev, zlib1g-dev, libscotch-dev, 
- mpi-default-dev, mpi-default-bin, paraview (>= 3.8), doxygen, 
- libjs-jquery, asciidoc, xmlto, docbook-utils, dvipng, asymptote, 
- texlive-science, dblatex, dpkg-dev (>= 1.16.1~), graphviz
+Build-Depends: cdbs, debhelper (>= 5.0.24), python-support, cmake, flex, gawk,
+ python, libreadline6-dev, zlib1g-dev, libscotch-dev, mpi-default-dev,
+ mpi-default-bin, paraview (>= 3.8), dpkg-dev (>= 1.16.1~)
+Build-Depends-Indep: doxygen,
+ libjs-jquery, asciidoc, docbook-utils, dvipng, asymptote, texlive-science,
+ dblatex, graphviz, libxml2-utils
 Standards-Version: 3.9.3
 
 Package: libfreefoam1
diff -upNr freefoam-0.1.0+dfsg-orig/debian/freefoam-dev-doc.install freefoam-0.1.0+dfsg/debian/freefoam-dev-doc.install
--- freefoam-0.1.0+dfsg-orig/debian/freefoam-dev-doc.install	2012-07-31 13:24:02.000000000 +0000
+++ freefoam-0.1.0+dfsg/debian/freefoam-dev-doc.install	2014-05-23 13:01:12.000000000 +0000
@@ -1,3 +1,3 @@
 debian/tmp/usr/share/doc/freefoam/API/* /usr/share/doc/freefoam-dev-doc/api
 debian/tmp/usr/share/doc/freefoam/css debian/tmp/usr/share/doc/freefoam/img /usr/share/doc/freefoam-dev-doc
-debian/tmp/usr/share/freefoam/DoxyDocIndex /usr/share/freefoam
+*/InstallFiles/data/DoxyDocIndex /usr/share/freefoam
diff -upNr freefoam-0.1.0+dfsg-orig/debian/patches/mips-patch.diff freefoam-0.1.0+dfsg/debian/patches/mips-patch.diff
--- freefoam-0.1.0+dfsg-orig/debian/patches/mips-patch.diff	1970-01-01 00:00:00.000000000 +0000
+++ freefoam-0.1.0+dfsg/debian/patches/mips-patch.diff	2014-05-23 12:59:57.000000000 +0000
@@ -0,0 +1,24 @@
+--- freefoam-0.1.0+dfsg.orig/applications/utilities/mesh/manipulation/setSet/writeFuns.C
++++ freefoam-0.1.0+dfsg/applications/utilities/mesh/manipulation/setSet/writeFuns.C
+@@ -26,8 +26,7 @@ License
+ #include "writeFuns.H"
+ 
+ #if defined(__mips) && !defined(__SICORTEX__)
+-#include <standards.h>
+-#include <sys/endian.h>
++#include <endian.h>
+ #endif
+ 
+ #if defined(LITTLE_ENDIAN) \
+--- freefoam-0.1.0+dfsg.orig/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C
++++ freefoam-0.1.0+dfsg/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C
+@@ -27,8 +27,7 @@ License
+ #include "vtkTopo.H"
+ 
+ #if defined(__mips) && !defined(__SICORTEX__)
+-#include <standards.h>
+-#include <sys/endian.h>
++#include <endian.h>
+ #endif
+ 
+ // MacOSX
diff -upNr freefoam-0.1.0+dfsg-orig/debian/patches/series freefoam-0.1.0+dfsg/debian/patches/series
--- freefoam-0.1.0+dfsg-orig/debian/patches/series	2012-07-31 13:18:15.000000000 +0000
+++ freefoam-0.1.0+dfsg/debian/patches/series	2014-05-23 12:59:57.000000000 +0000
@@ -9,3 +9,4 @@ correct-output-directory-for-freefoam-lo
 escape-meta-chars-for-doxygen-filter.diff
 fix-installation-dirs-for-template-files.diff
 update-doxygen-foamheader.diff
+mips-patch.diff
diff -upNr freefoam-0.1.0+dfsg-orig/debian/rules freefoam-0.1.0+dfsg/debian/rules
--- freefoam-0.1.0+dfsg-orig/debian/rules	2012-07-30 05:28:49.000000000 +0000
+++ freefoam-0.1.0+dfsg/debian/rules	2014-05-23 13:01:12.000000000 +0000
@@ -36,11 +36,11 @@ FF_CONFIG_PACK=						\
 	-DCPACK_SOURCE_ZIP=OFF				\
 
 FF_DOC=							\
-	-DFOAM_ENABLE_PDF_GUIDES=ON			\
+	-DFOAM_ENABLE_PDF_GUIDES=OFF			\
 	-DFOAM_ENABLE_XHTML_GUIDES=OFF			\
 	-DFOAM_ENABLE_XHTML_HELP=OFF			\
 	-DFOAM_ENABLE_MATHJAX=OFF			\
-	-DFOAM_ENABLE_DOXYGEN_DOCS=ON			\
+	-DFOAM_ENABLE_DOXYGEN_DOCS=OFF			\
 	-DFOAM_ENABLE_MANPAGE_HELP=OFF			\
 	-DFOAM_DOCS_FOR_SF=OFF				\
 
@@ -74,10 +74,24 @@ DEB_CMAKE_EXTRA_FLAGS= 					\
 	$(FF_DOC)					\
 	$(FF_INSTALL)
 
+DEB_DH_MAKESHLIBDEPS_ARGS_libfreefoam1=-X/usr/lib/$(FF_SUBDIR)
 
+TOP_BUILDDIR := $(DEB_BUILDDIR)
 
-DEB_DH_MAKESHLIBDEPS_ARGS_libfreefoam1=-X/usr/lib/$(FF_SUBDIR)
+# Re-configure for doc packages
+configure/freefoam-user-doc configure/freefoam-dev-doc:: debian/freefoam-enable-docs.stamp
+
+debian/freefoam-enable-docs.stamp:
+	cd $(TOP_BUILDDIR); \
+	cmake \
+	  -DFOAM_ENABLE_PDF_GUIDES=ON \
+	  -DFOAM_ENABLE_DOXYGEN_DOCS=ON \
+	  $(CURDIR)
+	touch $@
 
+build/freefoam-user-doc:: DEB_MAKE_BUILD_TARGET := UserGuide-pdf
+
+build/freefoam-dev-doc:: DEB_MAKE_BUILD_TARGET := apidoc-all
 
 install/libfreefoam1::
 	install -d $(CURDIR)/debian/libfreefoam1/usr/lib/$(FF_SUBDIR)
@@ -94,14 +108,22 @@ install/freefoam::
 	install -d $(CURDIR)/debian/freefoam/etc/bash_completion.d
 	cp $(CURDIR)/data/shellFunctions/bashCompletion/freefoam $(CURDIR)/debian/freefoam/etc/bash_completion.d/
 
-install/freefoam-user-doc::
+install/freefoam-user-doc:: DEB_BUILDDIR_freefoam-user-doc := $(TOP_BUILDDIR)/doc/UserGuide
+install/freefoam-user-doc:: install-tutorials
+	+$(DEB_MAKE_INVOKE) $(DEB_MAKE_INSTALL_TARGET)
+
+install-tutorials: DEB_BUILDDIR_freefoam-user-doc := $(TOP_BUILDDIR)/tutorials
+install-tutorials: build/freefoam-user-doc
+	+$(DEB_MAKE_INVOKE) $(DEB_MAKE_INSTALL_TARGET)
 	install -d $(CURDIR)/debian/freefoam-user-doc/usr/share/doc/freefoam-user-doc/tutorials
-	rm $(CURDIR)/debian/tmp/usr/share/doc/freefoam/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/data/Ubulk
-	rm $(CURDIR)/debian/tmp/usr/share/doc/freefoam/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/data/ptrace
-	rmdir $(CURDIR)/debian/tmp/usr/share/doc/freefoam/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/data
+	rm -rf $(CURDIR)/debian/tmp/usr/share/doc/freefoam/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/data
 
-install/freefoam-dev-doc::
-	rm $(CURDIR)/debian/tmp/usr/share/doc/freefoam/API/jquery.js
+# Depends on build/freefoam-user-doc because the installation is started in
+# $(DEB_BUILDDIR)/doc, which also requires the UserGuide to be built.
+install/freefoam-dev-doc:: DEB_BUILDDIR_freefoam-dev-doc := $(TOP_BUILDDIR)/doc
+install/freefoam-dev-doc:: build/freefoam-user-doc
+	+$(DEB_MAKE_INVOKE) $(DEB_MAKE_INSTALL_TARGET)
+	rm -f $(CURDIR)/debian/tmp/usr/share/doc/freefoam/API/jquery.js
 
 binary-install/libfreefoam1::
 	dh_pysupport -plibfreefoam1
@@ -111,3 +133,6 @@ binary-install/libfreefoam-dev::
 
 binary-install/freefoam::
 	dh_pysupport -pfreefoam
+
+clean::
+	rm -f debian/freefoam-enable-docs.stamp

Reply via email to