aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLily <47812810+LilyWangL@users.noreply.github.com>2020-02-05 07:35:26 +0800
committerGitHub <noreply@github.com>2020-02-04 15:35:26 -0800
commitd9200c4e94a61553d6679451c2d6e2de491395ce (patch)
tree00090129ea8fd281e4a901ec3afae695db79d7b6
parent319a54ebd3761ea39bc8f03cb1e205feb7f3fee5 (diff)
downloadvcpkg-d9200c4e94a61553d6679451c2d6e2de491395ce.tar.gz
vcpkg-d9200c4e94a61553d6679451c2d6e2de491395ce.zip
[libgpod] Add new port (#7983)
* [libgpod] Add new port * [libgpod] Fix build error * [libgpod] Modify ci.baseline.txt * [libgpod] Fix patch error * [libgpod] Fix conflict * [libgpod] Fix conflict
-rw-r--r--ports/libgpod/CMakeLists.txt78
-rw-r--r--ports/libgpod/CONTROL5
-rw-r--r--ports/libgpod/fix-glibconfigpath.patch117
-rw-r--r--ports/libgpod/portfile.cmake27
-rw-r--r--scripts/ci.baseline.txt6
5 files changed, 233 insertions, 0 deletions
diff --git a/ports/libgpod/CMakeLists.txt b/ports/libgpod/CMakeLists.txt
new file mode 100644
index 000000000..233efc722
--- /dev/null
+++ b/ports/libgpod/CMakeLists.txt
@@ -0,0 +1,78 @@
+cmake_minimum_required (VERSION 3.12)
+
+project (libgpod C)
+
+option(WITH_INTERNAL_GCHECKSUM OFF)
+
+find_package(sqlite3 CONFIG REQUIRED)
+
+include(SelectLibraryConfigurations)
+find_path(glib_PATH glib.h PATHS include)
+find_library(glib_LIBRARY_RELEASE NAMES glib-2.0 PATHS lib)
+find_library(glib_LIBRARY_DEBUG NAMES glib-2.0 PATHS debug/lib)
+select_library_configurations(glib)
+if (NOT glib_FOUND)
+ message(FATAL_ERROR "glib not found.")
+endif()
+
+find_path(plist_PATH plist++.h PATH_SUFFIXES plist)
+find_library(plist_LIBRARY_RELEASE NAMES plist PATHS lib)
+find_library(plist_LIBRARY_DEBUG NAMES plist PATHS debug/lib)
+select_library_configurations(plist)
+if (NOT plist_FOUND)
+ message(FATAL_ERROR "plist not found.")
+endif()
+message("plist_PATH: ${plist_PATH}")
+
+list(APPEND libgpod_Sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/db-artwork-debug.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/db-artwork-parser.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/db-artwork-writer.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/db-image-parser.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/db-parse-context.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/gchecksum.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_artwork.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_chapterdata.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_device.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_hash58.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_hash72.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_hashAB.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_iphone.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_itunesdb.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_photoalbum.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_playlist.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_plist.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_sqlite.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_sysinfo_extended_parser.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_thumb.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_track.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_tzinfo.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_zlib.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/ithumb-writer.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/pixmaps.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/rijndael.c
+)
+
+if (NOT WITH_INTERNAL_GCHECKSUM)
+ list(REMOVE_ITEM libgpod_Sources ${CMAKE_CURRENT_SOURCE_DIR}/src/gchecksum.c)
+endif()
+
+add_library(libgpod ${libgpod_Sources})
+
+target_include_directories(libgpod PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${glib_PATH} ${plist_PATH})
+
+if (WITH_INTERNAL_GCHECKSUM)
+ target_compile_definitions(libgpod PRIVATE -DWITH_INTERNAL_GCHECKSUM)
+endif()
+target_compile_definitions(libgpod PRIVATE -DLIBGPOD_BLOB_DIR=\"${LIBGPOD_BLOB_DIR}\" -DGETTEXT_PACKAGE="libgpod")
+
+target_link_libraries(libgpod PRIVATE ${glib_LIBRARY} ${plist_LIBRARY} sqlite3)
+
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb.h DESTINATION include/libgpod/gpod)
+
+install(
+ TARGETS libgpod
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+) \ No newline at end of file
diff --git a/ports/libgpod/CONTROL b/ports/libgpod/CONTROL
new file mode 100644
index 000000000..01134d303
--- /dev/null
+++ b/ports/libgpod/CONTROL
@@ -0,0 +1,5 @@
+Source: libgpod
+Version: 2019-08-29
+Homepage: https://github.com/fadingred/libgpod
+Description: libgpod is a library meant to abstract access to an iPod content.
+Build-Depends: glib, libplist, sqlite3 \ No newline at end of file
diff --git a/ports/libgpod/fix-glibconfigpath.patch b/ports/libgpod/fix-glibconfigpath.patch
new file mode 100644
index 000000000..1a60eb1aa
--- /dev/null
+++ b/ports/libgpod/fix-glibconfigpath.patch
@@ -0,0 +1,117 @@
+diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
+index c19f481..cca786f 100644
+--- a/src/db-artwork-writer.c
++++ b/src/db-artwork-writer.c
+@@ -22,7 +22,7 @@
+ *
+ */
+
+-#include <config.h>
++#include <glib/config.h>
+ #include "itdb.h"
+ #include "itdb_device.h"
+ #include "itdb_private.h"
+diff --git a/src/itdb_artwork.c b/src/itdb_artwork.c
+index 2328840..a7cdec4 100644
+--- a/src/itdb_artwork.c
++++ b/src/itdb_artwork.c
+@@ -26,7 +26,7 @@
+ | $Id$
+ */
+
+-#include <config.h>
++#include <glib/config.h>
+
+ #include "itdb_device.h"
+ #include "itdb_private.h"
+diff --git a/src/itdb_chapterdata.c b/src/itdb_chapterdata.c
+index 469e8b5..cb53077 100644
+--- a/src/itdb_chapterdata.c
++++ b/src/itdb_chapterdata.c
+@@ -27,7 +27,7 @@
+ | $Id: itdb_chapterdata.c 1612 2007-06-29 16:02:00Z jcsjcs $
+ */
+
+-#include <config.h>
++#include <glib/config.h>
+
+ #include "itdb_device.h"
+ #include <stdio.h>
+diff --git a/src/itdb_device.c b/src/itdb_device.c
+index 34b89fe..d776a64 100644
+--- a/src/itdb_device.c
++++ b/src/itdb_device.c
+@@ -29,7 +29,7 @@
+ |
+ | $Id$
+ */
+-#include <config.h>
++#include <glib/config.h>
+
+ #include "db-itunes-parser.h"
+ #include "itdb_device.h"
+diff --git a/src/itdb_photoalbum.c b/src/itdb_photoalbum.c
+index a2c8c29..562cbb7 100644
+--- a/src/itdb_photoalbum.c
++++ b/src/itdb_photoalbum.c
+@@ -26,7 +26,7 @@
+ |
+ | $Id$
+ */
+-#include <config.h>
++#include <glib/config.h>
+
+ #include "itdb_private.h"
+ #include "itdb_device.h"
+diff --git a/src/itdb_track.c b/src/itdb_track.c
+index 52a9fd4..d8a2ff3 100644
+--- a/src/itdb_track.c
++++ b/src/itdb_track.c
+@@ -26,7 +26,7 @@
+ | $Id$
+ */
+
+-#include <config.h>
++#include <glib/config.h>
+
+ #include "itdb_private.h"
+ #include "itdb_device.h"
+diff --git a/src/itdb_tzinfo.c b/src/itdb_tzinfo.c
+index ded4dd2..594e312 100644
+--- a/src/itdb_tzinfo.c
++++ b/src/itdb_tzinfo.c
+@@ -27,7 +27,7 @@
+ |
+ | $Id$
+ */
+-#include <config.h>
++#include <glib/config.h>
+
+ #include "itdb.h"
+ #include "itdb_device.h"
+diff --git a/src/itdb_zlib.c b/src/itdb_zlib.c
+index f6fa29b..43ec5e3 100644
+--- a/src/itdb_zlib.c
++++ b/src/itdb_zlib.c
+@@ -25,7 +25,7 @@
+ |
+ | $Id$
+ */
+-#include <config.h>
++#include <glib/config.h>
+ #include <string.h>
+ #include <zlib.h>
+
+diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c
+index 6b47aa6..e1c26e7 100644
+--- a/src/ithumb-writer.c
++++ b/src/ithumb-writer.c
+@@ -25,7 +25,7 @@
+ * $Id$
+ */
+
+-#include <config.h>
++#include <glib/config.h>
+ #include "itdb.h"
+ #include "db-image-parser.h"
+
diff --git a/ports/libgpod/portfile.cmake b/ports/libgpod/portfile.cmake
new file mode 100644
index 000000000..2bcf7fc37
--- /dev/null
+++ b/ports/libgpod/portfile.cmake
@@ -0,0 +1,27 @@
+vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platform" ON_TARGET "Windows" "OSX")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO fadingred/libgpod
+ REF 4a8a33ef4bc58eee1baca6793618365f75a5c3fa
+ SHA512 b7a120c1106c1205e8de2808de5ac4ff1cf189943017939a5ea4eded4e1ceef44557587e69a8591cc5249f8c8dbf0cbdcce1dd309d33a0e9207b0560abe3ae39
+ HEAD_REF master
+ PATCHES fix-glibconfigpath.patch
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS ${FEATURE_OPTIONS}
+ -DLIBGPOD_BLOB_DIR=${CURRENT_PACKAGES_DIR}/tools
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index e23b38481..f5a15d9ef 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -751,6 +751,12 @@ libgo:x64-osx=fail
libgo:x64-windows=fail
libgo:x64-windows-static=fail
libgo:x86-windows=fail
+libgpod:arm64-windows=fail
+libgpod:arm-uwp=fail
+libgpod:x64-uwp=fail
+libgpod:x64-windows=fail
+libgpod:x64-windows-static=fail
+libgpod:x86-windows=fail
libhydrogen:arm64-windows=fail
libics:arm-uwp=fail
libics:x64-uwp=fail