diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-10-01 17:09:25 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-10-01 17:12:54 +0200 |
commit | a88a0d76f13e9526b8302e88f017e153ac08d72f (patch) | |
tree | 6fe426d36469b6af577e2396f3949549c6b87d93 /sys-boot | |
parent | sys-cluster/pbs-python: Remove last-rited pkg (diff) | |
download | gentoo-a88a0d76f13e9526b8302e88f017e153ac08d72f.tar.gz gentoo-a88a0d76f13e9526b8302e88f017e153ac08d72f.tar.bz2 gentoo-a88a0d76f13e9526b8302e88f017e153ac08d72f.zip |
sys-boot/udk: Remove last-rited pkg
Closes: https://bugs.gentoo.org/735482
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/udk/Manifest | 3 | ||||
-rw-r--r-- | sys-boot/udk/files/2015-makefile.template | 54 | ||||
-rw-r--r-- | sys-boot/udk/files/2015-tools_def.template | 42 | ||||
-rw-r--r-- | sys-boot/udk/files/udk-workspace.template | 63 | ||||
-rw-r--r-- | sys-boot/udk/metadata.xml | 15 | ||||
-rw-r--r-- | sys-boot/udk/udk-2015-r1.ebuild | 203 | ||||
-rw-r--r-- | sys-boot/udk/udk-2018-r1.ebuild | 146 |
7 files changed, 0 insertions, 526 deletions
diff --git a/sys-boot/udk/Manifest b/sys-boot/udk/Manifest deleted file mode 100644 index 5b45c5e5d81f..000000000000 --- a/sys-boot/udk/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST UDK2015.Complete.MyWorkSpace.zip 121736982 BLAKE2B b37bd9ead6ce2c665128199249483ecbcb0f410077d0ca61820bdccb7ae71f6dad870a3cf2dad79f997ad9114678fab3c15a17227ae33aa1ff66f9187aa3a568 SHA512 7856a8f29296f817e8fd09d8eaf7207f4e25a13faa10936d1ceb10cb6a900be265379722c0ade0ef93b1c640fef8693667d2567962e3288b20ae77f607f03d39 -DIST udk-2018-docs.zip 79352781 BLAKE2B 9d08579d4645121cabb7ac52850de6492f9990240da9236064352df0595867bfc6952c9858865a8ce1d81982ec0e2440dc19930a75595454257294462adc60d6 SHA512 6ba2d961f20267cafb94bd020e8fe71e1392f1f2cdbc5c9f0a43212253ddf137b3e12cc789299dfd1ea099bb1541703b995ae20d28f0275395f5f85ed0656954 -DIST udk-2018.tar.gz 38642782 BLAKE2B a10171659451d7d3df737066ec0471db1e5055bd52556d4d0654b244e827512db8d88e2b74b4dfe0189f768e0eab7a705aa32a720e047555995cf339ea50c62f SHA512 8fd9316f08a5c30f8684b2fde73906a943bb067ec91699f41796e27679af73dbc38efaa100a57d4b835656b402d9c08896abc5c10fd0d607a7e0173b3d7a60b2 diff --git a/sys-boot/udk/files/2015-makefile.template b/sys-boot/udk/files/2015-makefile.template deleted file mode 100644 index c8ae8b6b420e..000000000000 --- a/sys-boot/udk/files/2015-makefile.template +++ /dev/null @@ -1,54 +0,0 @@ -TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) -EXEC = «MODULE».efi -SRC = $(shell find $(TOP) -type f -name '*.c') -OBJ = $(SRC:.c=.o) -INC_DIR = /usr/include/«PACKAGE_NAME» -LIB_DIR = /usr/lib -«STATIC_LIBS» - -EFI_LDS = $(LIB_DIR)/GccBase.lds - -«MODULE_TYPE» -«IMAGE_ENTRY_POINT» - -«CP» -«RM» -«CC» -«DLINK» -«OBJCOPY» -«GENFW» - -CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Werror \ - -Wno-array-bounds -ffunction-sections -fdata-sections -c -iquote$(TOP) \ - -include AutoGen.h -I$(INC_DIR) -DSTRING_ARRAY_NAME=«MODULE»Strings -m64 \ - -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS \ - -mno-red-zone -Wno-address -mcmodel=large -Wno-address \ - -Wno-unused-but-set-variable -DLINK_FLAGS=-nostdlib -n -q --gc-sections --entry $(IMAGE_ENTRY_POINT) \ - -u $(IMAGE_ENTRY_POINT) -melf_x86_64 --oformat=elf64-x86-64 -L $(LIB_DIR) \ - --script=$(EFI_LDS) --defsym=PECOFF_HEADER_SIZE=«PECOFF_HEADER_SIZE» -«OBJCOPY_FLAGS» -«GENFW_FLAGS» - -all: $(EXEC) - -%.efi: $(OBJ) - $(DLINK) -o $(@:.efi=.dll) $(DLINK_FLAGS) \ - --start-group $(STATIC_LIBRARY_FILES) $^ --end-group - $(OBJCOPY) $(OBJCOPY_FLAGS) $(@:.efi=.dll) - $(CP) $(@:.efi=.dll) $(@:.efi=.debug) - $(OBJCOPY) --strip-unneeded -R .eh_frame $(@:.efi=.dll) - $(OBJCOPY) --add-gnu-debuglink=$(@:.efi=.debug) $(@:.efi=.dll) - $(GENFW) -e $(MODULE_TYPE) -o $@ $(@:.efi=.dll) $(GENFW_FLAGS) - $(RM) $(@:.efi=.dll) - -%.o: %.c - $(CC) $(CC_FLAGS) -o $@ $^ - -clean: - $(RM) *.o - -mrproper: clean - $(RM) $(EXEC) $(EXEC:.efi=.debug) - -.PHONY: all clean mrproper diff --git a/sys-boot/udk/files/2015-tools_def.template b/sys-boot/udk/files/2015-tools_def.template deleted file mode 100644 index 5c866354a85c..000000000000 --- a/sys-boot/udk/files/2015-tools_def.template +++ /dev/null @@ -1,42 +0,0 @@ - -################# -# My custom toolchain -################# -*_CUSTOM_*_*_FAMILY = GCC -*_CUSTOM_*_MAKE_PATH = make -*_CUSTOM_*_ASL_PATH = DEF(UNIX_IASL_BIN) -*_CUSTOM_*_OBJCOPY_PATH = «OBJCOPY» -*_CUSTOM_*_CC_PATH = «CC» -*_CUSTOM_*_SLINK_PATH = «AR» -*_CUSTOM_*_DLINK_PATH = «LD» -*_CUSTOM_*_ASLDLINK_PATH = «LD» -*_CUSTOM_*_ASM_PATH = «CC» -*_CUSTOM_*_PP_PATH = «CC» -*_CUSTOM_*_VFRPP_PATH = «CC» -*_CUSTOM_*_ASLCC_PATH = «CC» -*_CUSTOM_*_ASLPP_PATH = «CC» -*_CUSTOM_*_RC_PATH = «OBJCOPY» -*_CUSTOM_*_PP_FLAGS = DEF(GCC_PP_FLAGS) -*_CUSTOM_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) -*_CUSTOM_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -*_CUSTOM_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) -*_CUSTOM_*_APP_FLAGS = -*_CUSTOM_*_ASL_FLAGS = DEF(IASL_FLAGS) -*_CUSTOM_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS) -*_CUSTOM_*_OBJCOPY_FLAGS = -*_CUSTOM_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -*_CUSTOM_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 -*_CUSTOM_IA32_CC_FLAGS = «CFLAGS» -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -D EFI32 -*_CUSTOM_IA32_ASLDLINK_FLAGS = -nostdlib -n -q --gc-sections -z common-page-size=0x40 --entry ReferenceAcpiTable -u ReferenceAcpiTable -m elf_i386 -*_CUSTOM_IA32_DLINK_FLAGS = -nostdlib -n -q --gc-sections -z common-page-size=0x40 --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map -m elf_i386 --oformat=elf32-i386 -*_CUSTOM_IA32_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) --defsym=PECOFF_HEADER_SIZE=0x220 -*_CUSTOM_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS) -*_CUSTOM_IA32_NASM_FLAGS = -f elf32 -*_CUSTOM_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -*_CUSTOM_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 -*_CUSTOM_X64_CC_FLAGS = «CFLAGS» -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -*_CUSTOM_X64_ASLDLINK_FLAGS = -nostdlib -n -q --gc-sections -z common-page-size=0x40 --entry ReferenceAcpiTable -u ReferenceAcpiTable -m elf_x86_64 -*_CUSTOM_X64_DLINK_FLAGS = -nostdlib -n -q --gc-sections -z common-page-size=0x40 --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map -m elf_x86_64 --oformat=elf64-x86-64 -*_CUSTOM_X64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) --defsym=PECOFF_HEADER_SIZE=0x228 -*_CUSTOM_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS) -*_CUSTOM_X64_NASM_FLAGS = -f elf64 diff --git a/sys-boot/udk/files/udk-workspace.template b/sys-boot/udk/files/udk-workspace.template deleted file mode 100644 index e119c3ae1a36..000000000000 --- a/sys-boot/udk/files/udk-workspace.template +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -SCRIPT_NAME='udk-workspace' -[ -n "${BASH_SOURCE}" ] && SCRIPT_NAME="${BASH_SOURCE}" - -show_usage() { - if [ ! -z "${1}" ]; then - echo "${1}" >&2 - echo >&2 - fi - echo "Usage:" - echo ". ${SCRIPT_NAME} [folder]" - echo "where folder is the workspace folder - current directory is used if unspecified" -} - -create_workspace() { - local workspace_dir="${PWD}" - if [ ! -z "${1}" ]; then - workspace_dir="${1}" - if ! mkdir -p "${1}"; then - show_usage "Cannot create directory ${1}" - return 1 - fi - fi - - pushd "${workspace_dir}" >/dev/null - if ! mkdir -p Conf; then - show_usage "Cannot create configuration directory" - return 1 - fi - export WORKSPACE="${PWD}" - popd >/dev/null -} - -if [ "${1}" = "-h" ] || [ "${1}" = "--help" ]; then - show_usage - # Script may have been sourced - return 0 2>/dev/null - exit 0 -elif [ "${SCRIPT_NAME}" = "${0}" ]; then - show_usage "Script must be sourced" - exit 1 -elif [ $# -gt 1 ]; then - show_usage "Too many arguments" - return 1 -fi - -if ! create_workspace "${1}"; then - return 1 -fi -unset -f show_usage -unset -f create_workspace -shift $# - -export EDK_TOOLS_PATH="{EDK_BASE}/BaseTools" -. "{EDK_BASE}/edksetup.sh" - -echo "Do not forget to call this script each time you open a new terminal or work on" -echo "another workspace." -echo "For more information, type:" -echo "${SCRIPT_NAME} --help" diff --git a/sys-boot/udk/metadata.xml b/sys-boot/udk/metadata.xml deleted file mode 100644 index a9f04df71ec4..000000000000 --- a/sys-boot/udk/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>sveyret@gmail.com</email> - <name>Stéphane Veyret</name> - </maintainer> - <maintainer type="project"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> - </maintainer> - <upstream> - <remote-id type="github">tianocore/udk</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-boot/udk/udk-2015-r1.ebuild b/sys-boot/udk/udk-2015-r1.ebuild deleted file mode 100644 index 0e6388c5e43c..000000000000 --- a/sys-boot/udk/udk-2015-r1.ebuild +++ /dev/null @@ -1,203 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="sqlite" - -inherit flag-o-matic multiprocessing python-single-r1 toolchain-funcs - -MY_V="${PN^^}${PV}" - -DESCRIPTION="Tianocore UEFI Development kit" -HOMEPAGE=" https://github.com/tianocore/tianocore.github.io/wiki/EDK-II" -SRC_URI="https://github.com/tianocore/${PN}/releases/download/${MY_V}/${MY_V}.Complete.MyWorkSpace.zip" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc examples" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" -RESTRICT="strip" - -RDEPEND="${PYTHON_DEPS}" -DEPEND="${RDEPEND} - app-arch/unzip - dev-lang/nasm" - -S="${WORKDIR}/MyWorkSpace" - -# Generated libs for EFI can contain WX sections -QA_EXECSTACK="usr/lib*/libBaseLib.a:*" - -pkg_setup() { - python_setup 'python2.7' - - if [[ ${ARCH} == "amd64" ]]; then - ARCH=X64 - elif [[ ${ARCH} == "x86" ]]; then - ARCH=IA32 - fi - - # We will create a custom toolchain with user defined settings - TOOLCHAIN_TAG="CUSTOM" -} - -src_unpack() { - unpack ${A} - unpack "${WORKDIR}/${MY_V}.MyWorkSpace.zip" - - pushd "${S}" || die - unpack "${WORKDIR}/BaseTools(Unix).tar" - - local doc_name - local f - if use doc; then - mkdir -p "${S}/doc" || die - pushd "${S}/doc" >/dev/null || die - for f in "${WORKDIR}/Documents/"*" Document.zip"; do - doc_name=${f##*/} - doc_name=${doc_name% Document.zip} - if [[ -f "${WORKDIR}/Documents/${doc_name} Document.zip" ]]; then - unpack "${WORKDIR}/Documents/${doc_name} Document.zip" - mv "html" "${doc_name}" || die - fi - done - popd >/dev/null || die - fi - - popd >/dev/null || die -} - -src_configure() { - # Patch source file for permissive error (issue #639080) - sed -e "s/\(mStringFileName == \)'\\\\0'/\1NULL/" \ - -i "${S}/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp" \ - || die "Failed to patch source file" - sed -e "s/\((StringPtr != \)L'\\\\0'/\1NULL/" \ - -i "${S}/MdeModulePkg/Library/UefiHiiLib/HiiLib.c" \ - || die "Failed to patch source file" - # Compile of Base Tools is required for further setting up the environment - # Base tools does not like parallel make - sed -e "s|^\(CFLAGS\s*=\).*$|\1 ${CFLAGS} -MD -fshort-wchar -fno-strict-aliasing -nostdlib -c -fPIC|" \ - -i "${S}/BaseTools/Source/C/Makefiles/header.makefile" \ - || die "Failed to update makefile header" - local make_flags=( - CC="$(tc-getCC)" - CXX="$(tc-getCXX)" - AS="$(tc-getAS)" - AR="$(tc-getAR)" - LD="$(tc-getLD)" - ) - emake "${make_flags[@]}" -j1 -C BaseTools - . edksetup.sh BaseTools - - # Update flags in UDK parameter files - append-cflags -fshort-wchar -fno-strict-aliasing -c - append-cflags $(test-flags-CC -ffunction-sections) - append-cflags $(test-flags-CC -fdata-sections) - append-cflags $(test-flags-CC -fno-stack-protector) - append-cflags $(test-flags-CC -fno-asynchronous-unwind-tables) - if [[ "${ARCH}" == "X64" ]]; then - append-cflags $(test-flags-CC -m64) $(test-flags-CC -mno-red-zone) - append-cflags $(test-flags-CC -mcmodel=large) - else - append-cflags $(test-flags-CC -m32) $(test-flags-CC -malign-double) - fi - sed -e "s|^\(ACTIVE_PLATFORM\s*=\).*$|\1 MdeModulePkg/MdeModulePkg.dsc|" \ - -e "s|^\(TARGET\s*=\).*$|\1 RELEASE|" \ - -e "s|^\(TARGET_ARCH\s*=\).*$|\1 ${ARCH}|" \ - -e "s|^\(TOOL_CHAIN_TAG\s*=\).*$|\1 ${TOOLCHAIN_TAG}|" \ - -e "s|^\(MAX_CONCURRENT_THREAD_NUMBER\s*=\).*$|\1 $(makeopts_jobs)|" \ - -i "${S}/Conf/target.txt" || die "Failed to configure target file" - sed -e "s|«CC»|$(tc-getCC)|" \ - -e "s|«AR»|$(tc-getAR)|" \ - -e "s|«LD»|$(tc-getLD)|" \ - -e "s|«OBJCOPY»|$(tc-getOBJCOPY)|" \ - -e "s|«CFLAGS»|${CFLAGS}|" \ - "${FILESDIR}/${PV}-tools_def.template" >>"${S}/Conf/tools_def.txt" \ - || die "Failed to prepare tools definition file" -} - -src_compile() { - if use examples; then - ewarn "Examples installation does not work anymore" - ewarn "Try with a most recent version of the package" - fi - - build libraries || die "Failed to compile environment" -} - -src_install() { - local f - local build_dir="${S}/Build/MdeModule/RELEASE_${TOOLCHAIN_TAG}/${ARCH}" - - for f in "${build_dir}"/*/Library/*/*/OUTPUT/*.lib; do - local fn="lib${f##*/}" - newlib.a "${f}" "${fn%.lib}.a" - done - dolib.a "${S}/BaseTools/Scripts/GccBase.lds" - - insinto "/usr/include/${PN}" - doins "${S}/MdePkg/Include/"*.h - doins -r "${S}/MdePkg/Include/"{${ARCH}/.,Guid,IndustryStandard,Library,Pi,Ppi,Protocol,Uefi} - local hfile - while read -d '' -r hfile; do - doins -r "${hfile}/." - done < <(find "${S}" -name 'BaseTools' -prune -o -name 'MdePkg' -prune -o \ - -name 'CryptoPkg' -prune -o -type d -name Include -print0) - - dobin "${S}/BaseTools/Source/C/bin/GenFw" - - if use doc; then - docinto "html" - # Document installation may be very long, so split it and display message - for f in "${S}"/doc/*; do - ebegin "Install documentation for ${f##*/}" - dodoc -r "${f}" - eend $? - done - fi -} - -## -# Parameters: -# 1 - Path where to search for source files. -# 2 - Path where source files must be copied. -copySourceFiles() { - local dest_file - while read -d '' -r filename; do - dest_file="${2}${filename#${1}}" - mkdir -p "${dest_file%/*}" || die - mv "${filename}" "${dest_file}" || die - done < <(find "${1}" -name '*.h' -print0 -o -name '*.c' -print0) -} - -## -# Parameters: -# 1 - Path of the file to create. -# 2 - Name of the module. -# 3 - Path of the generated Makefile. -createMakefile() { - local static_libs=$(sed -n '/^STATIC_LIBRARY_FILES\s*=/,/^\s*\$(OUTPUT_DIR)/{/^\s*\$(OUTPUT_DIR)/b;p}' ${3} \ - | sed -e 's|^\s*\$(BIN_DIR).*/\([^/]*\)\.lib|\t-l\1|' -e 's|\\$|\\\\\\n|' | tr --delete '\n') - local pecoff_header_size; - [[ $ARCH == X64 ]] && pecoff_header_size='0x228' || pecoff_header_size='0x220' - sed -e "s|«MODULE»|${2}|" \ - -e "s|«PACKAGE_NAME»|${PN}|" \ - -e "s|«STATIC_LIBS»|${static_libs}|" \ - -e "s|«MODULE_TYPE»|$(grep -e '^MODULE_TYPE\s*=' ${3} | tail -1)|" \ - -e "s|«IMAGE_ENTRY_POINT»|$(grep -e '^IMAGE_ENTRY_POINT\s*=' ${3})|" \ - -e "s|«CP»|$(grep -e '^CP\s*=' ${3})|" \ - -e "s|«RM»|$(grep -e '^RM\s*=' ${3})|" \ - -e "s|«CC»|$(grep -e '^CC\s*=' ${3})|" \ - -e "s|«DLINK»|$(grep -e '^DLINK\s*=' ${3})|" \ - -e "s|«OBJCOPY»|$(grep -e '^OBJCOPY\s*=' ${3})|" \ - -e "s|«GENFW»|$(grep -e '^GENFW\s*=' ${3})|" \ - -e "s|«PECOFF_HEADER_SIZE»|${pecoff_header_size}|" \ - -e "s|«OBJCOPY_FLAGS»|$(grep -e '^OBJCOPY_FLAGS\s*=' ${3})|" \ - -e "s|«GENFW_FLAGS»|$(grep -e '^GENFW_FLAGS\s*=' ${3})|" \ - "${FILESDIR}/${PV}-makefile.template" >${1} \ - || die "Failed to create Makefile" -} diff --git a/sys-boot/udk/udk-2018-r1.ebuild b/sys-boot/udk/udk-2018-r1.ebuild deleted file mode 100644 index 3ad3971c96a4..000000000000 --- a/sys-boot/udk/udk-2018-r1.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="sqlite" - -inherit multiprocessing python-single-r1 toolchain-funcs - -DESCRIPTION="Tianocore UEFI Development kit" -HOMEPAGE="https://github.com/tianocore/tianocore.github.io/wiki/EDK-II" - -if [[ ${PV} == *9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/tianocore/edk2.git" - KEYWORDS="" -else - MY_V="${PN^^}${PV}" - SRC_URI="https://github.com/tianocore/edk2/archive/v${MY_V}.tar.gz -> ${P}.tar.gz - doc? ( https://github.com/tianocore/edk2/releases/download/v${MY_V}/${MY_V}.Documents.zip -> ${P}-docs.zip )" - S="${WORKDIR}/edk2-v${MY_V}" - KEYWORDS="~amd64 ~x86" -fi - -LICENSE="BSD-2" -SLOT="0" -IUSE="doc" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" -RESTRICT="strip" - -RDEPEND="${PYTHON_DEPS}" -DEPEND="${RDEPEND} - >=dev-lang/nasm-2.14.02 - >=sys-power/iasl-20160729 - doc? ( app-arch/unzip )" - -DOCDIR="${WORKDIR}/Documents" - -# EFI pre-build libs -QA_PREBUILT=" - usr/lib/${P}/BeagleBoardPkg/Debugger_scripts/rvi_dummy.axf - usr/lib/${P}/ArmPkg/Library/GccLto/*.a -" -# GenBiosId is built upstream -# VfrCompile does not use LDFLAGS but next upsteam version should change this -QA_FLAGS_IGNORED=" - usr/lib/udk-2018/BaseTools/Source/C/bin/VfrCompile - usr/lib/${P}/Vlv2TbltDevicePkg/GenBiosId -" - -pkg_setup() { - if use x86; then - EFIARCH=IA32 - elif use amd64; then - EFIARCH=X64 - fi - - # Select toolchain within predefined ones - if tc-is-gcc; then - TOOLCHAIN_TAG="GCC5" - elif tc-is-clang; then - TOOLCHAIN_TAG="CLANG38" - else - TOOLCHAIN_TAG="ELFGCC" - fi -} - -src_unpack() { - default - - local doc_name - local f - if use doc; then - pushd "${DOCDIR}" >/dev/null || die - rm -f *.chm || die - for f in *.zip; do - unpack "${DOCDIR}/${f}" - mv html "${f%.zip}" || die - done - rm -f *.zip || die - popd >/dev/null || die - fi -} - -src_configure() { - sed -e "s|^\(BUILD_CFLAGS\s*=\).*$|\1 ${CFLAGS} -MD -fshort-wchar -fno-strict-aliasing -nostdlib -c -fPIC|" \ - -e "s|^\(BUILD_LFLAGS\s*=\).*$|\1 ${LDFLAGS}|" \ - -e "s|^\(BUILD_CXXFLAGS\s*=\).*$|\1 ${CXXFLAGS} -Wno-unused-result|" \ - -i "BaseTools/Source/C/Makefiles/header.makefile" \ - || die "Failed to update makefile header" -} - -src_compile() { - local make_flags=( - BUILD_CC="$(tc-getBUILD_CC)" - BUILD_CXX="$(tc-getBUILD_CXX)" - BUILD_AS="$(tc-getBUILD_AS)" - BUILD_AR="$(tc-getBUILD_AR)" - BUILD_LD="$(tc-getBUILD_LD)" - ) - # Base tools does not like parallel make - emake "${make_flags[@]}" -j1 -C BaseTools - - # Update template parameter files - sed -e "s|^\(ACTIVE_PLATFORM\s*=\).*$|\1 MdeModulePkg/MdeModulePkg.dsc|" \ - -e "s|^\(TARGET\s*=\).*$|\1 RELEASE|" \ - -e "s|^\(TARGET_ARCH\s*=\).*$|\1 ${EFIARCH}|" \ - -e "s|^\(TOOL_CHAIN_TAG\s*=\).*$|\1 ${TOOLCHAIN_TAG}|" \ - -e "s|^\(MAX_CONCURRENT_THREAD_NUMBER\s*=\).*$|\1 $(makeopts_jobs)|" \ - -i "BaseTools/Conf/target.template" || die "Failed to configure target file" - - # Clean unneeded files - find . -name '*.bat' -o -name '*.exe' -exec rm -f {} \; || die - find ./BaseTools/Source/C -mindepth 1 -maxdepth 1 \! -name 'bin' -exec rm -rf {} \; || die - - # Upsteam hack (symbolic link) should only be created if needed - rm "${S}/EmulatorPkg/Unix/Host/X11IncludeHack" || die - - # Create workspace script file - sed -e "s|{EDK_BASE}|${EPREFIX}/usr/lib/${P}|" \ - "${FILESDIR}"/udk-workspace.template \ - > "${T}/udk-workspace" || die "Failed to build udk-workspace" -} - -src_install() { - dobin "${T}/udk-workspace" - - # Use mkdir && cp here as doins does not preserve execution bits - mkdir -p "${ED}/usr/lib/${P}" || die - cp -pR "${S}"/* "${D}/usr/lib/${P}" || die - dosym "${P}" "/usr/lib/${PN}" - - local HTML_DOCS - use doc && HTML_DOCS=( "${DOCDIR}"/. ) - einstalldocs -} - -pkg_postinst() { - elog "To create a new workspace, execute:" - elog " . udk-workspace [workspace_dir]" - elog "You can link appropriate packages to your workspace. For example," - elog "in order to build MdeModulePkg and examples, you can try:" - elog " ln -s \"${EROOT}/usr/lib/${P}/\"Mde{Module,}Pkg ." - elog " build -a ${EFIARCH} all" -} |