added my Recipes
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
From da8c7a027390de7828d4272a3c8bcdbffbac25ad Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Thu, 5 May 2022 16:57:48 +0800
|
||||
Subject: [PATCH] make.rc: set VAL_MTA
|
||||
|
||||
Some build server may provide sendmail like /usr/lib/sendmail which
|
||||
may result the VAL_MTA to be /usr/lib/sendmail, but the sendmail
|
||||
is actually /usr/sbin/sendmail on the target.
|
||||
|
||||
Fixes:
|
||||
# echo "invalide address email" | s-nail -s "test mail" -r test@test.com tester@test.com
|
||||
s-nail: Cannot start /usr/lib/sendmail: executable not found (adjust *mta* variable)
|
||||
/home/root/dead.letter 10/234
|
||||
s-nail: ... message not sent
|
||||
|
||||
# which sendmail
|
||||
/usr/sbin/sendmail
|
||||
|
||||
Upstream-Status: Inappropriate [oe-specific]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
make.rc | 9 +--------
|
||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
||||
|
||||
diff --git a/make.rc b/make.rc
|
||||
index 98bd968..45ac0d4 100644
|
||||
--- a/make.rc
|
||||
+++ b/make.rc
|
||||
@@ -96,14 +96,7 @@ VAL_MAIL=`\
|
||||
|
||||
# Path to the local MTA (Mail-Transfer-Agent).
|
||||
# MTA aliases (aliases(5)) are optionally supported via OPT_MTA_ALIASES.
|
||||
-VAL_MTA=`\
|
||||
- if [ -x /usr/bin/sendmail ]; then \
|
||||
- echo /usr/bin/sendmail;\
|
||||
- elif [ -x /usr/lib/sendmail ]; then \
|
||||
- echo /usr/lib/sendmail;\
|
||||
- else \
|
||||
- echo /usr/sbin/sendmail;\
|
||||
- fi`
|
||||
+VAL_MTA=/usr/sbin/sendmail
|
||||
|
||||
# Today a lot of systems no longer use sendmail(1), but a different MTA.
|
||||
# To ensure compatibility with sendmail(1), a system called
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From fa93dab6393527673e642f26b6ea2c4413dd3cfe Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Wed, 27 Jul 2022 13:40:12 +0800
|
||||
Subject: [PATCH] make-config.sh: hidden the build info
|
||||
|
||||
Use the CC as placeholder to replace the real build information which
|
||||
will be collected via src/mx/accmacvar.c and then added in the final
|
||||
binary s-nail, so hidden the build info to avoid revealing the detailed
|
||||
build info.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
mk/make-config.sh | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/mk/make-config.sh b/mk/make-config.sh
|
||||
index 2d7c619..9146004 100644
|
||||
--- a/mk/make-config.sh
|
||||
+++ b/mk/make-config.sh
|
||||
@@ -3637,15 +3637,15 @@ LIBS=`squeeze_ws "${LIBS}"`
|
||||
COMMLINE=`printf '%s\n' "${COMMLINE}" | ${sed} -e 's/.*--\(.*\)/\1/'`
|
||||
COMMLINE=`squeeze_ws "${COMMLINE}"`
|
||||
|
||||
-i=`printf '%s %s %s\n' "${CC}" "${CFLAGS}" "${i}"`
|
||||
+i="CC"
|
||||
printf '#define VAL_BUILD_CC "%s"\n' "$i" >> ${h}
|
||||
i=`string_to_char_array "${i}"`
|
||||
printf '#define VAL_BUILD_CC_ARRAY %s\n' "$i" >> ${h}
|
||||
-i=`printf '%s %s %s\n' "${CC}" "${LDFLAGS}" "${LIBS}"`
|
||||
+i="CC"
|
||||
printf '#define VAL_BUILD_LD "%s"\n' "$i" >> ${h}
|
||||
i=`string_to_char_array "${i}"`
|
||||
printf '#define VAL_BUILD_LD_ARRAY %s\n' "$i" >> ${h}
|
||||
-i=${COMMLINE}
|
||||
+i="CC"
|
||||
printf '#define VAL_BUILD_REST "%s"\n' "$i" >> ${h}
|
||||
i=`string_to_char_array "${i}"`
|
||||
printf '#define VAL_BUILD_REST_ARRAY %s\n' "$i" >> ${h}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
From 9db4c0f6bc0dd11c77b54296fce6b8afe18f4325 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Nurpmeso <steffen@sdaoden.eu>
|
||||
Date: Thu, 9 Jun 2022 18:26:38 +0800
|
||||
Subject: [PATCH] su_INLINE: eh no; give up, share detection with clang but for
|
||||
a thing
|
||||
|
||||
Upstream-Status: Backport [https://git.sdaoden.eu/browse/s-nail.git/commit/?id=de2a44c393a39d80ddf12154aec94cace84b19c1]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
include/su/code.h | 34 +++++++++-------------------------
|
||||
1 file changed, 9 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/include/su/code.h b/include/su/code.h
|
||||
index 9683f4a..c7a2af3 100644
|
||||
--- a/include/su/code.h
|
||||
+++ b/include/su/code.h
|
||||
@@ -308,29 +308,8 @@ do{\
|
||||
# ifdef DOXYGEN
|
||||
# define su_INLINE inline
|
||||
# define su_SINLINE inline
|
||||
-# elif su_CC_GCC
|
||||
-# if !su_CC_VCHECK_GCC(3, 1)
|
||||
-# define su_INLINE extern __inline__
|
||||
-# define su_SINLINE static __inline__
|
||||
-# elif !defined __GNUC_GNU_INLINE__ /*4.1.3; !su_CC_VCHECK_GCC(4, 2)*/
|
||||
-# define su_INLINE extern __inline __attribute__((always_inline))
|
||||
-# define su_SINLINE static __inline __attribute__((always_inline))
|
||||
- /* gcc 8.3.0 bug: does not gracefully inline with -Os
|
||||
- * gcc 12.1.0 bug: ditto, -Og
|
||||
- * Thus: always gcc-specific! */
|
||||
-# elif 1 /*!defined __OPTIMIZE__ || \
|
||||
- !defined __STDC_VERSION__ || __STDC_VERSION__ +0 < 199901L*/
|
||||
-# define su_INLINE extern __inline __attribute__((gnu_inline))
|
||||
-# define su_SINLINE static __inline __attribute__((gnu_inline))
|
||||
-# elif !defined NDEBUG || !defined __OPTIMIZE__
|
||||
-# define su_INLINE static inline
|
||||
-# define su_SINLINE static inline
|
||||
-# else
|
||||
-# define su_INLINE inline
|
||||
-# define su_SINLINE static inline
|
||||
-# endif
|
||||
-# elif su_CC_CLANG || su_CC_PCC
|
||||
-# if defined __STDC_VERSION__ && __STDC_VERSION__ +0 >= 199901L
|
||||
+# elif su_CC_CLANG || su_CC_GCC || su_CC_PCC
|
||||
+# if defined __STDC_VERSION__ && __STDC_VERSION__ +0 >= 199901l
|
||||
# if !defined NDEBUG || !defined __OPTIMIZE__
|
||||
# define su_INLINE static inline
|
||||
# define su_SINLINE static inline
|
||||
@@ -340,8 +319,13 @@ do{\
|
||||
# define su_SINLINE static inline __attribute__((always_inline))
|
||||
# endif
|
||||
# else
|
||||
-# define su_INLINE static __inline
|
||||
-# define su_SINLINE static __inline
|
||||
+# if su_CC_VCHECK_GCC(3, 1)
|
||||
+# define su_INLINE static __inline __attribute__((always_inline))
|
||||
+# define su_SINLINE static __inline __attribute__((always_inline))
|
||||
+# else
|
||||
+# define su_INLINE static __inline
|
||||
+# define su_SINLINE static __inline
|
||||
+# endif
|
||||
# endif
|
||||
# else
|
||||
# define su_INLINE static /* TODO __attribute__((unused)) alike? */
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 5429b9e343c808951b1418d8626e544c9dcb28de Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Nurpmeso <steffen@sdaoden.eu>
|
||||
Date: Thu, 9 Jun 2022 18:06:04 +0800
|
||||
Subject: [PATCH] su_INLINE: gcc: only GNU specifics after -Og
|
||||
|
||||
Upstream-Status: Backport [https://git.sdaoden.eu/browse/s-nail.git/commit/?id=c5544b66c3b4b2e161166562349908a07e324b38]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
include/su/code.h | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/su/code.h b/include/su/code.h
|
||||
index 4d552c1..9683f4a 100644
|
||||
--- a/include/su/code.h
|
||||
+++ b/include/su/code.h
|
||||
@@ -309,16 +309,17 @@ do{\
|
||||
# define su_INLINE inline
|
||||
# define su_SINLINE inline
|
||||
# elif su_CC_GCC
|
||||
- /* After lots of trouble with OpenBSD/gcc 4.2.1 and SunOS/gcc 3.4.3 */
|
||||
-# if !su_CC_VCHECK_GCC(3, 2) /* Unsure: only used C++ at that time */
|
||||
-# define su_INLINE extern __inline
|
||||
-# define su_SINLINE static __inline
|
||||
-# elif !su_CC_VCHECK_GCC(4, 3)
|
||||
+# if !su_CC_VCHECK_GCC(3, 1)
|
||||
+# define su_INLINE extern __inline__
|
||||
+# define su_SINLINE static __inline__
|
||||
+# elif !defined __GNUC_GNU_INLINE__ /*4.1.3; !su_CC_VCHECK_GCC(4, 2)*/
|
||||
# define su_INLINE extern __inline __attribute__((always_inline))
|
||||
# define su_SINLINE static __inline __attribute__((always_inline))
|
||||
- /* xxx gcc 8.3.0 bug: does not truly inline with -Os */
|
||||
-# elif !su_CC_VCHECK_GCC(8, 3) || !defined __OPTIMIZE__ ||\
|
||||
- !defined __STDC_VERSION__ || __STDC_VERSION__ +0 < 199901L
|
||||
+ /* gcc 8.3.0 bug: does not gracefully inline with -Os
|
||||
+ * gcc 12.1.0 bug: ditto, -Og
|
||||
+ * Thus: always gcc-specific! */
|
||||
+# elif 1 /*!defined __OPTIMIZE__ || \
|
||||
+ !defined __STDC_VERSION__ || __STDC_VERSION__ +0 < 199901L*/
|
||||
# define su_INLINE extern __inline __attribute__((gnu_inline))
|
||||
# define su_SINLINE static __inline __attribute__((gnu_inline))
|
||||
# elif !defined NDEBUG || !defined __OPTIMIZE__
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
Don't wrap CC in quotes as our CC has options and this breaks command lookup.
|
||||
|
||||
Upstream-Status: Backport [https://git.sdaoden.eu/browse/s-nail.git/commit/?h=next&id=c08f3c898def715edf9164e169c3b3522f4c7a1f]
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
From c08f3c898def715edf9164e169c3b3522f4c7a1f Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Nurpmeso <steffen@sdaoden.eu>
|
||||
Date: Tue, 1 Feb 2022 18:54:16 +0100
|
||||
Subject: [-] Remove even more bogus quotation marks (Ross Burton)..
|
||||
|
||||
On top of (mk/su-find-command.sh: clearly define space behaviour)
|
||||
and (mx-test.sh: remove bogus quotation marks) Ross Burton
|
||||
reported some more on the ML. I looked around and hope this was it.
|
||||
---
|
||||
mk/pcb-cc.sh | 2 +-
|
||||
mk/su-make-errors.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mk/pcb-cc.sh b/mk/pcb-cc.sh
|
||||
index 2697c5cf..075f8988 100755
|
||||
--- a/mk/pcb-cc.sh
|
||||
+++ b/mk/pcb-cc.sh
|
||||
@@ -18,7 +18,7 @@ if dowemayhave "$@"; then
|
||||
if acmd_set CC clang || acmd_set CC gcc ||
|
||||
acmd_set CC tcc || acmd_set CC pcc ||
|
||||
acmd_set CC c89 || acmd_set CC c99; then
|
||||
- exec "$CC" "$@"
|
||||
+ exec $CC "$@"
|
||||
else
|
||||
echo >&2 'boing booom tschak'
|
||||
echo >&2 'ERROR: I cannot find a compiler!'
|
||||
diff --git a/mk/su-make-errors.sh b/mk/su-make-errors.sh
|
||||
index f5c5144e..7fede15e 100644
|
||||
--- a/mk/su-make-errors.sh
|
||||
+++ b/mk/su-make-errors.sh
|
||||
@@ -157,7 +157,7 @@ compile_time() { # {{{
|
||||
# The problem is that at least (some versions of) gcc mangle output.
|
||||
# Ensure we get both arguments on one line.
|
||||
# While here sort numerically.
|
||||
- "${CC}" -E "${TARGET}".c |
|
||||
+ ${CC} -E "${TARGET}".c |
|
||||
${awk} '
|
||||
function stripsym(sym){
|
||||
sym = substr(sym, 2)
|
||||
--
|
||||
@@ -0,0 +1,49 @@
|
||||
SUMMARY = "Feature-rich BSD mail(1)"
|
||||
HOMEPAGE = "https://www.sdaoden.eu/code.html#s-mailx"
|
||||
SECTION = "console/network"
|
||||
|
||||
LICENSE = "ISC & BSD-3-Clause & BSD-4-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=87266591c81260f10221f1f38872d023"
|
||||
|
||||
SRC_URI = "https://ftp.sdaoden.eu/${BP}.tar.xz \
|
||||
file://make-errors.patch \
|
||||
file://0001-make.rc-set-VAL_MTA.patch \
|
||||
file://0001-su_INLINE-gcc-only-GNU-specifics-after-Og.patch \
|
||||
file://0001-su_INLINE-eh-no-give-up-share-detection.patch \
|
||||
file://0001-mk-make-config.sh-not-reveal-the-build-env.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "2714d6b8fb2af3b363fc7c79b76d058753716345d1b6ebcd8870ecd0e4f7ef8c"
|
||||
|
||||
DEPENDS = "coreutils-native"
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
inherit update-alternatives
|
||||
|
||||
EXTRA_OEMAKE = "VERBOSE=yes \
|
||||
CONFIG=minimal \
|
||||
OPT_AUTOCC=no \
|
||||
OPT_CROSS_BUILD=yes \
|
||||
OBJDIR=${B} \
|
||||
strip=true \
|
||||
VAL_PREFIX=${prefix} \
|
||||
VAL_BINDIR=${bindir} \
|
||||
VAL_LIBEXECDIR=${libexecdir} \
|
||||
VAL_MANDIR=${mandir} \
|
||||
VAL_SYSCONFDIR=${sysconfdir}"
|
||||
|
||||
do_configure[cleandirs] += "${B}"
|
||||
do_configure() {
|
||||
oe_runmake -C ${S} config
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
oe_runmake -C ${S} build
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake -C ${S} install DESTDIR=${D}
|
||||
}
|
||||
|
||||
ALTERNATIVE:${PN} = "mailx"
|
||||
ALTERNATIVE_TARGET[mailx] = "${bindir}/s-nail"
|
||||
Reference in New Issue
Block a user