pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/arcticfox



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu Mar 21 12:47:20 UTC 2024

Modified Files:
        pkgsrc/www/arcticfox: Makefile PLIST distinfo
        pkgsrc/www/arcticfox/files: cubeb_sun.c

Log Message:
arcticfox: Update to 43.1

- Download issue fixed
- several video decoder fixes
- icon fixes
- security fixes


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 pkgsrc/www/arcticfox/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/www/arcticfox/PLIST
cvs rdiff -u -r1.11 -r1.12 pkgsrc/www/arcticfox/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/www/arcticfox/files/cubeb_sun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/arcticfox/Makefile
diff -u pkgsrc/www/arcticfox/Makefile:1.42 pkgsrc/www/arcticfox/Makefile:1.43
--- pkgsrc/www/arcticfox/Makefile:1.42  Tue Jan 30 14:22:36 2024
+++ pkgsrc/www/arcticfox/Makefile       Thu Mar 21 12:47:19 2024
@@ -1,14 +1,13 @@
-# $NetBSD: Makefile,v 1.42 2024/01/30 14:22:36 ryoon Exp $
+# $NetBSD: Makefile,v 1.43 2024/03/21 12:47:19 nia Exp $
 
-DISTNAME=      arcticfox-43.0
-PKGREVISION=   5
+DISTNAME=      arcticfox-43.1
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=rmottola/}
 GITHUB_PROJECT=        Arctic-Fox
 GITHUB_TAG=    v${PKGVERSION_NOREV}
 
 MAINTAINER=    nia%NetBSD.org@localhost
-HOMEPAGE=      https://github.com/wicknix/Arctic-Fox
+HOMEPAGE=      https://github.com/rmottola/Arctic-Fox
 COMMENT=       Web browser for aging systems, forked from Firefox
 LICENSE=       mpl-1.1
 
@@ -140,6 +139,7 @@ BUILDLINK_API_DEPENDS.libevent+=    libeven
 .include "../../textproc/hunspell/buildlink3.mk"
 #.include "../../textproc/icu/buildlink3.mk"
 .include "../../x11/gtk2/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
 .include "../../x11/libXt/buildlink3.mk"
 .include "../../x11/pixman/buildlink3.mk"
 #.include "../../mk/jpeg.buildlink3.mk"

Index: pkgsrc/www/arcticfox/PLIST
diff -u pkgsrc/www/arcticfox/PLIST:1.9 pkgsrc/www/arcticfox/PLIST:1.10
--- pkgsrc/www/arcticfox/PLIST:1.9      Mon Aug  7 19:25:44 2023
+++ pkgsrc/www/arcticfox/PLIST  Thu Mar 21 12:47:19 2024
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.9 2023/08/07 19:25:44 abs Exp $
+@comment $NetBSD: PLIST,v 1.10 2024/03/21 12:47:19 nia Exp $
 bin/arcticfox
 lib/${PKGNAME}/application.ini
 lib/${PKGNAME}/arcticfox
@@ -17,7 +17,11 @@ lib/${PKGNAME}/defaults/pref/channel-pre
 lib/${PKGNAME}/dependentlibs.list
 lib/${PKGNAME}/dictionaries/en-US.aff
 lib/${PKGNAME}/dictionaries/en-US.dic
+lib/${PKGNAME}/gtk2/libmozgtk.so
 lib/${PKGNAME}/liblgpllibs.so
+lib/${PKGNAME}/libmozavcodec.so
+lib/${PKGNAME}/libmozavutil.so
+lib/${PKGNAME}/libmozgtk.so
 lib/${PKGNAME}/libmozsqlite3.so
 lib/${PKGNAME}/libxul.so
 lib/${PKGNAME}/omni.ja

Index: pkgsrc/www/arcticfox/distinfo
diff -u pkgsrc/www/arcticfox/distinfo:1.11 pkgsrc/www/arcticfox/distinfo:1.12
--- pkgsrc/www/arcticfox/distinfo:1.11  Fri Nov  3 23:41:18 2023
+++ pkgsrc/www/arcticfox/distinfo       Thu Mar 21 12:47:19 2024
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.11 2023/11/03 23:41:18 abs Exp $
+$NetBSD: distinfo,v 1.12 2024/03/21 12:47:19 nia Exp $
 
