Skip to content

Commit

Permalink
*/*: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: HardenedBSD
  • Loading branch information
fichtner committed Jun 2, 2020
1 parent ff86648 commit 76ca447
Show file tree
Hide file tree
Showing 1,336 changed files with 17,968 additions and 14,209 deletions.
2 changes: 1 addition & 1 deletion archivers/c-blosc/pkg-descr
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ via a memcpy() OS call. Blosc is the first compressor (that I'm aware of)
that is meant not only to reduce the size of large datasets on-disk or
in-memory, but also to accelerate memory-bound computations.

WWW: http://blosc.org/
WWW: https://blosc.org/
6 changes: 5 additions & 1 deletion astro/gnuastro/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# $FreeBSD$

PORTNAME= gnuastro
PORTVERSION= 0.11
PORTVERSION= 0.12
CATEGORIES= astro
MASTER_SITES= GNU

Expand All @@ -28,6 +28,10 @@ PORTDOCS= AUTHORS ChangeLog NEWS README THANKS

OPTIONS_DEFINE= DOCS

post-patch:
@${REINPLACE_CMD} -e 's,cflags_add="-O3",:,' \
${WRKSRC}/configure

post-install:
@${FIND} ${STAGEDIR}${PREFIX}/etc -name \*.conf \
-exec ${MV} '{}' '{}.sample' \;
Expand Down
6 changes: 3 additions & 3 deletions astro/gnuastro/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1574693798
SHA256 (gnuastro-0.11.tar.lz) = 7bcc22311e69db17351a476df01dfd31009b0db06e2b6d525338efb3b0603e30
SIZE (gnuastro-0.11.tar.lz) = 3490088
TIMESTAMP = 1589989283
SHA256 (gnuastro-0.12.tar.lz) = ced7ab6d3dca6913fc8df649070dc3a496b67e975b14e57a64e81c2c0e0bf37a
SIZE (gnuastro-0.12.tar.lz) = 3533517
11 changes: 11 additions & 0 deletions astro/gnuastro/files/patch-bin_fits_keywords.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- bin/fits/keywords.c.orig 2020-05-15 16:58:42 UTC
+++ bin/fits/keywords.c
@@ -413,6 +413,8 @@ keywords_date_to_seconds(struct fitsparams *p, fitsfil
/* Return the number of seconds (and subseconds) that it corresponds
to. */
seconds=gal_fits_key_date_to_seconds(fitsdate, &subsecstr, &subsec);
+ if(seconds==GAL_BLANK_SIZE_T)
+ error(EXIT_FAILURE, 0, "the time string couldn't be interpretted");

/* Print the result (for the sub-seconds, print everything after the */
if( !p->cp.quiet )
41 changes: 41 additions & 0 deletions astro/gnuastro/files/patch-lib_fits.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--- lib/fits.c.orig 2020-05-15 16:58:42 UTC
+++ lib/fits.c
@@ -1023,6 +1023,7 @@ gal_fits_key_date_to_seconds(char *fitsdate, char **su
time_t t;
char *tmp;
struct tm tp;
+ size_t seconds;
void *outptr=subsec;

/* Fill in the 'tp' elements with values read from the string. */
@@ -1044,14 +1045,23 @@ gal_fits_key_date_to_seconds(char *fitsdate, char **su
tmp);
}

- /* Convert the 'tm' structure to 'time_t'. Note that the system's
- timezone and daylight saving need to be subtracted from the output of
- 'mktime'. Otherwise the result will be different on different
- host-system timezones (which is not what we want here: bug #57995). */
- t=mktime(&tp)-timezone-daylight;
+ /* Convert the contents of the 'tm' structure to 'time_t' (a positive
+ integer) with 'mktime'. Note that by design, the system's timezone is
+ included in the returned value of 'mktime' (leading to situations like
+ bug #57995). But it writes the given time's timezone (number of
+ seconds ahead of UTC) in the 'tm_gmtoff' element of its input.
- /* Return the value and set the output pointer. */
- return (size_t)t;
+ IMPORTANT NOTE: the timezone that is calculated by 'mktime' (in
+ 'tp.tm_gmtoff') belongs to the time that is already within 'tp' (this
+ is exactly what we want!). So for example when daylight saving is
+ activated at run-time, but at the time inside 'tp', there was no
+ daylight saving, the value of 'tp.tm_gmtoff' will be different from
+ the 'timezone' global variable. */
+ t=mktime(&tp);
+
+ /* Calculate the seconds and return it. */
+ seconds = (t == (time_t)(-1)) ? GAL_BLANK_SIZE_T : (t+tp.tm_gmtoff);
+ return seconds;
}


