Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#15049 closed defect (fixed)

RFE: install manuals and info pages of gcc43

Reported by: jochen@… Owned by: mww@…
Priority: High Milestone:
Component: ports Version: 1.6.0
Keywords: gcc documentation info manual gcc_select Cc:
Port:

Description

Again, I believe that manuals are an integral part of software. Therefore, gcc43 should install them instead of deleting them.

Due to the conflict issues I propose to move them to a specific position, like this (untested due to missing computing resources, but it shows the idea):

Index: Portfile
===================================================================
--- Portfile	(revision 36111)
+++ Portfile	(working copy)
@@ -72,13 +72,15 @@
 # install-info # errors on objc-info files
 
 post-destroot {
-	file delete -force ${destroot}${prefix}/share/man/man7 \
-		${destroot}${prefix}/share/info
+        # move manuals to gcc43-specific directory
+	xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7
+	xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info
+        file copy ${destroot}${prefix}/share/man/man7/* ${destroot}${prefix}/share/gcc43/man/man7
+        file copy ${destroot}${prefix}/share/info/* ${destroot}${prefix}/share/gcc43/info
 	# install/copy ffitarget.h only if we have it
 	if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
 		file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
 	}
-
 	# install select file for gcc_select
 	xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
 	xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/

It would be great if then gcc_select could provide the appropriate (selected) set in the standard place.

Change History (7)

comment:1 Changed 16 years ago by jochen@…

Priority: NormalHigh

I attach a tested patch that installs the info pages and the Unic manuals to ${prefix}/share/gcc43. This does not cause any conflicts and at least the documentation can be used if someone (like me) wants to.

Please update the portfile accordingly.

comment:2 Changed 16 years ago by jochen@…

When trying to attach the diff, I always get an internal error from the server. So here comes the patch inline:

Index: Portfile
===================================================================
--- Portfile	(revision 37687)
+++ Portfile	(working copy)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
 # $Id$
 
 PortSystem 1.0
@@ -2,114 +3,116 @@
 
-name			gcc43
-version			4.3.1
-platforms		darwin
-categories		lang
-maintainers		mww
-description		The GNU compiler collection
-long_description	The GNU compiler collection, including front ends for \
-			C, C++, Objective-C, Objective-C++, Java and Fortran95.
+name            gcc43
+version         4.3.1
+platforms       darwin
+categories      lang
+maintainers     mww
+description     The GNU compiler collection
+long_description The GNU compiler collection, including front ends for \
+                C, C++, Objective-C, Objective-C++, Java and Fortran95.
 
-homepage		http://gcc.gnu.org/
-master_sites		ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
-			ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
-			ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
-			ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
-			gnu:/gcc/gcc-${version}
+homepage        http://gcc.gnu.org/
+master_sites    ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
+                ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
+                ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
+                ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
+                gnu:/gcc/gcc-${version}
 
-set dcore		gcc-core-${version}.tar.bz2
-set dfort		gcc-fortran-${version}.tar.bz2
-set dcxx		gcc-g++-${version}.tar.bz2
-set djava		gcc-java-${version}.tar.bz2
-set dobjc		gcc-objc-${version}.tar.bz2
-distfiles		${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
+set dcore       gcc-core-${version}.tar.bz2
+set dfort       gcc-fortran-${version}.tar.bz2
+set dcxx        gcc-g++-${version}.tar.bz2
+set djava       gcc-java-${version}.tar.bz2
+set dobjc       gcc-objc-${version}.tar.bz2
+distfiles       ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
 
-checksums		${dcore} sha1 2d47e33344b7978a59af04885c1d3947c3dc360e \
-			${dfort} sha1 9cdd7eb07784d66bf78d687b8f50b5cc66ea4cca \
-			${dcxx} sha1 3d29de4077a9deeb1de512321c7961b7b97513c5 \
-			${djava} sha1 91f32153b9a6628ae920a723153011bd70515af1 \
-			${dobjc} sha1 351e251040e0437ab6651f43a665d0ffdf24ee9c
+checksums       ${dcore} sha1 2d47e33344b7978a59af04885c1d3947c3dc360e \
+                ${dfort} sha1 9cdd7eb07784d66bf78d687b8f50b5cc66ea4cca \
+                ${dcxx} sha1 3d29de4077a9deeb1de512321c7961b7b97513c5 \
+                ${djava} sha1 91f32153b9a6628ae920a723153011bd70515af1 \
+                ${dobjc} sha1 351e251040e0437ab6651f43a665d0ffdf24ee9c
 
-use_bzip2		yes
+use_bzip2       yes
 
-depends_lib		port:gmp port:mpfr port:libiconv
+depends_lib     port:gmp port:mpfr port:libiconv
 
-set major		4.3
+set major       4.3
 
-worksrcdir		build
+worksrcdir      build
 
 pre-configure {
-	file mkdir ${worksrcpath}
+    file mkdir ${worksrcpath}
 }
 
-configure.cmd	../gcc-${version}/configure
-configure.args	--enable-languages=c,c++,objc,obj-c++,java,fortran \
-		--libdir=${prefix}/lib/${name} \
-		--includedir=${prefix}/include/${name} \
-		--infodir=${prefix}/share/info \
-		--mandir=${prefix}/share/man \
-		--with-local-prefix=${prefix} \
-		--with-system-zlib \
-		--disable-nls \
-		--program-suffix=-mp-${major} \
-		--with-gxx-include-dir=${prefix}/include/${name}/c++/ \
-		--with-gmp=${prefix} \
-		--with-mpfr=${prefix}
+configure.cmd   ../gcc-${version}/configure
+configure.args  --enable-languages=c,c++,objc,obj-c++,java,fortran \
+        --libdir=${prefix}/lib/${name} \
+        --includedir=${prefix}/include/${name} \
+        --infodir=${prefix}/share/info \
+        --mandir=${prefix}/share/man \
+        --with-local-prefix=${prefix} \
+        --with-system-zlib \
+        --disable-nls \
+        --program-suffix=-mp-${major} \
+        --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
+        --with-gmp=${prefix} \
+        --with-mpfr=${prefix}
 # do NOT use MacPorts binutils -- they do not work
 configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
-			AS_FOR_TARGET=/usr/bin/as \
-			LD_FOR_TARGET=/usr/bin/ld \
-			NM_FOR_TARGET=/usr/bin/nm \
-			OBJDUMP_FOR_TARGET=/usr/bin/objdump \
-			RANLIB_FOR_TARGET=/usr/bin/ranlib \
-			STRIP_FOR_TARGET=/usr/bin/strip
+            AS_FOR_TARGET=/usr/bin/as \
+            LD_FOR_TARGET=/usr/bin/ld \
+            NM_FOR_TARGET=/usr/bin/nm \
+            OBJDUMP_FOR_TARGET=/usr/bin/objdump \
+            RANLIB_FOR_TARGET=/usr/bin/ranlib \
+            STRIP_FOR_TARGET=/usr/bin/strip
 
-use_parallel_build	yes
+use_parallel_build  yes
 
-destroot.target	install install-info-host
+destroot.target install install-info-host
 # install-info # errors on objc-info files
 
 post-destroot {
-	file delete -force ${destroot}${prefix}/share/man/man7 \
-		${destroot}${prefix}/share/info
-	# install/copy ffitarget.h only if we have it
-	if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
-		file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
-	}
-
-	# install select file for gcc_select
-	xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
-	xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/
+    # move manuals to gcc43-specific directory
+    xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7
+    xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info
+    eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*]  ${destroot}${prefix}/share/gcc43/man/man7
+    eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/info
+    # install/copy ffitarget.h only if we have it
+    if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
+        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
+    }
+    # install select file for gcc_select
+    xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
+    xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/
 }
 
 #platform darwin 7 {
-#	configure.cflags-append	-force_cpusubtype_ALL
-#	confgiure.env 	BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
-#	build.args-append	XCFLAGS=-force_cpusubtype_ALL
+#   configure.cflags-append -force_cpusubtype_ALL
+#   configure.env           BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
+#   build.args-append   XCFLAGS=-force_cpusubtype_ALL
 #}
 
 platform powerpc {
-	configure.args-append --disable-multilib
+    configure.args-append --disable-multilib
 }
 
 # Java support does not compile on 10.4
 platform darwin 8 {
-	configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran
-	configure.args-append	--enable-languages=c,c++,objc,obj-c++,fortran
+    configure.args-delete   --enable-languages=c,c++,objc,obj-c++,java,fortran
+    configure.args-append   --enable-languages=c,c++,objc,obj-c++,fortran
 }
 # odcctools currently do not compile for x64 - move to variant for the time being
 #variant odcctools \
-#	description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
-#	depends_lib-append	port:odcctools
-#	patch {
-#		reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
-#			${workpath}/gcc-${version}/gcc/config/darwin.h
-#	}
-#	configure.args-append	--with-as=${prefix}/bin/odas \
-#				--with-ld=${prefix}/bin/odld \
-#				--with-ar=${prefix}/bin/odar
+#   description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
+#   depends_lib-append  port:odcctools
+#   patch {
+#       reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
+#           ${workpath}/gcc-${version}/gcc/config/darwin.h
+#   }
+#   configure.args-append   --with-as=${prefix}/bin/odas \
+#               --with-ld=${prefix}/bin/odld \
+#               --with-ar=${prefix}/bin/odar
 #}
 
-livecheck.check	regex
-livecheck.url	http://gcc.gnu.org/gcc-4.3/
-livecheck.regex	GCC (4\\.3\\.\[0-9\])
+livecheck.check regex
+livecheck.url   http://gcc.gnu.org/gcc-4.3/
+livecheck.regex GCC (4\\.3\\.\[0-9\])
 

comment:3 Changed 16 years ago by mww@…

Status: newassigned

would you mind pasting a diff?

comment:4 Changed 16 years ago by jochen@…

Well, there is a unified diff just above. It does three things:

  1. Provide modeline according to the guide: http://guide.macports.org/#development.practices
  2. Fix whitespace according to 1.
  3. Change post-destroot in order to copy documentation as described above:
    -	file delete -force ${destroot}${prefix}/share/man/man7 \
    -		${destroot}${prefix}/share/info
    +    # move manuals to gcc43-specific directory
    +    xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7
    +    xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info
    +    eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*] ${destroot}${prefix}/share/gcc43/man/man7
    +    eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/info
    

comment:5 Changed 16 years ago by mww@…

ah, cool -- if you want to commit this youself (probably faster than waiting for me to do it), please inc. the revision!

comment:6 Changed 16 years ago by jochen@…

Resolution: fixed
Status: assignedclosed

Fixed in r37806

comment:7 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

Note: See TracTickets for help on using tickets.