-BLAKE2s (arcticfox-43.0.tar.gz) = ec8905ce56fb1c81bbc91b94e6f7ee9233726fc2d81a8dbbf2ed1f11dd98489d
-SHA512 (arcticfox-43.0.tar.gz) = 51cc98428410226e412fc6bc302bb1010dcefa5b5bc7ccb49c2fd241858929702c498ae98db89a1e2247b69a54ecf6fc26fdfa135dfe1ac0b7b967ae4ec1b956
-Size (arcticfox-43.0.tar.gz) = 211458406 bytes
+BLAKE2s (arcticfox-43.1.tar.gz) = 26cdcdf7ff023250df4aed3dcc7119031aa86f7466be2315bff9032f94227230
+SHA512 (arcticfox-43.1.tar.gz) = 19f2934fcf4cb07192176957fb7427d17d8ab4cd5cd10eadbc3630e4deb0a3ad3de5b1656e68b26d6537cff43d3c2997fa3e189fcf05ad70c6e62cb4d943818b
+Size (arcticfox-43.1.tar.gz) = 213148775 bytes
 SHA1 (patch-configure.in) = ccea0e59b808d8743b66c58bda07a2719e89e74f
 SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 98dd10e2eaa3ec2160f517d1a6cee01caa37ffb0
 SHA1 (patch-media_libcubeb_src_cubeb.c) = b3c4bd8146e2f7146baf1c2050260f7629cdb09a

Index: pkgsrc/www/arcticfox/files/cubeb_sun.c
diff -u pkgsrc/www/arcticfox/files/cubeb_sun.c:1.1 pkgsrc/www/arcticfox/files/cubeb_sun.c:1.2
--- pkgsrc/www/arcticfox/files/cubeb_sun.c:1.1  Sat Feb  5 20:51:07 2022
+++ pkgsrc/www/arcticfox/files/cubeb_sun.c      Thu Mar 21 12:47:20 2024
@@ -1,9 +1,5 @@
 /*
- * Copyright © 2022 Nia Alarie
- *
- * This is a playback-only version of the Sun driver specifically for
- * legacy Firefox (e.g. Arcticfox). Please see the most recent version
- * of the cubeb sources for the record & playback version.
+ * Copyright © 2019-2024 Nia Alarie
  *
  * This program is made available under an ISC-style license.  See the
  * accompanying file LICENSE for details.
@@ -20,6 +16,8 @@
 #include "cubeb/cubeb.h"
 #include "cubeb-internal.h"
 
+#define CUBEB_OLD_API /* seamonkey and older firefox */
+
 #define BYTES_TO_FRAMES(bytes, channels) \
   (bytes / (channels * sizeof(int16_t)))
 
