[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
This commit is contained in:
Lily 2020-02-05 07:35:26 +08:00 committed by GitHub
parent 319a54ebd3
commit d9200c4e94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 233 additions and 0 deletions

View File

@ -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
)

5
ports/libgpod/CONTROL Normal file
View File

@ -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

View File

@ -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"

View File

@ -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)

View File

@ -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