translated package: pthreads

This commit is contained in:
Volker Grabsch 2008-11-08 16:46:34 +01:00
parent e6ea73ceac
commit 1acb8f5e00
1 changed files with 25 additions and 0 deletions

25
src/pthreads.mk Normal file
View File

@ -0,0 +1,25 @@
# pthreads-w32
# http://sourceware.org/pthreads-win32/
PKG := pthreads
$(PKG)_VERSION := 2-8-0
$(PKG)_SUBDIR := pthreads-w32-$($(PKG)_VERSION)-release
$(PKG)_FILE := pthreads-w32-$($(PKG)_VERSION)-release.tar.gz
$(PKG)_URL := ftp://sourceware.org/pub/pthreads-win32/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
wget -q -O- 'ftp://sourceware.org/pub/pthreads-win32/Release_notes' | \
$(SED) -n 's,^RELEASE \([0-9][^[:space:]]*\).*,\1,p' | \
tr '.' '-' | \
head -1
endef
define $(PKG)_BUILD
$(SED) '35i\#define PTW32_STATIC_LIB' -i '$(2)/pthread.h'
$(MAKE) -C '$(2)' -j '$(JOBS)' GC-static CROSS='$(TARGET)-'
install -d '$(PREFIX)/$(TARGET)/lib'
install -m664 '$(2)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a'
install -d '$(PREFIX)/$(TARGET)/include'
install -m664 '$(2)/pthread.h' '$(2)/sched.h' '$(2)/semaphore.h' '$(PREFIX)/$(TARGET)/include/'
endef