Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=b7339c2ba9085bd49c03088a1cb9c88f250fa116
commit b7339c2ba9085bd49c03088a1cb9c88f250fa116 Author: Priyank <[EMAIL PROTECTED]> Date: Wed Sep 19 13:24:58 2007 +0530 fortune-mod-1.99.1-1-i686 * Moved to apps-extra diff --git a/source/apps-extra/fortune-mod/FrugalBuild b/source/apps-extra/fortune-mod/FrugalBuild new file mode 100644 index 0000000..0638612 --- /dev/null +++ b/source/apps-extra/fortune-mod/FrugalBuild @@ -0,0 +1,38 @@ +# Compiling Time: 0.02 SBU +# Maintainer: Priyank Gosalia <[EMAIL PROTECTED]> + +pkgname=fortune-mod +pkgver=1.99.1 +pkgrel=1 +pkgdesc="The notorious Fortune Cookie Program from BSD games" +url="http://www.redellipse.net/code/fortune" +depends=('recode') +groups=('apps-extra') +archs=('i686' 'x86_64') +up2date="lynx -dump http://www.redellipse.net/code/downloads/ | grep $pkgname | Flasttar" +source=(http://www.redellipse.net/code/downloads/$pkgname-$pkgver.tar.gz \ + fortune-mod_all-fix.patch0 fortune-mod-1.99.1.patch) +sha1sums=('53aa354025094d7c0e544bb1662714815fa63918' \ + '666864d9053f617b3724b301a2f80c1c3702ea6c' \ + '4733ec91baf87a2d96a285287e6943d0778861ea') + +build() { + Fcd + Fpatchall + make REGEXDEFS='-DHAVE_REGEX_H -DPOSIX_REGEX -DHAVE_STDBOOL' \ + COOKIEDIR=/usr/share/fortune \ + LOCALDIR=/usr/local/share/fortune || return 1 + + make COOKIEDIR=/usr/share/fortune fortune/fortune.man || return 1 + + make FORTDIR=$Fdestdir/usr/bin \ + COOKIEDIR=$Fdestdir/usr/share/fortune \ + BINDIR=$Fdestdir/usr/bin \ + BINMANDIR=$Fdestdir/usr/man/man1 \ + FORTMANDIR=$Fdestdir/usr/man/man6 install + + Frm usr/share/fortune/*.u8 + Frm usr/share/fortune/off/*.u8 +} + +# optimization OK diff --git a/source/apps-extra/fortune-mod/fortune-mod-1.99.1.patch b/source/apps-extra/fortune-mod/fortune-mod-1.99.1.patch new file mode 100644 index 0000000..d9b27fb --- /dev/null +++ b/source/apps-extra/fortune-mod/fortune-mod-1.99.1.patch @@ -0,0 +1,99 @@ +--- fortune-mod-1.99.1/datfiles/Makefile ++++ fortune-mod-1.99.1/datfiles/Makefile +@@ -58,7 +58,7 @@ + if [ $(WEB) = 1 ] ; then cd html && $(MAKE) install ; fi + for i in $(COOKIES) ; do \ + install -m 0644 $$i $$i.dat $(COOKIEDIR) || exit $? ; \ +- cp -d $$i.u8 $(COOKIEDIR) ; \ ++ cp -P $$i.u8 $(COOKIEDIR) ; \ + done + + clean: +--- fortune-mod-1.99.1/datfiles/off/Makefile ++++ fortune-mod-1.99.1/datfiles/off/Makefile +@@ -38,7 +38,7 @@ + install -m 0755 -d $(OCOOKIEDIR) + for i in $(OCOOKIES) ; \ + do install -m 0644 $$i $$i.dat $(OCOOKIEDIR) || exit $$? ; \ +- cp -d $$i.u8 $(OCOOKIEDIR) ; \ ++ cp -P $$i.u8 $(OCOOKIEDIR) ; \ + done + + clean: +--- fortune-mod-1.99.1/Makefile ++++ fortune-mod-1.99.1/Makefile +@@ -65,8 +65,7 @@ + RECODELIBS=-lrecode + + DEFINES=-DFORTDIR="\"$(COOKIEDIR)\"" -DOFFDIR="\"$(OCOOKIEDIR)\"" -DLOCFORTDIR="\"$(LOCALDIR)\"" -DLOCOFFDIR="\"$(LOCALODIR)\"" +-CFLAGS=-O2 $(DEFINES) -Wall -fomit-frame-pointer -pipe -fsigned-char +-LDFLAGS=-s ++CFLAGS += $(DEFINES) -fsigned-char + + # The above flags are used by default; the debug flags are used when make + # is called with a debug target, such as 'make debug' +--- fortune-mod-1.99.1/fortune/fortune.c ++++ fortune-mod-1.99.1/fortune/fortune.c +@@ -97,7 +97,7 @@ + #endif /* killing warnings */ + + #define PROGRAM_NAME "fortune-mod" +-#define PROGRAM_VERSION "9708" ++#define PROGRAM_VERSION "1.99.1" + + #ifdef HAVE_STDBOOL_H + #include <stdbool.h> +@@ -256,6 +256,7 @@ + + int add_dir(register FILEDESC *); + ++const char *program_name; + char *program_version(void) + { + static char buf[BUFSIZ]; +@@ -1675,14 +1675,17 @@ + char *ctype, *crequest; + getargs(ac, av); + ++ program_name = (char *const) av[0]; + outer = recode_new_outer(true); + request = recode_new_request (outer); + + setlocale(LC_ALL,""); + ctype = nl_langinfo(CODESET); +- if(strcmp(ctype,"ANSI_X3.4-1968") == 0) +- ctype="ISO-8859-1"; +- ++ if (!ctype || !*ctype) ++ ctype="C"; /* revert to C if no valid envvars! */ ++ else ++ if(strcmp(ctype,"ANSI_X3.4-1968") == 0) ++ ctype="ISO-8859-1"; + crequest = malloc(strlen(ctype) + 7 + 1); + sprintf(crequest, "UTF-8..%s", ctype); + recode_scan_request (request, crequest); +--- fortune-mod-1.99.1/util/rot.c ++++ fortune-mod-1.99.1/util/rot.c +@@ -5,10 +5,11 @@ + + #include <stdio.h> + #include <ctype.h> ++#include <stdlib.h> + + int main(void) + { +- char a, b; ++ short int a, b; + + while ((a = getchar()) != EOF) + { +--- fortune-mod-1.99.1/util/unstr.c ++++ fortune-mod-1.99.1/util/unstr.c +@@ -96,6 +96,7 @@ + #include <string.h> + #include <unistd.h> + ++#include <stdlib.h> + #ifndef MAXPATHLEN + #define MAXPATHLEN 1024 + #endif /* MAXPATHLEN */ diff --git a/source/apps-extra/fortune-mod/fortune-mod_all-fix.patch0 b/source/apps-extra/fortune-mod/fortune-mod_all-fix.patch0 new file mode 100644 index 0000000..4c5692e --- /dev/null +++ b/source/apps-extra/fortune-mod/fortune-mod_all-fix.patch0 @@ -0,0 +1,21 @@ +--- fortune/fortune.c 2006-03-11 15:33:14.000000000 +0100 ++++ fortune/fortune.c 2006-03-11 15:43:16.000000000 +0100 +@@ -974,7 +974,7 @@ + if (!ret) + ret=add_file(percent, fullpathname, NULL, &File_list, + &File_tail, NULL); +- if ( (!ret && fullpathname != locpathname) || strcmp(sp, "all") == 0 ) ++ if (!ret && strncmp(fullpathname, locpathname, sizeof(fullpathname))) + ret=add_file(percent, locpathname, NULL, &File_list, + &File_tail, NULL); + +@@ -985,7 +985,8 @@ + } + if (!ret) + return FALSE; +- ++ if (strncmp(fullpathname, locpathname, sizeof(fullpathname)) && strcmp(sp, "all") == 0) ++ add_file(percent, locpathname, NULL, &File_list, &File_tail, NULL); + } + else + if (!add_file(percent, fullpathname, NULL, &File_list, diff --git a/source/apps/fortune-mod/FrugalBuild b/source/apps/fortune-mod/FrugalBuild deleted file mode 100644 index 6d465f9..0000000 --- a/source/apps/fortune-mod/FrugalBuild +++ /dev/null @@ -1,38 +0,0 @@ -# Compiling Time: 0.02 SBU -# Maintainer: Priyank Gosalia <[EMAIL PROTECTED]> - -pkgname=fortune-mod -pkgver=1.99.1 -pkgrel=1 -pkgdesc="The notorious Fortune Cookie Program from BSD games" -url="http://www.redellipse.net/code/fortune" -depends=('recode') -groups=('apps') -archs=('i686' 'x86_64') -up2date="lynx -dump http://www.redellipse.net/code/downloads/ | grep $pkgname | Flasttar" -source=(http://www.redellipse.net/code/downloads/$pkgname-$pkgver.tar.gz \ - fortune-mod_all-fix.patch0 fortune-mod-1.99.1.patch) -sha1sums=('53aa354025094d7c0e544bb1662714815fa63918' \ - '666864d9053f617b3724b301a2f80c1c3702ea6c' \ - '4733ec91baf87a2d96a285287e6943d0778861ea') - -build() { - Fcd - Fpatchall - make REGEXDEFS='-DHAVE_REGEX_H -DPOSIX_REGEX -DHAVE_STDBOOL' \ - COOKIEDIR=/usr/share/fortune \ - LOCALDIR=/usr/local/share/fortune || return 1 - - make COOKIEDIR=/usr/share/fortune fortune/fortune.man || return 1 - - make FORTDIR=$Fdestdir/usr/bin \ - COOKIEDIR=$Fdestdir/usr/share/fortune \ - BINDIR=$Fdestdir/usr/bin \ - BINMANDIR=$Fdestdir/usr/man/man1 \ - FORTMANDIR=$Fdestdir/usr/man/man6 install - - Frm usr/share/fortune/*.u8 - Frm usr/share/fortune/off/*.u8 -} - -# optimization OK diff --git a/source/apps/fortune-mod/fortune-mod-1.99.1.patch b/source/apps/fortune-mod/fortune-mod-1.99.1.patch deleted file mode 100644 index d9b27fb..0000000 --- a/source/apps/fortune-mod/fortune-mod-1.99.1.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- fortune-mod-1.99.1/datfiles/Makefile -+++ fortune-mod-1.99.1/datfiles/Makefile -@@ -58,7 +58,7 @@ - if [ $(WEB) = 1 ] ; then cd html && $(MAKE) install ; fi - for i in $(COOKIES) ; do \ - install -m 0644 $$i $$i.dat $(COOKIEDIR) || exit $? ; \ -- cp -d $$i.u8 $(COOKIEDIR) ; \ -+ cp -P $$i.u8 $(COOKIEDIR) ; \ - done - - clean: ---- fortune-mod-1.99.1/datfiles/off/Makefile -+++ fortune-mod-1.99.1/datfiles/off/Makefile -@@ -38,7 +38,7 @@ - install -m 0755 -d $(OCOOKIEDIR) - for i in $(OCOOKIES) ; \ - do install -m 0644 $$i $$i.dat $(OCOOKIEDIR) || exit $$? ; \ -- cp -d $$i.u8 $(OCOOKIEDIR) ; \ -+ cp -P $$i.u8 $(OCOOKIEDIR) ; \ - done - - clean: ---- fortune-mod-1.99.1/Makefile -+++ fortune-mod-1.99.1/Makefile -@@ -65,8 +65,7 @@ - RECODELIBS=-lrecode - - DEFINES=-DFORTDIR="\"$(COOKIEDIR)\"" -DOFFDIR="\"$(OCOOKIEDIR)\"" -DLOCFORTDIR="\"$(LOCALDIR)\"" -DLOCOFFDIR="\"$(LOCALODIR)\"" --CFLAGS=-O2 $(DEFINES) -Wall -fomit-frame-pointer -pipe -fsigned-char --LDFLAGS=-s -+CFLAGS += $(DEFINES) -fsigned-char - - # The above flags are used by default; the debug flags are used when make - # is called with a debug target, such as 'make debug' ---- fortune-mod-1.99.1/fortune/fortune.c -+++ fortune-mod-1.99.1/fortune/fortune.c -@@ -97,7 +97,7 @@ - #endif /* killing warnings */ - - #define PROGRAM_NAME "fortune-mod" --#define PROGRAM_VERSION "9708" -+#define PROGRAM_VERSION "1.99.1" - - #ifdef HAVE_STDBOOL_H - #include <stdbool.h> -@@ -256,6 +256,7 @@ - - int add_dir(register FILEDESC *); - -+const char *program_name; - char *program_version(void) - { - static char buf[BUFSIZ]; -@@ -1675,14 +1675,17 @@ - char *ctype, *crequest; - getargs(ac, av); - -+ program_name = (char *const) av[0]; - outer = recode_new_outer(true); - request = recode_new_request (outer); - - setlocale(LC_ALL,""); - ctype = nl_langinfo(CODESET); -- if(strcmp(ctype,"ANSI_X3.4-1968") == 0) -- ctype="ISO-8859-1"; -- -+ if (!ctype || !*ctype) -+ ctype="C"; /* revert to C if no valid envvars! */ -+ else -+ if(strcmp(ctype,"ANSI_X3.4-1968") == 0) -+ ctype="ISO-8859-1"; - crequest = malloc(strlen(ctype) + 7 + 1); - sprintf(crequest, "UTF-8..%s", ctype); - recode_scan_request (request, crequest); ---- fortune-mod-1.99.1/util/rot.c -+++ fortune-mod-1.99.1/util/rot.c -@@ -5,10 +5,11 @@ - - #include <stdio.h> - #include <ctype.h> -+#include <stdlib.h> - - int main(void) - { -- char a, b; -+ short int a, b; - - while ((a = getchar()) != EOF) - { ---- fortune-mod-1.99.1/util/unstr.c -+++ fortune-mod-1.99.1/util/unstr.c -@@ -96,6 +96,7 @@ - #include <string.h> - #include <unistd.h> - -+#include <stdlib.h> - #ifndef MAXPATHLEN - #define MAXPATHLEN 1024 - #endif /* MAXPATHLEN */ diff --git a/source/apps/fortune-mod/fortune-mod_all-fix.patch0 b/source/apps/fortune-mod/fortune-mod_all-fix.patch0 deleted file mode 100644 index 4c5692e..0000000 --- a/source/apps/fortune-mod/fortune-mod_all-fix.patch0 +++ /dev/null @@ -1,21 +0,0 @@ ---- fortune/fortune.c 2006-03-11 15:33:14.000000000 +0100 -+++ fortune/fortune.c 2006-03-11 15:43:16.000000000 +0100 -@@ -974,7 +974,7 @@ - if (!ret) - ret=add_file(percent, fullpathname, NULL, &File_list, - &File_tail, NULL); -- if ( (!ret && fullpathname != locpathname) || strcmp(sp, "all") == 0 ) -+ if (!ret && strncmp(fullpathname, locpathname, sizeof(fullpathname))) - ret=add_file(percent, locpathname, NULL, &File_list, - &File_tail, NULL); - -@@ -985,7 +985,8 @@ - } - if (!ret) - return FALSE; -- -+ if (strncmp(fullpathname, locpathname, sizeof(fullpathname)) && strcmp(sp, "all") == 0) -+ add_file(percent, locpathname, NULL, &File_list, &File_tail, NULL); - } - else - if (!add_file(percent, fullpathname, NULL, &File_list, _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
