void-packages/srcpkgs/rmilter/patches/de-vendor.patch
Đoàn Trần Công Danh 0b75183b5e rmilter: de-vendor most of dependencies
While we're at it, set the group to _rmilter.
2021-04-04 13:36:10 +07:00

58 lines
2.3 KiB
Diff

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -240,10 +240,7 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}
"${CMAKE_BINARY_DIR}/src"
"${CMAKE_BINARY_DIR}/"
"${CMAKE_SOURCE_DIR}/compat"
- "${CMAKE_SOURCE_DIR}/uthash"
- "${CMAKE_SOURCE_DIR}/contrib/libucl"
- "${CMAKE_SOURCE_DIR}/contrib/http-parser"
- "${CMAKE_SOURCE_DIR}/contrib/xxhash")
+ )
BISON_TARGET(CfgParser src/cfg_file.y ${CMAKE_CURRENT_BINARY_DIR}/cfg_yacc.c)
FLEX_TARGET(CfgScanner src/cfg_file.l ${CMAKE_CURRENT_BINARY_DIR}/cfg_lex.c)
@@ -376,16 +373,17 @@ IF(ENABLE_MEMCACHED MATCHES "ON")
MODULES libmemcached)
ENDIF()
+pkg_check_modules(hiredis REQUIRED hiredis)
+pkg_check_modules(libucl REQUIRED libucl)
+pkg_check_modules(libzstd REQUIRED libzstd)
+
################################ SOURCES SECTION ###########################
-ADD_SUBDIRECTORY(hiredis)
-INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/hiredis")
+INCLUDE_DIRECTORIES(${hiredis_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${libucl_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${libzstd_INCLUDE_DIRS})
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/lc-btrie")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/")
-ADD_SUBDIRECTORY(contrib/libucl)
-ADD_SUBDIRECTORY(contrib/http-parser)
-ADD_SUBDIRECTORY(contrib/xxhash)
ADD_SUBDIRECTORY(contrib/lc-btrie)
-ADD_SUBDIRECTORY(contrib/zstd)
SET(RMILTERSRC
compat/blake2b-ref.c
@@ -410,12 +408,12 @@ CONFIGURE_FILE(config.h.in config.h)
ADD_EXECUTABLE(rmilter ${RMILTERSRC})
SET_TARGET_PROPERTIES(rmilter PROPERTIES LINKER_LANGUAGE C)
TARGET_LINK_LIBRARIES(rmilter ${RMILTER_REQUIRED_LIBRARIES})
-TARGET_LINK_LIBRARIES(rmilter rmilter-hiredis)
-TARGET_LINK_LIBRARIES(rmilter ucl)
-TARGET_LINK_LIBRARIES(rmilter xxhash)
-TARGET_LINK_LIBRARIES(rmilter rmilter-http-parser)
+TARGET_LINK_LIBRARIES(rmilter ${hiredis_LINK_LIBRARIES})
+TARGET_LINK_LIBRARIES(rmilter ${libucl_LINK_LIBRARIES})
+TARGET_LINK_LIBRARIES(rmilter -lxxhash)
+TARGET_LINK_LIBRARIES(rmilter -lhttp_parser)
TARGET_LINK_LIBRARIES(rmilter lcbtrie)
-TARGET_LINK_LIBRARIES(rmilter rmilter-zstd)
+TARGET_LINK_LIBRARIES(rmilter ${libzstd_LINK_LIBRARIES})
##################### INSTALLATION ##########################################