package/libclc: switch to using LLVM's monorepo
PATCH 1/1 package/libclc: switch to using LLVM's monorepo
The LLVM project has switched to using a monorepo to host all their components. The separate, individual repositories have been closed late 2020 / early 2021. The libclc repository is no longer.
Switch to using the libclc source from the llvm monorepo; switch to using the github helper, to avoid a huge git clone (still 115MiB instead of the previous 172KiB...).
Finding the corresponding commit was made easy because the commit logs embed a reference to the svn revision the git commit is made from (and comparing with a local git clone of the previous repo).
Adapt the build commands and license location accordingly; switch to the new, two-space separator in the hash file.
--- package/libclc/libclc.hash | 4 ++-- package/libclc/libclc.mk | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-)
package/libclc/libclc.hash +2 -2
@@ -1,3 +1,3 @@ # locally calculated -sha256 5ea2cd2fa7fa1474d3e0580064e7a22014ef8d64dbbd7c546277fa4beb5acf86 libclc-d1cbc92e2ceee59963f5c3a576382e5bba31f060.tar.gz -sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 LICENSE.TXT +sha256 b025a5fb23c78deee144e4a7fee76bedca46e327d99695484a2a2cbf7f2192f9 libclc-2abbe2f09119ccad8ad96841ea4632a9c8a8f04d.tar.gz +sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 libclc/LICENSE.TXT
package/libclc/libclc.mk +7 -8
@@ -5,11 +5,10 @@ ################################################################################ # Use the latest commit from release_90 branch. -LIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060 -LIBCLC_SITE = https://git.llvm.org/git/libclc -LIBCLC_SITE_METHOD = git +LIBCLC_VERSION = 2abbe2f09119ccad8ad96841ea4632a9c8a8f04d +LIBCLC_SITE = $(call github,llvm,llvm-project,$(LIBCLC_VERSION)) LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT -LIBCLC_LICENSE_FILES = LICENSE.TXT +LIBCLC_LICENSE_FILES = libclc/LICENSE.TXT LIBCLC_DEPENDENCIES = host-clang host-llvm LIBCLC_INSTALL_STAGING = YES
@@ -28,19 +27,19 @@ LIBCLC_CONF_OPTS = \ --with-cxx-compiler=$(HOSTCXX_NOCCACHE) define LIBCLC_CONFIGURE_CMDS - (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)) + cd $(@D)/libclc && $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS) endef define LIBCLC_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc endef define LIBCLC_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(TARGET_DIR) install endef define LIBCLC_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(STAGING_DIR) install endef $(eval $(generic-package))
Signature · 1 line
2.25.1
PATCH 1/1 package/libclc: switch to using LLVM's monorepo
Hello Yann,
Le 09/01/2021 ? 11:33, Yann E. MORIN a ?crit?:
Quoted 7 lines
The LLVM project has switched to using a monorepo to host all their components. The separate, individual repositories have been closed late 2020 / early 2021. The libclc repository is no longer.
Switch to using the libclc source from the llvm monorepo; switch to using the github helper, to avoid a huge git clone (still 115MiB instead of the previous 172KiB...).
I didn't noticed that the repository is no longer available because I'm using a mirror locally: https://github.com/llvm-mirror/libclc.git
If we really care about thee download size, maybe we can use the mirror before updating to llvm 11.0 that's the first release providing an archive for libclc:
https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libclc-11.0.0.src.tar.xz
Otherwise ok for me.
Quoted 47 lines
Finding the corresponding commit was made easy because the commit logs embed a reference to the svn revision the git commit is made from (and comparing with a local git clone of the previous repo).
Adapt the build commands and license location accordingly; switch to the new, two-space separator in the hash file.
Signed-off-by Yann E. MORIN <[email protected]>Cc Romain Naour <[email protected]>Cc Valentin Korenblit <[email protected]>Cc Michael Opdenacker <[email protected]>--- package/libclc/libclc.hash | 4 ++-- package/libclc/libclc.mk | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-)package/libclc/libclc.hash +2
-2@@ -1,3 +1,3 @@ # locally calculated -sha256 5ea2cd2fa7fa1474d3e0580064e7a22014ef8d64dbbd7c546277fa4beb5acf86 libclc-d1cbc92e2ceee59963f5c3a576382e5bba31f060.tar.gz -sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 LICENSE.TXT +sha256 b025a5fb23c78deee144e4a7fee76bedca46e327d99695484a2a2cbf7f2192f9 libclc-2abbe2f09119ccad8ad96841ea4632a9c8a8f04d.tar.gz +sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 libclc/LICENSE.TXTpackage/libclc/libclc.mk +3
-4@@ -5,11 +5,10 @@ ################################################################################ # Use the latest commit from release_90 branch. -LIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060 -LIBCLC_SITE = https://git.llvm.org/git/libclc -LIBCLC_SITE_METHOD = git +LIBCLC_VERSION = 2abbe2f09119ccad8ad96841ea4632a9c8a8f04d +LIBCLC_SITE = $(call github,llvm,llvm-project,$(LIBCLC_VERSION)) LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT -LIBCLC_LICENSE_FILES = LICENSE.TXT +LIBCLC_LICENSE_FILES = libclc/LICENSE.TXT LIBCLC_DEPENDENCIES = host-clang host-llvm LIBCLC_INSTALL_STAGING = YES
package/libclc/libclc.mk LIBCLC_CONF_OPTS = \ · line 30
Quoted 5 lines
package/libclc/libclc.mk +1
-1@@ -28,19 +27,19 @@ LIBCLC_CONF_OPTS = \ --with-cxx-compiler=$(HOSTCXX_NOCCACHE) define LIBCLC_CONFIGURE_CMDS - (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)) + cd $(@D)/libclc && $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)
Here you're removing the sub-shell but it's used for most other packages.
Best regards,
Romain
Quoted 19 lines
package/libclc/libclc.mk +3
-3endef define LIBCLC_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc endef define LIBCLC_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(TARGET_DIR) install endef define LIBCLC_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(STAGING_DIR) install endef $(eval $(generic-package))
PATCH 1/1 package/libclc: switch to using LLVM's monorepo
Romain, All,
On 2021-01-09 12:25 +0100, Romain Naour spake thusly:
Quoted 11 lines
Le 09/01/2021 ? 11:33, Yann E. MORIN a ?crit?:
Quoted 7 lines
The LLVM project has switched to using a monorepo to host all their components. The separate, individual repositories have been closed late 2020 / early 2021. The libclc repository is no longer.
Switch to using the libclc source from the llvm monorepo; switch to using the github helper, to avoid a huge git clone (still 115MiB instead of the previous 172KiB...).
I didn't noticed that the repository is no longer available because I'm using a mirror locally: https://github.com/llvm-mirror/libclc.git
Ah, but then we would be back to square one when we eventually want to update the libclc version, which is not going to be available in that legacy mirror, but only in the official llvm-project repo...
Quoted 3 lines
If we really care about thee download size, maybe we can use the mirror before updating to llvm 11.0 that's the first release providing an archive for libclc:
https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libclc-11.0.0.src.tar.xz
I would say that if people are concerned about the download size, they would have to go to the llvm project and whine there.
[--SNIP--]
Quoted 8 lines
package/libclc/libclc.mk LIBCLC_CONF_OPTS = \ · line 30
Quoted 6 lines
package/libclc/libclc.mk +1
-1@@ -28,19 +27,19 @@ LIBCLC_CONF_OPTS = \ --with-cxx-compiler=$(HOSTCXX_NOCCACHE) define LIBCLC_CONFIGURE_CMDS - (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)) + cd $(@D)/libclc && $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)Here you're removing the sub-shell but it's used for most other packages.
The subshell is totally useless; it is an anti-pattern.
That most packages use it is not a reason to keep it; instead, we should get rid of it.
Note: I know we have similar constructs in the infras; that's not good, at all...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'