Discussion:
[Slackbuilds-users] About owncloud-client SlackBuild
Didier Spaier
2018-11-09 16:49:56 UTC
Permalink
Hello,

Instead of dropping the doc it's often possible to replace the
converter expected by the Makefile by another one easier to
get installed. Too tired to check for this specific case now,
but will do that later unless someone is faster.

Best, Didier
Hello,
I tried to build owncloud-client recently and ran into problems. In
summary, it seems that when "make doc" is executed, an error is shown
pointing to a lacking "latexmk" utility that would be used to build
something.
Some googlings after and I found that this utility possibly belongs to
one of the "texlive" SBo packages (texlive, texlive-doc or
texlive-extra). The first is easy to build and install (considering
also that it collides with a base Slackware package), but the last two
requires downloading ~1Gb each, and so I didn't feel comfortable in
building and installing them all.
By the other hand, one possibility is that the documentation could be
regarded as an optional thing in the whole owncloud-client package.
So I tried to build owncloud-client commenting out the "make doc" step,
and it worked.
I took an additional step and changed the SlackBuild to allow building
the package without "make doc" when latexmk is not available. Here is a
--
diff --git a/network/owncloud-client/owncloud-client.SlackBuild b/network/owncloud-client/owncloud-client.SlackBuild
index 0ee0dd35aa12ebbbbe3e4c756a6d4264719f68ce..5903474f96496aee2b695df0630ffeb75350267b 100644
--- a/network/owncloud-client/owncloud-client.SlackBuild
+++ b/network/owncloud-client/owncloud-client.SlackBuild
@@ -22,6 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# latexmk is not present
+
PRGNAM=owncloud-client
VERSION=${VERSION:-2.4.2}
BUILD=${BUILD:-1}
@@ -71,6 +74,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+HAVE_LATEXMK=$(latexmk -v 2>/dev/null | head -1 || true)
+test -z "${HAVE_LATEXMK}" && echo "latexmk not found: will not build docs"
+
mkdir -p build
cd build
cmake \
@@ -84,7 +90,7 @@ cd build
-DBUILD_WITH_QT4=${BUILD_WITH_QT4:-"No"} \
..
make VERBOSE=1
- make doc
+ test -n "${HAVE_LATEXMK}" && make doc
make install DESTDIR=$PKG
cd ..
Matteo Bernardini
2018-11-09 17:39:37 UTC
Permalink
Il giorno ven 9 nov 2018 alle ore 17:13 Luiz Carlos Ramos via
Post by Didier Spaier
Hello,
I tried to build owncloud-client recently and ran into problems. In
summary, it seems that when "make doc" is executed, an error is shown
pointing to a lacking "latexmk" utility that would be used to build
something.
Some googlings after and I found that this utility possibly belongs to
one of the "texlive" SBo packages (texlive, texlive-doc or
texlive-extra). The first is easy to build and install (considering
also that it collides with a base Slackware package), but the last two
requires downloading ~1Gb each, and so I didn't feel comfortable in
building and installing them all.
By the other hand, one possibility is that the documentation could be
regarded as an optional thing in the whole owncloud-client package.
So I tried to build owncloud-client commenting out the "make doc" step,
and it worked.
I took an additional step and changed the SlackBuild to allow building
the package without "make doc" when latexmk is not available. Here is a
--
diff --git a/network/owncloud-client/owncloud-client.SlackBuild b/network/owncloud-client/owncloud-client.SlackBuild
index 0ee0dd35aa12ebbbbe3e4c756a6d4264719f68ce..5903474f96496aee2b695df0630ffeb75350267b 100644
--- a/network/owncloud-client/owncloud-client.SlackBuild
+++ b/network/owncloud-client/owncloud-client.SlackBuild
@@ -22,6 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# latexmk is not present
+
PRGNAM=owncloud-client
VERSION=${VERSION:-2.4.2}
BUILD=${BUILD:-1}
@@ -71,6 +74,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+HAVE_LATEXMK=$(latexmk -v 2>/dev/null | head -1 || true)
+test -z "${HAVE_LATEXMK}" && echo "latexmk not found: will not build docs"
+
mkdir -p build
cd build
cmake \
@@ -84,7 +90,7 @@ cd build
-DBUILD_WITH_QT4=${BUILD_WITH_QT4:-"No"} \
..
make VERBOSE=1
- make doc
+ test -n "${HAVE_LATEXMK}" && make doc
make install DESTDIR=$PKG
cd ..
--
In the same case, I tested it and it worked fine.
This effectively makes something (which in the best of my knowledge is
texlive and friends) as optional dependencies of owncloud-client.
Of course if you eventually accept this change, it should also be
advisable to write something in the README file about this optional
dependency and the effects of not having them.
Many thanks,
Luiz Carlos Ramos
São Paulo - Brazil
hi Luis,

