diff --git a/graphics/ufraw/Makefile b/graphics/ufraw/Makefile new file mode 100644 index 00000000000..c07a35c149b --- /dev/null +++ b/graphics/ufraw/Makefile @@ -0,0 +1,41 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2006/09/17 17:52:38 mbalmer Exp $ + +COMMENT= "read and manipulate raw images from digital cameras" + +DISTNAME= ufraw-0.9.1 + +CATEGORIES= graphics +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ufraw/} +HOMEPAGE= http://ufraw.sourceforge.net/ + +MAINTAINER= Marc Balmer + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +WANTLIB= c fontconfig freetype m stdc++ X11 z gmodule-2.0.0.0 \ + glib-2.0.0.0 gimpui-2.0.0.0 pango-1.0.0.0 \ + pangocairo-1.0.0.0 gimpmath-2.0.0.0 gdk_pixbuf-2.0.0.0 \ + gdk-x11-2.0.0.0 pangoft2-1.0.0.0 gtk-x11-2.0.0.0 cairo \ + gimpwidgets-2.0.0.0 gimpbase-2.0.0.0 atk-1.0.0.0 \ + gimpcolor-2.0.0.0 gobject-2.0.0.0 + +LIB_DEPENDS= gimp-2.0.0.0:gimp-2.*:graphics/gimp/stable \ + tiff.>=37::graphics/tiff \ + jpeg.>=62::graphics/jpeg \ + lcms.>=1.15::graphics/lcms \ + exif.>=12.1::graphics/libexif + +MODULES= devel/gettext + +USE_X11= Yes +USE_GMAKE= Yes +AUTOCONF_VERSION= 2.59 +CONFIGURE_STYLE= gnu +CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" +CONFIGURE_ARGS= --enable-extras --with-libexif + +.include diff --git a/graphics/ufraw/distinfo b/graphics/ufraw/distinfo new file mode 100644 index 00000000000..057caab4405 --- /dev/null +++ b/graphics/ufraw/distinfo @@ -0,0 +1,4 @@ +MD5 (ufraw-0.9.1.tar.gz) = 7388ed97a156ea6a7272513a1dc8f8d5 +RMD160 (ufraw-0.9.1.tar.gz) = 67bd53c29b8ce51a42f44669cd8c1ff6ce7af106 +SHA1 (ufraw-0.9.1.tar.gz) = 748d1c2c8f4f4fdbc384dfb8ea756ac019004001 +SIZE (ufraw-0.9.1.tar.gz) = 331171 diff --git a/graphics/ufraw/patches/patch-nikon_curve_c b/graphics/ufraw/patches/patch-nikon_curve_c new file mode 100644 index 00000000000..ae6ccf252ab --- /dev/null +++ b/graphics/ufraw/patches/patch-nikon_curve_c @@ -0,0 +1,96 @@ +$OpenBSD: patch-nikon_curve_c,v 1.1.1.1 2006/09/17 17:52:38 mbalmer Exp $ +--- nikon_curve.c.orig Wed Apr 26 18:30:10 2006 ++++ nikon_curve.c Tue Jul 11 23:00:25 2006 +@@ -76,8 +76,8 @@ static const unsigned char *FileTypeHead + #ifdef _STAND_ALONE_ + + //filenames +-char exportFilename[1024]; +-char nikonFilename[1024]; ++char exportFilename[FILENAME_MAX]; ++char nikonFilename[FILENAME_MAX]; + + unsigned int standalone_samplingRes = 65536; + unsigned int standalone_outputRes = 256; +@@ -118,8 +118,7 @@ int ProcessArgs(int num_args, char *args + else if (strcmp(args[i],"-o") == 0 || strcmp(args[i],"-O") == 0) + { + i++; +- strncpy(exportFilename, args[i], 1023); +- exportFilename[1023] = '\0'; ++ strlcpy(exportFilename, args[i], sizeof(exportFilename)); + } + else if (strcmp(args[i],"-sr") == 0) + { +@@ -147,24 +146,21 @@ int ProcessArgs(int num_args, char *args + { + i++; + program_mode = NEF_MODE; +- strncpy(nikonFilename, args[i], 1023); +- nikonFilename[1023] = '\0'; ++ strlcpy(nikonFilename, args[i], sizeof(nikonFilename)); + } + //don't load argument 0 + else if (i != 0) + { + //consider this the file name to load +- strncpy(nikonFilename, args[i], 1023); +- nikonFilename[1023] = '\0'; ++ strlcpy(nikonFilename, args[i], sizeof(nikonFilename)); + } + } + + if (strlen(exportFilename) == 0) + { + //set it to have a default output file name +- strncpy(exportFilename, nikonFilename, 1023); +- strncat(exportFilename, "_CURVE_OUTPUT.txt", 1023); +- exportFilename[1023] = '\0'; ++ strlcpy(exportFilename, nikonFilename, sizeof(exportFilename)); ++ strlcat(exportFilename, "_CURVE_OUTPUT.txt", sizeof(exportFilename)); + } + + return NC_SUCCESS; +@@ -1674,7 +1670,7 @@ int ConvertNikonCurveData(char *inFileNa + { + //Load the curve data from the ncv/ntc file + NikonData data; +- char tmpstr[1024]; ++ char tmpstr[FILENAME_MAX]; + + if ( samplingRes <= 1 || outputRes <= 1 || samplingRes > MAX_RESOLUTION + || outputRes > MAX_RESOLUTION ) +@@ -1704,8 +1700,7 @@ int ConvertNikonCurveData(char *inFileNa + } + + //rename output files +- strncpy(tmpstr, outFileName, 1023); +- tmpstr[1023] = '\0'; ++ strlcpy(tmpstr, outFileName, sizeof(tmpstr)); + //if the name has an extension, attempt to remove it + if (tmpstr[strlen(tmpstr)-4] == '.') + { +@@ -1715,19 +1710,19 @@ int ConvertNikonCurveData(char *inFileNa + switch(i) + { + case TONE_CURVE: +- strncat(tmpstr, "_TONE.txt", 1023); ++ strlcat(tmpstr, "_TONE.txt", sizeof(tmpstr)); + break; + + case RED_CURVE: +- strncat(tmpstr, "_RED.txt", 1023); ++ strlcat(tmpstr, "_RED.txt", sizeof(tmpstr)); + break; + + case GREEN_CURVE: +- strncat(tmpstr, "_GREEN.txt", 1023); ++ strlcat(tmpstr, "_GREEN.txt", sizeof(tmpstr)); + break; + + case BLUE_CURVE: +- strncat(tmpstr, "_BLUE.txt", 1023); ++ strlcat(tmpstr, "_BLUE.txt", sizeof(tmpstr)); + break; + + default: diff --git a/graphics/ufraw/patches/patch-ufraw-batch_c b/graphics/ufraw/patches/patch-ufraw-batch_c new file mode 100644 index 00000000000..f6e1d5b3a09 --- /dev/null +++ b/graphics/ufraw/patches/patch-ufraw-batch_c @@ -0,0 +1,16 @@ +$OpenBSD: patch-ufraw-batch_c,v 1.1.1.1 2006/09/17 17:52:38 mbalmer Exp $ +--- ufraw-batch.c.orig Fri Aug 4 10:27:39 2006 ++++ ufraw-batch.c Fri Aug 4 10:28:21 2006 +@@ -55,9 +55,9 @@ int main (int argc, char **argv) + if (strlen(cmd.inputFilename)>0) { + status = conf_load(&conf, cmd.inputFilename); + if (status==UFRAW_SUCCESS) { +- strcpy(conf.inputFilename, ""); +- strcpy(conf.outputFilename, ""); +- strcpy(conf.outputPath, ""); ++ strlcpy(conf.inputFilename, "",sizeof(conf.inputFilename)); ++ strlcpy(conf.outputFilename, "",sizeof(conf.outputFilename)); ++ strlcpy(conf.outputPath, "",sizeof(conf.outputPath)); + } else { + ufraw_message(UFRAW_REPORT, NULL); + conf.version = 0; diff --git a/graphics/ufraw/patches/patch-ufraw_c b/graphics/ufraw/patches/patch-ufraw_c new file mode 100644 index 00000000000..e95b81aed33 --- /dev/null +++ b/graphics/ufraw/patches/patch-ufraw_c @@ -0,0 +1,16 @@ +$OpenBSD: patch-ufraw_c,v 1.1.1.1 2006/09/17 17:52:38 mbalmer Exp $ +--- ufraw.c.orig Fri Aug 4 10:17:56 2006 ++++ ufraw.c Fri Aug 4 10:18:55 2006 +@@ -89,9 +89,9 @@ int main (int argc, char **argv) + if (strlen(cmd.inputFilename)>0) { + status = conf_load(&conf, cmd.inputFilename); + if (status==UFRAW_SUCCESS) { +- strcpy(conf.inputFilename, ""); +- strcpy(conf.outputFilename, ""); +- strcpy(conf.outputPath, ""); ++ strlcpy(conf.inputFilename, "", sizeof(conf.inputFilename)); ++ strlcpy(conf.outputFilename, "", sizeof(conf.outputFilename)); ++ strlcpy(conf.outputPath, "", sizeof(conf.outputPath)); + } else { + ufraw_message(UFRAW_REPORT, NULL); + conf.version = 0; diff --git a/graphics/ufraw/patches/patch-ufraw_developer_c b/graphics/ufraw/patches/patch-ufraw_developer_c new file mode 100644 index 00000000000..cf19b4fbd85 --- /dev/null +++ b/graphics/ufraw/patches/patch-ufraw_developer_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-ufraw_developer_c,v 1.1.1.1 2006/09/17 17:52:38 mbalmer Exp $ +--- ufraw_developer.c.orig Fri Aug 4 10:24:32 2006 ++++ ufraw_developer.c Fri Aug 4 10:25:30 2006 +@@ -30,7 +30,7 @@ developer_data *developer_init() + d->saturation = -1; + for (i=0; iprofile[i] = NULL; +- strcpy(d->profileFile[i],"no such file"); ++ strlcpy(d->profileFile[i],"no such file",sizeof(d->profileFile[i])); + } + memset(&d->baseCurveData, 0, sizeof(d->baseCurveData)); + d->baseCurveData.m_gamma = -1.0; +@@ -76,7 +76,7 @@ void developer_profile(developer_data *d + g_strlcpy(p->productName, cmsTakeProductName(d->profile[type]), + max_name); + else +- strcpy(p->productName, ""); ++ strlcpy(p->productName, "",sizeof(p->productName)); + } + } + diff --git a/graphics/ufraw/patches/patch-ufraw_preview_c b/graphics/ufraw/patches/patch-ufraw_preview_c new file mode 100644 index 00000000000..2242d8d7855 --- /dev/null +++ b/graphics/ufraw/patches/patch-ufraw_preview_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-ufraw_preview_c,v 1.1.1.1 2006/09/17 17:52:38 mbalmer Exp $ +--- ufraw_preview.c.orig Fri Aug 11 23:08:11 2006 ++++ ufraw_preview.c Thu Aug 17 14:03:46 2006 +@@ -2628,7 +2628,7 @@ int ufraw_preview(ufraw_data *uf, int pl + g_idle_remove_by_data(data); + + /* In interactive mode outputPath is taken into account only once */ +- strcpy(uf->conf->outputPath, ""); ++ strlcpy(uf->conf->outputPath, "",sizeof(uf->conf->outputPath)); + if (status==GTK_RESPONSE_OK) { + if (CFG->saveConfiguration==disabled_state) { + /* Restore the original 'image settings' */ diff --git a/graphics/ufraw/pkg/DESCR b/graphics/ufraw/pkg/DESCR new file mode 100644 index 00000000000..64ee11d51fc --- /dev/null +++ b/graphics/ufraw/pkg/DESCR @@ -0,0 +1,11 @@ +Raw photo loader plugin for The GIMP by Udi Fuchs, + +UFRaw is a utility to read and manipulate raw images from digital cameras. +It can be used by itself or as a GIMP plug-in. +It reads raw images using Dave Coffin's raw conversion utility DCRaw. +And it supports basic color management using Little CMS, allowing +the user to apply color profiles. + +Ufraw was originally based on the GIMP plug-in by Dave Coffin +http://www.cybercom.net/~dcoffin/ +and on Pawel T. Jochym's (jochym at ifj edu pl) plug-in. diff --git a/graphics/ufraw/pkg/PLIST b/graphics/ufraw/pkg/PLIST new file mode 100644 index 00000000000..c3bbdc321df --- /dev/null +++ b/graphics/ufraw/pkg/PLIST @@ -0,0 +1,14 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2006/09/17 17:52:38 mbalmer Exp $ +@comment bin/dcraw +bin/nikon-curve +bin/ufraw +bin/ufraw-batch +lib/gimp/ +lib/gimp/2.0/ +lib/gimp/2.0/plug-ins/ +lib/gimp/2.0/plug-ins/ufraw-gimp +@man man/man1/ufraw.1 +share/applications/ +share/applications/ufraw.desktop +share/pixmaps/ +share/pixmaps/ufraw.png