aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-12-10 12:57:35 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-12-10 12:57:35 +0200
commita66642f744406a052aef5c3bdb5eac12ca37bb1b (patch)
tree47c6f5901afdd830c7cdeaf7feaf8779a5a3919c
parent8908c82bf9ea99bac1fe112504550692046a11a6 (diff)
downloadguix-a66642f744406a052aef5c3bdb5eac12ca37bb1b.tar
guix-a66642f744406a052aef5c3bdb5eac12ca37bb1b.tar.gz
gnu: cdrkit-libre: Fix cross-compiling.
* gnu/packages/cdrom.scm (cdrkit-libre)[source]: Add patch. * gnu/packages/patches/cdrkit-libre-cross-compile.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/cdrom.scm1
-rw-r--r--gnu/packages/patches/cdrkit-libre-cross-compile.patch32
3 files changed, 34 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index c55966762b..efc12fa370 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -925,6 +925,7 @@ dist_patch_DATA = \
%D%/packages/patches/catdoc-CVE-2017-11110.patch \
%D%/packages/patches/circos-remove-findbin.patch \
%D%/packages/patches/cdparanoia-fpic.patch \
+ %D%/packages/patches/cdrkit-libre-cross-compile.patch \
%D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \
%D%/packages/patches/ceph-disable-cpu-optimizations.patch \
%D%/packages/patches/ceph-boost-compat.patch \
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index 65f7409232..1ad4829dc4 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -929,6 +929,7 @@ Supported extensions to ISO 9660 are Rock Ridge, Joliet, AAIP, zisofs.")
(sha256
(base32
"0g2zyzb56czh429qy87lvaddzjnlcq8c616ddxsmsshz3clhyzrh"))
+ (patches (search-patches "cdrkit-libre-cross-compile.patch"))
(modules '((guix build utils)))
(snippet
#~(begin
diff --git a/gnu/packages/patches/cdrkit-libre-cross-compile.patch b/gnu/packages/patches/cdrkit-libre-cross-compile.patch
new file mode 100644
index 0000000000..09c34b8c0a
--- /dev/null
+++ b/gnu/packages/patches/cdrkit-libre-cross-compile.patch
@@ -0,0 +1,32 @@
+Patch extracted from a set of patches to cross-compile ffmeg and dependencies for mingw-w64.
+https://github.com/Warblefly/MultimediaTools-mingw-w64/commit/01e30a17637b67afd65c1e24302f8daf94b19b32#diff-503bd595ad2a49840cc56acdb3432487a20a0acb7981ce83be51fe311216de8f
+
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index 99a69fd..e5ba8a7 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -35,8 +35,6 @@ endif(VA_LIST_IS_ARRAY)
+ INCLUDE(TestBigEndian)
+ TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
+
+-TRY_RUN(BITFIELDS_HTOL TEST_DUMMY ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/test_BITFIELDS_HTOL.c)
+-
+ INCLUDE(CheckIncludeFiles)
+
+ #SET(CMAKE_REQUIRED_INCLUDES "/usr/include;/usr/local/include")
+diff --git a/include/xconfig.h.in b/include/xconfig.h.in
+index c130600..476c00b 100644
+--- a/include/xconfig.h.in
++++ b/include/xconfig.h.in
+@@ -233,7 +233,11 @@
+ /* If using network byte order */
+ #cmakedefine WORDS_BIGENDIAN
+ /* If high bits come first in structures */
+-#cmakedefine BITFIELDS_HTOL
++#ifdef WORDS_BIGENDIAN
++#define BITFIELDS_HTOL
++#else
++#define BITFIELDS_LTOH
++#endif
+ #define HAVE_C_BIGENDIAN /* Flag that WORDS_BIGENDIAN test was done */
+ #define HAVE_C_BITFIELDS /* Flag that BITFIELDS_HTOL test was done */