On Tue, Dec 21, 2010 at 13:35:26 +0100, Jasper Lievisse Adriaanse wrote:
> Did you forget to diff the patches directory when generating this diff?
> As I get this with make patch:
> No such line 19876 in input file, ignoring
> 1 out of 2 hunks failed--saving rejects to examples/albumart.c.rej
> ***> patch-examples_albumart_c did not apply cleanly
> 3 out of 3 hunks failed--saving rejects to examples/connect.c.rej
> ***> patch-examples_connect_c did not apply cleanly
> 1 out of 1 hunks failed--saving rejects to examples/newfolder.c.rej
> ***> patch-examples_newfolder_c did not apply cleanly
> 1 out of 2 hunks failed--saving rejects to examples/newplaylist.c.rej
> ***> patch-examples_newplaylist_c did not apply cleanly
> Ignoring previously applied (or reversed) patch.
> 1 out of 1 hunks ignored--saving rejects to libmtp.pc.in.rej
> ***> patch-libmtp_pc_in did not apply cleanly
Sorry, yes...
So, here is another try. Now with the patches directory too. Apply with
-E.
Daniel
--
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libmtp/Makefile,v
retrieving revision 1.14
diff -p -u -r1.14 Makefile
--- Makefile 15 Nov 2010 19:46:00 -0000 1.14
+++ Makefile 21 Dec 2010 13:21:13 -0000
@@ -2,10 +2,9 @@
COMMENT= Media Transfer Protocol (MTP) implementation
-DISTNAME= libmtp-0.2.6.1
+DISTNAME= libmtp-1.0.3
PKGNAME= ${DISTNAME}
-REVISION= 2
-SHARED_LIBS= mtp 3.0 # .8.0
+SHARED_LIBS= mtp 11.1
CATEGORIES= devel
HOMEPAGE= http://libmtp.sourceforge.net/
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/libmtp/distinfo,v
retrieving revision 1.7
diff -p -u -r1.7 distinfo
--- distinfo 21 Apr 2008 15:23:22 -0000 1.7
+++ distinfo 21 Dec 2010 13:21:13 -0000
@@ -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
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-configure,v
retrieving revision 1.4
diff -p -u -r1.4 patch-configure
--- patches/patch-configure 30 Dec 2007 19:57:35 -0000 1.4
+++ patches/patch-configure 21 Dec 2010 13:21:13 -0000
@@ -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$
+--- 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/
+ 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
Index: patches/patch-examples_albumart_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_albumart_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_albumart_c
--- patches/patch-examples_albumart_c 31 Mar 2009 13:37:16 -0000 1.1
+++ patches/patch-examples_albumart_c 21 Dec 2010 13:21:13 -0000
@@ -1,10 +1,10 @@
-$OpenBSD: patch-examples_albumart_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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) {
Index: patches/patch-examples_connect_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_connect_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_connect_c
--- patches/patch-examples_connect_c 31 Mar 2009 13:37:16 -0000 1.1
+++ patches/patch-examples_connect_c 21 Dec 2010 13:21:13 -0000
@@ -1,33 +1,23 @@
-$OpenBSD: patch-examples_connect_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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':
Index: patches/patch-examples_delfile_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_delfile_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_delfile_c
--- patches/patch-examples_delfile_c 31 Mar 2009 13:37:16 -0000 1.1
+++ patches/patch-examples_delfile_c 21 Dec 2010 13:21:13 -0000
@@ -1,10 +1,10 @@
-$OpenBSD: patch-examples_delfile_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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);
Index: patches/patch-examples_emptyfolders_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_emptyfolders_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_emptyfolders_c
--- patches/patch-examples_emptyfolders_c 31 Mar 2009 13:37:16 -0000
1.1
+++ patches/patch-examples_emptyfolders_c 21 Dec 2010 13:21:13 -0000
@@ -1,21 +1,21 @@
-$OpenBSD: patch-examples_emptyfolders_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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");
}
Index: patches/patch-examples_newfolder_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_newfolder_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_newfolder_c
--- patches/patch-examples_newfolder_c 31 Mar 2009 13:37:16 -0000 1.1
+++ patches/patch-examples_newfolder_c 21 Dec 2010 13:21:13 -0000
@@ -1,10 +1,10 @@
-$OpenBSD: patch-examples_newfolder_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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) {
Index: patches/patch-examples_newplaylist_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_newplaylist_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_newplaylist_c
--- patches/patch-examples_newplaylist_c 31 Mar 2009 13:37:16 -0000
1.1
+++ patches/patch-examples_newplaylist_c 21 Dec 2010 13:21:13 -0000
@@ -1,10 +1,10 @@
-$OpenBSD: patch-examples_newplaylist_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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);
Index: patches/patch-examples_sendfile_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_sendfile_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_sendfile_c
--- patches/patch-examples_sendfile_c 31 Mar 2009 13:37:16 -0000 1.1
+++ patches/patch-examples_sendfile_c 21 Dec 2010 13:21:13 -0000
@@ -1,23 +1,22 @@
-$OpenBSD: patch-examples_sendfile_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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);
Index: patches/patch-examples_thumb_c
===================================================================
RCS file: /cvs/ports/devel/libmtp/patches/patch-examples_thumb_c,v
retrieving revision 1.1
diff -p -u -r1.1 patch-examples_thumb_c
--- patches/patch-examples_thumb_c 31 Mar 2009 13:37:16 -0000 1.1
+++ patches/patch-examples_thumb_c 21 Dec 2010 13:21:13 -0000
@@ -1,10 +1,10 @@
-$OpenBSD: patch-examples_thumb_c,v 1.1 2009/03/31 13:37:16 jasper Exp $
+$OpenBSD$
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;
}
Index: patches/patch-examples_util_c
===================================================================
RCS file: patches/patch-examples_util_c
diff -N patches/patch-examples_util_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-examples_util_c 21 Dec 2010 13:21:13 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+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
Index: patches/patch-libmtp_pc_in
===================================================================
RCS file: patches/patch-libmtp_pc_in
diff -N patches/patch-libmtp_pc_in
--- patches/patch-libmtp_pc_in 30 Jan 2007 14:15:27 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -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@
Index: pkg/PFRAG.shared
===================================================================
RCS file: /cvs/ports/devel/libmtp/pkg/PFRAG.shared,v
retrieving revision 1.1.1.1
diff -p -u -r1.1.1.1 PFRAG.shared
--- pkg/PFRAG.shared 11 Jan 2007 21:56:16 -0000 1.1.1.1
+++ pkg/PFRAG.shared 21 Dec 2010 13:21:13 -0000
@@ -1,2 +1,2 @@
-...@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2007/01/11 21:56:16 jasper Exp $
+...@comment $OpenBSD$
@lib lib/libmtp.so.${LIBmtp_VERSION}
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/libmtp/pkg/PLIST,v
retrieving revision 1.2
diff -p -u -r1.2 PLIST
--- pkg/PLIST 30 Dec 2007 19:57:35 -0000 1.2
+++ pkg/PLIST 21 Dec 2010 13:21:13 -0000
@@ -1,26 +1,26 @@
-...@comment $OpenBSD: PLIST,v 1.2 2007/12/30 19:57:35 jasper Exp $
+...@comment $OpenBSD$
%%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