Created
April 27, 2013 01:04
-
-
Save erincandescent/5471455 to your computer and use it in GitHub Desktop.
Package specification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Package specifications are all done in YaML | |
name: gcc | |
version: 4.7.1 | |
targets: any | |
license: gpl3 | |
# Depends declarations are evaluated with host and target matching the package. | |
# E.G, for gcc@i386:arm, gmp below will be evaluated as gmp@i386:arm. The rules | |
# of deduction for the depends section allow the target property to "coalesce" | |
# down to "compatible" architectures; because a target doesn't make sense for | |
# gmp, it will have a noarch target, and so gmp@i386: will be selected. | |
# | |
# Binutils *does* have a target, therefore binutils@i386:arm will be selected | |
depends: | |
- gmp | |
- mpc | |
- mpfr | |
- binutils | |
# Same rules apply to build-depends as for depends, except build-depends aren't | |
# required on the host system for a binary package | |
build_depends: | |
- gmp-dev | |
- mpc-dev | |
- mpfr-dev | |
# Host depends is "logically" the same as build-depends, except host-depends | |
# dependencies are satisfied from the packages installed on the host machine | |
# during cross compilation. Additionally, the default host & target resolution | |
# is different: the default host is the architecture of the build machine, and | |
# the default target is that of the package host machine | |
host_depends: | |
- cc | |
- c++ | |
- ld | |
# NNNNN the above taxomony is confusing. Perhaps host/build depends should be | |
# swapped? | |
# Features that this package provides. Features have the same name, architecture | |
# and version rules as packages | |
provides: | |
cc: ${PREFIX}/bin/${TARGET_TRIPLE}-gcc | |
c++: ${PREFIX}/bin/${TARGET_TRIPLE}-g++ | |
"libgcc@$TARGET:": ${PREFIX}/lib/gcc/${TARGET_TRIPLE}/libgcc.a | |
# Source URLs. The method of retrival is scheme dependent (e.g. svn:// might be | |
# used for an SVN checkout) | |
# | |
# Source files will be passed to the prepare script in the $SOURCE_name | |
# variables | |
sources: | |
gcc: http://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2 | |
# Prepares the source. When building a source package, this is the only script | |
# executed | |
prepare: > | |
bzcat $SOURCE_gcc | pax -r | |
# Configure the package for building. Executed before the build script. | |
configure: > | |
$SOURCES/configure \ | |
--target=$TARGET_TRIPLE \ | |
--host=$TARGET_HOST \ | |
--prefix=$PREFIX \ | |
--with-sysroot=$SYSROOT \ | |
--with-build-sysroot=$BUILD_SYSROOT \ | |
--enable-languages=c,c++ \ | |
--enable-__cxa_atexit \ | |
--enable-gnu-indirect-function \ | |
--enable-target-optspace \ | |
--enable-targets=all \ | |
--disable-nls | |
# Build the package | |
build: > | |
gmake all-gcc all-target-libgcc | |
# Install the package into a staging environment. fpkgbuild sets DESTDIR so this | |
# is relatively simple for autotools based systems | |
install: > | |
gmake install-gcc install-target-libgcc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment