# HG changeset patch # User Pascal Bellard # Date 1456172958 -3600 # Node ID 62104f2454a324a26795097298f8c7aa30546ab2 # Parent dec20e5fa2833746bd92cd3599dcae658471660f Add gnubg diff -r dec20e5fa283 -r 62104f2454a3 gnubg/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnubg/receipt Mon Feb 22 21:29:18 2016 +0100 @@ -0,0 +1,36 @@ +# SliTaz package receipt. + +PACKAGE="gnubg" +VERSION="1.05.000" +CATEGORY="games" +SHORT_DESC="GNU Backgammon game." +MAINTAINER="pascal.bellard@slitaz.org" +LICENSE="GPL" +TARBALL="$PACKAGE-release-$VERSION-sources.tar.gz" +WEB_SITE="http://www.gnubg.org/" +WGET_URL="http://files.gnubg.org/media/sources/$TARBALL" + +DEPENDS="gtk+ libcanberra ncurses python gmp libvorbis libltdl" +BUILD_DEPENDS="pkg-config autoconf automake bison flex libtool \ +glib-dev libpng-dev freetype-dev gtk+-dev cairo-dev libcanberra-dev \ +gtkglext-dev readline-dev python sqlite-dev gmp-dev" + +# Rules to configure and make the package. +compile_rules() +{ + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --disable-cputest \ + $CONFIGURE_ARGS && + make && + make DESTDIR=$DESTDIR install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share/applications + cp -a $install/* $fs + cp -a $stuff/gnupg.desktop $fs/usr/share/applications +} diff -r dec20e5fa283 -r 62104f2454a3 gnubg/stuff/gnubg.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnubg/stuff/gnubg.desktop Mon Feb 22 21:29:18 2016 +0100 @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=GNU Backgammon +GenericName=Backgammon +Comment=GTK or console backgammon program with analysis +Exec=gnubg -w +Terminal=false +Icon=gnubg +Type=Application +Categories=Game;BoardGame;GTK; +Keywords=analysis;tutor; diff -r dec20e5fa283 -r 62104f2454a3 syslinux/stuff/iso2exe/iso2exe.c --- a/syslinux/stuff/iso2exe/iso2exe.c Sun Feb 21 19:26:01 2016 +0000 +++ b/syslinux/stuff/iso2exe/iso2exe.c Mon Feb 22 21:29:18 2016 +0100 @@ -63,7 +63,7 @@ static uint64_t total64; /* must be directly before hash[] */ static uint32_t hash[8]; /* 4 elements for md5, 5 for sha1, 8 for sha256 */ -//#define rotl32(x,n) (((x) << (n)) | ((x) >> (32 - (n)))) +/* #define rotl32(x,n) (((x) << (n)) | ((x) >> (32 - (n)))) */ static uint32_t rotl32(uint32_t x, unsigned n) { return (x << n) | (x >> (32 - n)); @@ -114,10 +114,10 @@ /* Do we have enough space for the length count? */ if (remaining >= 8) { /* Store the 64-bit counter of bits in the buffer */ - //uint64_t t = total64 << 3; + /* uint64_t t = total64 << 3; */ uint32_t *t = (uint32_t *) (&wbuffer[64 - 8]); /* wbuffer is suitably aligned for this */ - //*(uint64_t *) (&wbuffer[64 - 8]) = t; + /* *(uint64_t *) (&wbuffer[64 - 8]) = t; */ t[0] = total64.l << 3; t[1] = (total64.h << 3) | (total64.l >> 29); } @@ -287,14 +287,6 @@ unsigned long size, catalog, lba; int cylinders, i, j, isohybrid; unsigned n; -#ifdef __MSDOS__ - for (bootiso = (char *) install; - bootiso[0] != 'M' || bootiso[1] != 'Z' || bootiso[2] != '\xEB'; - bootiso++) if (bootiso < (char *) install) { - bootiso = "No bootiso data"; - return 0; - } -#endif if (!filename) return USAGE; fd = open(filename,O_RDWR|O_BINARY); @@ -314,8 +306,7 @@ for (i = 0; i < 32; i++, n = BUFFERSZ) { write(fd, buffer + n, BUFFERSZ); } - i = getcustomsector(); - lseek(fd, i * 2048UL, SEEK_SET); + lseek(fd, getcustomsector() << 11, SEEK_SET); i = clear_config(i); ftruncate(fd, i * 2048UL); close(fd); @@ -393,12 +384,12 @@ lseek(fd, pos, SEEK_SET); clear_config(pos); lseek(fd, pos, SEEK_SET); - write(fd, "#!boot 00000000000000000000000000000000\n", 40); + write(fd, bootiso+CUSTOM_HEADER, 40); n = pos + 40; md5_begin(); if (append) { i = strlen(append); - writenhash("append=", 7); + writenhash(bootiso+CMDLINE_TAG, 7); writenhash(append, i); writenhash("\n", 1); n += i + 8; @@ -421,7 +412,7 @@ x /= 10; } while (x); if (*++p != '0') { - writenhash("initrd:", 7); + writenhash(bootiso+INITRD_TAG, 7); i = number - p + sizeof(number); writenhash(p, i); n += i + 7; @@ -494,7 +485,7 @@ return SUCCESSMSG; } -static unsigned short files[] = { // to move to iso2exe.sh .... +static unsigned short files[] = { WIN32_EXE, /* 0 */ SYSLINUX_MBR, /* 1 */ FLAVOR_INFO, /* 2 */ @@ -516,7 +507,7 @@ char *s; c = getcustomsector(); - readsector(0); + readsector(0UL); i = 1024; if (WORD(buffer+1024) != 35615) i = 512 * (1 + BYTE(buffer+417)); stub = WORD(buffer+20) - 0xC0; @@ -547,7 +538,7 @@ file_offset = 0x8000U; file_size = 2048*c - file_offset; break; case CUSTOM_MAGIC: /* custom.magic */ readsector(c); - if (!strncmp(buffer, "#!boot", 6)) { + if (!strncmp(buffer, bootiso+CUSTOM_HEADER, 6)) { file_size = 39; file_offset = 2048*c; }; break; case CUSTOM_APPEND: /* custom.append */ @@ -565,26 +556,34 @@ } } +static long heap = 0; +static void show_free(void) +{ + if (file_offset > heap && (file_offset - heap) > 16) + printf(bootiso + FREE_FORMAT, file_offset - heap, + heap, file_offset); +} + static void list(void) { - int num, heap = 0; + int num; for (num = 0; num < sizeof(files)/sizeof(files[0]); num++) { fileofs(num); if (file_size <= 0 || file_offset > 0x3FFFFFFFUL) continue; readsector(file_offset / 2048); if (WORD(buffer + file_offset % 2048) == 0) continue; - if (file_offset > heap && (file_offset - heap) > 16) - printf("%d free bytes in %04X..%04X\n", - file_offset - heap, heap, file_offset); + show_free(); if (file_offset >= heap) heap = file_offset + file_size; - printf("%s at %04X (%d bytes).\n", bootiso + files[num], - file_offset, file_size); + printf(bootiso + USED_FORMAT, bootiso + files[num], + file_offset, file_size); } - file_offset=lseek(fd, 0UL, SEEK_END); - if (file_offset > heap) - printf("%d free bytes in %04X..%04X\n", - file_offset - heap, heap, file_offset); +#ifdef __MSDOS__ + file_offset = (heap + 0xFFFFFUL) & 0xFFF00000UL; +#else + file_offset=lseek(fd, 0UL, SEEK_END); +#endif + show_free(); } static void extract(char *name) @@ -612,6 +611,7 @@ int i; char *s; + data_fixup(); for (i = 0; argc > 2;) { s = argv[1]; if (*s != '-') break; diff -r dec20e5fa283 -r 62104f2454a3 syslinux/stuff/iso2exe/iso2exe.sh --- a/syslinux/stuff/iso2exe/iso2exe.sh Sun Feb 21 19:26:01 2016 +0000 +++ b/syslinux/stuff/iso2exe/iso2exe.sh Mon Feb 22 21:29:18 2016 +0100 @@ -46,7 +46,8 @@ # 2> /dev/null && echo "Store mount.posixovl ($(wc -c \ # < /usr/sbin/mount.posixovl) bytes) ..." find $TMP -type f -print0 | xargs -0 chmod +x - ( cd $TMP ; find * | cpio -o -H newc ) | compress $TMP/rootfs.gz + ( cd $TMP ; find * | grep -v rootfs.gz | cpio -o -H newc ) | \ + compress $TMP/rootfs.gz SIZE=$(wc -c < $TMP/rootfs.gz) store 24 $SIZE $1 OFS=$(( $OFS - $SIZE )) @@ -245,9 +246,9 @@ #ifndef __MSDOS__ static char $name[] = { /* head */ -$(hexdump -v -n $HSZ -e '" " 16/1 "0x%02X, "' -e '" // %04.4_ax |" 16/1 "%_p" "| \n"' $DATA | sed 's/ 0x ,/ /g') +$(hexdump -v -n $HSZ -e '" " 16/1 "0x%02X, "' -e '" /* %04.4_ax */ \n"' $DATA | sed 's/ 0x ,/ /g') /* tail */ -$(hexdump -v -s $OFS -e '" " 16/1 "0x%02X, "' -e '" // %04.4_ax |" 16/1 "%_p" "| \n"' $DATA | sed 's/ 0x ,/ /g') +$(hexdump -v -s $OFS -e '" " 16/1 "0x%02X, "' -e '" /* %04.4_ax */ \n"' $DATA | sed 's/ 0x ,/ /g') /* These strange constants are defined in RFC 1321 as T[i] = (int)(4294967296.0 * fabs(sin(i))), i=1..64 @@ -294,14 +295,12 @@ while read tag str; do if [ "$mode" == "data" ]; then echo -en "$str\0" | hexdump -v -e '" " 16/1 "0x%02X, "' \ - -e '" // %04.4_ax |" 16/1 "%_p" "| \n"' | \ + -e '" /* %04.4_ax */ \n"' | \ sed 's/ 0x ,/ /g' else if [ $ofs -eq 0 ]; then cat <