- update jhead to 2.87
- update & regen patches ok ajacoutot@, okan@
This commit is contained in:
parent
c1e8acc0a7
commit
c95c3c67ae
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2008/10/21 23:47:52 okan Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2009/10/01 20:20:23 benoit Exp $
|
||||
|
||||
COMMENT= Exif jpeg camera setting parser and thumbnail remover
|
||||
|
||||
DISTNAME= jhead-2.84
|
||||
DISTNAME= jhead-2.87
|
||||
CATEGORIES= graphics
|
||||
|
||||
HOMEPAGE= http://www.sentex.net/~mwandel/jhead/
|
||||
@ -24,9 +24,6 @@ RUN_DEPENDS= ::graphics/jpeg
|
||||
|
||||
MAKE_FILE= makefile
|
||||
|
||||
post-build:
|
||||
@gzip -d ${WRKSRC}/jhead.1.gz
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/jhead ${PREFIX}/bin
|
||||
${INSTALL_DATA} ${WRKSRC}/jhead.1 ${PREFIX}/man/man1
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (jhead-2.84.tar.gz) = PgCfjopqB31Klm0UuHlwOA==
|
||||
RMD160 (jhead-2.84.tar.gz) = AYt1RQ16HhwgGP0FssPCX3DNhmk=
|
||||
SHA1 (jhead-2.84.tar.gz) = YyUcY6fYjk97APKH68exCVwkIvY=
|
||||
SHA256 (jhead-2.84.tar.gz) = xIEednJwPgmDG8kx6sEpoAOllJxDKYrYxruhDgR5cpQ=
|
||||
SIZE (jhead-2.84.tar.gz) = 64159
|
||||
MD5 (jhead-2.87.tar.gz) = fl6Ev3SACAjBcZVkFCKNuQ==
|
||||
RMD160 (jhead-2.87.tar.gz) = LRnrUoF9A6fXr7rSrEArI2wjp78=
|
||||
SHA1 (jhead-2.87.tar.gz) = yQODetw+zYz+i9z3qGYNGHVPSAA=
|
||||
SHA256 (jhead-2.87.tar.gz) = VEu5ODZ8IuxFwBop5KUBKbvj3MqU7oG//LjwRL4s924=
|
||||
SIZE (jhead-2.87.tar.gz) = 62358
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-gpsinfo_c,v 1.3 2008/10/21 23:47:52 okan Exp $
|
||||
--- gpsinfo.c.orig Sat Oct 4 12:10:35 2008
|
||||
+++ gpsinfo.c Tue Oct 21 11:53:21 2008
|
||||
@@ -144,9 +144,10 @@ void ProcessGpsInfo(unsigned char * DirStart, int Byte
|
||||
$OpenBSD: patch-gpsinfo_c,v 1.4 2009/10/01 20:20:27 benoit Exp $
|
||||
--- gpsinfo.c.orig Mon Mar 2 08:34:10 2009
|
||||
+++ gpsinfo.c Wed Sep 30 16:49:45 2009
|
||||
@@ -145,9 +145,10 @@ void ProcessGpsInfo(unsigned char * DirStart, int Byte
|
||||
FmtString[3+a*7] = (char)('0'+digits);
|
||||
|
||||
Values[a] = ConvertAnyFormat(ValuePtr+a*ComponentSize, Format);
|
||||
@ -14,7 +14,7 @@ $OpenBSD: patch-gpsinfo_c,v 1.3 2008/10/21 23:47:52 okan Exp $
|
||||
|
||||
if (Tag == TAG_GPS_LAT){
|
||||
strncpy(ImageInfo.GpsLat+2, TempString, 29);
|
||||
@@ -160,8 +161,8 @@ void ProcessGpsInfo(unsigned char * DirStart, int Byte
|
||||
@@ -161,8 +162,8 @@ void ProcessGpsInfo(unsigned char * DirStart, int Byte
|
||||
break;
|
||||
|
||||
case TAG_GPS_ALT:
|
||||
|
@ -1,17 +1,16 @@
|
||||
$OpenBSD: patch-jhead_c,v 1.6 2008/10/21 23:47:52 okan Exp $
|
||||
--- jhead.c.orig Sat Oct 4 12:10:35 2008
|
||||
+++ jhead.c Sun Oct 19 19:19:22 2008
|
||||
@@ -154,7 +154,8 @@ static int FileEditComment(char * TempFileName, char *
|
||||
#endif
|
||||
--- jhead.c.orig Mon Mar 2 08:34:10 2009
|
||||
+++ jhead.c Wed Sep 30 16:49:45 2009
|
||||
@@ -155,7 +155,8 @@ static int FileEditComment(char * TempFileName, char *
|
||||
}
|
||||
if (strlen(Editor) > PATH_MAX) ErrFatal("env too long");
|
||||
|
||||
- sprintf(QuotedPath, "%s \"%s\"",Editor, TempFileName);
|
||||
+ snprintf(QuotedPath, sizeof(QuotedPath), "%s \"%s\"",Editor,
|
||||
+ TempFileName);
|
||||
a = system(QuotedPath);
|
||||
}
|
||||
|
||||
@@ -260,7 +261,8 @@ static int ModifyDescriptComment(char * OutComment, ch
|
||||
|
||||
@@ -261,7 +262,8 @@ static int ModifyDescriptComment(char * OutComment, ch
|
||||
if (!HasScandate && !ImageInfo.DateTime[0]){
|
||||
// Scan date is not in the file yet, and it doesn't have one built in. Add it.
|
||||
char Temp[30];
|
||||
@ -21,7 +20,7 @@ $OpenBSD: patch-jhead_c,v 1.6 2008/10/21 23:47:52 okan Exp $
|
||||
strncat(OutComment, Temp, MAX_COMMENT_SIZE-5-strlen(OutComment));
|
||||
Modified = TRUE;
|
||||
}
|
||||
@@ -286,7 +288,9 @@ static int AutoResizeCmdStuff(void)
|
||||
@@ -287,7 +289,9 @@ static int AutoResizeCmdStuff(void)
|
||||
|
||||
if (scale < 0.5) scale = 0.5; // Don't scale down by more than a factor of two.
|
||||
|
||||
@ -32,25 +31,7 @@ $OpenBSD: patch-jhead_c,v 1.6 2008/10/21 23:47:52 okan Exp $
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -316,13 +320,15 @@ static void DoCommand(const char * FileName, int ShowI
|
||||
if (ApplyCommand[a] == '&'){
|
||||
if (ApplyCommand[a+1] == 'i'){
|
||||
// Input file.
|
||||
- e += sprintf(ExecString+e, "\"%s\"",FileName);
|
||||
+ e += snprintf(ExecString+e, sizeof(ExecString) + e,
|
||||
+ "\"%s\"",FileName);
|
||||
a += 1;
|
||||
continue;
|
||||
}
|
||||
if (ApplyCommand[a+1] == 'o'){
|
||||
// Needs an output file distinct from the input file.
|
||||
- e += sprintf(ExecString+e, "\"%s\"",TempName);
|
||||
+ e += snprintf(ExecString+e, sizeof(ExecString) + e,
|
||||
+ "\"%s\"",TempName);
|
||||
a += 1;
|
||||
TempUsed = TRUE;
|
||||
unlink(TempName);// Remove any pre-existing temp file
|
||||
@@ -553,7 +559,8 @@ static void DoFileRenaming(const char * FileName)
|
||||
@@ -601,7 +605,8 @@ static void DoFileRenaming(const char * FileName)
|
||||
memcpy(pat, pattern+ppos, 4);
|
||||
pat[a-ppos] = 'd'; // Replace 'i' with 'd' for '%d'
|
||||
pat[a-ppos+1] = '\0';
|
||||
@ -60,19 +41,16 @@ $OpenBSD: patch-jhead_c,v 1.6 2008/10/21 23:47:52 okan Exp $
|
||||
nl = strlen(num);
|
||||
l = strlen(pattern+a+1);
|
||||
if (ppos+nl+l+1 >= PATH_MAX) ErrFatal("str overflow");
|
||||
@@ -570,8 +577,9 @@ static void DoFileRenaming(const char * FileName)
|
||||
strftime(NewBaseName+PrefixPart, PATH_MAX, pattern, &tm);
|
||||
@@ -617,7 +622,7 @@ static void DoFileRenaming(const char * FileName)
|
||||
strftime(NewName, PATH_MAX, pattern, &tm);
|
||||
}else{
|
||||
// My favourite scheme.
|
||||
- sprintf(NewBaseName+PrefixPart, "%02d%02d-%02d%02d%02d",
|
||||
- tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
+ snprintf(NewBaseName+PrefixPart, sizeof NewBaseName+PrefixPart,
|
||||
+ "%02d%02d-%02d%02d%02d",
|
||||
+ tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
- sprintf(NewName, "%02d%02d-%02d%02d%02d",
|
||||
+ snprintf(NewName, sizeof NewBaseName, "%02d%02d-%02d%02d%02d",
|
||||
tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
}
|
||||
|
||||
AddLetter = isdigit(NewBaseName[strlen(NewBaseName)-1]);
|
||||
@@ -596,7 +604,7 @@ static void DoFileRenaming(const char * FileName)
|
||||
@@ -646,7 +651,7 @@ static void DoFileRenaming(const char * FileName)
|
||||
NameExtra[0] = 0;
|
||||
}
|
||||
|
||||
@ -81,7 +59,7 @@ $OpenBSD: patch-jhead_c,v 1.6 2008/10/21 23:47:52 okan Exp $
|
||||
|
||||
if (!strcmp(FileName, NewName)) break; // Skip if its already this name.
|
||||
|
||||
@@ -606,7 +614,8 @@ static void DoFileRenaming(const char * FileName)
|
||||
@@ -661,7 +666,8 @@ static void DoFileRenaming(const char * FileName)
|
||||
printf("%s --> %s\n",FileName, NewName);
|
||||
#ifdef _WIN32
|
||||
if (RenameAssociatedFiles){
|
||||
@ -91,27 +69,27 @@ $OpenBSD: patch-jhead_c,v 1.6 2008/10/21 23:47:52 okan Exp $
|
||||
RenameAssociated(FileName, NewName);
|
||||
}
|
||||
#endif
|
||||
@@ -638,7 +647,8 @@ static int DoAutoRotate(const char * FileName)
|
||||
@@ -694,7 +700,8 @@ static int DoAutoRotate(const char * FileName)
|
||||
ErrFatal("Orientation screwup");
|
||||
}
|
||||
|
||||
- sprintf(RotateCommand, "jpegtran -%s -outfile &o &i", Argument);
|
||||
+ snprintf(RotateCommand, sizeof(RotateCommand),
|
||||
+ "jpegtran -%s -outfile &o &i", Argument);
|
||||
- sprintf(RotateCommand, "jpegtran -trim -%s -outfile &o &i", Argument);
|
||||
+ snprintf(RotateCommand, sizeof(RotateCommand),
|
||||
+ "jpegtran -trim -%s -outfile &o &i", Argument);
|
||||
ApplyCommand = RotateCommand;
|
||||
DoCommand(FileName, FALSE);
|
||||
ApplyCommand = NULL;
|
||||
@@ -657,7 +667,8 @@ static int DoAutoRotate(const char * FileName)
|
||||
@@ -713,7 +720,8 @@ static int DoAutoRotate(const char * FileName)
|
||||
strcpy(ThumbTempName_out, FileName);
|
||||
strcat(ThumbTempName_out, ".tho");
|
||||
SaveThumbnail(ThumbTempName_in);
|
||||
- sprintf(RotateCommand,"jpegtran -%s -outfile \"%s\" \"%s\"",
|
||||
+ snprintf(RotateCommand, sizeof(RotateCommand),
|
||||
+ "jpegtran -%s -outfile \"%s\" \"%s\"",
|
||||
- sprintf(RotateCommand,"jpegtran -trim -%s -outfile \"%s\" \"%s\"",
|
||||
+ snprintf(RotateCommand, sizeof(RotateCommand),
|
||||
+ "jpegtran -trim -%s -outfile \"%s\" \"%s\"",
|
||||
Argument, ThumbTempName_out, ThumbTempName_in);
|
||||
|
||||
if (system(RotateCommand) == 0){
|
||||
@@ -685,7 +696,8 @@ static int RegenerateThumbnail(const char * FileName)
|
||||
@@ -741,7 +749,8 @@ static int RegenerateThumbnail(const char * FileName)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -121,7 +99,7 @@ $OpenBSD: patch-jhead_c,v 1.6 2008/10/21 23:47:52 okan Exp $
|
||||
RegenThumbnail, RegenThumbnail, FileName);
|
||||
|
||||
if (system(ThumbnailGenCommand) == 0){
|
||||
@@ -1025,7 +1037,7 @@ void ProcessFile(const char * FileName)
|
||||
@@ -1081,7 +1090,7 @@ void ProcessFile(const char * FileName)
|
||||
|
||||
// Print to temp buffer first to avoid putting null termination in destination.
|
||||
// snprintf() would do the trick, hbut not available everywhere (like FreeBSD 4.4)
|
||||
|
Loading…
Reference in New Issue
Block a user