diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2020-04-03 23:07:16 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-04-04 08:59:51 +0200 |
commit | df9b2cc1642e4d976aa5f9dbcd3e953d8717a265 (patch) | |
tree | 5ef03d25186635cd42d30cbaf0a36d64c220c2f9 /source/ap | |
parent | fe5dc86ceeef97ef22fa8759bef4715e6d42865d (diff) | |
download | current-df9b2cc1642e4d976aa5f9dbcd3e953d8717a265.tar.gz |
Fri Apr 3 23:07:16 UTC 202020200403230716
ap/lsof-4.93.2-x86_64-2.txz: Rebuilt.
Fixed the manpage. Thanks to kaott.
ap/sc-7.16-x86_64-7.txz: Rebuilt.
Brought back the classic SC. Thanks to dive.
d/Cython-0.29.16-x86_64-1.txz: Upgraded.
d/mercurial-5.3.2-x86_64-1.txz: Upgraded.
l/gtk+3-3.24.17-x86_64-1.txz: Upgraded.
n/dhcpcd-8.1.7-x86_64-1.txz: Upgraded.
n/iproute2-5.6.0-x86_64-1.txz: Upgraded.
x/libdrm-2.4.101-x86_64-1.txz: Upgraded.
x/mesa-20.0.4-x86_64-1.txz: Upgraded.
xap/mozilla-firefox-68.6.1esr-x86_64-1.txz: Upgraded.
This release contains critical security fixes and improvements.
"Under certain conditions, when running the nsDocShell destructor, a race
condition can cause a use-after-free. We are aware of targeted attacks in
the wild abusing this flaw."
"Under certain conditions, when handling a ReadableStream, a race condition
can cause a use-after-free. We are aware of targeted attacks in the wild
abusing this flaw."
For more information, see:
https://www.mozilla.org/en-US/firefox/68.6.1/releasenotes/
https://www.mozilla.org/en-US/security/advisories/mfsa2020-11/
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6819
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6820
(* Security fix *)
Diffstat (limited to 'source/ap')
-rwxr-xr-x | source/ap/lsof/lsof.SlackBuild | 15 | ||||
-rw-r--r-- | source/ap/sc/sc-7.16-3.diff | 538 | ||||
-rw-r--r-- | source/ap/sc/sc-7.16.lsm | 17 | ||||
-rwxr-xr-x | source/ap/sc/sc.SlackBuild | 127 | ||||
-rw-r--r-- | source/ap/sc/slack-desc | 19 |
5 files changed, 713 insertions, 3 deletions
diff --git a/source/ap/lsof/lsof.SlackBuild b/source/ap/lsof/lsof.SlackBuild index ece6171b..f7665ebf 100755 --- a/source/ap/lsof/lsof.SlackBuild +++ b/source/ap/lsof/lsof.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2008, 2009, 2010, 2018, 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=lsof VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -70,7 +70,16 @@ cat lsof > $PKG/usr/bin/lsof # No, NOT suid. chmod 755 $PKG/usr/bin/lsof mkdir -p $PKG/usr/man/man8 -cat Lsof.8 | gzip -9c > $PKG/usr/man/man8/lsof.8.gz +# Grab the version number: +# When copying the manpage, eliminate the line requiring the "version" file to +# be present, and sed a placeholder for the version into place: +cat Lsof.8 | grep -v "^.so ./version$" | sed 's|\\\*(VN|%VERSION%|g' > $PKG/usr/man/man8/lsof.8 +# Get the revision number: +LSOFVER="$(cat version | cut -f 3 -d ' ')" +# Make the replacement: +sed -i "s/%VERSION%/$LSOFVER/g" $PKG/usr/man/man8/lsof.8 +# Compress the manpage: +gzip -9 $PKG/usr/man/man8/lsof.8 mkdir -p $PKG/usr/doc/lsof-$VERSION cp -a 00* $PKG/usr/doc/lsof-$VERSION chmod 644 $PKG/usr/doc/lsof-$VERSION/* diff --git a/source/ap/sc/sc-7.16-3.diff b/source/ap/sc/sc-7.16-3.diff new file mode 100644 index 00000000..2de64aae --- /dev/null +++ b/source/ap/sc/sc-7.16-3.diff @@ -0,0 +1,538 @@ +Description: Upstream changes introduced in version 7.16-3 + This patch has been created by dpkg-source during the package build. + Here's the last changelog entry, hopefully it gives details on why + those changes were made: + . + sc (7.16-3) unstable; urgency=low + . + * Changed maintainer to the new email address, recursively. + * Fixed old changelog entries' bug closing method + * Add patches supplied by Carsten Hey + + Stop compressing tutorial.sc file (closes: #514777) + + Use default colors (closes: #514775) + * Bump Standards to 3.8.4. + * Bump dependency of debhelper. + . + The person named in the Author field signed this changelog entry. +Author: Adam Majer <adamm@zombino.com> +Bug-Debian: http://bugs.debian.org/514775 +Bug-Debian: http://bugs.debian.org/514777 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: <vendor|upstream|other>, <url of original patch> +Bug: <url in upstream bugtracker> +Bug-Debian: http://bugs.debian.org/<bugnumber> +Forwarded: <no|not-needed|url proving that it has been forwarded> +Reviewed-By: <name and email of someone who approved the patch> +Last-Update: <YYYY-MM-DD> + +--- sc-7.16.orig/abbrev.c ++++ sc-7.16/abbrev.c +@@ -19,10 +19,15 @@ + #include <stdio.h> + #include <stdlib.h> + #include <ctype.h> ++#include <curses.h> ++#include <unistd.h> + #include "sc.h" + + static struct abbrev *abbr_base; + ++int are_abbrevs(void); ++ ++ + void + add_abbr(char *string) + { +@@ -87,7 +92,7 @@ add_abbr(char *string) + } + } + +- if (expansion == NULL) ++ if (expansion == NULL){ + if ((a = find_abbr(string, strlen(string), &prev))) { + error("abbrev \"%s %s\"", a->abbr, a->exp); + return; +@@ -95,6 +100,7 @@ add_abbr(char *string) + error("abreviation \"%s\" doesn't exist", string); + return; + } ++ } + + if (find_abbr(string, strlen(string), &prev)) + del_abbr(string); +@@ -122,7 +128,7 @@ void + del_abbr(char *abbrev) + { + struct abbrev *a; +- struct abbrev **prev; ++ struct abbrev **prev=0; + + if (!(a = find_abbr(abbrev, strlen(abbrev), prev))) + return; +--- sc-7.16.orig/cmds.c ++++ sc-7.16/cmds.c +@@ -478,7 +478,7 @@ yankrow(int arg) + int i, qtmp; + char buf[50]; + struct frange *fr; +- struct ent *obuf; ++ struct ent *obuf=0; + + if ((fr = find_frange(currow, curcol))) + rs = fr->or_right->row - currow + 1; +@@ -535,7 +535,7 @@ yankcol(int arg) + int cs = maxcol - curcol + 1; + int i, qtmp; + char buf[50]; +- struct ent *obuf; ++ struct ent *obuf=0; + + if (cs - arg < 0) { + cs = cs > 0 ? cs : 0; +@@ -810,7 +810,7 @@ pullcells(int to_insert) + + if (to_insert == 'r') { + insertrow(numrows, 0); +- if (fr = find_frange(currow, curcol)) ++ if ((fr = find_frange(currow, curcol))) + deltac = fr->or_left->col - mincol; + else { + for (i = 0; i < numrows; i++) +@@ -2279,7 +2279,7 @@ copye(register struct enode *e, int Rdel + ret->e.r.right.vp = lookat(newrow, newcol); + ret->e.r.right.vf = e->e.r.right.vf; + } else { +- struct enode *temprange; ++ struct enode *temprange=0; + + if (freeenodes) { + ret = freeenodes; +@@ -2337,8 +2337,7 @@ copye(register struct enode *e, int Rdel + break; + case 'f': + case 'F': +- if (range && ret->op == 'F' || +- !range && ret->op == 'f') ++ if ((range && ret->op == 'F') || (!range && ret->op == 'f')) + Rdelta = Cdelta = 0; + ret->e.o.left = copye(e->e.o.left, Rdelta, Cdelta, + r1, c1, r2, c2, transpose); +@@ -2798,7 +2797,7 @@ void + write_cells(register FILE *f, int r0, int c0, int rn, int cn, int dr, int dc) + { + register struct ent **pp; +- int r, c, rs, cs, mf; ++ int r, c, rs=0, cs=0, mf; + char *dpointptr; + + mf = modflg; +@@ -2861,12 +2860,12 @@ writefile(char *fname, int r0, int c0, i + if ((plugin = findplugin(p+1, 'w')) != NULL) { + if (!plugin_exists(plugin, strlen(plugin), save + 1)) { + error("plugin not found"); +- return; ++ return -1; + } + *save = '|'; + if ((strlen(save) + strlen(fname) + 20) > PATHLEN) { + error("Path too long"); +- return; ++ return -1; + } + sprintf(save + strlen(save), " %s%d:", coltoa(c0), r0); + sprintf(save + strlen(save), "%s%d \"%s\"", coltoa(cn), rn, fname); +@@ -2883,13 +2882,14 @@ writefile(char *fname, int r0, int c0, i + } + #endif /* VMS */ + +- if (*fname == '\0') ++ if (*fname == '\0'){ + if (isatty(STDOUT_FILENO) || *curfile != '\0') + fname = curfile; + else { + write_fd(stdout, r0, c0, rn, cn); + return (0); + } ++ } + + #ifdef MSDOS + namelen = 12; +@@ -2981,12 +2981,12 @@ readfile(char *fname, int eraseflg) + if ((plugin = findplugin(p+1, 'r')) != NULL) { + if (!(plugin_exists(plugin, strlen(plugin), save + 1))) { + error("plugin not found"); +- return; ++ return -1; + } + *save = '|'; + if ((strlen(save) + strlen(fname) + 2) > PATHLEN) { + error("Path too long"); +- return; ++ return -1; + } + sprintf(save + strlen(save), " \"%s\"", fname); + eraseflg = 0; +--- sc-7.16.orig/color.c ++++ sc-7.16/color.c +@@ -19,6 +19,7 @@ + + #include <curses.h> + #include <ctype.h> ++#include <unistd.h> + #include "sc.h" + + /* a linked list of free [struct ent]'s, uses .next as the pointer */ +@@ -30,6 +31,8 @@ static struct crange *color_base; + void + initcolor(int colornum) + { ++ use_default_colors(); ++ + if (!colornum) { + int i; + +--- sc-7.16.orig/frame.c ++++ sc-7.16/frame.c +@@ -18,6 +18,9 @@ + + #include <stdio.h> + #include <ctype.h> ++#include <stdlib.h> ++#include <curses.h> ++#include <unistd.h> + #include "sc.h" + + static struct frange *frame_base; +--- sc-7.16.orig/help.c ++++ sc-7.16/help.c +@@ -11,6 +11,7 @@ char *header = " Quick Reference"; + char *revision = "$Revision: 7.16 $"; + #else + #include <curses.h> ++#include <unistd.h> + #include "sc.h" + #endif /* QREF */ + +--- sc-7.16.orig/interp.c ++++ sc-7.16/interp.c +@@ -1572,12 +1572,12 @@ void + copy(struct ent *dv1, struct ent *dv2, struct ent *v1, struct ent *v2) + { + struct ent *p; +- struct ent *n; ++/* struct ent *n;*/ + static int minsr = -1, minsc = -1; + static int maxsr = -1, maxsc = -1; + int mindr, mindc; + int maxdr, maxdc; +- int vr, vc; ++/* int vr, vc;*/ + int r, c; + int deltar, deltac; + +@@ -2066,7 +2066,7 @@ str_search(char *s, int firstrow, int fi + *line = '\0'; + } + } +- if (!col_hidden[c]) ++ if (!col_hidden[c]){ + if (gs.g_type == G_STR) { + if (p && p->label + #if defined(REGCOMP) +@@ -2099,6 +2099,7 @@ str_search(char *s, int firstrow, int fi + #endif + #endif + break; ++ } + if (r == endr && c == endc) { + error("String not found"); + #if defined(REGCOMP) +@@ -2471,13 +2472,11 @@ clearent(struct ent *v) + int + constant(register struct enode *e) + { +- return ( +- e == NULL ++ return e == NULL + || e->op == O_CONST + || e->op == O_SCONST +- || e->op == 'm' && constant(e->e.o.left) +- || ( +- e->op != O_VAR ++ || (e->op == 'm' && constant(e->e.o.left)) ++ || (e->op != O_VAR + && !(e->op & REDUCE) + && constant(e->e.o.left) + && constant(e->e.o.right) +@@ -2491,9 +2490,7 @@ constant(register struct enode *e) + && e->op != LASTCOL + && e->op != NUMITER + && e->op != FILENAME +- && optimize +- ) +- ); ++ && optimize ); + } + + void +--- sc-7.16.orig/lex.c ++++ sc-7.16/lex.c +@@ -34,6 +34,8 @@ + #include <signal.h> + #include <setjmp.h> + #include <ctype.h> ++#include <unistd.h> ++#include <math.h> + #include "sc.h" + + #ifdef NONOTIMEOUT +@@ -107,7 +109,7 @@ int + yylex() + { + char *p = line + linelim; +- int ret; ++ int ret=0; + static int isfunc = 0; + static bool isgoto = 0; + static bool colstate = 0; +@@ -326,7 +328,7 @@ plugin_exists(char *name, int len, char + strcpy((char *)path, HomeDir); + strcat((char *)path, "/.sc/plugins/"); + strncat((char *)path, name, len); +- if (fp = fopen((char *)path, "r")) { ++ if ((fp = fopen((char *)path, "r"))) { + fclose(fp); + return 1; + } +@@ -334,7 +336,7 @@ plugin_exists(char *name, int len, char + strcpy((char *)path, LIBDIR); + strcat((char *)path, "/plugins/"); + strncat((char *)path, name, len); +- if (fp = fopen((char *)path, "r")) { ++ if ((fp = fopen((char *)path, "r"))) { + fclose(fp); + return 1; + } +--- sc-7.16.orig/Makefile ++++ sc-7.16/Makefile +@@ -32,7 +32,7 @@ MANMODE=644 + + # This is where the library file (tutorial) goes. + #LIBDIR=/usr/local/share/$(name) # reno +-LIBDIR=${prefix}/lib/$(name) ++LIBDIR=${prefix}/share/doc/$(name) + LIBRARY=-DLIBDIR=\"${LIBDIR}\" + + # Set SIMPLE for lex.c if you don't want arrow keys or lex.c blows up +--- sc-7.16.orig/range.c ++++ sc-7.16/range.c +@@ -18,6 +18,8 @@ + + #include <stdio.h> + #include <ctype.h> ++#include <unistd.h> ++#include <curses.h> + #include "sc.h" + + static struct range *rng_base; +--- sc-7.16.orig/sc.c ++++ sc-7.16/sc.c +@@ -212,7 +212,7 @@ flush_saved() + + if (dbidx < 0) + return; +- if (p = delbuf[dbidx]) { ++ if ((p = delbuf[dbidx])) { + scxfree(delbuffmt[dbidx]); + delbuffmt[dbidx] = NULL; + } +@@ -845,7 +845,7 @@ main (int argc, char **argv) + break; + case 'C': + color = !color; +- if (has_colors()) ++ if (has_colors()){ + if (color) { + attron(COLOR_PAIR(1)); + bkgd(COLOR_PAIR(1) | ' '); +@@ -853,6 +853,7 @@ main (int argc, char **argv) + attron(COLOR_PAIR(0)); + bkgd(COLOR_PAIR(0) | ' '); + } ++ } + error("Color %sabled.", color ? "en" : "dis"); + break; + case 'N': +--- sc-7.16.orig/sc.h ++++ sc-7.16/sc.h +@@ -612,6 +612,9 @@ extern int pagesize; /* If nonzero, use + extern int rowlimit; + extern int collimit; + ++void yankr(struct ent *v1, struct ent *v2); ++ ++ + #if BSD42 || SYSIII + + #ifndef cbreak +--- sc-7.16.orig/screen.c ++++ sc-7.16/screen.c +@@ -234,11 +234,12 @@ update(int anychanged) /* did any cell + i = stcol; + lcols = 0; + col = rescol + frcols; +- if (fr && stcol >= fr->or_left->col) ++ if (fr && stcol >= fr->or_left->col){ + if (stcol < fr->ir_left->col) + i = fr->or_left->col; + else + col += flcols; ++ } + for (; (col + fwidth[i] < cols-1 || col_hidden[i] || i < curcol) && + i < maxcols; i++) { + lcols++; +@@ -328,11 +329,12 @@ update(int anychanged) /* did any cell + i = stcol; + lcols = 0; + col = rescol + frcols; +- if (fr && stcol >= fr->or_left->col) ++ if (fr && stcol >= fr->or_left->col){ + if (stcol < fr->ir_left->col) + i = fr->or_left->col; + else + col += flcols; ++ } + for (; (col + fwidth[i] < cols-1 || col_hidden[i] || i < curcol) && + i < maxcols; i++) { + lcols++; +@@ -377,11 +379,12 @@ update(int anychanged) /* did any cell + i = strow; + rows = 0; + row = RESROW + fbrows; +- if (fr && strow >= fr->or_left->row) ++ if (fr && strow >= fr->or_left->row){ + if (strow < fr->ir_left->row) + i = fr->or_left->row; + else + row += ftrows; ++ } + for (; (row < lines || row_hidden[i] || i < currow) && i < maxrows; + i++) { + rows++; +@@ -460,11 +463,12 @@ update(int anychanged) /* did any cell + i = strow; + rows = 0; + row = RESROW + fbrows; +- if (fr && strow >= fr->or_left->row) ++ if (fr && strow >= fr->or_left->row){ + if (strow < fr->ir_left->row) + i = fr->or_left->row; + else + row += ftrows; ++ } + for (; (row < lines || row_hidden[i] || i < currow) && i < maxrows; + i++) { + rows++; +--- sc-7.16.orig/sort.c ++++ sc-7.16/sort.c +@@ -19,6 +19,8 @@ + #include <stdio.h> + #include <ctype.h> + #include <stdlib.h> ++#include <unistd.h> ++#include <curses.h> + #include "sc.h" + + int compare(const void *row1, const void *row2); +--- sc-7.16.orig/vi.c ++++ sc-7.16/vi.c +@@ -17,6 +17,8 @@ + #include <curses.h> + #include <ctype.h> + #include <stdlib.h> ++#include <unistd.h> ++#include <sys/wait.h> + #include "sc.h" + + #if defined(REGCOMP) +@@ -40,7 +42,7 @@ void gotobottom(); + + #define istext(a) (isalnum(a) || ((a) == '_')) + +-#define bool int ++/*#define bool int*/ + #define true 1 + #define false 0 + +@@ -667,8 +669,10 @@ dotab() + static struct range *nextmatch; + int len; + +- if (linelim > 0 && isalnum(line[linelim-1]) || line[linelim-1] == '_' || +- (completethis && line[linelim-1] == ' ')) { ++ if ((linelim > 0 && isalnum(line[linelim-1])) || ++ line[linelim-1] == '_' || ++ (completethis && line[linelim-1] == ' ')) { ++ + if (!completethis) { + for (completethis = line + linelim - 1; isalnum(*completethis) || + *completethis == '_'; completethis--) /* */; +@@ -715,7 +719,7 @@ void + showdr() + { + int minsr, minsc, maxsr, maxsc; +- char *p; ++ /*char *p;*/ + char r[12]; + struct frange *fr = find_frange(currow, curcol); + +@@ -1566,7 +1570,7 @@ static void + search_again(bool reverse) + { + int prev_match; +- int found_it; ++ int found_it=0; + #if !defined(REGCOMP) && !defined(RE_COMP) && !defined(REGCMP) + char *look_here; + int do_next; +@@ -1777,7 +1781,7 @@ to_char(int arg, int n) + static void + match_paren() + { +- register int i; ++ /*register int i;*/ + int nest = 1; + int tmp = linelim; + +--- sc-7.16.orig/vmtbl.c ++++ sc-7.16/vmtbl.c +@@ -16,6 +16,7 @@ + # include <curses.h> + #endif /* PSC */ + ++#include <unistd.h> + #include "sc.h" + + /* +--- sc-7.16.orig/xmalloc.c ++++ sc-7.16/xmalloc.c +@@ -4,11 +4,12 @@ + */ + + #include <curses.h> ++#include <stdlib.h> + #include "sc.h" + +-extern char *malloc(); ++/* extern char *malloc(); + extern char *realloc(); +-extern void free(); ++extern void free(); */ + void fatal(); + + #ifdef SYSV3 diff --git a/source/ap/sc/sc-7.16.lsm b/source/ap/sc/sc-7.16.lsm new file mode 100644 index 00000000..e37be385 --- /dev/null +++ b/source/ap/sc/sc-7.16.lsm @@ -0,0 +1,17 @@ +Begin4 +Title: sc Spreadsheet Calculator +Version: 7.16 +Entered-date: 2002-9-19 +Description: sc is a free curses-based spreadsheet program that uses + key bindings similar to vi and less. +Keywords: spreadsheet calculator console textmode curses ncurses +Author: Too numerous to mention. +Maintained-by: nrocinu@myrealbox.com (Chuck Martin) +Primary-site: ibiblio.org /pub/Linux/apps/financial/spreadsheet +Alternate-site: +Original-site: +Platforms: Pre-7.x versions presumably worked on any Unix or Unix + clone, as well as VMS and DOS. Hopefully, this is still + true, but it's only been tested on Linux. +Copying-policy: Public domain +End diff --git a/source/ap/sc/sc.SlackBuild b/source/ap/sc/sc.SlackBuild new file mode 100755 index 00000000..39fa435c --- /dev/null +++ b/source/ap/sc/sc.SlackBuild @@ -0,0 +1,127 @@ +#!/bin/bash + +# Copyright 2008, 2009, 2015, 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=sc +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-7} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +# Old software, modern compiler: +zcat $CWD/sc-7.16-3.diff.gz | patch -p1 --verbose || exit 1 + +# Build: +make $NUMJOBS || exit 1 + +# Install: +mkdir -p $PKG/usr/bin +cat sc > $PKG/usr/bin/sc +cat scqref > $PKG/usr/bin/scqref +cat psc > $PKG/usr/bin/psc +mkdir -p $PKG/usr/man/man1 +name=sc NAME=SC LIBDIR=/usr/lib${LIBDIRSUFFIX}/sc sh torev sc.doc > sc.1 +name=sc NAME=SC LIBDIR=/usr/lib${LIBDIRSUFFIX}/sc sh torev psc.doc > psc.1 +cat sc.1 | gzip -9c > $PKG/usr/man/man1/sc.1.gz +cat psc.1 | gzip -9c > $PKG/usr/man/man1/psc.1.gz +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/sc +cat tutorial.sc > $PKG/usr/lib${LIBDIRSUFFIX}/sc/tutorial.sc + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/sc-$VERSION +cp -a CHANGES README TODO SC.MACROS $PKG/usr/doc/sc-$VERSION +chmod 644 $PKG/usr/doc/sc-$VERSION/* + +# If there's a CHANGES file, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r CHANGES ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES + touch -r CHANGES $DOCSDIR/CHANGES +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/ap/sc/slack-desc b/source/ap/sc/slack-desc new file mode 100644 index 00000000..9d98227c --- /dev/null +++ b/source/ap/sc/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +sc: sc (spreadsheet calculator) +sc: +sc: This is a simple curses-based spreadsheet program. +sc: +sc: +sc: +sc: +sc: +sc: +sc: +sc: |