@@ -87,12 +85,17 @@ struct cubeb_stream {
   int floating;
   int running;
   int play_fd;
+  int record_fd;
   float volume;
   struct audio_info p_info; /* info for the play fd */
+  struct audio_info r_info; /* info for the record fd */
   cubeb_data_callback data_cb;
   cubeb_state_callback state_cb;
   int16_t * play_buf;
+  int16_t * record_buf;
   float * f_play_buf;
+  float * f_record_buf;
+  char input_name[32];
   char output_name[32];
   uint64_t frames_written;
   uint64_t blocks_written;
@@ -194,6 +197,121 @@ sun_prinfo_verify_sanity(struct audio_pr
      prinfo->sample_rate < SUN_MAX_RATE && prinfo->sample_rate > SUN_MIN_RATE;
 }
 
+#ifndef CUBEB_OLD_API
+static int
+sun_enumerate_devices(cubeb * context, cubeb_device_type type,
+                      cubeb_device_collection * collection)
+{
+  unsigned i;
+  cubeb_device_info device = {0};
+  char dev[16] = SUN_DEFAULT_DEVICE;
+  char dev_friendly[64];
+  struct audio_info hwfmt;
+  struct audio_device hwname;
+  struct audio_prinfo *prinfo = NULL;
+  int hwprops;
+
+  collection->device = calloc(SUN_DEVICE_COUNT, sizeof(cubeb_device_info));
+  if (collection->device == NULL) {
+    return CUBEB_ERROR;
+  }
+  collection->count = 0;
+
+  for (i = 0; i < SUN_DEVICE_COUNT; ++i) {
+    if (i > 0) {
+      (void)snprintf(dev, sizeof(dev), "/dev/audio%u", i - 1);
+    }
+    if (sun_get_hwinfo(dev, &hwfmt, &hwprops, &hwname) != CUBEB_OK) {
+      continue;
+    }
+#ifdef AUDIO_GETPROPS
+    device.type = 0;
+    if ((hwprops & AUDIO_PROP_CAPTURE) != 0 &&
+        sun_prinfo_verify_sanity(&hwfmt.record)) {
+      /* the device supports recording, probably */
+      device.type |= CUBEB_DEVICE_TYPE_INPUT;
+    }
+    if ((hwprops & AUDIO_PROP_PLAYBACK) != 0 &&
+        sun_prinfo_verify_sanity(&hwfmt.play)) {
+      /* the device supports playback, probably */
+      device.type |= CUBEB_DEVICE_TYPE_OUTPUT;
+    }
+    switch (device.type) {
+    case 0:
+      /* device doesn't do input or output, aliens probably involved */
+      continue;
+    case CUBEB_DEVICE_TYPE_INPUT:
+      if ((type & CUBEB_DEVICE_TYPE_INPUT) == 0) {
+        /* this device is input only, not scanning for those, skip it */
+        continue;
+      }
+      break;
+    case CUBEB_DEVICE_TYPE_OUTPUT:
+      if ((type & CUBEB_DEVICE_TYPE_OUTPUT) == 0) {
+        /* this device is output only, not scanning for those, skip it */
+        continue;
+      }
+      break;
+    }
+    if ((type & CUBEB_DEVICE_TYPE_INPUT) != 0) {
+      prinfo = &hwfmt.record;
+    }
+    if ((type & CUBEB_DEVICE_TYPE_OUTPUT) != 0) {
+      prinfo = &hwfmt.play;
+    }
+#endif
+    if (i > 0) {
+      (void)snprintf(dev_friendly, sizeof(dev_friendly), "%s %s %s (%d)",
+                     hwname.name, hwname.version, hwname.config, i - 1);
+    } else {
+      (void)snprintf(dev_friendly, sizeof(dev_friendly), "%s %s %s (default)",
+                     hwname.name, hwname.version, hwname.config);
+    }
+    device.devid = (void *)(uintptr_t)i;
+    device.device_id = strdup(dev);
+    device.friendly_name = strdup(dev_friendly);
+    device.group_id = strdup(dev);
+    device.vendor_name = strdup(hwname.name);
+    device.type = type;
+    device.state = CUBEB_DEVICE_STATE_ENABLED;
+    device.preferred = (i == 0) ? CUBEB_DEVICE_PREF_ALL : CUBEB_DEVICE_PREF_NONE;
+#ifdef AUDIO_GETFORMAT
+    device.max_channels = prinfo->channels;
+    device.default_rate = prinfo->sample_rate;
+#else
+    device.max_channels = 2;
+    device.default_rate = SUN_PREFER_RATE;
+#endif
+    device.default_format = CUBEB_DEVICE_FMT_S16NE;
+    device.format = CUBEB_DEVICE_FMT_S16NE;
+    device.min_rate = SUN_MIN_RATE;
+    device.max_rate = SUN_MAX_RATE;
+    device.latency_lo = SUN_LATENCY_MS * SUN_MIN_RATE / 1000;
+    device.latency_hi = SUN_LATENCY_MS * SUN_MAX_RATE / 1000;
+    collection->device[collection->count++] = device;
+  }
+  return CUBEB_OK;
+}
+#endif
+
+#ifndef CUBEB_OLD_API
+static int
+sun_device_collection_destroy(cubeb * context,
+                              cubeb_device_collection * collection)
+{
+  unsigned i;
+
+  for (i = 0; i < collection->count; ++i) {
+    free((char *)collection->device[i].device_id);
+    free((char *)collection->device[i].friendly_name);
+    free((char *)collection->device[i].group_id);
+    free((char *)collection->device[i].vendor_name);
+  }
+  free(collection->device);
+  return CUBEB_OK;
+}
+#endif
+
 static int
 sun_copy_params(int fd, cubeb_stream * stream, cubeb_stream_params * params,
                 struct audio_info * info, struct audio_prinfo * prinfo)
@@ -260,8 +378,13 @@ sun_stream_destroy(cubeb_stream * s)
   if (s->play_fd != -1) {
     close(s->play_fd);
   }
+  if (s->record_fd != -1) {
+    close(s->record_fd);
+  }
   free(s->f_play_buf);
+  free(s->f_record_buf);
   free(s->play_buf);
+  free(s->record_buf);
   free(s);
 }
 
