public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/crossdev:master commit in: wrappers/, /, wrappers/site/
@ 2018-10-20 20:08 Sergei Trofimovich
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2018-10-20 20:08 UTC (permalink / raw
  To: gentoo-commits

commit:     4d6557b3898af143993e46314cd02e0b28e1ca5a
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 20 20:04:36 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 20 20:04:36 2018 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=4d6557b3

config.site add support for /etc/ overrides

Now crossdev imports cache variables from
    /etc/crossdev/include/site

The file format is the same as
    /usr/share/crossdev/include/site

it is useful to drop local overrides.

Reported-by: Alon Bar-Lev
Bug: https://bugs.gentoo.org/264074
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 settings.mk               | 1 +
 wrappers/Makefile         | 6 +++++-
 wrappers/README           | 2 ++
 wrappers/site/config.site | 5 +++++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/settings.mk b/settings.mk
index 01f8e9d..352d1bf 100644
--- a/settings.mk
+++ b/settings.mk
@@ -8,3 +8,4 @@ PREFIX ?= $(EPREFIX)/usr
 
 INSTALL_DIR  = install -m 755 -d
 INSTALL_EXEC = install -m 755
+INSTALL_DATA = install -m 644

diff --git a/wrappers/Makefile b/wrappers/Makefile
index 4aee778..19a1da3 100644
--- a/wrappers/Makefile
+++ b/wrappers/Makefile
@@ -6,11 +6,14 @@ include ../settings.mk
 PORTDIR ?= $(shell portageq envvar PORTDIR)
 FNAMES = cross-emerge  cross-fix-root  cross-pkg-config  emerge-wrapper
 SITEDIR = $(PREFIX)/share/crossdev/include/site
+ETC_SITEDIR = $(EPREFIX)/etc/crossdev/include/site
 
 all:
 
 install:
-	$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/bin/ $(DESTDIR)$(SITEDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/bin/ $(DESTDIR)$(SITEDIR) $(DESTDIR)$(ETC_SITEDIR)
+	$(INSTALL_DATA) README $(DESTDIR)$(ETC_SITEDIR)
+	sed -i -e s:@PREFIX@:$(PREFIX):g $(DESTDIR)$(ETC_SITEDIR)/README
 	$(INSTALL_EXEC) $(FNAMES) $(DESTDIR)$(PREFIX)/bin/
 	sed -i -e "s:@GENTOO_PORTAGE_EPREFIX@:$(EPREFIX):g" $(DESTDIR)$(PREFIX)/bin/cross-emerge
 	sed -i -e "s:@GENTOO_PORTAGE_EPREFIX@:$(EPREFIX):g" $(DESTDIR)$(PREFIX)/bin/emerge-wrapper
@@ -19,6 +22,7 @@ install:
 	cp -a site $(DESTDIR)$(PREFIX)/share/crossdev/include/
 	sed -i -e s:@PREFIX@:$(PREFIX):g $(DESTDIR)$(PREFIX)/bin/emerge-wrapper
 	sed -i -e s:@SITEDIR@:$(SITEDIR):g $(DESTDIR)$(SITEDIR)/config.site
+	sed -i -e s:@ETC_SITEDIR@:$(ETC_SITEDIR):g $(DESTDIR)$(SITEDIR)/config.site
 	mv $(DESTDIR)$(SITEDIR)/config.site $(DESTDIR)$(PREFIX)/share/
 	ln -sf $(PORTDIR)/profiles/embedded $(DESTDIR)$(PREFIX)/share/crossdev/etc/portage/make.profile
 

diff --git a/wrappers/README b/wrappers/README
new file mode 100644
index 0000000..0ff42ac
--- /dev/null
+++ b/wrappers/README
@@ -0,0 +1,2 @@
+Drop here your local overrides for autoconf cache variables.
+See @PREFIX@/share/config.site for details.

diff --git a/wrappers/site/config.site b/wrappers/site/config.site
index 8205657..be1afac 100755
--- a/wrappers/site/config.site
+++ b/wrappers/site/config.site
@@ -2,8 +2,12 @@
 # Copyright 2009-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+# provided by crossdev
 SITEDIR="@SITEDIR@"
 
+# user override
+ETC_SITEDIR="@ETC_SITEDIR@"
+
 config_site_arch() {
 	local host="${CHOST%%-*}"
 
@@ -41,6 +45,7 @@ config_site_names() {
 
 	for x in ${sites} ${CHOST}; do
 		[ -e "${SITEDIR}/${x}" ] && echo "${SITEDIR}/${x}"
+		[ -e "${ETC_SITEDIR}/${x}" ] && echo "${ETC_SITEDIR}/${x}"
 	done
 }
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-20 20:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-20 20:08 [gentoo-commits] proj/crossdev:master commit in: wrappers/, /, wrappers/site/ Sergei Trofimovich

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