/[gentoo-x86]/sys-boot/grub/grub-9999.ebuild
Gentoo

Diff of /sys-boot/grub/grub-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.58 Revision 1.59
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/Attic/grub-9999.ebuild,v 1.58 2012/03/17 22:30:14 floppym Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/Attic/grub-9999.ebuild,v 1.59 2012/03/18 06:41:10 floppym Exp $
4 4
5EAPI=4 5EAPI=4
6 6
7if [[ ${PV} == "9999" ]] ; then 7if [[ ${PV} == "9999" ]] ; then
8 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/" 8 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
115 popd > /dev/null || die 115 popd > /dev/null || die
116} 116}
117 117
118grub_src_configure() { 118grub_src_configure() {
119 local platform=$1 119 local platform=$1
120 local target=
121 local with_platform= 120 local with_platform=
122 121
123 [[ -z ${platform} ]] && die "${FUNCNAME} [platform]" 122 [[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
124 123
125 # Used below for efi cross-building 124 # Used below for efi cross-building
126 tc-export CC NM OBJCOPY STRIP 125 tc-export CC NM OBJCOPY STRIP
127 unset TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS 126
127 estack_push CTARGET "${CTARGET}"
128 estack_push TARGET_CC "${TARGET_CC}"
129 estack_push TARGET_CFLAGS "${TARGET_CFLAGS}"
130 estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}"
128 131
129 case ${platform} in 132 case ${platform} in
130 efi-32) 133 efi-32)
131 if [[ ${CHOST} == x86_64* ]]; then 134 if [[ ${CHOST} == x86_64* ]]; then
132 target="--target=i386" 135 CTARGET="${CTARGET:-i386}"
136 TARGET_CC="${TARGET_CC:-${CC}}"
133 export TARGET_CC="${CC}" 137 export TARGET_CC
134 fi 138 fi
135 with_platform="--with-platform=efi" 139 with_platform="--with-platform=efi"
136 ;; 140 ;;
137 efi-64) 141 efi-64)
138 if [[ ${CHOST} == i?86* ]]; then 142 if [[ ${CHOST} == i?86* ]]; then
139 target="--target=x86_64" 143 CTARGET="${CTARGET:-x86_64}"
140 export TARGET_CC="${CC}" 144 TARGET_CC="${TARGET_CC:-${CC}}"
141 export TARGET_CFLAGS="-march=x86-64" 145 TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
142 export TARGET_CPPFLAGS="-march=x86-64" 146 TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
147 export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS
143 fi 148 fi
144 with_platform="--with-platform=efi" 149 with_platform="--with-platform=efi"
145 ;; 150 ;;
146 guessed) ;; 151 guessed) ;;
147 *) with_platform="--with-platform=${platform}" ;; 152 *) with_platform="--with-platform=${platform}" ;;
151 econf \ 156 econf \
152 --disable-werror \ 157 --disable-werror \
153 --program-prefix= \ 158 --program-prefix= \
154 --program-transform-name="s,grub,grub2," \ 159 --program-transform-name="s,grub,grub2," \
155 --with-grubdir=grub2 \ 160 --with-grubdir=grub2 \
156 ${target} \
157 ${with_platform} \ 161 ${with_platform} \
158 $(use_enable debug mm-debug) \ 162 $(use_enable debug mm-debug) \
159 $(use_enable debug grub-emu-usb) \ 163 $(use_enable debug grub-emu-usb) \
160 $(use_enable device-mapper) \ 164 $(use_enable device-mapper) \
161 $(use_enable efiemu) \ 165 $(use_enable efiemu) \
162 $(use_enable mount grub-mount) \ 166 $(use_enable mount grub-mount) \
163 $(use_enable nls) \ 167 $(use_enable nls) \
164 $(use_enable truetype grub-mkfont) \ 168 $(use_enable truetype grub-mkfont) \
165 $(use_enable libzfs) \ 169 $(use_enable libzfs) \
166 $(use sdl && use_enable debug grub-emu-sdl) 170 $(use sdl && use_enable debug grub-emu-sdl)
171
172 estack_pop CTARGET CTARGET || die
173 estack_pop TARGET_CC TARGET_CC || die
174 estack_pop TARGET_CFLAGS TARGET_CFLAGS || die
175 estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die
167} 176}
168 177
169grub_src_compile() { 178grub_src_compile() {
170 default_src_compile 179 default_src_compile
171 pax-mark -mpes "${grub_binaries[@]}" 180 pax-mark -mpes "${grub_binaries[@]}"

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.20