Import of scrot-0.8
scrot is a commandline screen capture util like "import", but using imlib2. It has lots of options for autogenerating filenames, and can do fun stuff like taking screenshots of multiple displays and glueing them together. from Victor Sahlstedt <cvss@home.se>; ok naddy@
This commit is contained in:
parent
5fb968f7a2
commit
e6efa5c7a2
26
graphics/scrot/Makefile
Normal file
26
graphics/scrot/Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2004/07/01 21:53:16 robert Exp $
|
||||
|
||||
COMMENT= "commandline screen capture util"
|
||||
|
||||
DISTNAME= scrot-0.8
|
||||
CATEGORIES= graphics
|
||||
|
||||
HOMEPAGE= http://www.linuxbrit.co.uk/scrot/
|
||||
|
||||
MAINTAINER= Victor Sahlstedt <cvss@home.se>
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= http://www.linuxbrit.co.uk/downloads/
|
||||
|
||||
LIB_DEPENDS= giblib.1::devel/giblib \
|
||||
Imlib2.1::graphics/imlib2
|
||||
|
||||
USE_X11= Yes
|
||||
CONFIGURE_STYLE= gnu
|
||||
|
||||
.include <bsd.port.mk>
|
3
graphics/scrot/distinfo
Normal file
3
graphics/scrot/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (scrot-0.8.tar.gz) = ccae904d225609571bdd3b03445c1e88
|
||||
RMD160 (scrot-0.8.tar.gz) = e082ee2dedea50756df0b53d212f9270ca201533
|
||||
SHA1 (scrot-0.8.tar.gz) = 674fcb4860f1dcfa02cde7d82414e1e1c731aa75
|
12
graphics/scrot/patches/patch-Makefile.in
Normal file
12
graphics/scrot/patches/patch-Makefile.in
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Makefile.in,v 1.1.1.1 2004/07/01 21:53:16 robert Exp $
|
||||
--- Makefile.in.orig Thu May 20 04:43:58 2004
|
||||
+++ Makefile.in Thu May 20 04:44:08 2004
|
||||
@@ -82,7 +82,7 @@ INCLUDES = -I/usr/X11R6/include $(X_CFLA
|
||||
man_MANS = scrot.1
|
||||
|
||||
docs_DATA = README AUTHORS ChangeLog TODO
|
||||
-docsdir = $(prefix)/doc/scrot
|
||||
+docsdir = $(prefix)/share/doc/scrot
|
||||
|
||||
EXTRA_DIST = scrot.spec scrot.1 $(docs_DATA)
|
||||
|
44
graphics/scrot/patches/patch-src_Makefile_in
Normal file
44
graphics/scrot/patches/patch-src_Makefile_in
Normal file
@ -0,0 +1,44 @@
|
||||
$OpenBSD: patch-src_Makefile_in,v 1.1.1.1 2004/07/01 21:53:16 robert Exp $
|
||||
--- src/Makefile.in.orig Mon Jun 23 14:13:34 2003
|
||||
+++ src/Makefile.in Mon Jun 28 15:42:33 2004
|
||||
@@ -73,13 +73,13 @@
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
-LDFLAGS = -L/usr/X11R6/lib
|
||||
-INCLUDES = -g -O3 -Wall -I/usr/X11R6/include $(X_CFLAGS) -I$(prefix)/include -I$(includedir) -I. -DPREFIX=\""$(prefix)"\" @GIBLIB_CFLAGS@
|
||||
+LDFLAGS = -L${X11BASE}/lib
|
||||
+INCLUDES = -Wall -I${X11BASE}/include $(X_CFLAGS) -I$(prefix)/include -I$(includedir) -I. -DPREFIX=\""$(prefix)"\" @GIBLIB_CFLAGS@
|
||||
|
||||
LIBOBJS = @LIBOBJS@
|
||||
|
||||
bin_PROGRAMS = scrot
|
||||
-scrot_SOURCES = main.c getopt.c getopt1.c getopt.h scrot.h options.c options.h debug.h imlib.c structs.h
|
||||
+scrot_SOURCES = main.c scrot.h options.c options.h debug.h imlib.c structs.h
|
||||
|
||||
scrot_LDADD = -lX11 @GIBLIB_LIBS@
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
@@ -91,7 +91,7 @@
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I.
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LIBS = @LIBS@
|
||||
-scrot_OBJECTS = main.o getopt.o getopt1.o options.o imlib.o
|
||||
+scrot_OBJECTS = main.o options.o imlib.o
|
||||
scrot_DEPENDENCIES =
|
||||
scrot_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
@@ -239,11 +239,9 @@
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
-getopt.o: getopt.c config.h
|
||||
-getopt1.o: getopt1.c config.h getopt.h
|
||||
-imlib.o: imlib.c scrot.h getopt.h config.h structs.h debug.h options.h
|
||||
-main.o: main.c scrot.h getopt.h config.h structs.h debug.h options.h
|
||||
-options.o: options.c scrot.h getopt.h config.h structs.h debug.h \
|
||||
+imlib.o: imlib.c scrot.h config.h structs.h debug.h options.h
|
||||
+main.o: main.c scrot.h config.h structs.h debug.h options.h
|
||||
+options.o: options.c scrot.h config.h structs.h debug.h \
|
||||
options.h
|
||||
|
||||
info-am:
|
75
graphics/scrot/patches/patch-src_main_c
Normal file
75
graphics/scrot/patches/patch-src_main_c
Normal file
@ -0,0 +1,75 @@
|
||||
$OpenBSD: patch-src_main_c,v 1.1.1.1 2004/07/01 21:53:16 robert Exp $
|
||||
--- src/main.c.orig Thu Jul 1 23:19:39 2004
|
||||
+++ src/main.c Thu Jul 1 23:21:16 2004
|
||||
@@ -426,28 +426,28 @@
|
||||
switch (*c) {
|
||||
case 'f':
|
||||
if (filename_im)
|
||||
- strcat(ret, filename_im);
|
||||
+ strlcat(ret, filename_im, sizeof(ret));
|
||||
break;
|
||||
case 'm': /* t was allready taken, so m as in mini */
|
||||
if (filename_thumb)
|
||||
- strcat(ret, filename_thumb);
|
||||
+ strlcat(ret, filename_thumb, sizeof(ret));
|
||||
break;
|
||||
case 'n':
|
||||
if (filename_im) {
|
||||
tmp = strrchr(filename_im, '/');
|
||||
if (tmp)
|
||||
- strcat(ret, tmp + 1);
|
||||
+ strlcat(ret, tmp + 1, sizeof(ret));
|
||||
else
|
||||
- strcat(ret, filename_im);
|
||||
+ strlcat(ret, filename_im, sizeof(ret));
|
||||
}
|
||||
break;
|
||||
case 'w':
|
||||
snprintf(buf, sizeof(buf), "%d", gib_imlib_image_get_width(im));
|
||||
- strcat(ret, buf);
|
||||
+ strlcat(ret, buf, sizeof(ret));
|
||||
break;
|
||||
case 'h':
|
||||
snprintf(buf, sizeof(buf), "%d", gib_imlib_image_get_height(im));
|
||||
- strcat(ret, buf);
|
||||
+ strlcat(ret, buf, sizeof(ret));
|
||||
break;
|
||||
case 's':
|
||||
if (filename_im) {
|
||||
@@ -456,22 +456,22 @@
|
||||
|
||||
size = st.st_size;
|
||||
snprintf(buf, sizeof(buf), "%d", size);
|
||||
- strcat(ret, buf);
|
||||
+ strlcat(ret, buf, sizeof(ret));
|
||||
} else
|
||||
- strcat(ret, "[err]");
|
||||
+ strlcat(ret, "[err]", sizeof(ret));
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
snprintf(buf, sizeof(buf), "%d",
|
||||
gib_imlib_image_get_width(im) *
|
||||
gib_imlib_image_get_height(im));
|
||||
- strcat(ret, buf);
|
||||
+ strlcat(ret, buf, sizeof(ret));
|
||||
break;
|
||||
case 't':
|
||||
- strcat(ret, gib_imlib_image_format(im));
|
||||
+ strlcat(ret, gib_imlib_image_format(im), sizeof(ret));
|
||||
break;
|
||||
case '$':
|
||||
- strcat(ret, "$");
|
||||
+ strlcat(ret, "$", sizeof(ret));
|
||||
break;
|
||||
default:
|
||||
strncat(ret, c, 1);
|
||||
@@ -482,7 +482,7 @@
|
||||
switch (*c) {
|
||||
case 'n':
|
||||
if (filename_im)
|
||||
- strcat(ret, "\n");
|
||||
+ strlcat(ret, "\n", sizeof(ret));
|
||||
break;
|
||||
default:
|
||||
strncat(ret, c, 1);
|
26
graphics/scrot/patches/patch-src_options_c
Normal file
26
graphics/scrot/patches/patch-src_options_c
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-src_options_c,v 1.1.1.1 2004/07/01 21:53:16 robert Exp $
|
||||
--- src/options.c.orig Mon Jun 23 14:09:08 2003
|
||||
+++ src/options.c Thu Jul 1 23:22:32 2004
|
||||
@@ -141,6 +141,7 @@
|
||||
|
||||
length = strlen(name) + 7;
|
||||
new_title = gib_emalloc(length);
|
||||
+ memset(new_title, 0, sizeof(new_title));
|
||||
|
||||
dot_pos = strrchr(name, '.');
|
||||
if (dot_pos)
|
||||
@@ -148,11 +149,11 @@
|
||||
diff = (dot_pos - name) / sizeof(char);
|
||||
|
||||
strncpy(new_title, name, diff);
|
||||
- strcat(new_title, "-thumb");
|
||||
- strcat(new_title, dot_pos);
|
||||
+ strlcat(new_title, "-thumb", length);
|
||||
+ strlcat(new_title, dot_pos, length);
|
||||
}
|
||||
else
|
||||
- sprintf(new_title, "%s-thumb", name);
|
||||
+ snprintf(new_title, length, "%s-thumb", name);
|
||||
|
||||
return new_title;
|
||||
}
|
4
graphics/scrot/pkg/DESCR
Normal file
4
graphics/scrot/pkg/DESCR
Normal file
@ -0,0 +1,4 @@
|
||||
scrot is a commandline screen capture util like "import", but using
|
||||
imlib2. It has lots of options for autogenerating filenames, and can
|
||||
do fun stuff like taking screenshots of multiple displays and glueing
|
||||
them together.
|
8
graphics/scrot/pkg/PLIST
Normal file
8
graphics/scrot/pkg/PLIST
Normal file
@ -0,0 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/07/01 21:53:16 robert Exp $
|
||||
bin/scrot
|
||||
man/man1/scrot.1
|
||||
share/doc/scrot/AUTHORS
|
||||
share/doc/scrot/ChangeLog
|
||||
share/doc/scrot/README
|
||||
share/doc/scrot/TODO
|
||||
@dirrm share/doc/scrot
|
Loading…
Reference in New Issue
Block a user