New port: devel/clthreads: C++ wrapper library around the POSIX threads API

Approved by:	tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D13153
This commit is contained in:
Yuri Victorovich 2017-11-22 06:28:01 +00:00
parent 4fb6908f37
commit d301e51abf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=454676
5 changed files with 82 additions and 0 deletions

View file

@ -319,6 +319,7 @@
SUBDIR += clojure-cider
SUBDIR += cloudabi
SUBDIR += cloudabi-toolchain
SUBDIR += clthreads
SUBDIR += cltune
SUBDIR += cmake
SUBDIR += cmake-doc

24
devel/clthreads/Makefile Normal file
View file

@ -0,0 +1,24 @@
# $FreeBSD$
PORTNAME= clthreads
DISTVERSION= 2.4.0
CATEGORIES= devel
MASTER_SITES= http://kokkinizita.linuxaudio.org/linuxaudio/downloads/
MAINTAINER= yuri@FreeBSD.org
COMMENT= C++ wrapper library around the POSIX threads API
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
USES= tar:bz2
USE_LDCONFIG= yes
PLIST_FILES= include/clthreads.h \
lib/libclthreads.so \
lib/libclthreads.so.${DISTVERSION}
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libclthreads.so.${DISTVERSION}
.include <bsd.port.mk>

3
devel/clthreads/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1511064281
SHA256 (clthreads-2.4.0.tar.bz2) = a69fd566af24b85a10c5ecd957a85b7f5eb1c56995d2b999219b52f353ea1de9
SIZE (clthreads-2.4.0.tar.bz2) = 14796

View file

@ -0,0 +1,51 @@
--- Makefile.orig 2008-03-22 21:48:25 UTC
+++ Makefile
@@ -17,18 +17,18 @@
# Modify as required.
#
-PREFIX = /usr/local
-SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
-LIBDIR = lib$(SUFFIX)
+PREFIX ?= /usr/local
+#SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+LIBDIR = lib
MAJVERS = 2
MINVERS = 4.0
VERSION = $(MAJVERS).$(MINVERS)
-DISTDIR = clthreads-$(VERSION)
+DISTDIR ?= clthreads-$(VERSION)
-CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
+CXXFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
LDLFAGS +=
LDLIBS +=
@@ -41,16 +41,16 @@ CLTHREADS_O = p_thread.o a_thread.o itc_
CLTHREADS_H = clthreads.h
-$(CLTHREADS_MIN): $(CLTHREADS_O)
- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
+all: $(CLTHREADS_O)
+ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
-install: $(CLTHREADS_MIN)
- /usr/bin/install -d $(PREFIX)/$(LIBDIR)
- /usr/bin/install -m 644 $(CLTHREADS_H) $(PREFIX)/include
- /usr/bin/install -m 755 $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)
- /sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
- ln -sf $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)/$(CLTHREADS_SO)
+install: all
+ #/usr/bin/install -d $(PREFIX)/$(LIBDIR)
+ /usr/bin/install -m 644 $(CLTHREADS_H) $(DESTDIR)$(PREFIX)/include
+ /usr/bin/install -m 755 $(CLTHREADS_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ #/sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
+ ln -sf $(CLTHREADS_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLTHREADS_SO)
clean:

View file

@ -0,0 +1,3 @@
A C++ threading library by Fons Adriaensen <fons@kokkinizita.net>.
WWW: http://kokkinizita.linuxaudio.org/linuxaudio