diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-util/mingw-runtime | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-util/mingw-runtime')
-rw-r--r-- | dev-util/mingw-runtime/Manifest | 11 | ||||
-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 | 11 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-3.18.ebuild | 77 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-3.20.2.ebuild | 78 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-3.20.ebuild | 76 | ||||
-rw-r--r-- | dev-util/mingw-runtime/mingw-runtime-4.0.3.1.ebuild | 83 |
8 files changed, 508 insertions, 0 deletions
diff --git a/dev-util/mingw-runtime/Manifest b/dev-util/mingw-runtime/Manifest new file mode 100644 index 000000000000..5278bd0c3ee3 --- /dev/null +++ b/dev-util/mingw-runtime/Manifest @@ -0,0 +1,11 @@ +AUX mingw-runtime-3.18-gcc-4.6.patch 861 BLAKE2B cdcfbfd48163f8a6df52508d9f1ec2410e1957bea5fb1f4521b61ccaae4f2d38572870776bc9674e64272744718bf377ee2c90d5ff1dd8e9315d5d5c8a4b32f5 SHA512 696469f42f03f79219d946ea046aa2cf419f3abd6664db60b477a3ea474a652f42521ab039f4e4ccbd2d0c15d6816d54b4ac3551fbea3d5539dfcda71e17139d +AUX mingw-runtime-3.20-LDBL_MIN_EXP.patch 5806 BLAKE2B 2076564daebcead92b58f5845c2dfdea60c970add2b4cc3dd4ddf24d1caa620733439de4eb1ce4dcbeb82201e02f7e2e8a85881585c7f237e95f4da923e86979 SHA512 2013860ca92e5eeeaf94b5b78882a453d2f3312a51b6d8b37665e9d1f70aa80364355b5d3cb60a561adc6f2fb0001de41069548d715ffeb65793cdcc6c4b97ea +DIST mingwrt-3.18-mingw32-src.tar.gz 391939 BLAKE2B 9d0164f9292d29937bf01d7110d1a80719fb91baf2898670dcaed868c95b224d7b6d947d0a1b0cd70b5a0360f7d26a10d0956ee778e7c8d489d621ae531b788b SHA512 87778f08469a806dda606b0945d00511fccd0f7e0d545a33e2b4685db2490ec6a3e5e4267090b79a88eb963f97035fe8149097892f1f4a6e85f3a4661eb5e977 +DIST mingwrt-3.20-2-mingw32-src.tar.lzma 302072 BLAKE2B 93f5efff918e48829fe75018da53d34de1d0eeb782466e4a022740213433d634a41512f44a90676e4bbf8476e81e74ec1785ce127a2c217c755fcb9d6e9f8e72 SHA512 ffb8e3d46a4646b236b67df0d9d21571a0ee8b78125989d506c176e03922e520201770a03093f27789f0e4373bf64f69d41e377d861ddd008b5e29da65fb1d55 +DIST mingwrt-3.20-mingw32-src.tar.gz 393946 BLAKE2B 1efe539aac86ea9fb7b0e258d086a52421d0d23b18670728703ad9153fadd84b9ef50b6d1367839a3dbdfbecfe66ef431d512ca91ca6d6e6ff4b7ed865afd07e SHA512 2d2d3c7decc7b35ab4759034dcd291c8e322a46205ae70fd4c4d68224c9d7c75454b908f61ba8ca7e0fdf18ff121c5b7ffd02e0658b7557e3af1f89ed28ed58c +DIST mingwrt-4.0.3-1-mingw32-src.tar.lzma 1341612 BLAKE2B 4251c5737af3c209ea0fa22b604c24ffb6b67c6ab83d13e67ffc5750334f668005f321965a3d9cdf10e93e801730758c29cf64c10541a9e192e0a3355e2abd3f SHA512 2aa429f939038c86441ccfd32b4ddd40347582557f9427df92ea7454eb5bf743b8e1aafbb627b527be755976be807f415aad3920f700d93aa86d07bf40f12bde +EBUILD mingw-runtime-3.18.ebuild 1741 BLAKE2B 9fdb3431ed214a0c2cef899bfba14f4d4fc77b62d1e82a88a504e3e0fad9c29b28c2a4d77cdddb15207f5cb4873368d1eab5889a19bd4ca6b7647fc5382598c0 SHA512 475dd9cf0da0eb3fee396930d03aa5b7bb703409feb468585c8a9aeaf19d19f9a2f47f76b388dd9e866df83c05d542a95e00713c5010509f6512bf8a1bda5b34 +EBUILD mingw-runtime-3.20.2.ebuild 1885 BLAKE2B 23c4e547442cd5fb45f4d20ed983fe1cdb47227f441bbd33fc5cf1889d63cb46ab43792e401b337f9fbfceac0c690e2338fbf29dba0d835d717098e5b110596d SHA512 acf010d890cdac866ecbc41336de4151ab1301755b64226afbdf9039f77b93d3799c33375c49ea2186bb37d46249a8ee4217b69bb297156c132b22668ca937be +EBUILD mingw-runtime-3.20.ebuild 1813 BLAKE2B 87d775ccbfefcdfd6aadae32ba938ffda4a5ff771bf427b1cc192f42aa6aefbf7abce52259e30ebadb56d5848f753afcf8a92f87152e0869d79c10ad0c9d5645 SHA512 12ced00fc0e1ebd1837bc9105b5dd93158894301abde6e0db77e17316b48004ec4b577b9cb6af7052858824b915293f38b5985bc6e1832ab4836209b9eb19236 +EBUILD mingw-runtime-4.0.3.1.ebuild 1886 BLAKE2B 386b09ddab89cfd318edd224ccc827bb6a77a371b4186d5e39ec7a5a67ebc46f324810c0701d6e04a6c008afc6d9eb99945a12a1dedbf8870c00ae093fa38db5 SHA512 e0d87ea7eba4fa833c2b5bde35360dfd73aa6fa10140468a4654966e6e351ebe6c21b6c69dab94660544fde168239a76fa45905e286205c972a0b6668d9d74c6 +MISC metadata.xml 336 BLAKE2B f5b695f0c70efe0aef9843aab32d906407185d04d70d0ca5dc63872ec3f30d08454f4c706ade2f5d6191ac39cb0c3252349f03a50cf9c1726562361634e7d928 SHA512 c15c4f7fe2796147558f99a89942b216159b291e18dfb02358f0985fef55e7ce166dbd0831ef24938a5bc76377634036932e0ce1526d01c2b07be35cac17cbf9 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..eff81002e624 --- /dev/null +++ b/dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch @@ -0,0 +1,27 @@ +https://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..49377fe2b099 --- /dev/null +++ b/dev-util/mingw-runtime/files/mingw-runtime-3.20-LDBL_MIN_EXP.patch @@ -0,0 +1,145 @@ +https://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..6c377f90be9b --- /dev/null +++ b/dev-util/mingw-runtime/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>toolchain@gentoo.org</email> + <name>Gentoo Toolchain Project</name> + </maintainer> + <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..fde71e0d98cb --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=0 + +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 x86" +IUSE="headers-only" +RESTRICT="strip" + +S=${WORKDIR}/${MY_P} + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use 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..cd21a8f2e9f8 --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-3.20.2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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/" +# https://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 ~x86" +IUSE="headers-only" +RESTRICT="strip" + +DEPEND="app-arch/xz-utils" + +S=${WORKDIR}/${MY_P} + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use 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..e75340a8d33d --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-3.20.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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/" +# https://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 ~x86" +IUSE="headers-only" +RESTRICT="strip" + +S=${WORKDIR}/${MY_P} + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use 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..0a13e7773d86 --- /dev/null +++ b/dev-util/mingw-runtime/mingw-runtime-4.0.3.1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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/" +# https://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="headers-only" +RESTRICT="strip" + +DEPEND="app-arch/xz-utils" +RDEPEND="" + +S=${WORKDIR}/${MY_P}-src + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use 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 +} |