public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2017-08-15 11:40 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2017-08-15 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     2e532c0afb904d63c70525fd387431c42cee6f82
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 15 07:11:35 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 07:11:35 2017 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=2e532c0a

Support substituting functions.sh path as well, to fix Prefix

Bug: https://bugs.gentoo.org/627824

 Makefile    | 5 ++++-
 eltpatch.in | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 05a8b7e..90ddc87 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 DESTDIR =
-prefix = /usr
+rootprefix =
+gentoofuncs = $(rootprefix)/lib/gentoo/functions.sh
+prefix = $(rootprefix)/usr
 bindir = $(prefix)/bin
 libdirname = lib
 datadir = $(prefix)/share
@@ -16,6 +18,7 @@ eltpatch: eltpatch.in
 	rm -f $@ $@.tmp
 	sed -e 's^@ELT_patchdir@^$(patchdir)^' \
 		-e 's^@ELT_libdir@^$(libdirname)^' \
+		-e 's^@ELT_gentoofuncs@^$(gentoofuncs)^' \
 		$< > $@.tmp
 	chmod +x $@.tmp
 	mv $@.tmp $@

diff --git a/eltpatch.in b/eltpatch.in
index 7dae4bb..a4e87d2 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -2,7 +2,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-source "/lib/gentoo/functions.sh" || exit 1
+source "@ELT_gentoofuncs@" || exit 1
 
 die() {
 	eerror "${@}"


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2017-08-26  7:10 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2017-08-26  7:10 UTC (permalink / raw
  To: gentoo-commits

commit:     f632a16afebd48162815c3001554cf9bbb91e1da
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 25 11:06:40 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug 25 13:21:35 2017 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=f632a16a

Prefer GNU tools on BSD systems

Bug: https://bugs.gentoo.org/628882

 eltpatch.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eltpatch.in b/eltpatch.in
index a4e87d2..8f6f9f3 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -2,6 +2,12 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+# BSD support; https://bugs.gentoo.org/628882
+# note: this need to happen before function definitions
+type -P gfind &>/dev/null && alias find=gfind
+type -P gpatch &>/dev/null && alias patch=gpatch
+type -P gsed &>/dev/null && alias sed=gsed
+
 source "@ELT_gentoofuncs@" || exit 1
 
 die() {


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2017-08-26 11:38 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2017-08-26 11:38 UTC (permalink / raw
  To: gentoo-commits

commit:     64edea29f6e62c0ac1005d072f391fe5d4dc0822
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 26 11:16:13 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 26 11:16:13 2017 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=64edea29

Use explicit tool vars instead of aliases

Aliases do not work for calling the tool in a subshell, so just
explicitly set FIND, PATCH and SED variables to the correct tool,
and use them to call them.

 eltpatch.in | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/eltpatch.in b/eltpatch.in
index 8f6f9f3..d8c847b 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -3,10 +3,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 # BSD support; https://bugs.gentoo.org/628882
-# note: this need to happen before function definitions
-type -P gfind &>/dev/null && alias find=gfind
-type -P gpatch &>/dev/null && alias patch=gpatch
-type -P gsed &>/dev/null && alias sed=gsed
+type -P gfind &>/dev/null && FIND=gfind || FIND=find
+type -P gpatch &>/dev/null && PATCH=gpatch || PATCH=patch
+type -P gsed &>/dev/null && SED=gsed || SED=sed
 
 source "@ELT_gentoofuncs@" || exit 1
 
@@ -40,11 +39,11 @@ ELT_try_and_apply_patch() {
 	# Save file for permission restoration.  `patch` sometimes resets things.
 	# Ideally we'd want 'stat -c %a', but stat is highly non portable and we are
 	# guaranted to have GNU find, so use that instead.
-	local perms="$(find ${file} -maxdepth 0 -printf '%m')"
+	local perms="$(${FIND} ${file} -maxdepth 0 -printf '%m')"
 	# We only support patchlevel of 0 - why worry if its static patches?
-	if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
+	if ${PATCH} -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
 		einfo "  Applying ${disp} ..."
-		patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1
+		${PATCH} -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1
 		ret=$?
 		ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}"
 	else
@@ -92,9 +91,9 @@ ELT_walk_patches() {
 	pushd "@ELT_patchdir@" >/dev/null || die "pushd to elt-patch dir failed"
 
 	# Go through the patches in reverse order (newer version to older)
-	for patch in $(find "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r) ; do
+	for patch in $(${FIND} "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r) ; do
 		tmp="${TMPDIR}/libtool-elt.patch"
-		sed "${sed_args[@]}" "${patch}" > "${tmp}" || die "sed on patch ${patch} failed"
+		${SED} "${sed_args[@]}" "${patch}" > "${tmp}" || die "sed on patch ${patch} failed"
 		if ELT_try_and_apply_patch "${file}" "${tmp}" "${patch}" ; then
 			# Break to unwind w/popd rather than return directly
 			ret=0
@@ -192,7 +191,7 @@ elibtoolize() {
 		[[ -f ${S}/ltmain.sh || -f ${S}/configure ]] && dirs+=( "${S}" )
 	else
 		[[ ${#dirs[@]} -eq 0 ]] && dirs+=( "${S}" )
-		dirs=( $(find "${dirs[@]}" '(' -name ltmain.sh -o -name configure ')' -printf '%h\n' | sort -u) )
+		dirs=( $(${FIND} "${dirs[@]}" '(' -name ltmain.sh -o -name configure ')' -printf '%h\n' | sort -u) )
 	fi
 
 	local d p ret


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2020-03-13 14:37 Michael Haubenwallner
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Haubenwallner @ 2020-03-13 14:37 UTC (permalink / raw
  To: gentoo-commits

commit:     a13029e428c2bc84343bb0a3d629ab7c7f33590c
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 28 14:11:53 2019 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Fri Mar 13 13:56:24 2020 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=a13029e4

winnt: die if libtool version is not 2.4.6+

Reorder in elt_patches to perform the check early.

Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>

 eltpatch.in | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 6b69216..e12f754 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -179,7 +179,7 @@ elibtoolize() {
 		*-hpux*)    elt_patches+=" hpux-conf deplibs hc-flag-ld hardcode hardcode-relink relink-prog no-lc" ;;
 		*-irix*)    elt_patches+=" irix-ltmain" ;;
 		*-mint*)    elt_patches+=" mint-conf" ;;
-		*-winnt*)   elt_patches+=" winnt-conf winnt-ltmain" ;;
+		*-winnt*)   elt_patches+=" winnt-ltmain winnt-conf" ;;
 	esac
 
 	if ${LD} --version 2>&1 | grep -qs 'GNU gold'; then
@@ -286,6 +286,18 @@ elibtoolize() {
 						ret=$?
 					fi
 					;;
+				winnt-ltmain)
+					local version=$(ELT_libtool_version "${d}/ltmain.sh")
+					case ${version} in
+					2.4.6 | 2.4.6[' .']* )
+						ELT_walk_patches "${d}/ltmain.sh" "${p}"
+						ret=$?
+						;;
+					*)
+						die "${p}: need libtool 2.4.6+ (not ${version}) in ${d}"
+						;;
+					esac
+					;;
 				*)
 					ELT_walk_patches "${d}/ltmain.sh" "${p}"
 					ret=$?


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2021-11-04 10:33 Mike Frysinger
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2021-11-04 10:33 UTC (permalink / raw
  To: gentoo-commits

commit:     c4ea896a322a84876a92bc530ef506c098f40c2c
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  4 10:19:36 2021 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Nov  4 10:19:36 2021 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=c4ea896a

eltpatch: allow ELT_patchdir to be overridden via env

This will allow for local testing.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 eltpatch.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/eltpatch.in b/eltpatch.in
index 887fc6f..7d3980e 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -7,6 +7,8 @@ type -P gfind &>/dev/null && FIND=gfind || FIND=find
 type -P gpatch &>/dev/null && PATCH=gpatch || PATCH=patch
 type -P gsed &>/dev/null && SED=gsed || SED=sed
 
+: "${ELT_patchdir:=@ELT_patchdir@}"
+
 source "@ELT_gentoofuncs@" || exit 1
 
 die() {
@@ -74,7 +76,7 @@ ELT_walk_patches() {
 	local ret=1
 	local file=$1
 	local patch_set=$2
-	local patch_dir="@ELT_patchdir@/${patch_set}"
+	local patch_dir="${ELT_patchdir}/${patch_set}"
 	local rem_int_dep=$3
 
 	[[ -z ${patch_set} ]] && return 1
@@ -88,7 +90,7 @@ ELT_walk_patches() {
 		sed_args+=( -e "s|@REM_INT_DEP@|${rem_int_dep}|g" )
 	fi
 
-	pushd "@ELT_patchdir@" >/dev/null || die "pushd to elt-patch dir failed"
+	pushd "${ELT_patchdir}" >/dev/null || die "pushd to elt-patch dir failed"
 
 	# Go through the patches in reverse order (newer version to older)
 	for patch in $(${FIND} "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r) ; do


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2021-11-04 10:33 Mike Frysinger
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2021-11-04 10:33 UTC (permalink / raw
  To: gentoo-commits

commit:     964785ff0def008f3367f9f1d3f7eca2b17f78b6
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  4 10:18:48 2021 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Nov  4 10:18:48 2021 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=964785ff

ignore generated eltpatch

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..728412a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*~
+
+/eltpatch


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2024-01-14 18:35 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2024-01-14 18:35 UTC (permalink / raw
  To: gentoo-commits

commit:     dd72f5f57aee037d93922129018a8c120fc49237
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 14 18:33:53 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 18:34:29 2024 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=dd72f5f5

Makefile: add trivial check target

Signed-off-by: Sam James <sam <AT> gentoo.org>

 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 90ddc87..badd60b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 DESTDIR =
@@ -26,6 +26,9 @@ eltpatch: eltpatch.in
 clean:
 	rm -f eltpatch
 
+check: eltpatch
+	cd tests && ./setup.sh && ./run.sh
+
 install-bin: eltpatch
 	install -d $(DESTDIR)$(bindir)
 	install -m0755 $< $(DESTDIR)$(bindir)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2024-05-12 15:38 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2024-05-12 15:38 UTC (permalink / raw
  To: gentoo-commits

commit:     bc356deb703c7f5352470ccc2aa647d9a17a804d
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Mar 27 21:36:41 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 12 15:38:28 2024 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=bc356deb

eltpatch.in: support slibtoolize

Patching ltmain.sh is not applicable when LIBTOOLIZE=slibtoolize which
copies a ltmain.sh script with #!/dev/null in the shebang.

Bug: https://bugs.gentoo.org/927823
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/elt-patches/pull/1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eltpatch.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 8c6daee..f1afdb8 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -217,7 +217,7 @@ elibtoolize() {
 		fi
 
 		# patching ltmain.sh
-		[[ -f ${d}/ltmain.sh ]] &&
+		[[ -f ${d}/ltmain.sh ]] && sed -n '1p' ${d}/ltmain.sh | grep -qsv '/dev/null' &&
 		for p in ${elt_patches} ; do
 			ret=0
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2024-10-19  9:17 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2024-10-19  9:17 UTC (permalink / raw
  To: gentoo-commits

commit:     fe12f228730a096bd9d24f8331f3cf8b477765b3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 19 09:14:08 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 19 09:16:31 2024 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=fe12f228

Makefile: cleanup temporary test files in clean target

Matching .gitignore.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index badd60b..6e3c454 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,8 @@ eltpatch: eltpatch.in
 
 clean:
 	rm -f eltpatch
+	rm -rf tests/*.tmp
+	rm -rf tests/libtools
 
 check: eltpatch
 	cd tests && ./setup.sh && ./run.sh


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] proj/elt-patches:master commit in: /
@ 2024-10-19  9:20 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2024-10-19  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     4aa3f439d814807d093b2a7731a3b7b25ed520cd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 19 09:20:18 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 19 09:20:18 2024 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=4aa3f439

eltpatch.in: fix some indentation nits

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eltpatch.in | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/eltpatch.in b/eltpatch.in
index 2714ba0..23463be 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -61,9 +61,9 @@ ELT_try_and_apply_patch() {
 #
 ELT_libtool_version() {
 	(
-	unset VERSION
-	eval $(grep -e '^[[:space:]]*VERSION=' "$1")
-	echo "${VERSION:-0}"
+		unset VERSION
+		eval $(grep -e '^[[:space:]]*VERSION=' "$1")
+		echo "${VERSION:-0}"
 	)
 }
 
@@ -333,8 +333,8 @@ elibtoolize() {
 							fi
 						else
 							if grep -qs 'We do not want portage' "${d}/ltmain.sh" ; then
-							#	ewarn "  Portage patch seems to be already applied."
-							#	ewarn "  Please verify that it is not needed."
+								#ewarn "  Portage patch seems to be already applied."
+								#ewarn "  Please verify that it is not needed."
 								:
 							else
 								local version=$(ELT_libtool_version "${d}"/ltmain.sh)
@@ -417,11 +417,11 @@ elibtoolize() {
 					ELT_walk_patches "${d}/configure" "${p}"
 					ret=$?
 					;;
-                fix-file-check)
+				fix-file-check)
 					ELT_walk_patches "${d}/configure" "${p}"
 					ret=$?
 					;;
-                clang-runtime)
+				clang-runtime)
 					ELT_walk_patches "${d}/configure" "${p}"
 					ret=$?
 					;;


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-19  9:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26 11:38 [gentoo-commits] proj/elt-patches:master commit in: / Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-10-19  9:20 Sam James
2024-10-19  9:17 Sam James
2024-05-12 15:38 Sam James
2024-01-14 18:35 Sam James
2021-11-04 10:33 Mike Frysinger
2021-11-04 10:33 Mike Frysinger
2020-03-13 14:37 Michael Haubenwallner
2017-08-26  7:10 Michał Górny
2017-08-15 11:40 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox