Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (bedc699d46f576373a4c8313c2337e039f17fb4e)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (bedc699d46f576373a4c8313c2337e039f17fb4e)
  • Date: Sun, 14 Feb 2021 03:14:02 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

utils/teapot/BUILD | 1
utils/teapot/CONFIGURE | 7 -
utils/teapot/DEPENDS | 9 +-
utils/teapot/HISTORY | 5 +
utils/teapot/PRE_BUILD | 3
utils/teapot/patches/0001-Add-support-for-libtirpc.patch | 62
+++++++++++++++
6 files changed, 78 insertions(+), 9 deletions(-)

New commits:
commit bedc699d46f576373a4c8313c2337e039f17fb4e
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

teapot: Fix build against musl

Add libtirpc dependency and patch for XDR support on musl.

commit a692281478c26988dbcd366dd99559a582cf6e85
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

teapot: Fix disabling building the manual

Since TEAPOT_BUILD isn't a persistent variable it wasn't being passed
correctly to the BUILD stage.

So, replace TEAPOT_MANUAL and TEAPOT_BUILD for an optional dependency on
lyx that setups the required build flag.

diff --git a/utils/teapot/BUILD b/utils/teapot/BUILD
index 2848925..e013b8d 100755
--- a/utils/teapot/BUILD
+++ b/utils/teapot/BUILD
@@ -1,2 +1 @@
-OPTS="$TEAPOT_BUILD $OPTS" &&
cmake_build
diff --git a/utils/teapot/CONFIGURE b/utils/teapot/CONFIGURE
index 34d0197..6e01914 100755
--- a/utils/teapot/CONFIGURE
+++ b/utils/teapot/CONFIGURE
@@ -1,6 +1 @@
-config_query TEAPOT_MANUAL "build teapot user manual (pdf and html)" y &&
-
-if [[ "$TEAPOT_MANUAL" == "n" ]]
-then
- TEAPOT_BUILD="$TEAPOT_BUILD -DENABLE_HELP=off"
-fi
+persistent_remove TEAPOT_MANUAL
diff --git a/utils/teapot/DEPENDS b/utils/teapot/DEPENDS
index a20349b..3b58ff9 100755
--- a/utils/teapot/DEPENDS
+++ b/utils/teapot/DEPENDS
@@ -1,9 +1,14 @@
+case "$HOST" in
+ (*-musl) depends libtirpc ;;
+esac &&
depends ncurses &&
depends cmake &&

-if [[ "$TEAPOT_MANUAL" = "y" ]]
+optional_depends lyx \
+ -DENABLE_HELP={on,off} \
+ 'for building the user manual (HTML & PDF)' &&
+if is_depends_enabled "$SPELL" lyx
then
- depends lyx &&
depends latex2html
fi &&

diff --git a/utils/teapot/HISTORY b/utils/teapot/HISTORY
index 3cc2f5c..cb99359 100644
--- a/utils/teapot/HISTORY
+++ b/utils/teapot/HISTORY
@@ -1,3 +1,8 @@
+2021-02-14 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, CONFIGURE, DEPENDS: Fixed disabling building the manual
+ * DEPENDS, PRE_BUILD, patches/0001-Add-support-for-libtirpc.patch:
+ Added libtirpc support, for building against musl
+
2012-06-04 Justin Boffemmyer <flux AT sourcemage.org>
* BUILD, CONFIGURE, DEPENDS, DETAILS: spell created

diff --git a/utils/teapot/PRE_BUILD b/utils/teapot/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/utils/teapot/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/utils/teapot/patches/0001-Add-support-for-libtirpc.patch
b/utils/teapot/patches/0001-Add-support-for-libtirpc.patch
new file mode 100644
index 0000000..dcdcdab
--- /dev/null
+++ b/utils/teapot/patches/0001-Add-support-for-libtirpc.patch
@@ -0,0 +1,62 @@
+From 9e713c1c936f40b174fad6a542dbc75a05004530 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT sourcemage.org>
+Date: Sun, 14 Feb 2021 03:27:56 +0100
+Subject: Add support for libtirpc
+
+--
+ CMakeLists.txt | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7cf516af499a..5cfe41e52582 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,9 +11,16 @@ option(ENABLE_STATIC "Link FLTK statically" OFF)
+
+ add_library(teapotlib context.c csv.c eval.c func.c htmlio.c latex.c main.c
misc.c parser.c sc.c scanner.c sheet.c utf8.c wk1.c xdr.c)
+
+-find_library(LIB_PORTABLEXDR portablexdr)
+-if (NOT LIB_PORTABLEXDR)
+- set(LIB_PORTABLEXDR "")
++include(FindPkgConfig)
++pkg_search_module(LIBTIRPC libtirpc)
++if (LIBTIRPC_FOUND)
++ target_link_libraries(teapotlib PUBLIC ${LIBTIRPC_LIBRARIES})
++ include_directories(SYSTEM ${LIBTIRPC_INCLUDE_DIRS})
++else ()
++ find_library(LIB_PORTABLEXDR NAMES portablexdr)
++ if (LIB_PORTABLEXDR)
++ target_link_libraries(teapotlib PUBLIC ${LIB_PORTABLEXDR})
++ endif ()
+ endif ()
+
+ find_package(Curses)
+@@ -36,7 +42,7 @@ endif ()
+ if (CURSES_FOUND)
+ include_directories("${CURSES_INCLUDE_DIR}")
+ add_executable(teapot display.c complete.c)
+- target_link_libraries(teapot teapotlib m ${CURSES_CURSES_LIBRARY}
${LIB_PORTABLEXDR})
++ target_link_libraries(teapot teapotlib m ${CURSES_CURSES_LIBRARY})
+ install(TARGETS teapot DESTINATION bin)
+ endif ()
+
+@@ -50,15 +56,15 @@ if (FLTK_FOUND)
+ if (ENABLE_HELP)
+ set(fteapot_DEB_DEPENDS "${fteapot_DEB_DEPENDS},
libfltk-images1.3")
+ if (ENABLE_STATIC)
+- target_link_libraries(fteapot teapotlib fltk
fltk_images ${LIB_PORTABLEXDR})
++ target_link_libraries(fteapot teapotlib fltk
fltk_images)
+ else ()
+- target_link_libraries(fteapot teapotlib fltk_SHARED
fltk_images_SHARED ${LIB_PORTABLEXDR})
++ target_link_libraries(fteapot teapotlib fltk_SHARED
fltk_images_SHARED)
+ endif ()
+ else ()
+ if (ENABLE_STATIC)
+- target_link_libraries(fteapot teapotlib fltk
fltk_images ${LIB_PORTABLEXDR})
++ target_link_libraries(fteapot teapotlib fltk
fltk_images)
+ else ()
+- target_link_libraries(fteapot teapotlib fltk_SHARED
${LIB_PORTABLEXDR})
++ target_link_libraries(fteapot teapotlib fltk_SHARED)
+ endif ()
+ endif ()
+ install(TARGETS fteapot DESTINATION bin)



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (bedc699d46f576373a4c8313c2337e039f17fb4e), Ismael Luceno, 02/13/2021

Archive powered by MHonArc 2.6.24.

Top of Page