diff options
Diffstat (limited to 'ports/libplist')
| -rw-r--r-- | ports/libplist/CONTROL | 3 | ||||
| -rw-r--r-- | ports/libplist/dllexport.patch | 37 | ||||
| -rw-r--r-- | ports/libplist/portfile.cmake | 20 |
3 files changed, 60 insertions, 0 deletions
diff --git a/ports/libplist/CONTROL b/ports/libplist/CONTROL new file mode 100644 index 000000000..22e209d14 --- /dev/null +++ b/ports/libplist/CONTROL @@ -0,0 +1,3 @@ +Source: libplist
+Version: 2.0.1.197-1
+Description: A library to handle Apple Property List format in binary or XML
diff --git a/ports/libplist/dllexport.patch b/ports/libplist/dllexport.patch new file mode 100644 index 000000000..f5e006210 --- /dev/null +++ b/ports/libplist/dllexport.patch @@ -0,0 +1,37 @@ +diff --git a/include/plist/plist.h b/include/plist/plist.h
+index 2863c74..9cdb219 100644
+--- a/include/plist/plist.h
++++ b/include/plist/plist.h
+@@ -42,7 +42,7 @@ extern "C"
+ #include <stdint.h>
+ #endif
+
+-#ifdef _MSC_VER
++#if defined(_MSC_VER) && defined(LIBPLIST_EXPORTS)
+ #define PLIST_API_MSC __declspec( dllexport )
+ #else
+ #define PLIST_API_MSC
+diff --git a/src/plist.h b/src/plist.h
+index 1e5d0d1..6690343 100644
+--- a/src/plist.h
++++ b/src/plist.h
+@@ -39,10 +39,7 @@
+ #include <sys/time.h>
+ #endif
+
+-#ifdef _MSC_VER
+- #define PLIST_API __declspec( dllexport )
+-#else
+-#ifdef WIN32
++#if (defined(_MSC_VER) || defined(WIN32)) && defined(LIBPLIST_EXPORTS)
+ #define PLIST_API __declspec( dllexport )
+ #else
+ #ifdef HAVE_FVISIBILITY
+@@ -51,7 +48,6 @@
+ #define PLIST_API
+ #endif
+ #endif
+-#endif
+
+ struct plist_data_s
+ {
diff --git a/ports/libplist/portfile.cmake b/ports/libplist/portfile.cmake new file mode 100644 index 000000000..71e12fd4c --- /dev/null +++ b/ports/libplist/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO libimobiledevice-win32/libplist
+ REF 2.0.1.197
+ SHA512 55e1817c61d608b11646eb9c28c445f9ee801c7beb2121bd810235561117262adb73dbecb23b9ef5b0c54b0fc8089e0a46acc0e8f4845329a50a663ab004052c
+ HEAD_REF master
+ PATCHES dllexport.patch
+)
+
+vcpkg_install_msbuild(
+ SOURCE_PATH ${SOURCE_PATH}
+ PROJECT_SUBPATH libplist.sln
+ INCLUDES_SUBPATH include
+ LICENSE_SUBPATH COPYING.lesser
+ REMOVE_ROOT_INCLUDES
+)
|
