[Buildroot] [PATCH 1/1] package/lsof: drop first and second patches

Fabrice Fontaine fontaine.fabrice at gmail.com
Tue Apr 5 20:55:21 UTC 2022


Set LSOF_AR and LSOF_CC to be able to drop first patch which is not
upstreamable: https://github.com/lsof-org/lsof/issues/197

$(TARGET_CONFIGURE_OPTS) must also be removed to avoid overriding AR
and so we can drop LSOF_CFLAGS_OVERRIDE=1 and third patch

DEBUG="$(TARGET_CFLAGS)" can also be dropped from LSOF_BUILD_CMDS as it
is already set in LSOF_CONFIGURE_CMDS

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 package/lsof/0001-makefile.patch                   | 14 --------------
 ...cs.patch => 0001-remove-susvlegacy-funcs.patch} |  0
 package/lsof/0003-override-cflags.patch            | 13 -------------
 package/lsof/lsof.mk                               |  5 +++--
 4 files changed, 3 insertions(+), 29 deletions(-)
 delete mode 100644 package/lsof/0001-makefile.patch
 rename package/lsof/{0002-remove-susvlegacy-funcs.patch => 0001-remove-susvlegacy-funcs.patch} (100%)
 delete mode 100644 package/lsof/0003-override-cflags.patch

diff --git a/package/lsof/0001-makefile.patch b/package/lsof/0001-makefile.patch
deleted file mode 100644
index 65b1b2e2a7..0000000000
--- a/package/lsof/0001-makefile.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -ru lsof_4.81.orig/lsof_4.81_src/lib/Makefile.skel lsof_4.81/lsof_4.81_src/lib/Makefile.skel
---- a/lib/Makefile.skel	2001-02-13 03:12:22.000000000 +0100
-+++ b/lib/Makefile.skel	2006-11-29 13:51:44.000000000 +0100
-@@ -21,8 +21,8 @@
- all:	${LIB}
- 
- ${LIB}:	${OBJ}
--	${AR}
--	${RANLIB}
-+	${AR} cr ${LIB} ${OBJ}
-+	${RANLIB} ${LIB}
- 
- clean:	FRC
- 	rm -f ${LIB} ${OBJ} errs Makefile.bak a.out core
diff --git a/package/lsof/0002-remove-susvlegacy-funcs.patch b/package/lsof/0001-remove-susvlegacy-funcs.patch
similarity index 100%
rename from package/lsof/0002-remove-susvlegacy-funcs.patch
rename to package/lsof/0001-remove-susvlegacy-funcs.patch
diff --git a/package/lsof/0003-override-cflags.patch b/package/lsof/0003-override-cflags.patch
deleted file mode 100644
index 135e599ac9..0000000000
--- a/package/lsof/0003-override-cflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- lsof_4.84/Configure	2008-10-21 18:21:45.000000000 +0200
-+++ lsof_4.84/Configure	2010-11-03 14:00:00.000000000 +0100
-@@ -5206,6 +5206,10 @@
-   cp $LSOF_MKFC ${LSOF_LIB}/$LSOF_LIBMKF
- fi	# }
- cat ./dialects/$LSOF_DIALECT_DIR/$LSOF_REST >> $LSOF_MKFC
-+if test "X$LSOF_CFLAGS_OVERRIDE" != "X"	# {
-+then
-+  sed -i -e 's/^CFLAGS=/override CFLAGS=/' $LSOF_MKFC
-+fi	# }
- if test "X$LSOF_LIB_NO" = "X"	# {
- then
- 
diff --git a/package/lsof/lsof.mk b/package/lsof/lsof.mk
index ff09d64345..e4e339349a 100644
--- a/package/lsof/lsof.mk
+++ b/package/lsof/lsof.mk
@@ -33,7 +33,8 @@ endif
 define LSOF_CONFIGURE_CMDS
 	(cd $(@D) ; \
 		echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" \
-		LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \
+		LSOF_AR="$(TARGET_AR) cr" LSOF_CC=$(TARGET_CC) \
+		LSOF_INCLUDE="$(STAGING_DIR)/usr/include" \
 		LINUX_CLIB=-DGLIBCV=2 LSOF_CFGL="$(TARGET_LDFLAGS)" \
 		./Configure linux)
 	$(LSOF_CONFIGURE_WCHAR_FIXUPS)
@@ -41,7 +42,7 @@ define LSOF_CONFIGURE_CMDS
 endef
 
 define LSOF_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" -C $(@D)
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
 endef
 
 define LSOF_INSTALL_TARGET_CMDS
-- 
2.35.1




More information about the buildroot mailing list