From cf164273b5405deda6a0697e631630d079eb12e0 Mon Sep 17 00:00:00 2001
From: Mohammed Alyousef <may642_2000@hotmail.com>
Date: Mon, 20 Jan 2025 00:28:58 +0300
Subject: [PATCH 1/5] [subprocess] add new port

---
 ports/subprocess/portfile.cmake | 13 +++++++++++++
 ports/subprocess/vcpkg.json     |  7 +++++++
 2 files changed, 20 insertions(+)
 create mode 100644 ports/subprocess/portfile.cmake
 create mode 100644 ports/subprocess/vcpkg.json

diff --git a/ports/subprocess/portfile.cmake b/ports/subprocess/portfile.cmake
new file mode 100644
index 00000000000000..3d1443cceb15e4
--- /dev/null
+++ b/ports/subprocess/portfile.cmake
@@ -0,0 +1,13 @@
+vcpkg_from_github(
+    OUT_SOURCE_PATH SOURCE_PATH
+    REPO sheredom/subprocess.h
+    REF b49c56e9fe214488493021017bf3954b91c7c1f5
+    SHA512 5d068660ae6e980d80271c0cecfd6e9057e9b04d1fd5154d60de0de9d062716a6c9b94a8ebadf722b49808b0761d5572d3495990efd18901516820a87f8ddf03
+    HEAD_REF master
+)
+
+# This is a header only library
+file(INSTALL "${SOURCE_PATH}/subprocess.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
diff --git a/ports/subprocess/vcpkg.json b/ports/subprocess/vcpkg.json
new file mode 100644
index 00000000000000..c7cfecf826a9e1
--- /dev/null
+++ b/ports/subprocess/vcpkg.json
@@ -0,0 +1,7 @@
+{
+  "name": "subprocess",
+  "version-date": "2024-07-20",
+  "description": "A simple one header solution to launching processes and interacting with them for C/C++.",
+  "homepage": "https://github.com/sheredom/subprocess.h",
+  "license": "Unlicense"
+}

From 0af24ef9b0c2a68ac689a8058a5a656c8962fd98 Mon Sep 17 00:00:00 2001
From: Mohammed Alyousef <may642_2000@hotmail.com>
Date: Mon, 20 Jan 2025 00:29:19 +0300
Subject: [PATCH 2/5] add versions

---
 versions/baseline.json      | 4 ++++
 versions/s-/subprocess.json | 9 +++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 versions/s-/subprocess.json

diff --git a/versions/baseline.json b/versions/baseline.json
index 9fbdb6bf34425f..002122d5720252 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -8800,6 +8800,10 @@
       "baseline": "2018-11-15",
       "port-version": 9
     },
+    "subprocess": {
+      "baseline": "2024-07-20",
+      "port-version": 0
+    },
     "suitesparse": {
       "baseline": "5.8.0",
       "port-version": 2
diff --git a/versions/s-/subprocess.json b/versions/s-/subprocess.json
new file mode 100644
index 00000000000000..72d7a0febf4213
--- /dev/null
+++ b/versions/s-/subprocess.json
@@ -0,0 +1,9 @@
+{
+  "versions": [
+    {
+      "git-tree": "f5043454361d55e5d798604a1f50a2c3f76175d0",
+      "version-date": "2024-07-20",
+      "port-version": 0
+    }
+  ]
+}

From ed7825c476a5b93dad16e3a7064e7ba64f807e77 Mon Sep 17 00:00:00 2001
From: Mohammed Alyousef <may642_2000@hotmail.com>
Date: Mon, 20 Jan 2025 10:40:02 +0300
Subject: [PATCH 3/5] use vcpkg_install_copyright

---
 ports/subprocess/portfile.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ports/subprocess/portfile.cmake b/ports/subprocess/portfile.cmake
index 3d1443cceb15e4..c1b2e8dd907265 100644
--- a/ports/subprocess/portfile.cmake
+++ b/ports/subprocess/portfile.cmake
@@ -10,4 +10,4 @@ vcpkg_from_github(
 file(INSTALL "${SOURCE_PATH}/subprocess.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
 
 # Handle copyright
-file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

From 5830acc333cd07fd3c62e971ced22ef2fba87114 Mon Sep 17 00:00:00 2001
From: MoAlyousef <may642_2000@hotmail.com>
Date: Mon, 20 Jan 2025 10:45:24 +0300
Subject: [PATCH 4/5] overwrite version

---
 versions/s-/subprocess.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/versions/s-/subprocess.json b/versions/s-/subprocess.json
index 72d7a0febf4213..bc79f320028166 100644
--- a/versions/s-/subprocess.json
+++ b/versions/s-/subprocess.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "f5043454361d55e5d798604a1f50a2c3f76175d0",
+      "git-tree": "c6d1e3514a58a59754d5858b3bfd262f5b9993d2",
       "version-date": "2024-07-20",
       "port-version": 0
     }

From 2a87a8a704d00d879831270fb9f0caab5fc51465 Mon Sep 17 00:00:00 2001
From: Mohammed Alyousef <may642_2000@hotmail.com>
Date: Wed, 22 Jan 2025 10:07:29 +0300
Subject: [PATCH 5/5] Update ports/subprocess/portfile.cmake

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
---
 ports/subprocess/portfile.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ports/subprocess/portfile.cmake b/ports/subprocess/portfile.cmake
index c1b2e8dd907265..a0cf11734267fa 100644
--- a/ports/subprocess/portfile.cmake
+++ b/ports/subprocess/portfile.cmake
@@ -7,7 +7,7 @@ vcpkg_from_github(
 )
 
 # This is a header only library
-file(INSTALL "${SOURCE_PATH}/subprocess.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+file(INSTALL "${SOURCE_PATH}/subprocess.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}")
 
 # Handle copyright
 vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")