@@ -311,8 +434,10 @@ sun_io_routine(void * arg)
 {
   cubeb_stream *s = arg;
   cubeb_state state = CUBEB_STATE_STARTED;
+  size_t to_read = 0;
   long to_write = 0;
   size_t write_ofs = 0;
+  size_t read_ofs = 0;
   int drain = 0;
 
   s->state_cb(s, s->user_ptr, CUBEB_STATE_STARTED);
@@ -325,8 +450,12 @@ sun_io_routine(void * arg)
     }
     pthread_mutex_unlock(&s->mutex);
     if (s->floating) {
+      if (s->record_fd != -1) {
+        sun_linear_to_float(s->record_buf, s->f_record_buf,
+                            s->r_info.record.channels, SUN_BUFFER_FRAMES);
+      }
       to_write = s->data_cb(s, s->user_ptr,
-                            s->f_play_buf, SUN_BUFFER_FRAMES);
+                            s->f_record_buf, s->f_play_buf, SUN_BUFFER_FRAMES);
       if (to_write == CUBEB_ERROR) {
         state = CUBEB_STATE_ERROR;
         break;
@@ -339,7 +468,7 @@ sun_io_routine(void * arg)
       }
     } else {
       to_write = s->data_cb(s, s->user_ptr,
-                            s->play_buf, SUN_BUFFER_FRAMES);
+                            s->record_buf, s->play_buf, SUN_BUFFER_FRAMES);
       if (to_write == CUBEB_ERROR) {
         state = CUBEB_STATE_ERROR;
         break;
@@ -354,8 +483,10 @@ sun_io_routine(void * arg)
       drain = 1;
     }
     to_write = s->play_fd != -1 ? to_write : 0;
+    to_read = s->record_fd != -1 ? SUN_BUFFER_FRAMES : 0;
     write_ofs = 0;
