pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/multimedia/gerbera gerbera: fix build on systems that ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/30896be2d708
branches:  trunk
changeset: 386330:30896be2d708
user:      nros <nros%pkgsrc.org@localhost>
date:      Thu Oct 06 08:41:03 2022 +0000

description:
gerbera: fix build on systems that use const in second argument to iconv

diffstat:

 multimedia/gerbera/distinfo                                    |   4 +-
 multimedia/gerbera/patches/patch-CMakeLists.txt                |  23 ++++++++++
 multimedia/gerbera/patches/patch-src_util_string__converter.cc |  17 +++++++
 3 files changed, 43 insertions(+), 1 deletions(-)

diffs (61 lines):

diff -r 7b03c8b445b8 -r 30896be2d708 multimedia/gerbera/distinfo
--- a/multimedia/gerbera/distinfo       Thu Oct 06 07:44:46 2022 +0000
+++ b/multimedia/gerbera/distinfo       Thu Oct 06 08:41:03 2022 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.2 2022/07/11 11:49:48 adam Exp $
+$NetBSD: distinfo,v 1.3 2022/10/06 08:41:03 nros Exp $
 
 BLAKE2s (gerbera-1.11.0.tar.gz) = b5262860214cd153029adb3895f4c6d332a3ebd40d38f45728af001b80a71eaa
 SHA512 (gerbera-1.11.0.tar.gz) = ae2b3342b3b57ce6d656d0ebadfd73b5f2764f2164314f6b0deac170a82e6861349c37732e6914454918112124038b221dbd4882001b5de51a49326432ccd70f
 Size (gerbera-1.11.0.tar.gz) = 4115178 bytes
+SHA1 (patch-CMakeLists.txt) = 97f56d9c927c40ad8179d80f97f338441fae142f
 SHA1 (patch-src_main.cc) = b7b59975bc477141c8a92af9200ba2b301e55926
+SHA1 (patch-src_util_string__converter.cc) = f60a91b8ccdb851c5e939254e429ac08f5715196
diff -r 7b03c8b445b8 -r 30896be2d708 multimedia/gerbera/patches/patch-CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/gerbera/patches/patch-CMakeLists.txt   Thu Oct 06 08:41:03 2022 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2022/10/06 08:41:03 nros Exp $
+
+* fix build on systems that have const in second argument to iconv
+
+--- CMakeLists.txt.orig        2022-05-03 17:39:25.000000000 +0000
++++ CMakeLists.txt
+@@ -326,6 +326,16 @@ target_link_libraries(libgerbera PUBLIC 
+ 
+ find_package(Iconv REQUIRED)
+ target_link_libraries(libgerbera PUBLIC Iconv::Iconv)
++include(CheckPrototypeDefinition)
++set(CMAKE_REQUIRED_LIBRARIES Iconv::Iconv)
++check_prototype_definition(iconv
++  "size_t iconv(iconv_t cd, const char ** src, size_t * srcl, char ** dst, size_t * dstl)"
++  0 "iconv.h" ICONV_CONST)
++if(ICONV_CONST)
++    target_compile_definitions(libgerbera PRIVATE ICONV_CONST)
++endif()
++unset(CMAKE_REQUIRED_LIBRARIES)
++
+ 
+ find_package(UUID REQUIRED)
+ target_link_libraries(libgerbera PUBLIC UUID::UUID)
diff -r 7b03c8b445b8 -r 30896be2d708 multimedia/gerbera/patches/patch-src_util_string__converter.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/gerbera/patches/patch-src_util_string__converter.cc    Thu Oct 06 08:41:03 2022 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_util_string__converter.cc,v 1.3 2022/10/06 08:41:03 nros Exp $
+
+* fix build on systems that have const in second argument to iconv
+
+--- src/util/string_converter.cc.orig  2022-10-06 08:09:22.564707578 +0000
++++ src/util/string_converter.cc
+@@ -122,8 +122,8 @@ std::string StringConverter::_convert(co
+     // log_debug(("iconv: BEFORE: input bytes left: {}  output bytes left: {}",
+     //        input_bytes, output_bytes));
+ #if defined(ICONV_CONST) || defined(SOLARIS)
+-    int ret = iconv(cd, inputPtr, &input_bytes,
+-        output_ptr, &output_bytes);
++    int ret = iconv(cd, inputPtr, &inputBytes,
++        outputPtr, &outputBytes);
+ #else
+     int ret = iconv(cd, const_cast<char**>(inputPtr), &inputBytes,
+         outputPtr, &outputBytes);



Home | Main Index | Thread Index | Old Index