void-packages/srcpkgs/obexftp/patches/fix-cross.patch
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

79 lines
1.9 KiB
Diff

diff --git a/bfb/CMakeLists.txt b/bfb/CMakeLists.txt
index 008241d..be233aa 100644
--- a/bfb/CMakeLists.txt
+++ b/bfb/CMakeLists.txt
@@ -16,14 +16,17 @@ set ( bfb_HEADERS
${bfb_PUBLIC_HEADERS}
)
-add_executable (crctable
- crcmodel.h
- crcmodel.c
- crctable.c
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/crctable
+ COMMAND cc
+ ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/crctable ${CMAKE_SOURCE_DIR}/bfb/crcmodel.h ${CMAKE_SOURCE_DIR}/bfb/crcmodel.c ${CMAKE_SOURCE_DIR}/bfb/crctable.c
+ DEPENDS crcmodel.h crcmodel.c crctable.c
)
-add_custom_command ( OUTPUT irda_fcs_table.c
- COMMAND crctable
+add_custom_command (
+ OUTPUT irda_fcs_table.c
+ DEPENDS crctable
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/crctable
)
add_library ( bfb
diff --git apps/CMakeLists.txt apps/CMakeLists.txt
index b5c84e4..e43aaeb 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -5,14 +5,21 @@ add_definitions( -DVERSION="${obexftp_VERSION}" )
add_definitions ( -DHAVE_USB )
add_executable ( obexftp_app obexftp.c )
-target_link_libraries ( obexftp_app obexftp )
+target_link_libraries ( obexftp_app
+ multicobex
+ bfb
+ obexftp )
set_target_properties ( obexftp_app PROPERTIES
OUTPUT_NAME obexftp
)
add_executable ( obexftpd_app obexftpd.c )
-target_link_libraries ( obexftpd_app obexftp openobex )
+target_link_libraries ( obexftpd_app
+ multicobex
+ bfb
+ obexftp
+ openobex )
set_target_properties ( obexftpd_app PROPERTIES
OUTPUT_NAME obexftpd
)
diff --git fuse/CMakeLists.txt fuse/CMakeLists.txt
index 0c80d3d..bba052b 100644
--- a/fuse/CMakeLists.txt
+++ b/fuse/CMakeLists.txt
@@ -14,6 +14,8 @@ if ( Fuse_FOUND )
target_link_libraries ( obexfs
obexftp
+ multicobex
+ bfb
${Fuse_LIBRARIES}
${EXPAT_LIBRARIES}
)
@@ -24,6 +26,8 @@ if ( Fuse_FOUND )
target_link_libraries ( obexautofs
obexftp
+ multicobex
+ bfb
${Fuse_LIBRARIES}
)