Commit

Add mystuff; remove patches for unused ports
Daniel Moch committed 1 year ago (Tree)

Diffstat

 .gitignore | 12 +
 mystuff/cgit-vargit/Makefile | 38 +++
 mystuff/cgit-vargit/distinfo | 4 
 mystuff/cgit-vargit/patches/patch-Makefile | 30 ++
 mystuff/cgit-vargit/patches/patch-cgit_mk | 10 
 mystuff/cgit-vargit/patches/patch-filter_c | 19 +
 mystuff/cgit-vargit/patches/patch-setup_c | 20 +
 mystuff/cgit-vargit/pkg/DESCR | 2 
 mystuff/cgit-vargit/pkg/PLIST | 11 
 mystuff/cgit-vargit/pkg/README | 72 ++++++
 mystuff/git-http-backend/Makefile | 46 ++++
 mystuff/git-http-backend/distinfo | 2 
 mystuff/git-http-backend/patches/patch-builtin_gc_c | 32 ++
 mystuff/git-http-backend/patches/patch-config_mak_uname | 15 +
 mystuff/git-http-backend/patches/patch-thread-utils_c | 30 ++
 mystuff/git-http-backend/pkg/DESCR | 2 
 mystuff/git-http-backend/pkg/PLIST | 10 
 mystuff/git-http-backend/pkg/README | 6 
 mystuff/shrt/Makefile | 17 +
 mystuff/shrt/distinfo | 2 
 mystuff/shrt/patches/patch-Makefile | 11 
 mystuff/shrt/patches/patch-config.h | 13 +
 mystuff/shrt/patches/patch-config.mk | 12 +
 mystuff/shrt/pkg/DESCR | 4 
 mystuff/shrt/pkg/PLIST | 4 
 mystuff/txt2html/Makefile | 17 +
 mystuff/txt2html/distinfo | 2 
 mystuff/txt2html/patches/patch-config.mk | 10 
 mystuff/txt2html/pkg/DESCR | 2 
 mystuff/txt2html/pkg/PLIST | 1 
 www/surf/patches/patch-config_def_h | 123 -----------
 x11/dwm/patches/patch-config_def_h | 110 ---------
 x11/st/patches/patch-config_def_h | 82 -------

.gitignore (created)

1 +/bulk/
2 +/distfiles/
3 +/locks/
4 +/logs/
5 +/lost+found/
6 +/openbsd-wip/
7 +/packages/
8 +/plist/
9 +/pobj/
10 +/sqlports/
11 +/sqlports-journal/
12 +/update/

mystuff/cgit-vargit/Makefile (created)

1 +COMMENT = web frontend for git repositories
2 +
3 +V = 1.2.3
4 +DISTNAME = cgit-${V}
5 +CATEGORIES = mystuff www devel
6 +FULLPKGNAME = cgit-vargit-${V}
7 +
8 +# upstream has git 2.25.1 called out as the specific version to build against
9 +# https://git.zx2c4.com/cgit/commit/?id=fde897b8171ed2e925b44ec6f69590ec07241017
10 +DISTFILES = ${DISTNAME}.tar.xz:0 \
11 + git-2.25.1.tar.gz:1
12 +
13 +MASTER_SITES0 = https://git.zx2c4.com/cgit/snapshot/
14 +MASTER_SITES1 = https://www.kernel.org/pub/software/scm/git/
15 +HOMEPAGE = https://git.zx2c4.com/cgit/about/
16 +
17 +# GPLv2
18 +PERMIT_PACKAGE = Yes
19 +
20 +USE_GMAKE = yes
21 +
22 +BUILD_DEPENDS = textproc/asciidoc
23 +LIB_DEPENDS = converters/libiconv
24 +
25 +PREFIX = ${VARBASE}
26 +MAKE_FLAGS += V=1 NO_GETTEXT=1 NO_LUA=1 LDFLAGS+='${STATIC} -L${LOCALBASE}/lib'
27 +
28 +ALL_TARGET = all doc-man
29 +
30 +post-extract:
31 + rmdir ${WRKSRC}/git
32 + mv ${WRKDIR}/git-* ${WRKSRC}/git
33 +
34 +post-install:
35 + mv ${PREFIX}/www/htdocs ${PREFIX}/www/cgit
36 + ${INSTALL_MAN} ${WRKBUILD}/cgitrc.5 ${WRKINST}${LOCALBASE}/man/man5
37 +
38 +.include <bsd.port.mk>

mystuff/cgit-vargit/distinfo (created)

1 +SHA256 (cgit-1.2.3.tar.xz) = Wl8S0vZr02Kci8ED7I7CMBspLpcVXTCpphiE6kFKbaQ=
2 +SHA256 (git-2.25.1.tar.gz) = SZmuDubMffsoDXBR45qCpWMLAMHYzVSJDwe0txk9Jao=
3 +SIZE (cgit-1.2.3.tar.xz) = 90632
4 +SIZE (git-2.25.1.tar.gz) = 9026631

mystuff/cgit-vargit/patches/patch-Makefile (created)

