Skip to content

Commit

Permalink
[pthreads] Fixed whitespaces in path issue (microsoft#31179)
Browse files Browse the repository at this point in the history
* quotes

* Updated version

* move static patch filenames to vcpkg_from_sourceforge()
  • Loading branch information
bold84 authored May 4, 2023
1 parent c0b1007 commit 13a0b7b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ports/pthreads/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ else()
list(APPEND PATCH_FILES use-mt.patch)
endif()

list(APPEND PATCH_FILES fix-pthread_getname_np.patch fix-install.patch)

vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO pthreads4w
Expand All @@ -27,6 +25,9 @@ vcpkg_from_sourceforge(
PATCHES
fix-arm-macro.patch
fix-arm64-version_rc.patch # https://sourceforge.net/p/pthreads4w/code/merge-requests/6/
fix-pthread_getname_np.patch
fix-install.patch
whitespace_in_path.patch
${PATCH_FILES}
)

Expand Down
2 changes: 1 addition & 1 deletion ports/pthreads/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pthreads",
"version": "3.0.0",
"port-version": 13,
"port-version": 14,
"description": "Meta-package that provides PThreads4W on Windows, or assumes presence of system pthreads on POSIX systems.",
"homepage": "https://sourceforge.net/projects/pthreads4w/",
"license": "Apache-2.0",
Expand Down
27 changes: 27 additions & 0 deletions ports/pthreads/whitespace_in_path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- a/Makefile Sat Apr 29 09:21:07 2023
+++ b/Makefile Sat Apr 29 09:19:07 2023
@@ -223,15 +223,15 @@

# Very basic install. It assumes "realclean" was done just prior to build target.
install:
- if not exist $(DLLDEST) mkdir $(DLLDEST)
- if not exist $(LIBDEST) mkdir $(LIBDEST)
- if not exist $(HDRDEST) mkdir $(HDRDEST)
- if exist pthreadV*.dll copy pthreadV*.dll $(DLLDEST)
- if exist pthreadV*.lib copy pthreadV*.lib $(LIBDEST)
- copy _ptw32.h $(HDRDEST)
- copy pthread.h $(HDRDEST)
- copy sched.h $(HDRDEST)
- copy semaphore.h $(HDRDEST)
+ if not exist "$(DLLDEST)" mkdir "$(DLLDEST)"
+ if not exist "$(LIBDEST)" mkdir "$(LIBDEST)"
+ if not exist "$(HDRDEST)" mkdir "$(HDRDEST)"
+ if exist pthreadV*.dll copy pthreadV*.dll "$(DLLDEST)"
+ if exist pthreadV*.lib copy pthreadV*.lib "$(LIBDEST)"
+ copy _ptw32.h "$(HDRDEST)"
+ copy pthread.h "$(HDRDEST)"
+ copy sched.h "$(HDRDEST)"
+ copy semaphore.h "$(HDRDEST)"

$(DLLS): $(DLL_OBJS)
$(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6386,7 +6386,7 @@
},
"pthreads": {
"baseline": "3.0.0",
"port-version": 13
"port-version": 14
},
"ptyqt": {
"baseline": "0.6.5",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pthreads.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2e0a6df2800d3677b941dc6504f083965b7886d9",
"version": "3.0.0",
"port-version": 14
},
{
"git-tree": "f4037e12c8075b814cab20c65509b49bd7f59257",
"version": "3.0.0",
Expand Down

0 comments on commit 13a0b7b

Please sign in to comment.