I don't know what is happening in your build environment but just to
confirm that I have tried a few minutes ago to build owncloud-client
without texlive installed on slackware64-14.2 (no latexmk binary is in
my $PATH) and everything went fine (also the "make doc" bit).

Matteo
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://sla
Matteo Bernardini
2018-11-10 09:57:58 UTC
Permalink
Il giorno ven 9 nov 2018 alle ore 21:35 Luiz Carlos Ramos
which points to something related to the Sphinx package as it is
suggested in the first line. I'll try to get more information as the
availability of time permits.
IMHO, I would just expand what is already in the README

"This package optionally requires the Sphinx package in order to create its
man pages."

with

"This package optionally requires the Sphinx package in order to create its
man pages (in this case you will also need texlive installed)."

Matteo
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/
Didier Spaier
2018-11-10 10:27:57 UTC
Permalink
Hello,
Post by Matteo Bernardini
IMHO, I would just expand what is already in the README
"This package optionally requires the Sphinx package in order to create its
man pages."
with
"This package optionally requires the Sphinx package in order to create its
man pages (in this case you will also need texlive installed)."
rst2man.py, shipped in the Slackware package docutils-0.14, gives an acceptable
result which can probably be enhanced choosing proper options or slightly
editing the source files. No dependencies needed to provide man pages then.

Best regards,

Didier
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/
Didier Spaier
2018-11-10 13:14:07 UTC
Permalink
Hello
I have to recognize that one phrase of mine in the last email is bad
worded and may be wrong: I made the assumption that one line in the file
/tmp/SBo/owncloudclient-2.4.2/build/doc/latex/Makefile pointed to
Sphinx, but I should be more careful, telling that that line was a
comment in the header. What could be understood as a truth is actually
only a suposition and maybe a hint. Whether Sphinx is related to the
problem, is actually matter of discussion.
A look at doc/{CMakeLists.txt,Makefile} answers that.

For the pdf target, rst2pdf can process all .rst files but the
glossary and the index. Those two could probably be easily fixed.

I tested this way:
cd doc
for i in *.rst; do rst2pdf -o ${i%.rst}.pdf $i ; done
atril *pdf &

Best regards,
Didier
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/
Didier Spaier
2018-11-10 18:03:39 UTC
Permalink
Hello,
Post by Didier Spaier
Hello,
In my environment, rst2pdf is not available. Possibly it is linked to
some SBo. Furthermore, rst2man.py and friends belong to docutils, which
in this sense is a dependency.
Post by Didier Spaier
cd doc
for i in *.rst; do rst2pdf -o ${i%.rst}.pdf $i ; done
atril *pdf &
Let me understand your suggestion: we would change the SlackBuild script
to use rst2pdf and friends to build the documentation directly from the
"doc" subdirectory instead of the current "make doc", is it correct? This
would be in order to avoid a dependency, if I understood correctly (but
it might introduce another one, as pointed above).
I wrongly assumed that rs2pdf was shipped in docutils as is rst2man,
sorry for the confusion. Actually I got it IIRC from:
https://github.com/rst2pdf/rst2pdf

Didier
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/
Matteo Bernardini
2018-11-11 16:01:22 UTC
Permalink
Il giorno sab 10 nov 2018 alle ore 13:43 Luiz Carlos Ramos via
Matteo and Didier,
Post by Matteo Bernardini
Il giorno ven 9 nov 2018 alle ore 21:35 Luiz Carlos Ramos
which points to something related to the Sphinx package as it is
suggested in the first line. I'll try to get more information as the
availability of time permits.
IMHO, I would just expand what is already in the README
"This package optionally requires the Sphinx package in order to create its
man pages."
with
"This package optionally requires the Sphinx package in order to create its
man pages (in this case you will also need texlive installed)."
In fact, the man pages seem to be being built correctly. The problem is
when the pdf files are being built.
I made a test to get some more conclusions: after the problem, I went to
/tmp/SBo/owncloud-client-2.4.2/build as root, run "make help" and got
some targets to test. I tested some of them, and these ones have run
make doc-man
make doc-html
make doc-latex
make doc-dev
make doc-pdf
an alternative I just tested, looking at Luiz's message, that will
also keep the SlackBuild more ore less as-is, would be to change just
the line

make doc

with

make doc-man

Matteo
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/

Loading...