summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-04-15 15:52:05 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-04-15 15:52:43 +0100
commitdafbb1556e9b31a848134693e6a59cf41f95887b (patch)
tree01fdddc1ffdc8d2aeccd4faee9df6c2dbfed5333 /app-office
parentwww-apache/mod_fastcgi_handler: Remove 0.6 (r0) (diff)
downloadgentoo-dafbb1556e9b31a848134693e6a59cf41f95887b.tar.gz
gentoo-dafbb1556e9b31a848134693e6a59cf41f95887b.tar.bz2
gentoo-dafbb1556e9b31a848134693e6a59cf41f95887b.zip
app-office/texmacs: fix build failure on 32-bit hosts, bug #652054
C compiler compiles this code for bot int-based and size_t-based guile. C++ compiler does not (and is what used by texmacs). Closes: https://bugs.gentoo.org/652054 Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'app-office')
-rw-r--r--app-office/texmacs/files/texmacs-1.99.6-guile-size_t.patch21
-rw-r--r--app-office/texmacs/texmacs-1.99.6-r2.ebuild3
2 files changed, 24 insertions, 0 deletions
diff --git a/app-office/texmacs/files/texmacs-1.99.6-guile-size_t.patch b/app-office/texmacs/files/texmacs-1.99.6-guile-size_t.patch
new file mode 100644
index 000000000000..3068169618fb
--- /dev/null
+++ b/app-office/texmacs/files/texmacs-1.99.6-guile-size_t.patch
@@ -0,0 +1,21 @@
+C compiler compiles this code for bot int-based and size_t-based
+guile. C++ compiler does not (and is what used by texmacs).
+
+https://bugs.gentoo.org/652054
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 37e9e87..5de2711 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -274,11 +274,11 @@ SET(CMAKE_REQUIRED_FLAGS "-Werror ${Guile_CFLAGS}")
+ SET(CMAKE_REQUIRED_INCLUDES ${Guile_INCLUDE_DIRS})
+ SET(CMAKE_REQUIRED_LIBRARIES ${Guile_LIBRARIES})
+
+ MESSAGE(STATUS "Checking the size_t of guile strings")
+
+-CHECK_C_SOURCE_COMPILES( "#include <guile/gh.h>
++CHECK_CXX_SOURCE_COMPILES( "#include <guile/gh.h>
+ #include <libguile.h>
+ void print_string (SCM s) {
+ int len_r;
+ char* r= gh_scm2newstr (s, &len_r); } int main() { return 0; }
+ " _guile_str_size_test)
diff --git a/app-office/texmacs/texmacs-1.99.6-r2.ebuild b/app-office/texmacs/texmacs-1.99.6-r2.ebuild
index e2d3ac76e183..cdc5bdd2566b 100644
--- a/app-office/texmacs/texmacs-1.99.6-r2.ebuild
+++ b/app-office/texmacs/texmacs-1.99.6-r2.ebuild
@@ -51,6 +51,9 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.99-remove-new-declaration.patch
"${FILESDIR}"/${PN}-1.99.6-math_util.patch
+
+ # fix build failure on 32-bit systems, bug #652054
+ "${FILESDIR}"/${PN}-1.99.6-guile-size_t.patch
)
src_configure() {