summaryrefslogtreecommitdiff
path: root/dev-libs/pthreads4w
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /dev-libs/pthreads4w
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'dev-libs/pthreads4w')
-rw-r--r--dev-libs/pthreads4w/Manifest3
-rw-r--r--dev-libs/pthreads4w/metadata.xml12
-rw-r--r--dev-libs/pthreads4w/pthreads4w-3.0.0.ebuild72
3 files changed, 87 insertions, 0 deletions
diff --git a/dev-libs/pthreads4w/Manifest b/dev-libs/pthreads4w/Manifest
new file mode 100644
index 000000000000..eb5738ba84bc
--- /dev/null
+++ b/dev-libs/pthreads4w/Manifest
@@ -0,0 +1,3 @@
+DIST pthreads4w-code-v3.0.0.zip 862409 BLAKE2B cd23103c92f8eaa2088fdd68cfc94655771d44c365ca32180395cdb8645b570c2f65620d3c2969671a48c6ac45889bc439f3490dc7ec2497dfeca9f758cda6cd SHA512 49e541b66c26ddaf812edb07b61d0553e2a5816ab002edc53a38a897db8ada6d0a096c98a9af73a8f40c94283df53094f76b429b09ac49862465d8697ed20013
+EBUILD pthreads4w-3.0.0.ebuild 1768 BLAKE2B 3f20bd24ca66a940d859bb745f3a8a4c62751e8baee1cb93715de7a14f24ae499bb81de4c7c1190ead216d3b78f7ab91b1aa7f489988af275b612d27e25d7d12 SHA512 56324493ca725379bb569f305916d3c5a13e6ed7c3b0cde110a67ea6c899bfc1a51a9858a40442410c2e64c39aacb12eee430dfc7efd287db97f8d290a95cf5e
+MISC metadata.xml 463 BLAKE2B b69ce2232b47e30b12f97c56b5ddc429313e2dd26c32829e4c67718abb3227701ae0e7df05a3a78c94e847afe2ccb8eca53890891310f2839acddb9b330befb8 SHA512 86b02a1f3f72d68d070392f355dcf4e03a4e8161b1e13b249e70ddf3335dd6e97ffa58bb0df0f1235330fa78b40f5182f62db6027fce19890ecd1b545952c82e
diff --git a/dev-libs/pthreads4w/metadata.xml b/dev-libs/pthreads4w/metadata.xml
new file mode 100644
index 000000000000..30aaf1fdc57c
--- /dev/null
+++ b/dev-libs/pthreads4w/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>haubi@gentoo.org</email>
+ <name>Michael Haubenwallner</name>
+ </maintainer>
+ <longdescription lang="en">
+ Also known as "pthreads-win32", POSIX Threads for Windows implements a large
+ subset of the threads related API from the Single Unix Specification Version 3.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-libs/pthreads4w/pthreads4w-3.0.0.ebuild b/dev-libs/pthreads4w/pthreads4w-3.0.0.ebuild
new file mode 100644
index 000000000000..9ab3c315154a
--- /dev/null
+++ b/dev-libs/pthreads4w/pthreads4w-3.0.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="POSIX Threads for Windows"
+HOMEPAGE="http://pthreads4w.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-code-v${PV}.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~x86-winnt"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND="
+ app-arch/unzip
+ sys-devel/parity
+"
+
+S=${WORKDIR}/${PN}-code-07053a521b0a9deb6db2a649cde1f828f2eb1f4f
+
+src_compile() {
+ # from pthreads.h:
+ # Note: Unless the build explicitly defines one of the following, then
+ # we default to standard C style cleanup. This style uses setjmp/longjmp
+ # in the cancellation and thread exit implementations and therefore won't
+ # do stack unwinding if linked to applications that have it (e.g.
+ # C++ apps). This is currently consistent with most/all commercial Unix
+ # POSIX threads implementations.
+ local variant="VC" # C style cleanup
+
+ case ${CHOST} in
+ *-libcmtd*) variant+="-static-debug" ;;
+ *-libcmt*) variant+="-static" ;;
+ *-msvcd*) variant+="-debug" ;;
+ *-msvc*) ;;
+ esac
+
+ case ${CHOST} in
+ x86_64-*) variant+=" TARGET_CPU=x64" ;;
+ i?86-*) variant+=" TARGET_CPU=x86" ;;
+ esac
+
+ ${CHOST}-nmake -f Makefile ${variant} || die
+}
+
+src_install() {
+ local V=$(ver_cut 1)
+ case ${CHOST} in
+ *-libcmtd*|*-msvcd*) V+="d" ;; # debug CRT
+ esac
+ case ${CHOST} in
+ *-libcmt*) # static CRT
+ dolib.so libpthreadVC${V}.lib
+ newlib.so libpthreadVC${V}.lib libpthread.lib # for -lpthread
+ ;;
+ *-msvc*) # dynamic CRT
+ dobin pthreadVC${V}.dll
+ dolib.so pthreadVC${V}.lib
+ newlib.so pthreadVC${V}.lib pthread.lib # for -lpthread
+ ;;
+ esac
+ insinto /usr/include
+ doins {pthread,sched,semaphore,_ptw32}.h
+ einstalldocs
+}
+
+src_test() {
+ ${CHOST}-nmake -DEXHAUSTIVE all-tests || die
+}