diff options
Diffstat (limited to 'meta/recipes-connectivity/socat')
-rw-r--r-- | meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch | 62 | ||||
-rw-r--r-- | meta/recipes-connectivity/socat/socat_1.8.0.0.bb (renamed from meta/recipes-connectivity/socat/socat_1.7.3.4.bb) | 14 |
2 files changed, 69 insertions, 7 deletions
diff --git a/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch b/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch new file mode 100644 index 0000000000..9051ae1abe --- /dev/null +++ b/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 4f887cc665c9a48b83e20ef4abe57afa7e365e0e Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@eng.windriver.com> | ||
3 | Date: Tue, 5 Dec 2023 23:02:22 -0800 | ||
4 | Subject: [PATCH v2] fix compile procan.c failed | ||
5 | |||
6 | 1. Compile socat failed if out of tree build (build dir != source dir) | ||
7 | ... | ||
8 | gcc -c -D CC="gcc" -o procan.o procan.c | ||
9 | cc1: fatal error: procan.c: No such file or directory | ||
10 | ... | ||
11 | Explicitly add $srcdir to makefile rule | ||
12 | |||
13 | 2. Compile socat failed if multiple words in $(CC), such as CC="gcc -m64" | ||
14 | ... | ||
15 | from ../socat-1.8.0.0/procan.c:10: | ||
16 | ../socat-1.8.0.0/sysincludes.h:18:10: fatal error: inttypes.h: No such file or directory | ||
17 | 18 | #include <inttypes.h> /* uint16_t */ | ||
18 | ... | ||
19 | |||
20 | In commit [Procan: print umask, CC, and couple more new infos][1], | ||
21 | it defeines marcro CC in C source, the space in CC will break | ||
22 | C source compile. Use first word of $(CC) to defeine marco CC | ||
23 | |||
24 | [1] https://repo.or.cz/socat.git/commit/cd5673dbd0786c94e0b3ace7e35fab14c01e3185 | ||
25 | |||
26 | Upstream-Status: Submitted [socat@dest-unreach.org] | ||
27 | Signed-off-by: Hongxu Jia <hongxu.jia@eng.windriver.com> | ||
28 | --- | ||
29 | Makefile.in | 10 +++++----- | ||
30 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
31 | |||
32 | diff --git a/Makefile.in b/Makefile.in | ||
33 | index c01b1a4..48dad69 100644 | ||
34 | --- a/Makefile.in | ||
35 | +++ b/Makefile.in | ||
36 | @@ -109,8 +109,8 @@ depend: $(CFILES) $(HFILES) | ||
37 | socat: socat.o libxio.a | ||
38 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ socat.o libxio.a $(CLIBS) | ||
39 | |||
40 | -procan.o: procan.c | ||
41 | - $(CC) $(CFLAGS) -c -D CC=\"$(CC)\" -o $@ procan.c | ||
42 | +procan.o: $(srcdir)/procan.c | ||
43 | + $(CC) $(CFLAGS) -c -D CC=\"$(firstword $(CC))\" -o $@ $(srcdir)/procan.c | ||
44 | |||
45 | PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o | ||
46 | procan: $(PROCAN_OBJS) | ||
47 | @@ -132,9 +132,9 @@ install: progs $(srcdir)/doc/socat.1 | ||
48 | mkdir -p $(DESTDIR)$(BINDEST) | ||
49 | $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)/socat1 | ||
50 | ln -sf socat1 $(DESTDIR)$(BINDEST)/socat | ||
51 | - $(INSTALL) -m 755 socat-chain.sh $(DESTDIR)$(BINDEST) | ||
52 | - $(INSTALL) -m 755 socat-mux.sh $(DESTDIR)$(BINDEST) | ||
53 | - $(INSTALL) -m 755 socat-broker.sh $(DESTDIR)$(BINDEST) | ||
54 | + $(INSTALL) -m 755 $(srcdir)/socat-chain.sh $(DESTDIR)$(BINDEST) | ||
55 | + $(INSTALL) -m 755 $(srcdir)/socat-mux.sh $(DESTDIR)$(BINDEST) | ||
56 | + $(INSTALL) -m 755 $(srcdir)/socat-broker.sh $(DESTDIR)$(BINDEST) | ||
57 | $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST) | ||
58 | $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST) | ||
59 | mkdir -p $(DESTDIR)$(MANDEST)/man1 | ||
60 | -- | ||
61 | 2.42.0 | ||
62 | |||
diff --git a/meta/recipes-connectivity/socat/socat_1.7.3.4.bb b/meta/recipes-connectivity/socat/socat_1.8.0.0.bb index f3f569d262..912605c95c 100644 --- a/meta/recipes-connectivity/socat/socat_1.7.3.4.bb +++ b/meta/recipes-connectivity/socat/socat_1.8.0.0.bb | |||
@@ -7,13 +7,13 @@ SECTION = "console/network" | |||
7 | 7 | ||
8 | LICENSE = "GPL-2.0-with-OpenSSL-exception" | 8 | LICENSE = "GPL-2.0-with-OpenSSL-exception" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
10 | file://README;beginline=257;endline=287;md5=338c05eadd013872abb1d6e198e10a3f" | 10 | file://README;beginline=241;endline=271;md5=338c05eadd013872abb1d6e198e10a3f" |
11 | 11 | ||
12 | SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \ | 12 | SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \ |
13 | file://0001-fix-compile-procan.c-failed.patch \ | ||
13 | " | 14 | " |
14 | 15 | ||
15 | SRC_URI[md5sum] = "3cca4f8cd9d2d1caabd9cc099451bac9" | 16 | SRC_URI[sha256sum] = "e1de683dd22ee0e3a6c6bbff269abe18ab0c9d7eb650204f125155b9005faca7" |
16 | SRC_URI[sha256sum] = "972374ca86f65498e23e3259c2ee1b8f9dbeb04d12c2a78c0c9b5d1cb97dfdfc" | ||
17 | 17 | ||
18 | inherit autotools | 18 | inherit autotools |
19 | 19 | ||
@@ -29,15 +29,15 @@ TERMBITS_SHIFTS ?= "sc_cv_sys_crdly_shift=9 \ | |||
29 | sc_cv_sys_tabdly_shift=11 \ | 29 | sc_cv_sys_tabdly_shift=11 \ |
30 | sc_cv_sys_csize_shift=4" | 30 | sc_cv_sys_csize_shift=4" |
31 | 31 | ||
32 | TERMBITS_SHIFTS_powerpc = "sc_cv_sys_crdly_shift=12 \ | 32 | TERMBITS_SHIFTS:powerpc = "sc_cv_sys_crdly_shift=12 \ |
33 | sc_cv_sys_tabdly_shift=10 \ | 33 | sc_cv_sys_tabdly_shift=10 \ |
34 | sc_cv_sys_csize_shift=8" | 34 | sc_cv_sys_csize_shift=8" |
35 | 35 | ||
36 | TERMBITS_SHIFTS_powerpc64 = "sc_cv_sys_crdly_shift=12 \ | 36 | TERMBITS_SHIFTS:powerpc64 = "sc_cv_sys_crdly_shift=12 \ |
37 | sc_cv_sys_tabdly_shift=10 \ | 37 | sc_cv_sys_tabdly_shift=10 \ |
38 | sc_cv_sys_csize_shift=8" | 38 | sc_cv_sys_csize_shift=8" |
39 | 39 | ||
40 | PACKAGECONFIG_class-target ??= "tcp-wrappers readline openssl" | 40 | PACKAGECONFIG:class-target ??= "tcp-wrappers readline openssl" |
41 | PACKAGECONFIG ??= "readline openssl" | 41 | PACKAGECONFIG ??= "readline openssl" |
42 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" | 42 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" |
43 | PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline" | 43 | PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline" |
@@ -45,7 +45,7 @@ PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | |||
45 | 45 | ||
46 | CFLAGS += "-fcommon" | 46 | CFLAGS += "-fcommon" |
47 | 47 | ||
48 | do_install_prepend () { | 48 | do_install:prepend () { |
49 | mkdir -p ${D}${bindir} | 49 | mkdir -p ${D}${bindir} |
50 | install -d ${D}${bindir} ${D}${mandir}/man1 | 50 | install -d ${D}${bindir} ${D}${mandir}/man1 |
51 | } | 51 | } |