From ba759af3a6168f9df4b4d2508c4447a4609f665b Mon Sep 17 00:00:00 2001 From: kevlo Date: Fri, 13 May 2022 01:41:21 +0000 Subject: [PATCH] Import xcb-imdkit-1.0.3 xcb-imdkit is an implementation of xim protocol in xcb, comparing with the implementation of IMDkit with Xlib, and xim inside Xlib, it has less memory foot print, better performance, and safer on malformed client. From Yifei Zhan --- inputmethods/xcb-imdkit/Makefile | 32 +++++++++++++++++++ inputmethods/xcb-imdkit/distinfo | 2 ++ .../xcb-imdkit/patches/patch-CMakeLists_txt | 12 +++++++ .../patches/patch-src_CMakeLists_txt | 12 +++++++ inputmethods/xcb-imdkit/pkg/DESCR | 4 +++ inputmethods/xcb-imdkit/pkg/PLIST | 16 ++++++++++ 6 files changed, 78 insertions(+) create mode 100644 inputmethods/xcb-imdkit/Makefile create mode 100644 inputmethods/xcb-imdkit/distinfo create mode 100644 inputmethods/xcb-imdkit/patches/patch-CMakeLists_txt create mode 100644 inputmethods/xcb-imdkit/patches/patch-src_CMakeLists_txt create mode 100644 inputmethods/xcb-imdkit/pkg/DESCR create mode 100644 inputmethods/xcb-imdkit/pkg/PLIST diff --git a/inputmethods/xcb-imdkit/Makefile b/inputmethods/xcb-imdkit/Makefile new file mode 100644 index 00000000000..b5dc5478b2e --- /dev/null +++ b/inputmethods/xcb-imdkit/Makefile @@ -0,0 +1,32 @@ +COMMENT = implementation of xim protocol in xcb + +DISTNAME = xcb-imdkit-1.0.3 + +SHARED_LIBS += xcb-imdkit 0.0 # 0.0 + +CATEGORIES = inputmethods + +HOMEPAGE = https://github.com/fcitx/xcb-imdkit + +MAINTAINER = Yifei Zhan + +# LGPL 2.1 +PERMIT_PACKAGE= Yes + +WANTLIB += xcb xcb-util + +MASTER_SITES = https://download.fcitx-im.org/fcitx5/xcb-imdkit/ +EXTRACT_SUFX = .tar.xz + +# C11 +COMPILER = base-clang ports-clang ports-gcc +COMPILER_LANGS = c + +MODULES = devel/kf5 +MODQT5_DEPS = No + +BUILD_DEPENDS = devel/uthash + +CFLAGS += -I${LOCALBASE}/include + +.include diff --git a/inputmethods/xcb-imdkit/distinfo b/inputmethods/xcb-imdkit/distinfo new file mode 100644 index 00000000000..457f7322854 --- /dev/null +++ b/inputmethods/xcb-imdkit/distinfo @@ -0,0 +1,2 @@ +SHA256 (xcb-imdkit-1.0.3.tar.xz) = CcJibqKfvWqMZQFEyhJre91jZSWLfDlQgCi/3KbcqOg= +SIZE (xcb-imdkit-1.0.3.tar.xz) = 346404 diff --git a/inputmethods/xcb-imdkit/patches/patch-CMakeLists_txt b/inputmethods/xcb-imdkit/patches/patch-CMakeLists_txt new file mode 100644 index 00000000000..3f304b0f0ad --- /dev/null +++ b/inputmethods/xcb-imdkit/patches/patch-CMakeLists_txt @@ -0,0 +1,12 @@ +Index: CMakeLists.txt +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -40,8 +40,6 @@ set(CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/c + + add_definitions(-D_GNU_SOURCE) + set(CMAKE_C_FLAGS "-fPIC -Wall -Wextra -Wno-unused-parameter -fvisibility=hidden ${CMAKE_C_FLAGS}") +-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed -Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") +-set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_MODULE_LINKER_FLAGS}") + + find_package(XCB REQUIRED COMPONENTS XCB UTIL KEYSYMS) + diff --git a/inputmethods/xcb-imdkit/patches/patch-src_CMakeLists_txt b/inputmethods/xcb-imdkit/patches/patch-src_CMakeLists_txt new file mode 100644 index 00000000000..b73ea195bb7 --- /dev/null +++ b/inputmethods/xcb-imdkit/patches/patch-src_CMakeLists_txt @@ -0,0 +1,12 @@ +Index: src/CMakeLists.txt +--- src/CMakeLists.txt.orig ++++ src/CMakeLists.txt +@@ -36,8 +36,6 @@ target_include_directories(xcb-imdkit + set_target_properties(xcb-imdkit PROPERTIES + VERSION ${XCB_IMDKIT_VERSION} + SOVERSION ${XCB_IMDKIT_SOVERSION} +- C_VISIBILITY_PRESET hidden +- LINK_FLAGS "-Wl,--no-undefined" + EXPORT_NAME XCBImdkit) + + target_link_libraries(xcb-imdkit diff --git a/inputmethods/xcb-imdkit/pkg/DESCR b/inputmethods/xcb-imdkit/pkg/DESCR new file mode 100644 index 00000000000..dad530bf928 --- /dev/null +++ b/inputmethods/xcb-imdkit/pkg/DESCR @@ -0,0 +1,4 @@ +xcb-imdkit is an implementation of xim protocol in xcb, comparing +with the implementation of IMDkit with Xlib, and xim inside Xlib, +it has less memory foot print, better performance, and safer on +malformed client. diff --git a/inputmethods/xcb-imdkit/pkg/PLIST b/inputmethods/xcb-imdkit/pkg/PLIST new file mode 100644 index 00000000000..3a5699591d2 --- /dev/null +++ b/inputmethods/xcb-imdkit/pkg/PLIST @@ -0,0 +1,16 @@ +include/xcb-imdkit/ +include/xcb-imdkit/encoding.h +include/xcb-imdkit/imclient.h +include/xcb-imdkit/imdkit.h +include/xcb-imdkit/xcbimdkit_export.h +include/xcb-imdkit/ximcommon.h +include/xcb-imdkit/ximproto-gen.h +include/xcb-imdkit/ximproto.h +lib/cmake/ +lib/cmake/XCBImdkit/ +lib/cmake/XCBImdkit/XCBImdkitConfig.cmake +lib/cmake/XCBImdkit/XCBImdkitConfigVersion.cmake +lib/cmake/XCBImdkit/XCBImdkitLibraryTargets${MODCMAKE_BUILD_SUFFIX} +lib/cmake/XCBImdkit/XCBImdkitLibraryTargets.cmake +@lib lib/libxcb-imdkit.so.${LIBxcb-imdkit_VERSION} +lib/pkgconfig/xcb-imdkit.pc