diff --git a/srcpkgs/phoon/patches/fix_stdlib.patch b/srcpkgs/phoon/patches/fix_stdlib.patch new file mode 100644 index 0000000..95435d9 --- /dev/null +++ b/srcpkgs/phoon/patches/fix_stdlib.patch @@ -0,0 +1,95 @@ +diff --git astro.c astro.c +index 1fbff03..a98c8a3 100644 +--- astro.c ++++ astro.c +@@ -26,6 +26,7 @@ + */ + + #include ++#include + #include + #include + +diff --git astro.h astro.h +index 8923520..1719ccc 100644 +--- astro.h ++++ astro.h +@@ -43,4 +43,4 @@ extern void phasehunt2( double sdate, double phases[2], double which[2] ); + */ + extern double phase( double pdate, double* pphase, double* mage, double* dist, double* angdia, double* sudist, double* suangdia ); + +-#endif _ASTRO_H_ ++#endif +diff --git date_parse.c date_parse.c +index 3ccfbee..0c665a0 100644 +--- date_parse.c ++++ date_parse.c +@@ -334,7 +334,7 @@ date_parse( char* str ) + ** non-portability, and it's only used for local times that don't + ** specify a zone - those don't occur in email and netnews. + */ +-#ifdef OS_SYSV ++#if defined(OS_SYSV) || defined(__linux) + tzset(); + gmtoff = -timezone; + #else /* OS_SYSV */ +diff --git phoon.c phoon.c +index 6b68465..05cdfae 100644 +--- phoon.c ++++ phoon.c +@@ -218,7 +218,7 @@ putmoon( time_t t, int numlines, char* atfiller ) + " `-. / . . .-' ", + " `--. . .--' ", + " `------------' "}; +- ++ + static char background24[24][49] = { + " .------------. ", + " .---' o . . `---. ", +@@ -510,19 +510,19 @@ main( int argc, char** argv ) + if ( argv[argn][1] != 'l' || argv[argn][2] != '\0' ) + { + fprintf( stderr, usage, argv[0] ); +- exit( 1 ); ++ return 1; + } + else + { + if ( argc - argn < 2 ) + { + fprintf( stderr, usage, argv[0] ); +- exit( 1 ); ++ return 1; + } + if ( sscanf( argv[argn + 1], "%d", &numlines ) != 1 ) + { + fprintf( stderr, usage, argv[0] ); +- exit( 1 ); ++ return 1; + } + argn += 2; + } +@@ -553,14 +553,14 @@ main( int argc, char** argv ) + if ( t <= 0 ) + { + fprintf( stderr, "illegal date/time: %s\n", buf ); +- exit( 1 ); ++ return 1; + } + } + else + { + /* Too many args! */ + fprintf( stderr, usage, argv[0] ); +- exit( 1 ); ++ return 1; + } + + /* Pseudo-randomly decide what the moon is made of, and print it. */ +@@ -570,5 +570,5 @@ main( int argc, char** argv ) + putmoon( t, numlines, "@" ); + + /* All done. */ +- exit( 0 ); ++ return 0; + } diff --git a/srcpkgs/phoon/template b/srcpkgs/phoon/template new file mode 100644 index 0000000..b98e5ee --- /dev/null +++ b/srcpkgs/phoon/template @@ -0,0 +1,22 @@ +# Template file for 'phoon' +pkgname=phoon +version=1 +revision=1 +archs="x86_64" +makedepends="git" +build_style=gnu-makefile +short_desc="display current moon phase" +maintainer="Zachary Scheiman " +license="MIT" +homepage="https://github.com/Distrotech/phoon" +patch_args="-Np0" + +do_fetch() { + git clone https://github.com/Distrotech/phoon.git $wrksrc + cd $wrksrc +} + +do_install() { + vbin phoon + vman phoon.1 +}