- update libmtp to 1.0.3
from LEVAI Daniel, with some tweaks by me ok william@ (MAINTAINER)
This commit is contained in:
parent
54adf4a2aa
commit
8756029f01
@ -1,11 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.14 2010/11/15 19:46:00 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.15 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
COMMENT= Media Transfer Protocol (MTP) implementation
|
||||
|
||||
DISTNAME= libmtp-0.2.6.1
|
||||
PKGNAME= ${DISTNAME}
|
||||
REVISION= 2
|
||||
SHARED_LIBS= mtp 3.0 # .8.0
|
||||
DISTNAME= libmtp-1.0.3
|
||||
SHARED_LIBS= mtp 4.0
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= http://libmtp.sourceforge.net/
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (libmtp-0.2.6.1.tar.gz) = AncKe0v7kc2eG9JuqoR3Cw==
|
||||
RMD160 (libmtp-0.2.6.1.tar.gz) = /C1+YFU3UT6YTDGMMBM35+pNPbk=
|
||||
SHA1 (libmtp-0.2.6.1.tar.gz) = yRoSsk2tAz9xtNr+2hE+soGZFUM=
|
||||
SHA256 (libmtp-0.2.6.1.tar.gz) = +AgImd7n7JqXBHiEs9UeW9MYpif4TTXD9NapZ+Oc3Vc=
|
||||
SIZE (libmtp-0.2.6.1.tar.gz) = 534773
|
||||
MD5 (libmtp-1.0.3.tar.gz) = qXKGmGB2VHblLy66RfK5Hg==
|
||||
RMD160 (libmtp-1.0.3.tar.gz) = u7WPIxvJRjj6cgC2wIOp3d0UwPQ=
|
||||
SHA1 (libmtp-1.0.3.tar.gz) = PSN9wC5CDZzLjyU50oGLL2GOr18=
|
||||
SHA256 (libmtp-1.0.3.tar.gz) = HQBIdhjnabvmQSYabhMSx7rDwoFwrysTp1C4+kAUyso=
|
||||
SIZE (libmtp-1.0.3.tar.gz) = 596040
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-configure,v 1.4 2007/12/30 19:57:35 jasper Exp $
|
||||
--- configure.orig Thu Nov 22 21:18:02 2007
|
||||
+++ configure Sun Dec 30 20:33:47 2007
|
||||
@@ -19877,7 +19877,7 @@ if test $ac_cv_lib_usb_usb_control_msg = yes; then
|
||||
$OpenBSD: patch-configure,v 1.5 2010/12/21 18:16:04 jasper Exp $
|
||||
--- configure.orig Sun May 23 01:07:34 2010
|
||||
+++ configure Tue Dec 21 14:08:52 2010
|
||||
@@ -12689,7 +12689,7 @@ if test "x$ac_cv_lib_usb_usb_control_msg" = x""yes; th
|
||||
#define HAVE_LIBUSB 1
|
||||
_ACEOF
|
||||
|
||||
@ -9,4 +9,4 @@ $OpenBSD: patch-configure,v 1.4 2007/12/30 19:57:35 jasper Exp $
|
||||
+ LIBS="-lusb -liconv $LIBS"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: I can't find the libusb libraries on your system. You
|
||||
{ { $as_echo "$as_me:$LINENO: error: I can't find the libusb libraries on your system. You
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-examples_albumart_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_albumart_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/albumart.c.orig Tue Mar 31 15:35:04 2009
|
||||
+++ examples/albumart.c Tue Mar 31 15:39:40 2009
|
||||
@@ -35,8 +35,11 @@ int main (int argc, char **argv) {
|
||||
--- examples/albumart.c.orig Wed Oct 7 01:14:54 2009
|
||||
+++ examples/albumart.c Tue Dec 21 13:57:21 2010
|
||||
@@ -43,8 +43,11 @@ int main (int argc, char **argv) {
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
LIBMTP_mtpdevice_t *device = NULL;
|
||||
@ -16,7 +16,7 @@ Fix compilation with GCC2.
|
||||
uint32_t *ids = NULL;
|
||||
uint32_t *tmp = NULL;
|
||||
uint64_t filesize;
|
||||
@@ -116,16 +119,16 @@ int main (int argc, char **argv) {
|
||||
@@ -135,18 +138,18 @@ int main (int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -31,8 +31,10 @@ Fix compilation with GCC2.
|
||||
album->name = albumname;
|
||||
album->no_tracks = idcount;
|
||||
album->tracks = ids;
|
||||
- int ret = LIBMTP_Create_New_Album(device,album,0);
|
||||
+ ret = LIBMTP_Create_New_Album(device,album,0);
|
||||
album->parent_id = parentid;
|
||||
album->storage_id = storageid;
|
||||
- int ret = LIBMTP_Create_New_Album(device,album);
|
||||
+ ret = LIBMTP_Create_New_Album(device,album);
|
||||
if (ret == 0) {
|
||||
ret = LIBMTP_Send_Representative_Sample(device,album->album_id, albumart);
|
||||
if (ret != 0) {
|
||||
|
@ -1,33 +1,23 @@
|
||||
$OpenBSD: patch-examples_connect_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_connect_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/connect.c.orig Tue Mar 31 15:21:29 2009
|
||||
+++ examples/connect.c Tue Mar 31 15:26:53 2009
|
||||
@@ -73,6 +73,10 @@ usage(void)
|
||||
--- examples/connect.c.orig Sat Jan 30 08:31:15 2010
|
||||
+++ examples/connect.c Tue Dec 21 14:01:22 2010
|
||||
@@ -77,6 +77,9 @@ usage(void)
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
+
|
||||
+ char *lang;
|
||||
+ char *arg1, *arg2;
|
||||
+
|
||||
if ( argc < 2 ) {
|
||||
usage ();
|
||||
return 1;
|
||||
@@ -82,7 +86,7 @@ int main (int argc, char **argv)
|
||||
* Check environment variables $LANG and $LC_CTYPE
|
||||
* to see if we want to support UTF-8 unicode
|
||||
*/
|
||||
- char * lang = getenv("LANG");
|
||||
+ lang = getenv("LANG");
|
||||
if (lang != NULL) {
|
||||
if (strlen(lang) > 5) {
|
||||
char *langsuff = &lang[strlen(lang)-5];
|
||||
@@ -133,7 +137,6 @@ int main (int argc, char **argv)
|
||||
+
|
||||
checklang();
|
||||
|
||||
LIBMTP_Init();
|
||||
@@ -122,7 +125,6 @@ int main (int argc, char **argv)
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
|
||||
- char *arg1, *arg2;
|
||||
switch (c) {
|
||||
case 'd':
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-examples_delfile_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_delfile_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/delfile.c.orig Tue Mar 31 15:27:20 2009
|
||||
+++ examples/delfile.c Tue Mar 31 15:27:48 2009
|
||||
@@ -41,10 +41,10 @@ void
|
||||
--- examples/delfile.c.orig Thu May 7 01:04:19 2009
|
||||
+++ examples/delfile.c Tue Dec 21 14:02:39 2010
|
||||
@@ -43,10 +43,10 @@ void
|
||||
delfile_function(char * path)
|
||||
{
|
||||
uint32_t id = parse_path (path,files,folders);
|
||||
|
@ -1,21 +1,21 @@
|
||||
$OpenBSD: patch-examples_emptyfolders_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_emptyfolders_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/emptyfolders.c.orig Tue Mar 31 15:43:55 2009
|
||||
+++ examples/emptyfolders.c Tue Mar 31 15:44:25 2009
|
||||
@@ -61,6 +61,10 @@ int main (int argc, char **argv)
|
||||
--- examples/emptyfolders.c.orig Thu May 7 01:04:19 2009
|
||||
+++ examples/emptyfolders.c Tue Dec 21 14:03:13 2010
|
||||
@@ -62,6 +62,10 @@ int main (int argc, char **argv)
|
||||
int do_delete = 0;
|
||||
int opt;
|
||||
|
||||
+ LIBMTP_mtpdevice_t *device = NULL;
|
||||
+ LIBMTP_folder_t *folders = NULL;
|
||||
+ LIBMTP_file_t *files = NULL;
|
||||
+ LIBMTP_mtpdevice_t *device;
|
||||
+ LIBMTP_folder_t *folders;
|
||||
+ LIBMTP_file_t *files;
|
||||
+
|
||||
fprintf(stdout, "libmtp version: " LIBMTP_VERSION_STRING "\n\n");
|
||||
|
||||
while ( (opt = getopt(argc, argv, "d")) != -1 ) {
|
||||
@@ -77,10 +81,6 @@ int main (int argc, char **argv)
|
||||
@@ -78,10 +82,6 @@ int main (int argc, char **argv)
|
||||
printf("This is a dummy run. No folders will be deleted.\n");
|
||||
printf("To delete folders, use the '-d' option.\n");
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-examples_newfolder_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_newfolder_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/newfolder.c.orig Tue Mar 31 15:29:03 2009
|
||||
+++ examples/newfolder.c Tue Mar 31 15:29:03 2009
|
||||
@@ -52,11 +52,12 @@ void newfolder_command (int argc, char **argv)
|
||||
--- examples/newfolder.c.orig Thu May 7 01:04:19 2009
|
||||
+++ examples/newfolder.c Tue Dec 21 14:03:42 2010
|
||||
@@ -54,11 +54,12 @@ void newfolder_command (int argc, char **argv)
|
||||
void
|
||||
newfolder_function(char * path)
|
||||
{
|
||||
@ -12,7 +12,7 @@ Fix compilation with GCC2.
|
||||
char * parent = dirname(path);
|
||||
char * folder = basename(path);
|
||||
int id = parse_path (parent,files,folders);
|
||||
int newid = LIBMTP_Create_Folder(device, folder, id);
|
||||
int newid = LIBMTP_Create_Folder(device, folder, id, 0);
|
||||
+
|
||||
+ printf("Creating new folder %s\n",path);
|
||||
if (newid == 0) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-examples_newplaylist_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_newplaylist_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/newplaylist.c.orig Tue Mar 31 15:42:26 2009
|
||||
+++ examples/newplaylist.c Tue Mar 31 15:43:12 2009
|
||||
@@ -32,9 +32,11 @@ static void usage(void) {
|
||||
--- examples/newplaylist.c.orig Wed Oct 7 01:14:54 2009
|
||||
+++ examples/newplaylist.c Tue Dec 21 14:05:23 2010
|
||||
@@ -34,9 +34,11 @@ static void usage(void) {
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
int opt;
|
||||
@ -16,7 +16,7 @@ Fix compilation with GCC2.
|
||||
int idcount = 0;
|
||||
uint32_t *ids = NULL;
|
||||
uint32_t *tmp = NULL;
|
||||
@@ -84,11 +86,11 @@ int main (int argc, char **argv) {
|
||||
@@ -94,13 +96,13 @@ int main (int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -25,8 +25,10 @@ Fix compilation with GCC2.
|
||||
playlist->name = playlistname;
|
||||
playlist->no_tracks = idcount;
|
||||
playlist->tracks = ids;
|
||||
- int ret = LIBMTP_Create_New_Playlist(device,playlist,0);
|
||||
+ ret = LIBMTP_Create_New_Playlist(device,playlist,0);
|
||||
playlist->parent_id = parentid;
|
||||
playlist->storage_id = storageid;
|
||||
- int ret = LIBMTP_Create_New_Playlist(device,playlist);
|
||||
+ ret = LIBMTP_Create_New_Playlist(device,playlist);
|
||||
if (ret != 0) {
|
||||
printf("Couldn't create playlist object\n");
|
||||
LIBMTP_Dump_Errorstack(device);
|
||||
|
@ -1,23 +1,22 @@
|
||||
$OpenBSD: patch-examples_sendfile_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_sendfile_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/sendfile.c.orig Tue Mar 31 15:29:34 2009
|
||||
+++ examples/sendfile.c Tue Mar 31 15:30:34 2009
|
||||
@@ -47,7 +47,6 @@ void sendfile_usage(void)
|
||||
--- examples/sendfile.c.orig Mon Jun 15 21:45:05 2009
|
||||
+++ examples/sendfile.c Tue Dec 21 14:07:04 2010
|
||||
@@ -48,13 +48,14 @@ void sendfile_usage(void)
|
||||
|
||||
int sendfile_function(char * from_path, char *to_path)
|
||||
{
|
||||
- printf("Sending %s to %s\n",from_path,to_path);
|
||||
char *filename;
|
||||
uint64_t filesize;
|
||||
#ifdef __USE_LARGEFILE64
|
||||
@@ -58,6 +57,8 @@ int sendfile_function(char * from_path, char *to_path)
|
||||
struct stat sb;
|
||||
LIBMTP_file_t *genfile;
|
||||
int ret;
|
||||
uint32_t parent_id = 0;
|
||||
+
|
||||
+ printf("Sending %s to %s\n",from_path,to_path);
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
if ( stat64(from_path, &sb) == -1 ) {
|
||||
if ( stat(from_path, &sb) == -1 ) {
|
||||
fprintf(stderr, "%s: ", from_path);
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-examples_thumb_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
|
||||
$OpenBSD: patch-examples_thumb_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/thumb.c.orig Tue Mar 31 15:44:56 2009
|
||||
+++ examples/thumb.c Tue Mar 31 15:45:35 2009
|
||||
@@ -36,6 +36,7 @@ int main (int argc, char **argv) {
|
||||
--- examples/thumb.c.orig Mon Jun 15 21:45:12 2009
|
||||
+++ examples/thumb.c Tue Dec 21 14:07:54 2010
|
||||
@@ -44,6 +44,7 @@ int main (int argc, char **argv) {
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
LIBMTP_mtpdevice_t *device = NULL;
|
||||
@ -12,7 +12,7 @@ Fix compilation with GCC2.
|
||||
int fd;
|
||||
uint32_t id = 0;
|
||||
uint64_t filesize;
|
||||
@@ -44,6 +45,7 @@ int main (int argc, char **argv) {
|
||||
@@ -52,6 +53,7 @@ int main (int argc, char **argv) {
|
||||
char *rest;
|
||||
struct stat statbuff;
|
||||
int ret;
|
||||
@ -20,7 +20,7 @@ Fix compilation with GCC2.
|
||||
|
||||
fprintf(stdout, "libmtp version: " LIBMTP_VERSION_STRING "\n\n");
|
||||
|
||||
@@ -96,9 +98,8 @@ int main (int argc, char **argv) {
|
||||
@@ -104,9 +106,8 @@ int main (int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
16
devel/libmtp/patches/patch-examples_util_c
Normal file
16
devel/libmtp/patches/patch-examples_util_c
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-examples_util_c,v 1.1 2010/12/21 18:16:04 jasper Exp $
|
||||
|
||||
Fix compilation with GCC2.
|
||||
|
||||
--- examples/util.c.orig Tue Dec 2 13:20:17 2008
|
||||
+++ examples/util.c Tue Dec 21 14:02:11 2010
|
||||
@@ -34,7 +34,8 @@
|
||||
void checklang(void)
|
||||
{
|
||||
char *langsuff = NULL;
|
||||
- char *lang = getenv("LANG");
|
||||
+ char *lang;
|
||||
+ lang = getenv("LANG");
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
// Set the locale in accordance with environment
|
@ -1,10 +0,0 @@
|
||||
$OpenBSD: patch-libmtp_pc_in,v 1.1 2007/01/30 14:15:27 espie Exp $
|
||||
--- libmtp.pc.in.orig Tue Jan 30 15:17:04 2007
|
||||
+++ libmtp.pc.in Tue Jan 30 15:17:08 2007
|
||||
@@ -11,5 +11,5 @@ Version: @VERSION@
|
||||
Requires: libusb
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lmtp
|
||||
-Libs.private @LIBS@
|
||||
+Libs.private: @LIBS@
|
||||
Cflags: -I${includedir} @OSFLAGS@
|
@ -1,2 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2007/01/11 21:56:16 jasper Exp $
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
||||
@lib lib/libmtp.so.${LIBmtp_VERSION}
|
||||
|
@ -1,26 +1,26 @@
|
||||
@comment $OpenBSD: PLIST,v 1.2 2007/12/30 19:57:35 jasper Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.3 2010/12/21 18:16:04 jasper Exp $
|
||||
%%SHARED%%
|
||||
bin/mtp-albumart
|
||||
bin/mtp-albums
|
||||
bin/mtp-connect
|
||||
@bin bin/mtp-albumart
|
||||
@bin bin/mtp-albums
|
||||
@bin bin/mtp-connect
|
||||
bin/mtp-delfile
|
||||
bin/mtp-detect
|
||||
bin/mtp-emptyfolders
|
||||
bin/mtp-files
|
||||
bin/mtp-folders
|
||||
bin/mtp-format
|
||||
@bin bin/mtp-detect
|
||||
@bin bin/mtp-emptyfolders
|
||||
@bin bin/mtp-files
|
||||
@bin bin/mtp-folders
|
||||
@bin bin/mtp-format
|
||||
bin/mtp-getfile
|
||||
bin/mtp-getplaylist
|
||||
bin/mtp-hotplug
|
||||
@bin bin/mtp-getplaylist
|
||||
@bin bin/mtp-hotplug
|
||||
bin/mtp-newfolder
|
||||
bin/mtp-newplaylist
|
||||
bin/mtp-playlists
|
||||
bin/mtp-reset
|
||||
@bin bin/mtp-newplaylist
|
||||
@bin bin/mtp-playlists
|
||||
@bin bin/mtp-reset
|
||||
bin/mtp-sendfile
|
||||
bin/mtp-sendtr
|
||||
bin/mtp-thumb
|
||||
bin/mtp-tracks
|
||||
bin/mtp-trexist
|
||||
@bin bin/mtp-thumb
|
||||
@bin bin/mtp-tracks
|
||||
@bin bin/mtp-trexist
|
||||
include/libmtp.h
|
||||
lib/libmtp.a
|
||||
lib/libmtp.la
|
||||
|
Loading…
Reference in New Issue
Block a user