-    while (to_write > 0) {
+    read_ofs = 0;
+    while (to_write > 0 || to_read > 0) {
       size_t bytes;
       ssize_t n, frames;
 
@@ -372,6 +503,16 @@ sun_io_routine(void * arg)
         to_write -= frames;
         write_ofs += frames;
       }
+      if (to_read > 0) {
+        bytes = FRAMES_TO_BYTES(to_read, s->r_info.record.channels);
+        if ((n = read(s->record_fd, s->record_buf + read_ofs, bytes)) < 0) {
+          state = CUBEB_STATE_ERROR;
+          break;
+        }
+        frames = BYTES_TO_FRAMES(n, s->r_info.record.channels);
+        to_read -= frames;
+        read_ofs += frames;
+      }
     }
     if (drain && state != CUBEB_STATE_ERROR) {
       state = CUBEB_STATE_DRAINED;
@@ -386,7 +527,10 @@ static int
 sun_stream_init(cubeb * context,
                 cubeb_stream ** stream,
                 char const * stream_name,
-                cubeb_stream_params stream_params,
+                cubeb_devid input_device,
+                cubeb_stream_params * input_stream_params,
+                cubeb_devid output_device,
+                cubeb_stream_params * output_stream_params,
                 unsigned latency_frames,
                 cubeb_data_callback data_callback,
                 cubeb_state_callback state_callback,
@@ -401,18 +545,63 @@ sun_stream_init(cubeb * context,
     ret = CUBEB_ERROR;
     goto error;
   }
-  snprintf(s->output_name, sizeof(s->output_name), "%s", SUN_DEFAULT_DEVICE);
-  if ((s->play_fd = open(s->output_name, O_WRONLY)) == -1) {
-    ret = CUBEB_ERROR;
-    goto error;
+  s->record_fd = -1;
+  s->play_fd = -1;
+  if (input_device != 0) {
+    snprintf(s->input_name, sizeof(s->input_name),
+      "/dev/audio%zu", (uintptr_t)input_device - 1);
+  } else {
+    snprintf(s->input_name, sizeof(s->input_name), "%s", SUN_DEFAULT_DEVICE);
   }
-  AUDIO_INITINFO(&s->p_info);
+  if (output_device != 0) {
+    snprintf(s->output_name, sizeof(s->output_name),
+      "/dev/audio%zu", (uintptr_t)output_device - 1);
+  } else {
+    snprintf(s->output_name, sizeof(s->output_name), "%s", SUN_DEFAULT_DEVICE);
+  }
+  if (input_stream_params != NULL) {
+#ifndef CUBEB_OLD_API
+    if (input_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK) {
+      ret = CUBEB_ERROR_NOT_SUPPORTED;
+      goto error;
+    }
+#endif
+    if (s->record_fd == -1) {
+      if ((s->record_fd = open(s->input_name, O_RDONLY)) == -1) {
+        ret = CUBEB_ERROR_DEVICE_UNAVAILABLE;
+        goto error;
+      }
+    }
+    AUDIO_INITINFO(&s->r_info);
+#ifdef AUMODE_RECORD
+    s->r_info.mode = AUMODE_RECORD;
+#endif
+    if ((ret = sun_copy_params(s->record_fd, s, input_stream_params,
+                               &s->r_info, &s->r_info.record)) != CUBEB_OK) {
+      goto error;
+    }
+  }
+  if (output_stream_params != NULL) {
+#ifndef CUBEB_OLD_API
+    if (output_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK) {
+      ret = CUBEB_ERROR_NOT_SUPPORTED;
+      goto error;
+    }
+#endif
+    if (s->play_fd == -1) {
+      if ((s->play_fd = open(s->output_name, O_WRONLY)) == -1) {
+        ret = CUBEB_ERROR_DEVICE_UNAVAILABLE;
+        goto error;
+      }
+    }
+    AUDIO_INITINFO(&s->p_info);
 #ifdef AUMODE_PLAY
-  s->p_info.mode = AUMODE_PLAY;
+    s->p_info.mode = AUMODE_PLAY;
 #endif
-  if ((ret = sun_copy_params(s->play_fd, s, &stream_params,
-                             &s->p_info, &s->p_info.play)) != CUBEB_OK) {
-    goto error;
+    if ((ret = sun_copy_params(s->play_fd, s, output_stream_params,
+                               &s->p_info, &s->p_info.play)) != CUBEB_OK) {
+      goto error;
+    }
   }
   s->context = context;
   s->volume = 1.0;
@@ -427,12 +616,22 @@ sun_stream_init(cubeb * context,
     ret = CUBEB_ERROR;
     goto error;
   }
+  if (s->record_fd != -1 && (s->record_buf = calloc(SUN_BUFFER_FRAMES,
+      s->r_info.record.channels * sizeof(int16_t))) == NULL) {
+    ret = CUBEB_ERROR;
+    goto error;
+  }
   if (s->floating) {
     if (s->play_fd != -1 && (s->f_play_buf = calloc(SUN_BUFFER_FRAMES,
         s->p_info.play.channels * sizeof(float))) == NULL) {
       ret = CUBEB_ERROR;
       goto error;
     }
+    if (s->record_fd != -1 && (s->f_record_buf = calloc(SUN_BUFFER_FRAMES,
+        s->r_info.record.channels * sizeof(float))) == NULL) {
+      ret = CUBEB_ERROR;
+      goto error;
+    }
   }
   *stream = s;
   return CUBEB_OK;
@@ -512,6 +711,8 @@ sun_get_current_device(cubeb_stream * st
   if (*device == NULL) {
     return CUBEB_ERROR;
   }
+  (*device)->input_name = stream->record_fd != -1 ?
+    strdup(stream->input_name) : NULL;
   (*device)->output_name = stream->play_fd != -1 ?
     strdup(stream->output_name) : NULL;
   return CUBEB_OK;
@@ -521,6 +722,7 @@ static int
 sun_stream_device_destroy(cubeb_stream * stream, cubeb_device * device)
 {
   (void)stream;
+  free(device->input_name);
   free(device->output_name);
   free(device);
   return CUBEB_OK;
@@ -532,16 +734,24 @@ static struct cubeb_ops const sun_ops = 
   .get_max_channel_count = sun_get_max_channel_count,
   .get_min_latency = sun_get_min_latency,
   .get_preferred_sample_rate = sun_get_preferred_sample_rate,
+#ifndef CUBEB_OLD_API
+  .enumerate_devices = sun_enumerate_devices,
+  .device_collection_destroy = sun_device_collection_destroy,
+#endif
   .destroy = sun_destroy,
   .stream_init = sun_stream_init,
   .stream_destroy = sun_stream_destroy,
   .stream_start = sun_stream_start,
   .stream_stop = sun_stream_stop,
+#ifndef CUBEB_OLD_API
+  .stream_reset_default_device = NULL,
+#endif
   .stream_get_position = sun_stream_get_position,
   .stream_get_latency = sun_stream_get_latency,
   .stream_set_volume = sun_stream_set_volume,
   .stream_set_panning = NULL,
   .stream_get_current_device = sun_get_current_device,
   .stream_device_destroy = sun_stream_device_destroy,
-  .stream_register_device_changed_callback = NULL
+  .stream_register_device_changed_callback = NULL,
+  .register_device_collection_changed = NULL
 };



Home | Main Index | Thread Index | Old Index