void-packages/srcpkgs/evolution-data-server/patches/gen-tables.patch
2021-12-06 11:02:09 +01:00

64 lines
2.3 KiB
Diff

camel-gen-tables and gen-western-table are executed in the build process so
they need to be built for the host architecture
--- a/src/camel/CMakeLists.txt
+++ b/src/camel/CMakeLists.txt
@@ -7,18 +7,10 @@ glib_mkenums_multiple(camel-enumtypes CAMEL_ENUMTYPES_H
camel-url.h
)
-add_executable(camel-gen-tables
- camel-gen-tables.c
-)
-
-target_include_directories(camel-gen-tables PUBLIC
- ${CMAKE_BINARY_DIR}
-)
-
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c
- DEPENDS camel-gen-tables
+ COMMAND /usr/bin/gcc ${CMAKE_CURRENT_SOURCE_DIR}/camel-gen-tables.c -I${CMAKE_BINARY_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables
+ && ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c
)
set(SOURCES
--- a/src/addressbook/libebook-contacts/CMakeLists.txt
+++ b/src/addressbook/libebook-contacts/CMakeLists.txt
@@ -2,31 +2,12 @@ glib_mkenums(e-book-contacts-enumtypes e-book-contacts-enums.h E_BOOK_CONTACTS_E
add_pkgconfig_file(libebook-contacts.pc.in libebook-contacts-${API_VERSION}.pc)
-add_executable(gen-western-table
- gen-western-table.c
-)
-
-target_compile_definitions(gen-western-table PRIVATE
- -DG_LOG_DOMAIN=\"gen-western-table\"
-)
-
-target_compile_options(gen-western-table PUBLIC
- ${GNOME_PLATFORM_CFLAGS}
-)
-
-target_include_directories(gen-western-table PUBLIC
- ${CMAKE_BINARY_DIR}
- ${GNOME_PLATFORM_INCLUDE_DIRS}
-)
-
-target_link_libraries(gen-western-table
- ${GNOME_PLATFORM_LDFLAGS}
-)
-
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h
- DEPENDS gen-western-table e-name-western-tables.h.in
+ COMMAND /usr/bin/gcc ${CMAKE_CURRENT_SOURCE_DIR}/gen-western-table.c -I${CMAKE_BINARY_DIR}
+ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 -o ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table
+ && ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h
+ DEPENDS e-name-western-tables.h.in
)
set(DEPENDENCIES