diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-util/mingw-runtime | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-util/mingw-runtime')
-rw-r--r-- | dev-util/mingw-runtime/Manifest | 4 | ||||
-rw-r--r-- | dev-util/mingw-runtime/files/mingw-runtime-3.12-DESTDIR.patch | 22 | ||||
-rw-r--r-- | dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch | 27 | ||||
-rw-r--r-- | dev-util/mingw-runtime/files/mingw-runtime-3.20-LDBL_MIN_EXP.patch | 145 | ||||
-rw-r--r-- | dev-util/mingw-runtime/metadata.xml | 8 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-3.18.ebuild | 76 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-3.20.2.ebuild | 79 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-3.20.ebuild | 77 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-4.0.3.1.ebuild | 84 |
9 files changed, 522 insertions, 0 deletions
diff --git a/dev-util/mingw-runtime/Manifest b/dev-util/mingw-runtime/Manifest new file mode 100644 index 000000000000..cc3e91f1a597 --- /dev/null +++ b/dev-util/mingw-runtime/Manifest @@ -0,0 +1,4 @@ +DIST mingwrt-3.18-mingw32-src.tar.gz 391939 SHA256 de4979fd6eedeb21d2d506fe4880a838706dc88cbebe031e38561967fb7cbd42 SHA512 87778f08469a806dda606b0945d00511fccd0f7e0d545a33e2b4685db2490ec6a3e5e4267090b79a88eb963f97035fe8149097892f1f4a6e85f3a4661eb5e977 WHIRLPOOL c8883fcb3a4d04e9bf28e8ee15c9d5eb1fea62d7d3aed1dcfd4ae90f7186468296dc67dcd27f2e11b4af762e0fd833749a0065f4744992295c45a881aa58817a +DIST mingwrt-3.20-2-mingw32-src.tar.lzma 302072 SHA256 398d300407861dda1d11cc5e2a4e44a1798503f364169459633020ea224a987c SHA512 ffb8e3d46a4646b236b67df0d9d21571a0ee8b78125989d506c176e03922e520201770a03093f27789f0e4373bf64f69d41e377d861ddd008b5e29da65fb1d55 WHIRLPOOL 46efda9e299fb29d538b4bb3aba9743f141e96bb60b15c62668a0b565bb84825d5a0e6accc97dafba5ec51dac904c917d6cea7c1e48676050be8ef3b7744c2e7 +DIST mingwrt-3.20-mingw32-src.tar.gz 393946 SHA256 f1869483318ed1df5e15e49b8315173e90c1caa2968c4956b7657854c36bfe0a SHA512 2d2d3c7decc7b35ab4759034dcd291c8e322a46205ae70fd4c4d68224c9d7c75454b908f61ba8ca7e0fdf18ff121c5b7ffd02e0658b7557e3af1f89ed28ed58c WHIRLPOOL c66a805cdd4500f142e0d38cd3add06046608addba67e1c0167d96dc4838eacd938c6d38c5d423ab7dd6344070445df5105eeac9bbe3529ca528d02c3f31bad3 +DIST mingwrt-4.0.3-1-mingw32-src.tar.lzma 1341612 SHA256 409be571382cad83a7304d37e13c620aa98757014b0107efe7e2895a1feafcc2 SHA512 2aa429f939038c86441ccfd32b4ddd40347582557f9427df92ea7454eb5bf743b8e1aafbb627b527be755976be807f415aad3920f700d93aa86d07bf40f12bde WHIRLPOOL 12be2c230370ff794a79635d8f12861f022f2551ff7d009882df6c358dd2bbaf1ae16e2944136055948a44b5f187893f9bedacdc49122570324cb726f38addd2 diff --git a/dev-util/mingw-runtime/files/mingw-runtime-3.12-DESTDIR.patch b/dev-util/mingw-runtime/files/mingw-runtime-3.12-DESTDIR.patch new file mode 100644 index 000000000000..f5c52ba6b1e2 --- /dev/null +++ b/dev-util/mingw-runtime/files/mingw-runtime-3.12-DESTDIR.patch @@ -0,0 +1,22 @@ +--- Makefile.in ++++ Makefile.in +@@ -58,5 +58,11 @@ + endif + ++inst_bindir:=$(DESTDIR)$(inst_bindir) ++inst_includedir:=$(DESTDIR)$(inst_includedir) ++inst_libdir:=$(DESTDIR)$(inst_libdir) ++inst_docdir:=$(DESTDIR)$(inst_docdir) ++mandir:=$(DESTDIR)$(mandir) ++ + # The Mingw headers are installed under a subdirectory of + # $(tooldir)/include when configuring in Cygwin. + HEADER_SUBDIR = @HEADER_SUBDIR@ +@@ -199,6 +199,6 @@ + all_dlls_host: $(DLLS) + +-install_dlls_host: ++install_dlls_host: install-dirs + for i in $(DLLS); do \ + $(INSTALL_PROGRAM) $$i $(inst_bindir)/$$i ; \ + done diff --git a/dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch b/dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch new file mode 100644 index 000000000000..8b2418178857 --- /dev/null +++ b/dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch @@ -0,0 +1,27 @@ +http://sourceforge.net/tracker/?func=detail&aid=3446009&group_id=2435&atid=302435 +https://bugs.gentoo.org/419627 + +--- a/tlssup.c ++++ b/tlssup.c +@@ -84,6 +84,7 @@ BOOL WINAPI + __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) + { + _PVFV *pfunc; ++ int nfuncs, ifunc; + + /* We don't let us trick here. */ + if (_CRT_MT != 2) +@@ -96,8 +97,12 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) + return TRUE; + } + +- for (pfunc = &__xd_a + 1; pfunc != &__xd_z; ++pfunc) ++ /* Use the nfuncs variable to iterate the TLS functions instead of pfunc to ++ avoid nasty compiler optimizations when comparing two global pointers. */ ++ nfuncs = &__xd_z - (&__xd_a + 1); ++ for (ifunc=0; ifunc < nfuncs; ++ifunc) + { ++ pfunc = (&__xd_a + 1) + ifunc; + if (*pfunc != NULL) + (*pfunc)(); + } diff --git a/dev-util/mingw-runtime/files/mingw-runtime-3.20-LDBL_MIN_EXP.patch b/dev-util/mingw-runtime/files/mingw-runtime-3.20-LDBL_MIN_EXP.patch new file mode 100644 index 000000000000..8c409569238d --- /dev/null +++ b/dev-util/mingw-runtime/files/mingw-runtime-3.20-LDBL_MIN_EXP.patch @@ -0,0 +1,145 @@ +http://sourceforge.net/tracker/?func=detail&atid=102435&aid=3441135&group_id=2435 +https://bugs.gentoo.org/395893 + +????-??-?? Keith Marshall <keithmarshall@...> + + Support pragmatic identification for w32api source directory. + + * aclocal.m4 (MINGW_AC_W32API_SRCDIR): New macro; implement it. + * configure.in (W32API_INCLUDE): Assign using MINGW_AC_W32API_SRCDIR. + * Makefile.in (W32API_INCLUDE): Prefix -I flag to AC_SUBST value. + * mingwex/Makefile.in (W32API_INCLUDE): Likewise. + * profile/Makefile.in (W32API_INCLUDE): Likewise. + +diff -r 62c176864807 Makefile.in +--- a/Makefile.in Mon Nov 28 11:32:25 2011 +0000 ++++ b/Makefile.in Mon Nov 28 21:18:55 2011 +0000 +@@ -166,9 +166,9 @@ THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_ + # Various libraries. + LIBM_A=@LIBM_A@ + +-W32API_INCLUDE = @W32API_INCLUDE@ +-INCLUDES = -I$(srcdir)/include \ +- -I$(srcdir)/../include \ ++W32API_INCLUDE = -I @W32API_INCLUDE@ ++INCLUDES = -I $(srcdir)/include \ ++ -I $(srcdir)/../include \ + -nostdinc \ + -iwithprefixbefore include + ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE) +diff -r 62c176864807 aclocal.m4 +--- a/aclocal.m4 Mon Nov 28 11:32:25 2011 +0000 ++++ b/aclocal.m4 Mon Nov 28 21:18:55 2011 +0000 +@@ -15,7 +15,65 @@ AC_DEFUN([MINGW_AC_CONFIG_SRCDIR], + AC_MSG_CHECKING([package version]) + PACKAGE_VERSION=`awk '$[2] == "'"$1"'" { print $[3] }' ${srcdir}/$2` + AC_MSG_RESULT([$PACKAGE_VERSION])dnl +-]) #MINGW_AC_CONFIG_SRCDIR ++])# MINGW_AC_CONFIG_SRCDIR ++ ++# MINGW_AC_W32API_SRCDIR ++# ---------------------- ++# Attempt to identify the location of the w32api sources. ++# Accept an explicit location specified by to user, as argument ++# to --with-w32api-srcdir; if unspecified, fall back to standard ++# location relative to ${srcdir}. Identification requires that ++# include/windows.h is present within the nominated directory. ++# This is naive, but AC_CHECK_HEADER cannot be used because ++# the system's w32api headers will interfere. ++# ++AC_DEFUN([MINGW_AC_W32API_SRCDIR], ++[AC_ARG_WITH([w32api-srcdir], ++ [AS_HELP_STRING([--with-w32api-srcdir=DIR], ++ [locate w32api sources in DIR [SRCDIR/../w32api]]) ++ ],[],[with_w32api_srcdir=NONE]) ++ AS_IF([test "x${with_w32api_srcdir}" = xNONE], ++ [AC_MSG_CHECKING([include path for w32api headers]) ++ for with_w32api_srcdir in ${srcdir}/../w32api*; do ++ test -f "${with_w32api_srcdir}/include/windows.h" && break ++ with_w32api_srcdir=NONE ++ done ++ AS_IF([test "x${with_w32api_srcdir}" = xNONE], ++ [AC_MSG_RESULT([none found]) ++ AC_MSG_RESULT ++ AC_MSG_WARN([source directory containing include/windows.h not found]) ++ AC_MSG_WARN([ensure w32api sources are installed at \${top_srcdir}/../w32api*]) ++ AC_MSG_WARN([or use --with-w32api-srcdir=DIR to specify an alternative]) ++ ], ++ [case "${with_w32api_srcdir}" in ++ "${srcdir}/"*) with_w32api_srcdir="`echo "${with_w32api_srcdir}"dnl ++ | sed s,"^${srcdir}/",'${top_srcdir}/',`" ;; ++ esac ++ AC_MSG_RESULT([${with_w32api_srcdir}/include]) ++ ]) ++ ], ++ [AC_MSG_CHECKING([for windows.h in ${with_w32api_srcdir}/include]) ++ AS_IF([test -f "${with_w32api_srcdir}/include/windows.h"], ++ [AC_MSG_RESULT([yes]) ++ case "${with_w32api_srcdir}" in /*) ;; ++ *) with_w32api_srcdir='${top_builddir}/'"${with_w32api_srcdir}" ;; ++ esac ++ ], ++ [AC_MSG_RESULT([no]) ++ AC_MSG_RESULT ++ AC_MSG_WARN([the nominated directory, ${with_w32api_srcdir}]) ++ AC_MSG_WARN([does not appear to contain valid w32api source code]) ++ AC_MSG_WARN([(file '${with_w32api_srcdir}/include/windows.h' is not present)]) ++ with_w32api_srcdir=NONE ++ ]) ++ ]) ++ AS_IF([test "x${with_w32api_srcdir}" = xNONE], ++ [AC_MSG_WARN([please correct this omission and run configure again]) ++ AC_MSG_RESULT ++ AC_MSG_ERROR([unable to continue until this issue is resolved]) ++ ]) ++ W32API_INCLUDE="${with_w32api_srcdir}/include" ++])# MINGW_AC_W32API_SRCDIR + + # The following is copied from `no-executables.m4', in the top + # `src/config' directory. +diff -r 62c176864807 configure.in +--- a/configure.in Mon Nov 28 11:32:25 2011 +0000 ++++ b/configure.in Mon Nov 28 21:18:55 2011 +0000 +@@ -44,7 +44,7 @@ AC_CHECK_TOOL([WINDRES], [windres], [win + + AC_SUBST([NO_CYGWIN]) + AC_SUBST([HEADER_SUBDIR]) +-AC_SUBST([W32API_INCLUDE], ['-I ${top_srcdir}/../w32api/include']) ++AC_SUBST([W32API_INCLUDE], [MINGW_AC_W32API_SRCDIR]) + + # The following are used by the GCC profiling hooks... + # +diff -r 62c176864807 mingwex/Makefile.in +--- a/mingwex/Makefile.in Mon Nov 28 11:32:25 2011 +0000 ++++ b/mingwex/Makefile.in Mon Nov 28 21:18:55 2011 +0000 +@@ -126,10 +126,9 @@ ifdef NO_CYGWIN + override CC := ${NO_CYGWIN} $(firstword $(filter-out ${NO_CYGWIN},${CC})) + endif + +-W32API_INCLUDE = @W32API_INCLUDE@ +-INCLUDES = -I${srcdir} -I${top_srcdir} -I${top_srcdir}/include \ +- -nostdinc \ +- -iwithprefixbefore include ++W32API_INCLUDE = -I @W32API_INCLUDE@ ++INCLUDES = -I ${srcdir} -I ${top_srcdir} -I ${top_srcdir}/include \ ++ -nostdinc -isystem @W32API_INCLUDE@ -iwithprefixbefore include + ALL_CFLAGS = $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) $(W32API_INCLUDE) + ALL_CXXFLAGS = $(CXXFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE) + +diff -r 62c176864807 profile/Makefile.in +--- a/profile/Makefile.in Mon Nov 28 11:32:25 2011 +0000 ++++ b/profile/Makefile.in Mon Nov 28 21:18:55 2011 +0000 +@@ -65,10 +65,9 @@ THREAD_DLL = @THREAD_DLL@ + THREAD_DLL_VERSION = 10 + THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll + +-W32API_INCLUDE = @W32API_INCLUDE@ +-INCLUDES = -I${srcdir} -I${top_srcdir}/include \ +- -nostdinc \ +- -iwithprefixbefore include ++W32API_INCLUDE = -I @W32API_INCLUDE@ ++INCLUDES = -I ${srcdir} -I ${top_srcdir}/include \ ++ -nostdinc -iwithprefixbefore include + ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE) + ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE) + diff --git a/dev-util/mingw-runtime/metadata.xml b/dev-util/mingw-runtime/metadata.xml new file mode 100644 index 000000000000..a4d63710b914 --- /dev/null +++ b/dev-util/mingw-runtime/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>toolchain</herd> + <upstream> + <remote-id type="sourceforge">mingw</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild b/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild new file mode 100644 index 000000000000..cda4ddde95ff --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +inherit flag-o-matic eutils + +MY_P="mingwrt-${PV}-mingw32" +DESCRIPTION="Free Win32 runtime and import library definitions" +HOMEPAGE="http://www.mingw.org/" +SRC_URI="mirror://sourceforge/mingw/${MY_P}-src.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~ppc ~sparc x86" +IUSE="crosscompile_opts_headers-only" +RESTRICT="strip" + +S=${WORKDIR}/${MY_P} + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] +} + +pkg_setup() { + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then + die "Invalid configuration" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-gcc-4.6.patch #419627 + sed -i \ + -e "/W32API_INCLUDE/s:=.*:='-I /usr/${CTARGET}/usr/include':" \ + $(find -name configure) || die + sed -i \ + -e '/^install_dlls_host:/s:$: install-dirs:' \ + Makefile.in || die # fix parallel install +} + +src_compile() { + just_headers && return 0 + + CHOST=${CTARGET} strip-unsupported-flags + econf --host=${CTARGET} || die + emake || die +} + +src_install() { + if just_headers ; then + insinto /usr/${CTARGET}/usr/include + doins -r include/* || die + else + local insdir + is_crosscompile \ + && insdir="${D}/usr/${CTARGET}" \ + || insdir="${D}" + emake install DESTDIR="${insdir}" || die + env -uRESTRICT CHOST=${CTARGET} prepallstrip + rm -rf "${insdir}"/usr/doc + dodoc CONTRIBUTORS ChangeLog README TODO readme.txt + fi + is_crosscompile && dosym usr /usr/${CTARGET}/mingw +} diff --git a/dev-util/mingw-runtime/mingw-runtime-3.20.2.ebuild b/dev-util/mingw-runtime/mingw-runtime-3.20.2.ebuild new file mode 100644 index 000000000000..bab3a288d05e --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-3.20.2.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +inherit flag-o-matic autotools versionator eutils + +MY_P="mingwrt-$(version_format_string '$1.$2-$3')-mingw32" +DESCRIPTION="Free Win32 runtime and import library definitions" +HOMEPAGE="http://www.mingw.org/" +# http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/ +SRC_URI="mirror://sourceforge/mingw/${MY_P}-src.tar.lzma" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="crosscompile_opts_headers-only" +RESTRICT="strip" + +DEPEND="app-arch/xz-utils" + +S=${WORKDIR}/${MY_P} + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] +} + +pkg_setup() { + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then + die "Invalid configuration" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.20-LDBL_MIN_EXP.patch #395893 + eautoconf + sed -i \ + -e '/^install_dlls_host:/s:$: install-dirs:' \ + Makefile.in || die # fix parallel install +} + +src_configure() { + just_headers && return 0 + + CHOST=${CTARGET} strip-unsupported-flags + econf \ + --host=${CTARGET} \ + --with-w32api-srcdir="/usr/${CTARGET}/usr" +} + +src_install() { + if just_headers ; then + insinto /usr/${CTARGET}/usr/include + doins -r include/* || die + else + local insdir + is_crosscompile \ + && insdir="${D}/usr/${CTARGET}" \ + || insdir="${D}" + emake install DESTDIR="${insdir}" || die + env -uRESTRICT CHOST=${CTARGET} prepallstrip + rm -rf "${insdir}"/usr/doc + docinto ${CTARGET} # Avoid collisions with other cross-compilers. + dodoc CONTRIBUTORS ChangeLog README TODO readme.txt + fi + is_crosscompile && dosym usr /usr/${CTARGET}/mingw +} diff --git a/dev-util/mingw-runtime/mingw-runtime-3.20.ebuild b/dev-util/mingw-runtime/mingw-runtime-3.20.ebuild new file mode 100644 index 000000000000..efcd8eeeeafe --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-3.20.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +inherit flag-o-matic autotools eutils + +MY_P="mingwrt-${PV}-mingw32" +DESCRIPTION="Free Win32 runtime and import library definitions" +HOMEPAGE="http://www.mingw.org/" +# http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/ +SRC_URI="mirror://sourceforge/mingw/${MY_P}-src.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="crosscompile_opts_headers-only" +RESTRICT="strip" + +S=${WORKDIR}/${MY_P} + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] +} + +pkg_setup() { + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then + die "Invalid configuration" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.20-LDBL_MIN_EXP.patch #395893 + eautoconf + sed -i \ + -e '/^install_dlls_host:/s:$: install-dirs:' \ + Makefile.in || die # fix parallel install +} + +src_configure() { + just_headers && return 0 + + CHOST=${CTARGET} strip-unsupported-flags + econf \ + --host=${CTARGET} \ + --with-w32api-srcdir="/usr/${CTARGET}/usr" +} + +src_install() { + if just_headers ; then + insinto /usr/${CTARGET}/usr/include + doins -r include/* || die + else + local insdir + is_crosscompile \ + && insdir="${D}/usr/${CTARGET}" \ + || insdir="${D}" + emake install DESTDIR="${insdir}" || die + env -uRESTRICT CHOST=${CTARGET} prepallstrip + rm -rf "${insdir}"/usr/doc + docinto ${CTARGET} # Avoid collisions with other cross-compilers. + dodoc CONTRIBUTORS ChangeLog README TODO readme.txt + fi + is_crosscompile && dosym usr /usr/${CTARGET}/mingw +} diff --git a/dev-util/mingw-runtime/mingw-runtime-4.0.3.1.ebuild b/dev-util/mingw-runtime/mingw-runtime-4.0.3.1.ebuild new file mode 100644 index 000000000000..dea6916c28cb --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-4.0.3.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +inherit flag-o-matic toolchain-funcs versionator + +MY_P="mingwrt-$(version_format_string '$1.$2.$3-$4')-mingw32" +DESCRIPTION="Free Win32 runtime and import library definitions" +HOMEPAGE="http://www.mingw.org/" +# http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/ +SRC_URI="mirror://sourceforge/mingw/${MY_P}-src.tar.lzma" + +LICENSE="BSD" +SLOT="0" +# Collides with w32api-4.x +#KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="crosscompile_opts_headers-only" +RESTRICT="strip" + +DEPEND="app-arch/xz-utils" +RDEPEND="" + +S=${WORKDIR}/${MY_P}-src + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] +} + +pkg_setup() { + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then + die "Invalid configuration" + fi +} + +src_prepare() { + sed -i \ + -e '/^install_dlls_host:/s:$: install-dirs:' \ + Makefile.in || die # fix parallel install +} + +src_configure() { + just_headers && return 0 + + CHOST=${CTARGET} strip-unsupported-flags + filter-flags -frecord-gcc-switches + tc-export AR + econf \ + --host=${CTARGET} \ + --docdir="${EPREFIX}/usr/share/doc/${PF}" +} + +src_compile() { + emake -j1 +} + +src_install() { + if just_headers ; then + insinto /usr/${CTARGET}/usr/include + doins -r include/* + else + local insdir + is_crosscompile \ + && insdir="${D}/usr/${CTARGET}" \ + || insdir="${D}" + emake -j1 install DESTDIR="${insdir}" + env -uRESTRICT CHOST=${CTARGET} prepallstrip + rm -rf "${insdir}"/usr/doc + docinto ${CTARGET} # Avoid collisions with other cross-compilers. + fi + is_crosscompile && dosym usr /usr/${CTARGET}/mingw +} |