5 changes: 3 additions & 2 deletions astro/gnuastro/pkg-plist
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ include/gnuastro/tiff.h
include/gnuastro/tile.h
include/gnuastro/txt.h
include/gnuastro/type.h
include/gnuastro/units.h
include/gnuastro/wcs.h
lib/libgnuastro.a
lib/libgnuastro.so
lib/libgnuastro.so.9
lib/libgnuastro.so.9.0.0
lib/libgnuastro.so.10
lib/libgnuastro.so.10.0.0
libdata/pkgconfig/gnuastro.pc
man/man1/astarithmetic.1.gz
man/man1/astbuildprog.1.gz
Expand Down
1 change: 1 addition & 0 deletions astro/oskar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE

ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64
ONLY_FOR_ARCHS_REASON= gccfeatures.h:54:4: This code has only been tested on x86 and powerpc platforms
BROKEN_FreeBSD_12_powerpc64= fails to compile: oskar_convert_cirs_relative_directions_to_enu_directions.c:67:29: 'csinl' undeclared (first use in this function)

LIB_DEPENDS= libcfitsio.so:astro/cfitsio

Expand Down
3 changes: 2 additions & 1 deletion audio/ardour5/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ LICENSE_FILE= ${WRKSRC}/COPYING
DEPRECATED= Uses deprecated version of python
EXPIRATION_DATE= 2020-09-15

BUILD_DEPENDS= lv2>=1.14.0:audio/lv2 itstool>2.0.0:textproc/itstool
BUILD_DEPENDS= lv2>=1.14.0:audio/lv2 itstool>2.0.0:textproc/itstool \
as:devel/binutils
LIB_DEPENDS= libserd-0.so:devel/serd \
libsord-0.so:devel/sord \
libsratom-0.so:audio/sratom \
Expand Down
10 changes: 10 additions & 0 deletions audio/carla/files/patch-source_theme_CarlaStyle.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- source/theme/CarlaStyle.cpp.orig 2020-05-28 16:39:10 UTC
+++ source/theme/CarlaStyle.cpp
@@ -22,6 +22,7 @@

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtGui/QPainter>
+# include <QtGui/QPainterPath>
# include <QtGui/QPixmapCache>
# include <QtWidgets/qdrawutil.h>
# include <QtWidgets/QApplication>
23 changes: 13 additions & 10 deletions audio/cava/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# $FreeBSD$

PORTNAME= cava
DISTVERSION= 0.6.1
PORTREVISION= 2
DISTVERSION= 0.7.0
CATEGORIES= audio

MAINTAINER= [email protected]
Expand All @@ -19,6 +18,7 @@ USE_GITHUB= yes
GH_ACCOUNT= karlstav

GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-input-alsa
CONFIGURE_ENV= ac_cv_lib_asound_snd_pcm_open=no \
FONT_DIR=${DATADIR}

Expand All @@ -28,24 +28,27 @@ PLIST_FILES= bin/cava
PORTDOCS= README.md
PORTEXAMPLES= config

OPTIONS_DEFINE= DOCS EXAMPLES PULSEAUDIO SNDIO VT
OPTIONS_DEFINE= DOCS EXAMPLES PORTAUDIO PULSEAUDIO SNDIO VT
OPTIONS_DEFAULT= PULSEAUDIO SNDIO VT
.if !exists(/usr/bin/vtfontcvt)
OPTIONS_EXCLUDE= VT
.endif

VT_DESC= Build with vt(4) support (installs custom font)

PULSEAUDIO_CONFIGURE_ENV_OFF= ac_cv_lib_pulse_simple_pa_simple_new=no
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
PORTAUDIO_CONFIGURE_OFF= --disable-input-portaudio

PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio \
libpulse.so:audio/pulseaudio \
libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_OFF= --disable-input-pulse

SNDIO_CONFIGURE_ENV_OFF= ac_cv_lib_sndio_sio_open=no
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio
SNDIO_CONFIGURE_OFF= --disable-input-sndio

