[MacPorts] #70411: msp430-elf-gcc: version is not fixed
MacPorts
noreply at macports.org
Sun Jul 21 21:23:24 UTC 2024
#70411: msp430-elf-gcc: version is not fixed
-----------------------------+--------------------------
Reporter: cooljeanius | Owner: edilmedeiros
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.9.3
Resolution: | Keywords:
Port: msp430-elf-gcc |
-----------------------------+--------------------------
Comment (by ryandesign):
I tried removing the block to see what you meant by "so that newlib will
compile correctly". It failed at the extract phase:
{{{
Error: Failed to extract msp430-elf-gcc: symlink:
/opt/local/var/macports/build/_Volumes_Shared_macports-ports_cross_msp430
-elf-gcc/msp430-elf-gcc/work/gcc-9.3.1.2/ -> /opt/local/var/macports/build
/_Volumes_Shared_macports-ports_cross_msp430-elf-gcc/msp430-elf-
gcc/work/newlib-2.4.0/newlib: no such file or directory
}}}
The crossgcc portgroup is the one trying to create this symlink and
assuming that the gcc version specified to `crossgcc.setup` is also in the
directory name, which in this case it isn't.
This patch lets me get past the extract, patch, and configure phases and
I'm now waiting for the build to finish:
{{{#!diff
--- a/cross/msp430-elf-gcc/Portfile
+++ b/cross/msp430-elf-gcc/Portfile
@@ -3,6 +3,11 @@
PortSystem 1.0
PortGroup crossgcc 1.0
+# This post-extract block must be declared before the one created by
crossgcc.setup.
+post-extract {
+ ln -s gcc-${crossgcc.version} ${workpath}/gcc-${version}
+}
+
crossgcc.setup msp430-elf 9.3.0
crossgcc.setup_libc newlib 2.4.0
@@ -25,22 +30,17 @@ checksums-append ${file_patch} \
sha256
ec6472b034e11e8cfdeb3934b218e5bafbb7a03f3afc0e76536bd9c42653525b \
size 283677
-# Bump back version so that newlib will compile correctly.
-pre-extract {
- version 9.3.0
-}
-
depends_run port:msp430-gcc-support-files
depends_extract-append \
port:bzip2
post-extract {
- system -W ${workpath} "${prefix}/bin/bzip2 -dc
${distpath}/${file_patch} | /usr/bin/tar xf -"
+ system -W ${workpath} "${prefix}/bin/bzip2 -dc [shellescape
${distpath}/${file_patch}] | /usr/bin/tar xf -"
}
pre-patch {
- system -W ${worksrcpath} "/usr/bin/patch -p0 <
${workpath}/${name_patch}/gcc-${version}.patch"
- system -W ${workpath}/newlib-2.4.0 "/usr/bin/patch -p0 <
${workpath}/${name_patch}/newlib-2_4_0.patch"
+ system -W ${worksrcpath} "/usr/bin/patch -p0 < [shellescape
${workpath}/${name_patch}/gcc-${crossgcc.version}.patch]"
+ system -W ${workpath}/newlib-2.4.0 "/usr/bin/patch -p0 < [shellescape
${workpath}/${name_patch}/newlib-2_4_0.patch]"
}
# gcc_system.diff: See
https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=111632
}}}
I don't know if the port's revision needs to be increased.
--
Ticket URL: <https://trac.macports.org/ticket/70411#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list