Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 566520 | Differences between
and this patch

Collapse All | Expand All

(-)/home/mike/gentoo/gentoo-x86/eclass/kernel-2.eclass (-39 / +31 lines)
Lines 157-167 handle_genpatches() { Link Here
157
157
158
		local use_cond_start="" use_cond_end=""
158
		local use_cond_start="" use_cond_end=""
159
159
160
160
		if [[ "${i}" == "experimental" && -z ${K_EXP_GENPATCHES_PULL} && -z ${K_EXP_GENPATCHES_NOUSE} ]] ; then
161
		if [[ "${i}" == "experimental" && -z ${K_EXP_GENPATCHES_PULL} && -z ${K_EXP_GENPATCHES_NOUSE} ]] ; then
161
			use_cond_start="experimental? ( "
162
			use_cond_start="experimental? ( "
162
			use_cond_end=" )"
163
			use_cond_end=" )"
163
164
164
			if use experimental ; then
165
			if [[ -n ${K_EXP_GENPATCHES_PULL} || -n ${K_EXP_GENPATCHES_NOUSE} ]] ; then
165
				UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
166
				UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
166
				debug-print "genpatches tarball: $tarball"
167
				debug-print "genpatches tarball: $tarball"
167
			fi
168
			fi
Lines 922-927 unipatch() { Link Here
922
	# it shall be by param only.
923
	# it shall be by param only.
923
	# -z "${UNIPATCH_LIST}" ] && UNIPATCH_LIST="${@}"
924
	# -z "${UNIPATCH_LIST}" ] && UNIPATCH_LIST="${@}"
924
	UNIPATCH_LIST="${@}"
925
	UNIPATCH_LIST="${@}"
926
	for i in ${UNIPATCH_LIST}; do
927
		if echo ${i} | grep -qs -e "experimental" ; then
928
        	# If experimental was not chosen by the user, drop experimental patches not in K_EXP_GENPATCHES_LIST.
929
			if [[ -n ${K_EXP_GENPATCHES_PULL} || -n ${K_EXP_GENPATCHES_NOUSE} ]] ; then
930
                # check gcc version < 4.9.X uses patch 5000 and = 4.9.X uses patch 5010
931
				if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -ne 9 ]]; then
932
                    # drop 5000_enable-additional-cpu-optimizations-for-gcc-4.9.patch
933
                    if [[ $UNIPATCH_DROP != *"5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"* ]]; then
934
                        UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"
935
                    fi
936
                else
937
                    if [[ $UNIPATCH_DROP != *"5000_enable-additional-cpu-optimizations-for-gcc.patch"* ]]; then
938
                        #drop 5000_enable-additional-cpu-optimizations-for-gcc.patch
939
                        UNIPATCH_DROP+=" 5000_enable-additional-cpu-optimizations-for-gcc.patch"
940
                    fi
941
                fi
942
 
943
                # if kdbus use flag is not set, drop the kdbus patch
944
                if [[ $UNIPATCH_DROP != *"5015_kdbus*.patch"* ]]; then
945
                    if ! has kdbus ${IUSE} ||  ! use kdbus; then
946
                        UNIPATCH_DROP="${UNIPATCH_DROP} 5015_kdbus*.patch"
947
                    fi
948
                fi
949
               continue
950
           else
951
               unset UNIPATCH_LIST[i]
952
           fi
953
       fi
954
	done
925
955
926
	#unpack any passed tarballs
956
	#unpack any passed tarballs
927
	for i in ${UNIPATCH_LIST}; do
957
	for i in ${UNIPATCH_LIST}; do
Lines 990-1033 unipatch() { Link Here
990
				fi
1020
				fi
991
			fi
1021
			fi
992
		fi
1022
		fi
993
994
		# If experimental was not chosen by the user, drop experimental patches not in K_EXP_GENPATCHES_LIST.
995
		if [[ "${i}" == *"genpatches-"*".experimental."* && -n ${K_EXP_GENPATCHES_PULL} ]] ; then
996
			if [[ -z ${K_EXP_GENPATCHES_NOUSE} ]] && use experimental; then
997
				continue
998
			fi
999
1000
			local j
1001
			for j in ${KPATCH_DIR}/*/50*_*.patch*; do
1002
				for k in ${K_EXP_GENPATCHES_LIST} ; do
1003
					[[ "$(basename ${j})" == ${k}* ]] && continue 2
1004
				done
1005
				UNIPATCH_DROP+=" $(basename ${j})"
1006
			done
1007
		else
1008
			UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
1009
			debug-print "genpatches tarball: $tarball"
1010
1011
			# check gcc version < 4.9.X uses patch 5000 and = 4.9.X uses patch 5010
1012
			if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -ne 9 ]]; then
1013
				# drop 5000_enable-additional-cpu-optimizations-for-gcc-4.9.patch
1014
				if [[ $UNIPATCH_DROP != *"5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"* ]]; then
1015
					UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"
1016
				fi
1017
			else
1018
				if [[ $UNIPATCH_DROP != *"5000_enable-additional-cpu-optimizations-for-gcc.patch"* ]]; then
1019
					#drop 5000_enable-additional-cpu-optimizations-for-gcc.patch
1020
					UNIPATCH_DROP+=" 5000_enable-additional-cpu-optimizations-for-gcc.patch"
1021
				fi
1022
			fi
1023
1024
			# if kdbus use flag is not set, drop the kdbus patch
1025
            if [[ $UNIPATCH_DROP != *"5015_kdbus*.patch"* ]]; then
1026
				if ! has kdbus ${IUSE} ||  ! use kdbus; then
1027
					UNIPATCH_DROP="${UNIPATCH_DROP} 5015_kdbus*.patch"
1028
				fi
1029
			fi
1030
 		fi
1031
	done
1023
	done
1032
1024
1033
	#populate KPATCH_DIRS so we know where to look to remove the excludes
1025
	#populate KPATCH_DIRS so we know where to look to remove the excludes

Return to bug 566520