Ticket #55090: libalkimia-KDE_HAVE_GCC_VISIBILITY-hack.patch

File libalkimia-KDE_HAVE_GCC_VISIBILITY-hack.patch, 1.8 KB (added by huppmann, 7 years ago)

patch to macports-port 586bfa29 kde/libalkimia

  • kde/libalkimia/Portfile

    diff --git a/kde/libalkimia/Portfile b/kde/libalkimia/Portfile
    index be0bb726..ae26cb34 100644
    a b checksums md5 8d7b529c7be5f72ae1cbb02e818e9b79 \ 
    4040                    rmd160  33b231fea22f6e64be5bec2accd4fc4aff3636ab
    4141
    4242depends_lib-append  port:kdelibs4
     43
     44patchfiles          patch-src-KDE_HAVE_GCC_VISIBILITY.diff
  • new file kde/libalkimia/files/patch-src-KDE_HAVE_GCC_VISIBILITY.diff

    diff --git a/kde/libalkimia/files/patch-src-KDE_HAVE_GCC_VISIBILITY.diff b/kde/libalkimia/files/patch-src-KDE_HAVE_GCC_VISIBILITY.diff
    new file mode 100644
    index 00000000..c8e18336
    - +  
     1kdemacros.h doesn't do anything unless __KDE_HAVE_GCC_VISIBILITY
     2is defined, so KDE_EXPORT et al. end up being empty, so all the
     3ALK_EXPORTs that expand to that are similarly empty, and the
     4libalkimia ends up having no exported symbols.
     5
     6this ends up being the case when compiling with clang++
     7
     8so lie to kdemacros.h and tell it that we're compiling with gcc
     9even if we're compiling with clang, which is fine (in this case),
     10as clang uses the same __attribute__((visibility("default")))
     11pragma to mark an object for export.
     12
     13--- libalkimia/CMakeLists.txt.orig      2017-10-15 14:58:55.000000000 -0400
     14+++ libalkimia/CMakeLists.txt   2017-10-15 14:53:32.000000000 -0400
     15@@ -38,7 +38,7 @@ find_package(GMP REQUIRED)
     16 
     17 include(KDE4Defaults)
     18 include_directories(${QDBUS_INCLUDE_DIRS} ${KDE4_INCLUDES})
     19-add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DMAKE_ALK_LIB)
     20+add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DMAKE_ALK_LIB -D__KDE_HAVE_GCC_VISIBILITY)
     21 add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
     22 
     23 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")