Browse Source

ap/toilet: Added a patch to fix initial position.

slackware-14.2
Damien Goutte-Gattat 12 years ago
parent
commit
31ef134d97
2 changed files with 86 additions and 1 deletions
  1. +81
    -0
      ap/toilet/fix-start-position.diff
  2. +5
    -1
      ap/toilet/toilet.SlackBuild

+ 81
- 0
ap/toilet/fix-start-position.diff View File

@ -0,0 +1,81 @@
diff -Naur toilet-0.1.orig/doc/toilet.1.in toilet-0.1/doc/toilet.1.in
--- toilet-0.1.orig/doc/toilet.1.in 2009-04-28 16:20:58.000000000 +0200
+++ toilet-0.1/doc/toilet.1.in 2009-04-28 16:45:06.000000000 +0200
@@ -144,6 +144,12 @@
.B figlet
manpage for more information about it.
.TP
+.B \-x, \-\-posx <pos>
+Specify the X (column) position.
+.TP
+.B \-y, \-\-posy <pos>
+Specify the y (row) position.
+.TP
.B \-v, \-\-version
Output version information and exit.
.RI
diff -Naur toilet-0.1.orig/src/main.c toilet-0.1/src/main.c
--- toilet-0.1.orig/src/main.c 2009-04-28 16:20:58.000000000 +0200
+++ toilet-0.1/src/main.c 2009-04-28 16:27:46.000000000 +0200
@@ -59,6 +59,9 @@
cx->filters = NULL;
cx->nfilters = 0;
+ cx->x = 0;
+ cx->y = 0;
+
#if defined(HAVE_GETOPT_H)
for(;;)
{
@@ -81,14 +84,16 @@
{ "help", 0, NULL, 'h' },
{ "infocode", 1, NULL, 'I' },
{ "version", 0, NULL, 'v' },
+ { "posx", 1, NULL, 'x' },
+ { "posy", 1, NULL, 'y' },
{ NULL, 0, NULL, 0 }
};
- int c = getopt_long(argc, argv, "f:d:w:tsSkWoF:E:hI:v",
+ int c = getopt_long(argc, argv, "f:d:w:tsSkWoF:E:hI:x:y:v",
long_options, &option_index);
# else
# define MOREINFO "Try `%s -h' for more information.\n"
- int c = getopt(argc, argv, "f:d:w:tsSkWoF:E:hI:v");
+ int c = getopt(argc, argv, "f:d:w:tsSkWoF:E:hI:x:y:v");
# endif
if(c == -1)
break;
@@ -164,6 +169,12 @@
case 141: /* --html */
export_set(cx, "html");
break;
+ case 'x': /* --posx */
+ cx->x = atoi(optarg);
+ break;
+ case 'y': /* --posy */
+ cx->y = atoi(optarg);
+ break;
case '?':
printf(MOREINFO, argv[0]);
return 1;
@@ -277,6 +288,8 @@
printf(" -E list list available export formats\n");
printf(" -h display this help and exit\n");
printf(" -I <code> print FIGlet-compatible infocode\n");
+ printf(" -x, --posx <pos> Set initial X (column) position\n");
+ printf(" -y, --posy <pos> Set initial Y (row) position\n");
printf(" -v output version information and exit\n");
# endif
}
diff -Naur toilet-0.1.orig/src/render.c toilet-0.1/src/render.c
--- toilet-0.1.orig/src/render.c 2009-04-28 16:20:58.000000000 +0200
+++ toilet-0.1/src/render.c 2009-04-28 16:26:41.000000000 +0200
@@ -33,7 +33,6 @@
int render_init(context_t *cx)
{
- cx->x = cx->y = 0;
cx->w = cx->h = 0;
cx->lines = 0;
cx->cv = cucul_create_canvas(0, 0);

+ 5
- 1
ap/toilet/toilet.SlackBuild View File

@ -32,7 +32,7 @@ WGET=${WGET:-http://caca.zoy.org/files/toilet/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-toilet}
BUILD=${BUILD:-1GGD}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
@ -76,6 +76,10 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
if [ -f $CWD/fix-start-position.diff ]; then
patch -p 1 < $CWD/fix-start-position.diff
fi
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \


Loading…
Cancel
Save