diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-11-28 09:21:44 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-11-28 09:21:44 +0000 |
commit | 6c634b3bd456c7c07b8a93df03dabec2925cef2f (patch) | |
tree | 858f3816e5460d713cd23e735c23acf1fec6b57e | |
parent | Initial cygwin support. (diff) | |
download | gentoo-2-6c634b3bd456c7c07b8a93df03dabec2925cef2f.tar.gz gentoo-2-6c634b3bd456c7c07b8a93df03dabec2925cef2f.tar.bz2 gentoo-2-6c634b3bd456c7c07b8a93df03dabec2925cef2f.zip |
Initial package by me.
(Portage version: 2.2_rc16/cvs/Linux 2.6.27.4 x86_64)
-rw-r--r-- | dev-libs/cygwin/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/cygwin/cygwin-1.5.25.15.ebuild | 92 | ||||
-rw-r--r-- | dev-libs/cygwin/metadata.xml | 5 |
3 files changed, 106 insertions, 0 deletions
diff --git a/dev-libs/cygwin/ChangeLog b/dev-libs/cygwin/ChangeLog new file mode 100644 index 000000000000..87fc3deb2499 --- /dev/null +++ b/dev-libs/cygwin/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for dev-libs/cygwin +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/cygwin/ChangeLog,v 1.1 2008/11/28 09:21:44 vapier Exp $ + +*cygwin-1.5.25.15 (28 Nov 2008) + + 28 Nov 2008; Mike Frysinger <vapier@gentoo.org> +metadata.xml, + +cygwin-1.5.25.15.ebuild: + Initial package by me. diff --git a/dev-libs/cygwin/cygwin-1.5.25.15.ebuild b/dev-libs/cygwin/cygwin-1.5.25.15.ebuild new file mode 100644 index 000000000000..c48681c0ceba --- /dev/null +++ b/dev-libs/cygwin/cygwin-1.5.25.15.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/cygwin/cygwin-1.5.25.15.ebuild,v 1.1 2008/11/28 09:21:44 vapier Exp $ + +inherit toolchain-funcs + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + export CTARGET=${CATEGORY/cross-} + fi +fi + +W32API_BIN="3.12-1" +MY_P="${PN}-${PV%.*}-${PV##*.}" +DESCRIPTION="Linux-like environment for Windows" +HOMEPAGE="http://cygwin.com/" +SRC_URI="!crosscompile_opts_headers-only? ( ftp://sourceware.org/pub/cygwin/release/cygwin/${MY_P}-src.tar.bz2 ) + crosscompile_opts_headers-only? ( + ftp://sourceware.org/pub/cygwin/release/w32api/w32api-${W32API_BIN}.tar.bz2 + ftp://sourceware.org/pub/cygwin/release/cygwin/${MY_P}.tar.bz2 + )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="crosscompile_opts_headers-only" +RESTRICT="strip" + +DEPEND="" + +S=${WORKDIR} + +just_headers() { + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] +} + +pkg_setup() { + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then + die "Invalid configuration; do not emerge this directly" + fi +} + +src_unpack() { + unpack ${A} + if just_headers ; then + mv usr/lib/w32api/* usr/lib/ || die + else + rm -rf ${MY_P}/etc # scrub garbage + fi +} + +src_compile() { + if just_headers ; then + return 0 + + # steps to install via src pkg + cd winsup/cygwin + econf || die + else + CHOST=${CTARGET} strip-unsupported-flags + mkdir "${WORKDIR}"/build + cd "${WORKDIR}"/build + ECONF_SOURCE=${S} \ + econf --prefix=/usr/${CTARGET}/usr || die + emake || die + fi +} + +src_install() { + if just_headers ; then + # cygwin guys do not support bootstrapping. thus the cygwin src pkg + # blows and cannot be bootstrapped. use the binaries -- the only + # thing upstream supports. + insinto /usr/${CTARGET} + doins -r * || die + return 0 + + # steps to install via src pkg + insinto /usr/${CTARGET}/usr/include + doins -r winsup/w32api/include/* || die + doins -r newlib/libc/include/* || die + dosym usr/include /usr/${CTARGET}/sys-include + cd winsup/cygwin + emake install-headers tooldir="${D}"/usr/${CTARGET}/usr || die + else + cd "${WORKDIR}"/build + emake install DESTDIR="${D}" || die + env -uRESTRICT CHOST=${CTARGET} prepallstrip + fi +} diff --git a/dev-libs/cygwin/metadata.xml b/dev-libs/cygwin/metadata.xml new file mode 100644 index 000000000000..fb4199eb7afe --- /dev/null +++ b/dev-libs/cygwin/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>toolchain</herd> +</pkgmetadata> |