VT_BUILD_DEPENDS= psf2bdf:x11-fonts/psftools
VT_MAKE_ARGS_OFF= cava_font__DATA=""
VT_PLIST_FILES= ${DATADIR}/cava.fnt
VT_BUILD_DEPENDS= psf2bdf:x11-fonts/psftools
VT_MAKE_ARGS_OFF= cava_font__DATA=""
VT_PLIST_FILES= ${DATADIR}/cava.fnt

pre-configure:
@${ECHO_CMD} ${DISTVERSION} > ${WRKSRC}/version
Expand Down
6 changes: 3 additions & 3 deletions audio/cava/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1525757005
SHA256 (karlstav-cava-0.6.1_GH0.tar.gz) = 98b880e7e704ed457863f379f31b488e06076bb34a5de02825096969b916a78d
SIZE (karlstav-cava-0.6.1_GH0.tar.gz) = 42285
TIMESTAMP = 1590792822
SHA256 (karlstav-cava-0.7.0_GH0.tar.gz) = 1ced5b131b86f2aa86259c58c2d2dfd46201ab908395229191b5a8dec894b84c
SIZE (karlstav-cava-0.7.0_GH0.tar.gz) = 52865
23 changes: 18 additions & 5 deletions audio/cava/files/patch-Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,34 @@
does not recognize
- Do not install the Linux-only font

--- Makefile.am.orig 2018-05-03 16:07:33 UTC
--- Makefile.am.orig 2020-05-26 20:29:47 UTC
+++ Makefile.am
@@ -13,11 +13,12 @@ cava_SOURCES = cava.c
cava_LDADD = -liniparser
@@ -10,11 +10,11 @@ M_CPPFLAGS = -DSYSTEM_LIBINIPARSER=@SYSTEM_LIBINIPARSE

bin_PROGRAMS = cava
cava_SOURCES = cava.c config.c input/common.c input/fifo.c input/shmem.c \
- output/terminal_noncurses.c output/raw.c
+ output/raw.c
cava_LDFLAGS = -L/usr/local/lib -Wl,-rpath /usr/local/lib
cava_CPPFLAGS = -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" \
- -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L
-cava_CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-result -Wno-maybe-uninitialized
+ -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L -DFONT_DIR=\"@FONT_DIR@\"
+
+cava_CFLAGS = -std=c99 -Wall -Wextra

if OSX
cava_CFLAGS += -DNORT
@@ -39,11 +39,11 @@ if SNDIO
endif

if NCURSES
- cava_SOURCES += output/terminal_bcircle.c output/terminal_ncurses.c
+ cava_SOURCES += output/terminal_ncurses.c
endif

cava_font_dir = @FONT_DIR@
-cava_font__DATA = cava.psf
+cava_font__DATA = cava.fnt

if !SYSTEM_LIBINIPARSER
cava_SOURCES += iniparser/libiniparser.la
cava_LDADD = -liniparser
65 changes: 56 additions & 9 deletions audio/cava/files/patch-cava.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,62 @@
--- cava.c.orig 2018-10-04 05:51:51 UTC
--- cava.c.orig 2020-05-26 20:29:47 UTC
+++ cava.c
@@ -341,8 +341,12 @@ as of 0.4.0 all options are specified in config file,
"/dev/console") == 0) inAtty = 1;
@@ -32,13 +32,11 @@
#include "util.h"

if (inAtty) {
#ifdef NCURSES
-#include "output/terminal_bcircle.h"
#include "output/terminal_ncurses.h"
#include <curses.h>
#endif

#include "output/raw.h"
-#include "output/terminal_noncurses.h"

#include "input/alsa.h"
#include "input/common.h"
@@ -91,8 +89,6 @@ void cleanup(void) {
#else
;
#endif
- } else if (output_mode == OUTPUT_NONCURSES) {
- cleanup_terminal_noncurses();
}
}

@@ -338,8 +334,12 @@ as of 0.4.0 all options are specified in config file,
if (strncmp(ttyname(0), "/dev/ttys", 9) == 0)
inAtty = 0;
if (inAtty) {
+#ifdef __FreeBSD__
+ system("/usr/sbin/vidcontrol -f " FONT_DIR "/cava.fnt >/dev/null 2>&1");
+ system("/usr/sbin/vidcontrol -f " FONT_DIR "/cava.fnt >/dev/null 2>&1");
+#else
system("setfont cava.psf >/dev/null 2>&1");
system("setterm -blank 0");
system("setfont cava.psf >/dev/null 2>&1");
system("setterm -blank 0");
+#endif
}
}
}

