mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 05:19:06 +08:00
[libcsv,hashids] Add new port (#28828)
* libcsv port * libcsv versioning * libcsv linkage fix * Update version database * [hashids] Add new port * [hashids] Update version database Co-authored-by: Emanuele Zavallone <emanuele.zavallone@next-informatica.com>
This commit is contained in:
parent
407d75560d
commit
44a4a76bc5
18
ports/hashids/hashids.patch
Normal file
18
ports/hashids/hashids.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/src/hashids.c b/src/hashids.c
|
||||
index 7f0b2f3..8d68509 100644
|
||||
--- a/src/hashids.c
|
||||
+++ b/src/hashids.c
|
||||
@@ -6,6 +6,13 @@
|
||||
|
||||
#include "hashids.h"
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#include <BaseTsd.h>
|
||||
+typedef SSIZE_T ssize_t;
|
||||
+#else
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
+
|
||||
/* branch prediction hinting */
|
||||
#ifndef __has_builtin
|
||||
# define __has_builtin(x) (0)
|
30
ports/hashids/portfile.cmake
Normal file
30
ports/hashids/portfile.cmake
Normal file
@ -0,0 +1,30 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO tzvetkoff/hashids.c
|
||||
REF 11ea51510ba968438eb9b1bc3f8c9981be731521 # v1.2.1
|
||||
SHA512 a6c066ff6544502f1c0ed55afcf994e6ed52b207e428de58992ec9e3ffef1e6fdb4439f2565e7cb039065403f497fcf8e95a8e3b9843e4f0b9bef22853816270
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
hashids.patch
|
||||
)
|
||||
|
||||
set(EXTRA_OPTS "")
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
# $LIBS is an environment variable that vcpkg already pre-populated with some libraries.
|
||||
# We need to re-purpose it when passing LIBS option to make to avoid overriding the vcpkg's own list.
|
||||
list(APPEND EXTRA_OPTS "LIBS=-lgetopt \$LIBS")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
OPTIONS
|
||||
${EXTRA_OPTS}
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/hashids" RENAME copyright)
|
13
ports/hashids/vcpkg.json
Normal file
13
ports/hashids/vcpkg.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "hashids",
|
||||
"version": "1.2.1",
|
||||
"description": "generate short unique ids from integers",
|
||||
"homepage": "https://hashids.org/c/",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "getopt",
|
||||
"platform": "windows & !mingw"
|
||||
}
|
||||
]
|
||||
}
|
13
ports/libcsv/Makefile.patch
Normal file
13
ports/libcsv/Makefile.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 79a3527..619a253 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
lib_LTLIBRARIES = libcsv.la
|
||||
libcsv_la_SOURCES = libcsv.c
|
||||
libcsv_la_LDFLAGS = -version-info 3:3:0
|
||||
- libcsv_la_CFLAGS = -Wall -Wextra
|
||||
+ libcsv_la_CFLAGS = -Wall
|
||||
libcsv_includedir = $(includedir)
|
||||
nobase_libcsv_include_HEADERS = csv.h
|
||||
dist_man_MANS = csv.3
|
21
ports/libcsv/portfile.cmake
Normal file
21
ports/libcsv/portfile.cmake
Normal file
@ -0,0 +1,21 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rgamble/libcsv
|
||||
REF b1d5212831842ee5869d99bc208a21837e4037d5 # v3.0.3
|
||||
SHA512 2e6ea0b68768d502e9bdb3bb801a1eb64b7fb0010a5006dec1b36a0fe705ec717560ec91f586572654c015db1f0d3a6e804dbcaa666a419192e93820b2c5e891
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
Makefile.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libcsv" RENAME copyright)
|
7
ports/libcsv/vcpkg.json
Normal file
7
ports/libcsv/vcpkg.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "libcsv",
|
||||
"version": "3.0.3",
|
||||
"description": "CSV parser and writer library",
|
||||
"homepage": "https://github.com/rgamble/libcsv",
|
||||
"license": "GPL-2.0-or-later"
|
||||
}
|
@ -2920,6 +2920,10 @@
|
||||
"baseline": "8",
|
||||
"port-version": 2
|
||||
},
|
||||
"hashids": {
|
||||
"baseline": "1.2.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"hayai": {
|
||||
"baseline": "2019-08-10",
|
||||
"port-version": 1
|
||||
@ -3712,6 +3716,10 @@
|
||||
"baseline": "0.6.13",
|
||||
"port-version": 3
|
||||
},
|
||||
"libcsv": {
|
||||
"baseline": "3.0.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"libcuckoo": {
|
||||
"baseline": "0.3.1",
|
||||
"port-version": 0
|
||||
|
9
versions/h-/hashids.json
Normal file
9
versions/h-/hashids.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "170dbea9b9e43fbefda63cd897b24e4e890c73ae",
|
||||
"version": "1.2.1",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/l-/libcsv.json
Normal file
9
versions/l-/libcsv.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "05dbce143e6757c7df2df6813ac7d559b2d908a1",
|
||||
"version": "3.0.3",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user