aboutsummaryrefslogtreecommitdiff
path: root/ports/libmagic
diff options
context:
space:
mode:
authorJackBoosY <yuzaiyang@beyondsoft.com>2020-01-13 23:55:59 -0800
committerJackBoosY <yuzaiyang@beyondsoft.com>2020-01-13 23:55:59 -0800
commit2514481b42ebdeec28649582fc666955cf206c84 (patch)
tree60c9809a5c3c8adbad240a40b1088a6f8e42c019 /ports/libmagic
parentb751326c91c9a307aaf5e340b61ab9f2d1ad45a4 (diff)
parent28eee51adb36f2165be846e77ef7b3ee5b3f8789 (diff)
downloadvcpkg-2514481b42ebdeec28649582fc666955cf206c84.tar.gz
vcpkg-2514481b42ebdeec28649582fc666955cf206c84.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg into dev/jack/upgrade_libi
Diffstat (limited to 'ports/libmagic')
-rw-r--r--ports/libmagic/CONTROL4
-rw-r--r--ports/libmagic/portfile.cmake29
2 files changed, 33 insertions, 0 deletions
diff --git a/ports/libmagic/CONTROL b/ports/libmagic/CONTROL
new file mode 100644
index 000000000..3f0b777eb
--- /dev/null
+++ b/ports/libmagic/CONTROL
@@ -0,0 +1,4 @@
+Source: libmagic
+Version: 5.37
+Homepage: https://github.com/file/file
+Description: This library can be used to classify files according to magic number tests. \ No newline at end of file
diff --git a/ports/libmagic/portfile.cmake b/ports/libmagic/portfile.cmake
new file mode 100644
index 000000000..8eabf13b7
--- /dev/null
+++ b/ports/libmagic/portfile.cmake
@@ -0,0 +1,29 @@
+vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux and Mac platform" ON_TARGET "Windows")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO file/file
+ REF a0d5b0e4e9f97d74a9911e95cedd579852e25398
+ SHA512 bd20a7f3a3117da10556a1f746f691d2e26b23b30cb70a6c08e05110eb415d457b82265dd910a7b05fc30bc34ba9019a33b1c59a34d844c14c2df7ba1eea060e
+ HEAD_REF mater
+)
+
+vcpkg_configure_make(
+ SOURCE_PATH ${SOURCE_PATH}
+ AUTOCONFIG
+)
+
+vcpkg_install_make()
+
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man/man5)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)