void-packages/srcpkgs/evolution-data-server/patches/gen-tables.patch
Đoàn Trần Công Danh a03d116397 srcpkgs/e*: convert patches to -Np1
```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

64 lines
2.5 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.orig 2018-10-27 15:24:42.168166299 +0200
+++ b/src/camel/CMakeLists.txt 2018-10-27 15:37:04.341765727 +0200
@@ -1,17 +1,10 @@
glib_mkenums(camel-enumtypes camel-enums.h CAMEL_ENUMTYPES_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.orig 2018-10-27 15:42:14.644088211 +0200
+++ b/src/addressbook/libebook-contacts/CMakeLists.txt 2018-10-27 15:45:43.359285829 +0200
@@ -2,31 +2,12 @@
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