From 78d511b94a3b0225068753e9122e10f2bd20a96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Bertin?= Date: Wed, 13 Mar 2024 19:35:32 +0100 Subject: [PATCH] port:binutils : make build again and add devport to allow building gcc Committed from host : Bola --- devel/binutils/Portfile | 81 +++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 31 deletions(-) diff --git a/devel/binutils/Portfile b/devel/binutils/Portfile index f4832c4d..b11a3e1a 100644 --- a/devel/binutils/Portfile +++ b/devel/binutils/Portfile @@ -1,9 +1,11 @@ # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 +PortGroup locale_select 1.0 +PortGroup save_configure_cmd 1.0 name binutils -version 2.30 ; revision 1 +version 2.30 ; revision 2 checksums rmd160 5b6152ff36d55da3b5da3a21b372897da66d953c \ sha256 efeade848067e9a03f1918b1da0d37aaffa0b0127a06b5e9236229851d9d0c09 @@ -35,18 +37,30 @@ configure.args --enable-option-checking \ --with-isl=${prefix} platform linux { + ############################### + PortGroup devport 1.0 + create_devport port:${name} + + if {![is_mainport]} { + # nothing else to be done + return + } + ############################### + configure.args-append \ --enable-compressed-debug-sections=all configure.env-append \ - LIBS="-L${prefix}/lib -lintl" + "LIBS=-L${prefix}/lib -lintl" build.env-append \ - LIBS="-L${prefix}/lib -lintl" + "LIBS=-L${prefix}/lib -lintl" } +configure.save_configure_cmd "install log" + # The Makefile runs configure again in subdirectories. # It correcty passes along most configure variables (CFLAGS, LDFLAGS, ...), # but seems to neglect CPPFLAGS. -build.env-append CPPFLAGS='-I${prefix}/include' +build.env-append "CPPFLAGS=-I${prefix}/include" # Binutils violates the mtree layout by creating ${prefix}// destroot.violate_mtree yes @@ -59,7 +73,7 @@ destroot.violate_mtree yes universal_variant no post-destroot { - set archdir "${prefix}/${os.arch}-pc-linux-gnu" + set archdir "${prefix}/${build_arch}-pc-linux-gnu" # the MacPorts install/activation process breaks hard symlinks file delete ${destroot}${archdir}/bin/ld.bfd ln -s ld ${destroot}${archdir}/bin/ld.bfd @@ -70,34 +84,39 @@ post-destroot { ln -s ${archdir}/bin/${b} ${destroot}${prefix}/bin/ } } + + register_devport_standard_content + #append_to_devport_standard_content bla + create_devport_content_archive } + # notes "Having ${name} installed will cause some other ports to\ # fail to build. Consider uninstalling ${name}." -configure.post_args-append "|& tee -a ${workpath}/.macports.${subport}.configure.log'" -pre-configure { - set cmd [join "${configure.cmd} ${configure.pre_args} ${configure.args}"] - configure.pre_args-prepend "-cf '${configure.cmd} " - configure.cmd "/bin/csh" - ui_debug "configure command set to `${configure.cmd} ${configure.pre_args} ${configure.args} ${configure.post_args}`" - system "echo '## ${cmd}' > ${workpath}/.macports.${subport}.configure.log" -} -post-configure { - if {![catch {set fd [open "${workpath}/.macports.${subport}.configure.cmd" "w"]} err]} { - foreach var [array names ::env] { - puts ${fd} "${var}=$::env(${var})" - } - puts ${fd} "[join [lrange [split ${configure.env} " "] 0 end] "\n"]\n" - puts ${fd} "cd ${worksrcpath}" - if {[info exists configure.post_args]} { - puts ${fd} "${configure.cmd} ${configure.pre_args} ${configure.args} ${configure.post_args}" - } else { - puts ${fd} "${configure.cmd} ${configure.pre_args} ${configure.args}" - } - } else { - if {[info exists fd]} { - unset fd - } - } -} +#configure.post_args-append "|& tee -a ${workpath}/.macports.${subport}.configure.log'" +#pre-configure { +# set cmd [join "${configure.cmd} ${configure.pre_args} ${configure.args}"] +# configure.pre_args-prepend "-cf '${configure.cmd} " +# configure.cmd "/bin/csh" +# ui_debug "configure command set to `${configure.cmd} ${configure.pre_args} ${configure.args} ${configure.post_args}`" +# system "echo '## ${cmd}' > ${workpath}/.macports.${subport}.configure.log" +#} +#post-configure { +# if {![catch {set fd [open "${workpath}/.macports.${subport}.configure.cmd" "w"]} err]} { +# foreach var [array names ::env] { +# puts ${fd} "${var}=$::env(${var})" +# } +# puts ${fd} "[join [lrange [split ${configure.env} " "] 0 end] "\n"]\n" +# puts ${fd} "cd ${worksrcpath}" +# if {[info exists configure.post_args]} { +# puts ${fd} "${configure.cmd} ${configure.pre_args} ${configure.args} ${configure.post_args}" +# } else { +# puts ${fd} "${configure.cmd} ${configure.pre_args} ${configure.args}" +# } +# } else { +# if {[info exists fd]} { +# unset fd +# } +# } +#}