Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 677458
Collapse All | Expand All

(-)/usr/portage/eclass/toolchain-binutils.eclass (-5 / +39 lines)
Lines 122-127 Link Here
122
	unpacker ${A}
122
	unpacker ${A}
123
	mkdir -p "${MY_BUILDDIR}"
123
	mkdir -p "${MY_BUILDDIR}"
124
	[[ -d ${WORKDIR}/patch ]] && mkdir "${WORKDIR}"/patch/skip
124
	[[ -d ${WORKDIR}/patch ]] && mkdir "${WORKDIR}"/patch/skip
125
126
    # Prevent 'make info' if doc is unset.
127
    if ! use doc ; then
128
        # DELETE the 'doc' subdirectories!
129
        # This is radical, but is the only way to avoid things like
130
        # the creation of the 'chew' program with the purpose of
131
        # 'chewing' documenbtation (before spitting it, that is...).
132
        # The problem with programs created during compile time,
133
        # like chew (in the bfd dir) is: THEY WILL *NOT* RUN!
134
        # I REPEAT: THEY WILL NOT RUN - if we are cross-compiling...
135
        # Whoever found it necessary to create such programs
136
        # during compilation of binutils is an IDIOT!
137
        for subdir in $(find ${WORKDIR}/ -type d -name 'doc'); do
138
		    rm -rf $subdir
139
        done
140
        # The above is NOT enough, though!
141
        # We must eradicate any mention of 'doc/Makefile'
142
        # in all configure* scripts! That includes configure.ac 
143
        # AND configure scripts - take no prisoners! 
144
        find ${WORKDIR}/ -name 'configure.ac' | xargs sed -i.bak -e '/AC_CONFIG_FILES/s/doc\/Makefile//'
145
        find ${WORKDIR}/ -name 'configure' | xargs sed -i.bak -e '/ac_config_files/s/doc\/Makefile//'
146
        find ${WORKDIR}/ -name 'Makefile*' | xargs sed -i.bak -e 's/all  *diststuff:  *info/diststuff: info/'
147
        find ${WORKDIR}/ -name 'Makefile*' | xargs sed -i.bak -e 's/SUBDIRS *= *doc  *po/SUBDIRS = po/'
148
    fi
125
}
149
}
126
150
127
# In case the ebuild wants to add a few of their own.
151
# In case the ebuild wants to add a few of their own.
Lines 282-287 Link Here
282
	# on everyone in alpha (for now), we'll just enable it when possible
306
	# on everyone in alpha (for now), we'll just enable it when possible
283
	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
307
	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
284
	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
308
	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
309
    # Prevent makeinfo from running if doc is unset.
310
    # ! use doc && myconf+=( --without-texinfo )
285
311
286
	myconf+=(
312
	myconf+=(
287
		--prefix="${EPREFIX}"/usr
313
		--prefix="${EPREFIX}"/usr
Lines 322-331 Link Here
322
	# For older versions, it means we don't get any info pages at all.
348
	# For older versions, it means we don't get any info pages at all.
323
	# Oh well, tough luck. #294617
349
	# Oh well, tough luck. #294617
324
	if [[ -e ${S}/gas/doc/as.info ]] || ! version_is_at_least 2.24 ; then
350
	if [[ -e ${S}/gas/doc/as.info ]] || ! version_is_at_least 2.24 ; then
325
		sed -i \
351
		sed -i -e '/^MAKEINFO/s:=.*:= true:' Makefile || die
326
			-e '/^MAKEINFO/s:=.*:= true:' \
327
			Makefile || die
328
	fi
352
	fi
353
    # Prevent 'make info' if doc is unset.
354
    # if ! use doc ; then
355
	# 	sed -i.bak -e '/maybe.*texinfo/s/^/# /; /^[# \t]*maybe-.*-texinfo *\\$/d' Makefile || die
356
    #     # for subdir in $(find . -mindepth 1 -maxdepth 1 -type d); do
357
	# 	  #     sed -i.bak -e 's/ info-recursive / /g; s/ install-info-recursive / /g' $subdir/Makefile || die
358
    #     # done
359
	# fi
329
}
360
}
330
361
331
toolchain-binutils_src_compile() {
362
toolchain-binutils_src_compile() {
Lines 339-346 Link Here
339
370
340
	# only build info pages if we user wants them, and if
371
	# only build info pages if we user wants them, and if
341
	# we have makeinfo (may not exist when we bootstrap)
372
	# we have makeinfo (may not exist when we bootstrap)
342
	if type -p makeinfo > /dev/null ; then
373
    # Prevent makeinfo from running if doc is unset.
343
		emake info || die "make info failed"
374
    if use doc ; then
375
    	if type -p makeinfo > /dev/null ; then
376
    		emake info || die "make info failed"
377
    	fi
344
	fi
378
	fi
345
	# we nuke the manpages when we're left with junk
379
	# we nuke the manpages when we're left with junk
346
	# (like when we bootstrap, no perl -> no manpages)
380
	# (like when we bootstrap, no perl -> no manpages)

Return to bug 677458