// We use unicode block characters to draw the bars and
@@ -547,12 +547,6 @@ as of 0.4.0 all options are specified in config file,
height = lines * 8;
break;
#endif
- case OUTPUT_NONCURSES:
- get_terminal_dim_noncurses(&width, &lines);
- init_terminal_noncurses(p.col, p.bgcol, width, lines, p.bar_width);
- height = (lines - 1) * 8;
- break;
-
case OUTPUT_RAW:
if (strcmp(p.raw_target, "/dev/stdout") != 0) {
// checking if file exists
@@ -998,10 +992,6 @@ as of 0.4.0 all options are specified in config file,
p.gradient);
break;
#endif
- case OUTPUT_NONCURSES:
- rc = draw_terminal_noncurses(inAtty, lines, width, number_of_bars, p.bar_width,
- p.bar_spacing, rest, bars, previous_frame);
- break;
case OUTPUT_RAW:
rc = print_raw_out(number_of_bars, fp, p.is_bin, p.bit_format, p.ascii_range,
p.bar_delim, p.frame_delim, bars);
43 changes: 33 additions & 10 deletions audio/cava/files/patch-config.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
--- config.c.orig 2017-08-26 08:52:40 UTC
Remove noncurses output method which only produces a garbled mess
on terminals.

--- config.c.orig 2020-05-29 23:28:58 UTC
+++ config.c
@@ -378,7 +378,7 @@ if (p->smcount > 0) {
iniparser_getseckeys(ini, "eq", keys);
#endif
#ifdef LEGACYINIPARSER
- char **keys = iniparser_getseckeys(ini, "eq");
+ char **keys = iniparser_getseckeys(ini, "eq", keys);
#endif
for (int sk = 0; sk < p->smcount; sk++) {
p->smooth[sk] = iniparser_getdouble(ini, keys[sk], 1);
@@ -173,10 +173,6 @@ bool validate_config(struct config_params *p, struct e
return false;
#endif
}
- if (strcmp(outputMethod, "noncurses") == 0) {
- p->om = OUTPUT_NONCURSES;
- p->bgcol = 0;
- }
if (strcmp(outputMethod, "raw") == 0) { // raw:
p->om = OUTPUT_RAW;
p->bar_spacing = 0;
@@ -220,7 +216,7 @@ bool validate_config(struct config_params *p, struct e
#ifdef NCURSES
write_errorf(error,
"output method %s is not supported, supported methods are: 'ncurses', "
- "'noncurses' and 'raw'\n",
+ "and 'raw'\n",
outputMethod);
return false;
#endif
@@ -408,7 +404,7 @@ bool load_config(char configPath[PATH_MAX], struct con
}

#ifdef NCURSES
- outputMethod = (char *)iniparser_getstring(ini, "output:method", "noncurses");
+ outputMethod = (char *)iniparser_getstring(ini, "output:method", "ncurses");
#endif
#ifndef NCURSES
outputMethod = (char *)iniparser_getstring(ini, "output:method", "noncurses");
13 changes: 13 additions & 0 deletions audio/cava/files/patch-configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Neuter gratuitous OS check that is not used for anything at all.

--- configure.ac.orig 2020-05-26 20:29:47 UTC
+++ configure.ac
@@ -294,7 +294,7 @@ case "${host_os}" in
build_mac=yes
;;
*)
- AC_MSG_ERROR(["OS $host_os is not supported"])
+ AC_MSG_NOTICE([I'm a teapot])
;;
esac

14 changes: 14 additions & 0 deletions audio/cava/files/patch-example__files_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- example_files/config.orig 2020-05-29 23:30:26 UTC
+++ example_files/config
@@ -76,10 +76,7 @@

[output]

-# Output method. Can be 'ncurses', 'noncurses' or 'raw'.
-# 'noncurses' uses a custom framebuffer technique and draws only changes
-# from frame to frame. As of version 0.7.0 'noncurses' is default.
-#
+# Output method. Can be 'ncurses', or 'raw'.
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
Loading

0 comments on commit 76ca447

Please sign in to comment.