1 +Index: Makefile
2 +--- Makefile.orig
3 ++++ Makefile
4 +@@ -2,11 +2,11 @@ all::
5 +
6 + CGIT_VERSION = v1.2.1
7 + CGIT_SCRIPT_NAME = cgit.cgi
8 +-CGIT_SCRIPT_PATH = /var/www/htdocs/cgit
9 +-CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
10 +-CGIT_CONFIG = /etc/cgitrc
11 +-CACHE_ROOT = /var/cache/cgit
12 +-prefix = /usr/local
13 +-libdir = $(prefix)/lib
14 ++CGIT_SCRIPT_PATH = /var/git/cgi-bin
15 ++CGIT_DATA_PATH = /var/www/htdocs
16 ++CGIT_CONFIG = /conf/cgitrc
17 ++CACHE_ROOT = /tmp/cgit
18 ++prefix = ${PREFIX}
19 ++libdir = $(prefix)/git/lib
20 + filterdir = $(libdir)/cgit/filters
21 + docdir = $(prefix)/share/doc/cgit
22 +@@ -90,8 +90,6 @@ install: all
23 + $(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png
24 + $(INSTALL) -m 0644 favicon.ico $(DESTDIR)$(CGIT_DATA_PATH)/favicon.ico
25 + $(INSTALL) -m 0644 robots.txt $(DESTDIR)$(CGIT_DATA_PATH)/robots.txt
26 +- $(INSTALL) -m 0755 -d $(DESTDIR)$(filterdir)
27 +- $(COPYTREE) filters/* $(DESTDIR)$(filterdir)
28 +
29 + install-doc: install-man install-html install-pdf
30 +

mystuff/cgit-vargit/patches/patch-cgit_mk (created)

1 +--- cgit.mk.orig Sun Jul 14 23:18:05 2013
2 ++++ cgit.mk Sun Jul 14 23:18:39 2013
3 +@@ -17,6 +17,7 @@ $(CGIT_PREFIX)VERSION: force-version
4 +
5 + # CGIT_CFLAGS is a separate variable so that we can track it separately
6 + # and avoid rebuilding all of Git when these variables change.
7 ++CGIT_CFLAGS += -L${LOCALBASE}/include
8 + CGIT_CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
9 + CGIT_CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
10 + CGIT_CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'

mystuff/cgit-vargit/patches/patch-filter_c (created)

1 +Wtf.
2 +Index: filter.c
3 +--- filter.c.orig
4 ++++ filter.c
5 +@@ -149,12 +149,13 @@ static struct cgit_filter *current_write_filter = NULL
6 +
7 + void cgit_init_filters(void)
8 + {
9 ++ return;
10 + libc_write = dlsym(RTLD_NEXT, "write");
11 + if (!libc_write)
12 + die("Could not locate libc's write function");
13 + }
14 +
15 +-ssize_t write(int fd, const void *buf, size_t count)
16 ++ssize_t wtf__write(int fd, const void *buf, size_t count)
17 + {
18 + if (fd != STDOUT_FILENO || !filter_write)
19 + return libc_write(fd, buf, count);

mystuff/cgit-vargit/patches/patch-setup_c (created)

1 +Dont openbsd dev/null, doesnt exist in the default chroot
2 +
3 +--- git/setup.c.orig Wed Mar 1 21:01:06 2017
4 ++++ git/setup.c Wed Mar 1 21:01:56 2017
5 +@@ -1024,6 +1024,7 @@ const char *resolve_gitdir(const char *suspect)
6 + /* if any standard file descriptor is missing open it to /dev/null */
7 + void sanitize_stdfds(void)
8 + {
9 ++#if 0
10 + int fd = open("/dev/null", O_RDWR, 0);
11 + while (fd != -1 && fd < 2)
12 + fd = dup(fd);
13 +@@ -1031,6 +1032,7 @@ void sanitize_stdfds(void)
14 + die_errno("open /dev/null or dup failed");
15 + if (fd > 2)
16 + close(fd);
17 ++#endif
18 + }
19 +
20 + int daemonize(void)

mystuff/cgit-vargit/pkg/DESCR (created)

1 +This is an attempt to create a fast web interface for the git scm,
2 +using a builtin cache to decrease server io-pressure.

mystuff/cgit-vargit/pkg/PLIST (created)

1 +@group daemon
2 +@bin git/cgi-bin/cgit.cgi
3 +@group
4 +www/cgit/
5 +www/cgit/cgit.css
6 +www/cgit/cgit.png
7 +www/cgit/favicon.ico
8 +www/cgit/robots.txt
9 +@cwd ${LOCALBASE}
10 +@man man/man5/cgitrc.5
11 +share/doc/pkg-readmes/${PKGSTEM}

mystuff/cgit-vargit/pkg/README (created)

1 ++-----------------------------------------------------------------------
2 +| Running ${PKGSTEM} on OpenBSD
3 ++-----------------------------------------------------------------------
4 +
5 +Cgit config
6 +===========
7 +By default, the cgitrc config file is searched in ${PREFIX}/conf/cgitrc.
8 +Refer to cgitrc(5) for the syntax.
9 +
10 +Webserver config
11 +================
12 +
13 +OpenBSD httpd
14 +-------------
15 +server "default" {
16 + listen on egress port 80
17 +
18 + # don't serve static files from cgit CGI: cgit.css and cgit.png
19 + location "/cgit.*" {
20 + root "/cgit"
21 + no fastcgi
22 + }
23 + root "/cgi-bin/cgit.cgi"
24 + fastcgi socket "/run/slowcgi.sock"
25 +}
26 +
27 +Nginx
28 +-----
29 +An example nginx config snippet is provided below, to run with
30 +slowcgi:
31 +
32 +server {
33 + server_name cgit.example.com;
34 + access_log logs/cgit-access main;
35 + error_log logs/cgit-error warn;
36 + location ~ /cgit.(png|css) {
37 + root /var/www/htdocs;
38 + }
39 + location / {
40 + rewrite /(.*) /cgi-bin/cgit.cgi/$1;
41 + }
42 + location /cgi-bin/ {
43 + fastcgi_pass unix:run/slowcgi.sock;
44 + fastcgi_split_path_info ^(/cgi-bin/[^/]+)(.*);
45 + fastcgi_param PATH_INFO $fastcgi_path_info;
46 + include fastcgi_params;
47 + }
48 +}
49 +
50 +Apache config
51 +-------------
52 +
53 +This config snippet works with Apache:
54 +
55 +ScriptAlias /cgit /cgi-bin/cgit.cgi
56 +<Location "/cgit">
57 + AllowOverride None
58 + Options +ExecCGI
59 + Order allow,deny
60 + Allow from all
61 +</Location>
62 +
63 +
64 +snapshots
65 +---------
66 +Nginx and OpenBSD httpd use chroot(2).
67 +
68 +For .tar.gz snapshot support a static binary in $chroot/bin/gzip is required.
69 +
70 + cd /usr/src/usr.bin/compress
71 + make clean && make LDFLAGS="-static -pie"
72 + cp obj/compress $chroot/bin/gzip

mystuff/git-http-backend/Makefile (created)

1 +COMMENT = CGI server for the distributed version control system
2 +
3 +V = 2.37.3
4 +DISTNAME = git-${V}
5 +CATEGORIES = mystuff www
6 +FULLPKGNAME = git-http-backend-${V}
7 +
8 +HOMEPAGE = https://git-scm.com/
9 +
10 +# GPLv2 only
11 +PERMIT_PACKAGE = Yes
12 +
13 +MASTER_SITES = https://www.kernel.org/pub/software/scm/git/
14 +
15 +CONFIGURE_STYLE = gnu autoconf no-autoheader
16 +AUTOCONF_VERSION = 2.71
17 +CONFIGURE_ARGS = --prefix=${PREFIX} \
18 + --libexecdir=/bin \
19 + --without-openssl \
20 + --without-curl \
21 + --without-tcltk
22 +CONFIGURE_ENV = NO_OPENSSL=1 NO_CURL=1 \
23 + CFLAGS="${CFLAGS} -static" \
24 + LDFLAGS="-L${LOCALBASE}/lib" \
25 + DIFF=diff TAR=tar
26 +
27 +PREFIX = /var/git
28 +
29 +USE_GMAKE = Yes
30 +
31 +TEST_DEPENDS = archivers/unzip \
32 + archivers/zip \
33 + devel/cvsps \
34 + devel/subversion,-perl
35 +
36 +do-install:
37 + install -Dm755 ${WRKBUILD}/git-http-backend ${WRKINST}/var/git/cgi-bin/git-http-backend
38 + install -Dm755 ${WRKBUILD}/git ${WRKINST}/var/git/bin/git
39 + install -Dm755 ${WRKBUILD}/git-fetch-pack ${WRKINST}/var/git/bin/git-fetch-pack
40 + install -Dm755 ${WRKBUILD}/git-index-pack ${WRKINST}/var/git/bin/git-index-pack
41 + install -Dm755 ${WRKBUILD}/git-receive-pack ${WRKINST}/var/git/bin/git-receive-pack
42 + install -Dm755 ${WRKBUILD}/git-send-pack ${WRKINST}/var/git/bin/git-send-pack
43 + install -Dm755 ${WRKBUILD}/git-upload-pack ${WRKINST}/var/git/bin/git-upload-pack
44 + install -Dm755 ${WRKBUILD}/git-verify-pack ${WRKINST}/var/git/bin/git-verify-pack
45 +
46 +.include <bsd.port.mk>

mystuff/git-http-backend/distinfo (created)

1 +SHA256 (git-2.37.3.tar.gz) = GB9lWHFV6kjGgvYxNWeOxTBVrfFTJCh1KRLTVuRrZKg=
2 +SIZE (git-2.37.3.tar.gz) = 10328519

mystuff/git-http-backend/patches/patch-builtin_gc_c (created)

1 +Replace sysctl HW_PHYSMEM/MEMSIZE/whatever madness with sysconf.
2 +
3 +Index: builtin/gc.c
4 +--- builtin/gc.c.orig
5 ++++ builtin/gc.c
6 +@@ -257,20 +257,13 @@ static uint64_t total_ram(void)
7 +
8 + if (!sysinfo(&si))
9 + return si.totalram;
10 +-#elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM))
11 +- int64_t physical_memory;
12 +- int mib[2];
13 +- size_t length;
14 ++#elif defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE)
15 ++ long phys_pages, pagesize;
16 +
17 +- mib[0] = CTL_HW;
18 +-# if defined(HW_MEMSIZE)
19 +- mib[1] = HW_MEMSIZE;
20 +-# else
21 +- mib[1] = HW_PHYSMEM;
22 +-# endif
23 +- length = sizeof(int64_t);
24 +- if (!sysctl(mib, 2, &physical_memory, &length, NULL, 0))
25 +- return physical_memory;
26 ++ phys_pages = sysconf(_SC_PHYS_PAGES);
27 ++ pagesize = sysconf(_SC_PAGESIZE);
28 ++ if (phys_pages != -1 && pagesize != -1)
29 ++ return (uint64_t)phys_pages * (uint64_t)pagesize;
30 + #elif defined(GIT_WINDOWS_NATIVE)
31 + MEMORYSTATUSEX memInfo;
32 +

mystuff/git-http-backend/patches/patch-config_mak_uname (created)

1 +OpenBSD wants DIR_HAS_BSD_GROUP_SEMANTICS, just like FreeBSD
2 +
3 +Index: config.mak.uname
4 +--- config.mak.uname.orig
5 ++++ config.mak.uname
6 +@@ -279,8 +279,7 @@ ifeq ($(uname_S),FreeBSD)
7 + FILENO_IS_A_MACRO = UnfortunatelyYes
8 + endif
9 + ifeq ($(uname_S),OpenBSD)
10 +- NO_STRCASESTR = YesPlease
11 +- NO_MEMMEM = YesPlease
12 ++ DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
13 + USE_ST_TIMESPEC = YesPlease
14 + NEEDS_LIBICONV = YesPlease
15 + BASIC_CFLAGS += -I/usr/local/include

mystuff/git-http-backend/patches/patch-thread-utils_c (created)

1 +Use sysconf(_SC_NPROCESSORS_ONLN) to properly omit disabled smt cores.
2 +
3 +Index: thread-utils.c
4 +--- thread-utils.c.orig
5 ++++ thread-utils.c
6 +@@ -25,9 +25,10 @@ int online_cpus(void)
7 + #else
8 + #ifdef _SC_NPROCESSORS_ONLN
9 + long ncpus;
10 +-#endif
11 +
12 +-#ifdef GIT_WINDOWS_NATIVE
13 ++ if ((ncpus = (long)sysconf(_SC_NPROCESSORS_ONLN)) > 0)
14 ++ return (int)ncpus;
15 ++#elif defined(GIT_WINDOWS_NATIVE)
16 + SYSTEM_INFO info;
17 + GetSystemInfo(&info);
18 +
19 +@@ -55,11 +56,6 @@ int online_cpus(void)
20 + if (!sysctl(mib, 2, &cpucount, &len, NULL, 0))
21 + return cpucount;
22 + #endif /* defined(HAVE_BSD_SYSCTL) && defined(HW_NCPU) */
23 +-
24 +-#ifdef _SC_NPROCESSORS_ONLN
25 +- if ((ncpus = (long)sysconf(_SC_NPROCESSORS_ONLN)) > 0)
26 +- return (int)ncpus;
27 +-#endif
28 +
29 + return 1;
30 + #endif

mystuff/git-http-backend/pkg/DESCR (created)

1 +CGI-based http server for the Git distributed source-code managemet
2 +tool

mystuff/git-http-backend/pkg/PLIST (created)

1 +@bin bin/git
2 +@bin bin/git-fetch-pack
3 +@bin bin/git-index-pack
4 +@bin bin/git-receive-pack
5 +@bin bin/git-send-pack
6 +@bin bin/git-upload-pack
7 +@bin bin/git-verify-pack
8 +@bin cgi-bin/git-http-backend
9 +@dir dev
10 +@exec-add mknod -m666 dev/null c 2 2

mystuff/git-http-backend/pkg/README (created)

1 +
2 ++-----------------------------------------------------------------------
3 +| Running ${PKGSTEM} on OpenBSD
4 ++-----------------------------------------------------------------------
5 +
6 +Pass GIT_PROJECT_ROOT as a parameter to the CGI script

mystuff/shrt/Makefile (created)

1 +COMMENT = url shortener and go-get redirector
2 +
3 +DISTNAME = shrt-1.0.4
4 +CATEGORIES = mystuff www
5 +HOMEPAGE = https://git.danielmoch.com/shrt/about/
6 +
7 +MASTER_SITES = https://dl.danielmoch.com/shrt/
8 +
9 +# ISC
10 +PERMIT_PACKAGE = Yes
11 +
12 +PREFIX = /var/www
13 +
14 +TEST_TARGET = test
15 +ALL_TARGET = all
16 +
17 +.include <bsd.port.mk>

mystuff/shrt/distinfo (created)

1 +SHA256 (shrt-1.0.4.tar.gz) = 7m7sJ6hh/+n4rhdOOo2ezAmRuivV9HymmsXR1xZVXwg=
2 +SIZE (shrt-1.0.4.tar.gz) = 6578

mystuff/shrt/patches/patch-Makefile (created)

1 +--- Makefile.orig Thu Nov 3 14:54:15 2022
2 ++++ Makefile Thu Nov 3 15:31:45 2022
3 +@@ -19,7 +19,7 @@
4 + rm -f shrt *.o
5 +
6 + install: shrt
7 +- install -Dm755 shrt ${DESTDIR}${PREFIX}/bin/shrt
8 ++ install -Dm755 shrt ${DESTDIR}${PREFIX}/cgi-bin/shrt
9 + install -Dm644 shrt.1 ${DESTDIR}${MANPATH}/man1/shrt.1
10 + install -Dm644 shrtfile.5 ${DESTDIR}${MANPATH}/man5/shrtfile.5
11 +

mystuff/shrt/patches/patch-config.h (created)

1 +--- config.h.orig Thu Nov 3 16:48:32 2022
2 ++++ config.h Thu Nov 3 16:48:59 2022
3 +@@ -1,8 +1,8 @@
4 + /* See LICENSE file for copyright and license details */
5 +
6 +-static const char *dbpath = "/htdocs/shrt.db";
7 ++static const char *dbpath = "/conf/shrt.db";
8 + static const char *srvname = "djmo.ch";
9 + static const char *scmtype = "git";
10 + static const char *suffix = ".git";
11 +-static const char *rdrname = "git://git.danielmoch.com";
12 ++static const char *rdrname = "https://git.danielmoch.com";
13 + static const char *barerdr = "https://www.danielmoch.com";

mystuff/shrt/patches/patch-config.mk (created)

1 +--- config.mk.orig Thu Nov 3 15:32:24 2022
2 ++++ config.mk Thu Nov 3 15:32:52 2022
3 +@@ -1,7 +1,7 @@
4 + # See LICENSE file for copyright and license details
5 + VERSION = 1.0.4
6 +-PREFIX := /usr/local
7 +-MANPATH := ${PREFIX}/man
8 ++PREFIX := /var/www
9 ++MANPATH := /usr/local/man
10 +
11 + SRC = \
12 + shrt.c \

mystuff/shrt/pkg/DESCR (created)

1 +This is a URL shortener. There are many like it, but this is mine. Try
2 +putting all the vowels in "shrt" and enjoy yourself!
3 +
4 +Also handles go-get redirects.

mystuff/shrt/pkg/PLIST (created)

1 +@bin cgi-bin/shrt
2 +@cwd ${LOCALBASE}
3 +@man man/man1/shrt.1
4 +@man man/man5/shrtfile.5

mystuff/txt2html/Makefile (created)

1 +COMMENT = HTML-encoding text filter
2 +
3 +DISTNAME = txt2html-0.1.0
4 +CATEGORIES = mystuff textproc
5 +HOMEPAGE = https://dl.danielmoch.com/txt2html
6 +
7 +MASTER_SITES = https://dl.danielmoch.com/txt2html/
8 +
9 +# ISC
10 +PERMIT_PACKAGE = Yes
11 +
12 +PREFIX = /var/git
13 +
14 +TEST_TARGET = test
15 +ALL_TARGET = all
16 +
17 +.include <bsd.port.mk>

mystuff/txt2html/distinfo (created)

1 +SHA256 (txt2html-0.1.0.tar.gz) = nXwBgcIGfP/1EihMb0LRdmU/H+74hyZo8QV/0SUV7Oc=
2 +SIZE (txt2html-0.1.0.tar.gz) = 2085

mystuff/txt2html/patches/patch-config.mk (created)

1 +--- config.mk.orig Fri Nov 4 09:49:11 2022
2 ++++ config.mk Fri Nov 4 09:49:40 2022
3 +@@ -1,6 +1,6 @@
4 + # See LICENSE file for copyright and license information
5 + VERSION = 0.1.0
6 +-PREFIX = /usr/local
7 ++PREFIX = /var/git
8 +
9 + SRC = txt2html.c
10 + OBJ = ${SRC:c=o}

mystuff/txt2html/pkg/DESCR (created)

1 +This utility filters stdin to stdout, applying HTML encoding along the
2 +way.

mystuff/txt2html/pkg/PLIST (created)

1 +@bin bin/txt2html

www/surf/patches/patch-config_def_h (deleted)

1 ---- config.def.h Tue Mar 28 12:17:45 2017
2 -+++ /home/djmoch/src/dotcom-git/slackbuilds/surf/config.h Sun Feb 9 19:03:06 2020
3 -@@ -1,10 +1,10 @@
4 - /* modifier 0 means no modifier */
5 - static int surfuseragent = 1; /* Append Surf version to default WebKit user agent */
6 - static char *fulluseragent = ""; /* Or override the whole user agent string */
7 --static char *scriptfile = "~/.surf/script.js";
8 --static char *styledir = "~/.surf/styles/";
9 --static char *cachedir = "~/.surf/cache/";
10 --static char *cookiefile = "~/.surf/cookies.txt";
11 -+static char *scriptfile = "~/etc/surf/script.js";
12 -+static char *styledir = "~/etc/surf/styles/";
13 -+static char *cachedir = "~/etc/surf/cache/";
14 -+static char *cookiefile = "~/etc/surf/cookies.txt";
15 -
16 - /* Webkit default features */
17 - static Parameter defconfig[ParameterLast] = {
18 -@@ -13,12 +13,12 @@
19 - SETV(CookiePolicies, "@Aa"),
20 - SETB(DiskCache, 1),
21 - SETB(DNSPrefetch, 0),
22 -- SETI(FontSize, 12),
23 -+ SETI(FontSize, 14),
24 - SETB(FrameFlattening, 0),
25 - SETB(Geolocation, 0),
26 - SETB(HideBackground, 0),
27 - SETB(Inspector, 0),
28 -- SETB(JavaScript, 1),
29 -+ SETB(JavaScript, 0),
30 - SETB(KioskMode, 0),
31 - SETB(LoadImages, 1),
32 - SETB(MediaManualPlay, 0),
33 -@@ -32,14 +32,15 @@
34 - SETV(SpellLanguages, ((char *[]){ "en_US", NULL })),
35 - SETB(StrictSSL, 0),
36 - SETB(Style, 1),
37 -- SETF(ZoomLevel, 1.0),
38 -+ SETF(ZoomLevel, 1.9),
39 - };
40 -
41 - static UriParameters uriparams[] = {
42 -- { "(://|\\.)suckless\\.org(/|$)", {
43 -- FSETB(JavaScript, 0),
44 -- FSETB(Plugins, 0),
45 -- }, },
46 -+ { "(://|\\.)djmoch\\.org(/|$)", { FSETB(JavaScript, 1), }, },
47 -+ { "(://|\\.)danielmoch\\.com(/|$)", { FSETB(JavaScript, 1), }, },
48 -+ { "(://|\\.)twitter\\.com(/|$)", { FSETB(JavaScript, 1), }, },
49 -+ { "(://|\\.)github\\.com(/|$)", { FSETB(JavaScript, 1), }, },
50 -+ { ".*", { FSETB(JavaScript, 0), }, },
51 - };
52 -
53 - static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
54 -@@ -49,17 +50,47 @@
55 - .v = (const char *[]){ "/bin/sh", "-c", \
56 - "prop=\"`xprop -id $2 $0 " \
57 - "| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \
58 -- "| xargs -0 printf %b | dmenu`\" &&" \
59 -+ "| xargs -0 printf %b | dmenu -fn \"sans:size=8\" -nb \"#3A3A3A\" " \
60 -+ "-nf \"#FFFFFF\" -sb \"#BCBCBC\" -sf \"#000000\"`\" &&" \
61 - "xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
62 - p, q, winid, NULL \
63 - } \
64 - }
65 -
66 -+#define SEARCH(p, q) { \
67 -+ .v = (const char *[]){ "/bin/sh", "-c", \
68 -+ "prop=\"https://duckduckgo.com/html?q=`dmenu -p \"Search DuckDuckGo\" " \
69 -+ "-fn \"sans:size=8\" -nb \"#3A3A3A\" " \
70 -+ "-nf \"#FFFFFF\" -sb \"#BCBCBC\" -sf \"#000000\"`\" &&" \
71 -+ "xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
72 -+ p, q, winid, NULL \
73 -+ } \
74 -+}
75 -+
76 -+#define BMARK(p, q) { \
77 -+ .v = (const char *[]){ "/bin/sh", "-c", \
78 -+ "prop=\"`cat ~/etc/surf/bookmarks " \
79 -+ "| dmenu -fn \"sans:size=8\" -nb \"#3A3A3A\" " \
80 -+ "-nf \"#FFFFFF\" -sb \"#BCBCBC\" -sf \"#000000\"`\" &&" \
81 -+ "xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
82 -+ p, q, winid, NULL \
83 -+ } \
84 -+}
85 -+
86 -+#define BMARKSAVE(p, q) { \
87 -+ .v = (const char *[]){ "/bin/sh", "-c", \
88 -+ "prop=\"`xprop -id $2 $0 " \
89 -+ "| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \
90 -+ "| xargs printf %b\n`\" && echo \"$prop\" >> ~/etc/surf/bookmarks", \
91 -+ p, q, winid, NULL \
92 -+ } \
93 -+}
94 -+
95 - /* DOWNLOAD(URI, referer) */
96 - #define DOWNLOAD(d, r) { \
97 - .v = (const char *[]){ "/bin/sh", "-c", \
98 -- "st -e /bin/sh -c \"curl -g -L -J -O --user-agent '$1'" \
99 -- " --referer '$2' -b $3 -c $3 '$0';" \
100 -+ "my term -e /bin/sh -c \"cd ~/dl; curl -g -L -J -O " \
101 -+ "--user-agent '$1' --referer '$2' -b $3 -c $3 '$0';" \
102 - " sleep 5;\"", \
103 - d, useragent, r, cookiefile, NULL \
104 - } \
105 -@@ -78,7 +109,7 @@
106 - /* VIDEOPLAY(URI) */
107 - #define VIDEOPLAY(u) {\
108 - .v = (const char *[]){ "/bin/sh", "-c", \
109 -- "mpv --really-quiet \"$0\"", u, NULL \
110 -+ "mplayer --really-quiet \"$0\"", u, NULL \
111 - } \
112 - }
113 -
114 -@@ -104,6 +135,9 @@
115 - { MODKEY, GDK_KEY_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
116 - { MODKEY, GDK_KEY_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
117 - { MODKEY, GDK_KEY_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
118 -+ { MODKEY, GDK_KEY_s, spawn, SEARCH("_SURF_URI", "_SURF_GO") },
119 -+ { MODKEY, GDK_KEY_d, spawn, BMARK("_SURF_URI", "_SURF_GO") },
120 -+ { MODKEY|GDK_SHIFT_MASK, GDK_KEY_d, spawn, BMARKSAVE("_SURF_URI", "_SURF_GO") },
121 -
122 - { 0, GDK_KEY_Escape, stop, { 0 } },
123 - { MODKEY, GDK_KEY_c, stop, { 0 } },

x11/dwm/patches/patch-config_def_h (deleted)

1 ---- config.def.h.old Sat Feb 2 07:55:28 2019
2 -+++ config.def.h Tue Jun 16 04:44:41 2020
3 -@@ -5,17 +5,17 @@
4 - static const unsigned int snap = 32; /* snap pixel */
5 - static const int showbar = 1; /* 0 means no bar */
6 - static const int topbar = 1; /* 0 means bottom bar */
7 --static const char *fonts[] = { "monospace:size=10" };
8 --static const char dmenufont[] = "monospace:size=10";
9 --static const char col_gray1[] = "#222222";
10 --static const char col_gray2[] = "#444444";
11 --static const char col_gray3[] = "#bbbbbb";
12 --static const char col_gray4[] = "#eeeeee";
13 --static const char col_cyan[] = "#005577";
14 -+static const char *fonts[] = { "sans:size=8" };
15 -+static const char dmenufont[] = "sans:size=8";
16 -+static const char col_gray1[] = "#3A3A3A";
17 -+static const char col_gray2[] = "#BCBCBC";
18 -+static const char col_white[] = "#FFFFFF";
19 -+static const char col_black[] = "#000000";
20 -+static const char col_blue[] = "#005FAF";
21 - static const char *colors[][3] = {
22 - /* fg bg border */
23 -- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
24 -- [SchemeSel] = { col_gray4, col_cyan, col_cyan },
25 -+ [SchemeNorm] = { col_white, col_gray1, col_gray1 },
26 -+ [SchemeSel] = { col_black, col_gray2, col_blue },
27 - };
28 -
29 - /* tagging */
30 -@@ -26,9 +26,13 @@
31 - * WM_CLASS(STRING) = instance, class
32 - * WM_NAME(STRING) = title
33 - */
34 -- /* class instance title tags mask isfloating monitor */
35 -- { "Gimp", NULL, NULL, 0, 1, -1 },
36 -- { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
37 -+ /* class instance title tags mask isfloating monitor */
38 -+ { NULL, NULL, "xbindkeys_show", 0, 1, -1 },
39 -+ { NULL, NULL, "xfontsel", 0, 1, -1 },
40 -+ { "newDiffPopup", NULL, NULL, 0, 1, -1 },
41 -+ { "xcalc", NULL, NULL, 0, 1, -1 },
42 -+ { "xclock", NULL, NULL, 0, 1, -1 },
43 -+ { "pinentry", NULL, NULL, 0, 1, -1 },
44 - };
45 -
46 - /* layout(s) */
47 -@@ -44,7 +48,7 @@
48 - };
49 -
50 - /* key definitions */
51 --#define MODKEY Mod1Mask
52 -+#define MODKEY Mod4Mask
53 - #define TAGKEYS(KEY,TAG) \
54 - { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
55 - { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
56 -@@ -56,23 +60,24 @@
57 -
58 - /* commands */
59 - static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
60 --static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
61 --static const char *termcmd[] = { "st", NULL };
62 -+static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_white, "-sb", col_gray2, "-sf", col_black, NULL };
63 -+static const char *passmenucmd[] = { "passmenu", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_white, "-sb", col_gray2, "-sf", col_black, NULL };
64 -+static const char *termcmd[] = { "my term", NULL };
65 -
66 - static Key keys[] = {
67 - /* modifier key function argument */
68 - { MODKEY, XK_p, spawn, {.v = dmenucmd } },
69 -- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
70 -+ { MODKEY, XK_z, spawn, {.v = passmenucmd } },
71 - { MODKEY, XK_b, togglebar, {0} },
72 - { MODKEY, XK_j, focusstack, {.i = +1 } },
73 - { MODKEY, XK_k, focusstack, {.i = -1 } },
74 - { MODKEY, XK_i, incnmaster, {.i = +1 } },
75 - { MODKEY, XK_d, incnmaster, {.i = -1 } },
76 -- { MODKEY, XK_h, setmfact, {.f = -0.05} },
77 -- { MODKEY, XK_l, setmfact, {.f = +0.05} },
78 -- { MODKEY, XK_Return, zoom, {0} },
79 -+ { MODKEY|Mod1Mask, XK_h, setmfact, {.f = -0.05} },
80 -+ { MODKEY|Mod1Mask, XK_l, setmfact, {.f = +0.05} },
81 -+ { MODKEY|ControlMask, XK_Return, zoom, {0} },
82 - { MODKEY, XK_Tab, view, {0} },
83 -- { MODKEY|ShiftMask, XK_c, killclient, {0} },
84 -+ { MODKEY, XK_q, killclient, {0} },
85 - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
86 - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
87 - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
88 -@@ -80,10 +85,9 @@
89 - { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
90 - { MODKEY, XK_0, view, {.ui = ~0 } },
91 - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
92 -- { MODKEY, XK_comma, focusmon, {.i = -1 } },
93 -- { MODKEY, XK_period, focusmon, {.i = +1 } },
94 -- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
95 -- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
96 -+ { MODKEY|ControlMask, XK_k, focusmon, {.i = -1 } },
97 -+ { MODKEY|ControlMask, XK_j, focusmon, {.i = +1 } },
98 -+ { MODKEY, XK_o, tagmon, {.i = +1 } },
99 - TAGKEYS( XK_1, 0)
100 - TAGKEYS( XK_2, 1)
101 - TAGKEYS( XK_3, 2)
102 -@@ -93,7 +97,7 @@
103 - TAGKEYS( XK_7, 6)
104 - TAGKEYS( XK_8, 7)
105 - TAGKEYS( XK_9, 8)
106 -- { MODKEY|ShiftMask, XK_q, quit, {0} },
107 -+ { Mod1Mask|ControlMask, XK_BackSpace, quit, {0} },
108 - };
109 -
110 - /* button definitions */

x11/st/patches/patch-config_def_h (deleted)

1 ---- config.def.h.orig Fri Jun 19 05:29:45 2020
2 -+++ config.def.h Wed Aug 5 12:02:44 2020
3 -@@ -5,7 +5,7 @@
4 - *
5 - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
6 - */
7 --static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
8 -+static char *font = "-*-courier-bold-r-*-*-24-*-*-*-*-*-iso10646-*";
9 - static int borderpx = 2;
10 -
11 - /*
12 -@@ -74,7 +74,7 @@
13 - static int bellvolume = 0;
14 -
15 - /* default TERM value */
16 --char *termname = "st-256color";
17 -+char *termname = "st";
18 -
19 - /*
20 - * spaces per tab
21 -@@ -96,30 +96,26 @@
22 - /* Terminal colors (16 first used in escape sequence) */
23 - static const char *colorname[] = {
24 - /* 8 normal colors */
25 -- "black",
26 -- "red3",
27 -- "green3",
28 -- "yellow3",
29 -- "blue2",
30 -- "magenta3",
31 -- "cyan3",
32 -- "gray90",
33 -+ "#000000",
34 -+ "#870000",
35 -+ "#00875F",
36 -+ "#878700",
37 -+ "#005FAF",
38 -+ "#875FAF",
39 -+ "#008080",
40 -+ "#BCBCBC",
41 -
42 - /* 8 bright colors */
43 -- "gray50",
44 -- "red",
45 -- "green",
46 -- "yellow",
47 -- "#5c5cff",
48 -- "magenta",
49 -- "cyan",
50 -- "white",
51 -+ "#3A3A3A",
52 -+ "#D7005F",
53 -+ "#00D75F",
54 -+ "#D7D787",
55 -+ "#5FAFFF",
56 -+ "#D787FF",
57 -+ "#87FF87",
58 -+ "#FFFFFF",
59 -
60 - [255] = 0,
61 --
62 -- /* more colors can be added after 255 to use with DefaultXX */
63 -- "#cccccc",
64 -- "#555555",
65 - };
66 -
67 -
68 -@@ -127,10 +123,10 @@
69 - * Default colors (colorname index)
70 - * foreground, background, cursor, reverse cursor
71 - */
72 --unsigned int defaultfg = 7;
73 --unsigned int defaultbg = 0;
74 --static unsigned int defaultcs = 256;
75 --static unsigned int defaultrcs = 257;
76 -+unsigned int defaultfg = 0;
77 -+unsigned int defaultbg = 15;
78 -+static unsigned int defaultcs = 0;
79 -+static unsigned int defaultrcs = 15;
80 -
81 - /*
82 - * Default shape of cursor