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:           Sun Jul 28 18:50:34 UTC 2024

Modified Files:
        pkgsrc/www/arcticfox: Makefile distinfo
Added Files:
        pkgsrc/www/arcticfox/patches: patch-ipc_chromium_src_base_atomicops.h
            patch-ipc_chromium_src_base_atomicops__internals__arm__gcc.h
            patch-media_libtheora_moz.build
            patch-media_libyuv_source_scale__argb.cc
            patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h
            patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops__internals__arm__gcc.h

Log Message:
arcticfox: Add support for NetBSD/earmv7hf


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 pkgsrc/www/arcticfox/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/www/arcticfox/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops.h \
    pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops__internals__arm__gcc.h \
    pkgsrc/www/arcticfox/patches/patch-media_libtheora_moz.build \
    pkgsrc/www/arcticfox/patches/patch-media_libyuv_source_scale__argb.cc \
    pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h \
    pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops__internals__arm__gcc.h

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.48 pkgsrc/www/arcticfox/Makefile:1.49
--- pkgsrc/www/arcticfox/Makefile:1.48  Tue Jul 16 10:27:56 2024
+++ pkgsrc/www/arcticfox/Makefile       Sun Jul 28 18:50:33 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2024/07/16 10:27:56 nia Exp $
+# $NetBSD: Makefile,v 1.49 2024/07/28 18:50:33 nia Exp $
 
 DISTNAME=      arcticfox-44.0
 CATEGORIES=    www
@@ -84,7 +84,8 @@ SSP_SUPPORTED=                no
 
 .include "../../mk/bsd.prefs.mk"
 
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+# it thinks yasm is required on arm
+.if !${MACHINE_PLATFORM:MNetBSD-*-powerpc*}
 TOOL_DEPENDS+=         yasm>=1.1:../../devel/yasm
 .endif
 
@@ -94,6 +95,10 @@ CONFIGURE_SCRIPT=    ${WRKSRC}/configure
 LDFLAGS+=              ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGNAME_NOREV}
 LDFLAGS+=              ${COMPILER_RPATH_FLAG}${PREFIX}/lib
 
+.if ${MACHINE_PLATFORM:MNetBSD-*-earm*}
+LDFLAGS+=              -Wl,--no-keep-memory
+.endif
+
 CWRAPPERS_APPEND.cc+=  ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGNAME_NOREV}
 CWRAPPERS_APPEND.cxx+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGNAME_NOREV}
 CWRAPPERS_APPEND.ld+=  ${LINKER_RPATH_FLAG}${PREFIX}/lib/${PKGNAME_NOREV}

Index: pkgsrc/www/arcticfox/distinfo
diff -u pkgsrc/www/arcticfox/distinfo:1.15 pkgsrc/www/arcticfox/distinfo:1.16
--- pkgsrc/www/arcticfox/distinfo:1.15  Tue Jul 16 10:27:56 2024
+++ pkgsrc/www/arcticfox/distinfo       Sun Jul 28 18:50:33 2024
@@ -1,15 +1,21 @@
-$NetBSD: distinfo,v 1.15 2024/07/16 10:27:56 nia Exp $
+$NetBSD: distinfo,v 1.16 2024/07/28 18:50:33 nia Exp $
 
 BLAKE2s (arcticfox-44.0.tar.gz) = 4b40b81c5914fd7896555b29011019b46835754989ca671b8ac9a4a4f1841538
 SHA512 (arcticfox-44.0.tar.gz) = 2c1638b6378233e6114789f48ca3c3f777e2062d21ff7733c4314455ed9dadc94be8dff403e6b7a2c35748c24860a5908937efee86da8ea460b8a3b8827398ca
 Size (arcticfox-44.0.tar.gz) = 212523721 bytes
 SHA1 (patch-intl_icu_source_configure) = 051da587e03131b3a6c1dec7c55ab0cc9c06c26c
+SHA1 (patch-ipc_chromium_src_base_atomicops.h) = 3ca1d435c9f85d1e5a54532739909454c86242a2
+SHA1 (patch-ipc_chromium_src_base_atomicops__internals__arm__gcc.h) = ecf6c5ee16346c0ecf06c886fd7d76dc33b85734
 SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 98dd10e2eaa3ec2160f517d1a6cee01caa37ffb0
 SHA1 (patch-js_src_jit_ExecutableAllocatorPosix.cpp) = 91e900b6d995edc70b3234468580f7db5aa88446
 SHA1 (patch-js_src_vm_ArrayBufferObject.cpp) = 7af433cde0b6391facdf7f785f8f1b660f458a73
 SHA1 (patch-media_libcubeb_src_cubeb.c) = b3c4bd8146e2f7146baf1c2050260f7629cdb09a
 SHA1 (patch-media_libcubeb_src_moz.build) = e98b39b6272b58d4183c526f36987ea239fadd5d
+SHA1 (patch-media_libtheora_moz.build) = 363ce4e49fdac54b7fd3c3e454edae635e3ccfcb
+SHA1 (patch-media_libyuv_source_scale__argb.cc) = 2522d5a448c521acbb28ea027142c6ebc0e568eb
 SHA1 (patch-old-configure.in) = 1aca7334fe96be60dd1c8434917a99f7d44b5315
+SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h) = eef34a9539f5ef2666bb26b175e3787ce4e50677
+SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops__internals__arm__gcc.h) = 0ce774c5dc9f53a858d4b9f490ec25d548b4bb96
 SHA1 (patch-xpcom_reflect_xptcall_genstubs.pl) = 88a431a961fd910e1e7043877eba77d377185bc3
 SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = b62af604ca0f409ecfba20c13a3deead54787192
 SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke_arm_netbsd.cpp) = 6e9337c0b8ddacc06d3fa72d5bc9044be9a3d93f

Added files:

Index: pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops.h
diff -u /dev/null pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops.h:1.1
--- /dev/null   Sun Jul 28 18:50:34 2024
+++ pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops.h        Sun Jul 28 18:50:33 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-ipc_chromium_src_base_atomicops.h,v 1.1 2024/07/28 18:50:33 nia Exp $
+
+Fixes for NetBSD/arm, taken from www/firefox52
+
+--- ipc/chromium/src/base/atomicops.h.orig     2024-03-20 16:39:08.000000000 +0000
++++ ipc/chromium/src/base/atomicops.h
+@@ -45,7 +45,7 @@ typedef int64_t Atomic64;
+ 
+ // Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
+ // Atomic64 routines below, depending on your architecture.
+-#ifdef OS_OPENBSD
++#if defined(OS_OPENBSD) || (defined(OS_NETBSD) && defined(ARCH_CPU_ARM_FAMILY))
+ #ifdef ARCH_CPU_64_BITS
+ typedef Atomic64 AtomicWord;
+ #else
Index: pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops__internals__arm__gcc.h
diff -u /dev/null pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops__internals__arm__gcc.h:1.1
--- /dev/null   Sun Jul 28 18:50:34 2024
+++ pkgsrc/www/arcticfox/patches/patch-ipc_chromium_src_base_atomicops__internals__arm__gcc.h   Sun Jul 28 18:50:33 2024
@@ -0,0 +1,92 @@
+$NetBSD: patch-ipc_chromium_src_base_atomicops__internals__arm__gcc.h,v 1.1 2024/07/28 18:50:33 nia Exp $
+
+Fixes for NetBSD/arm, taken from www/firefox52
+
+--- ipc/chromium/src/base/atomicops_internals_arm_gcc.h.orig   2024-03-20 16:39:08.000000000 +0000
++++ ipc/chromium/src/base/atomicops_internals_arm_gcc.h
+@@ -12,44 +12,19 @@
+ namespace base {
+ namespace subtle {
+ 
+-// 0xffff0fc0 is the hard coded address of a function provided by
+-// the kernel which implements an atomic compare-exchange. On older
+-// ARM architecture revisions (pre-v6) this may be implemented using
+-// a syscall. This address is stable, and in active use (hard coded)
+-// by at least glibc-2.7 and the Android C library.
+-typedef Atomic32 (*LinuxKernelCmpxchgFunc)(Atomic32 old_value,
+-                                           Atomic32 new_value,
+-                                           volatile Atomic32* ptr);
+-LinuxKernelCmpxchgFunc pLinuxKernelCmpxchg __attribute__((weak)) =
+-    (LinuxKernelCmpxchgFunc) 0xffff0fc0;
+-
+-typedef void (*LinuxKernelMemoryBarrierFunc)(void);
+-LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) =
+-    (LinuxKernelMemoryBarrierFunc) 0xffff0fa0;
+-
+-
+ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+                                          Atomic32 old_value,
+                                          Atomic32 new_value) {
+-  Atomic32 prev_value = *ptr;
+-  do {
+-    if (!pLinuxKernelCmpxchg(old_value, new_value,
+-                             const_cast<Atomic32*>(ptr))) {
+-      return old_value;
+-    }
+-    prev_value = *ptr;
+-  } while (prev_value == old_value);
+-  return prev_value;
++  return __sync_val_compare_and_swap(ptr, old_value, new_value);
+ }
+ 
+ inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+                                          Atomic32 new_value) {
+-  Atomic32 old_value;
++  Atomic32 prev_value;
+   do {
+-    old_value = *ptr;
+-  } while (pLinuxKernelCmpxchg(old_value, new_value,
+-                               const_cast<Atomic32*>(ptr)));
+-  return old_value;
++    prev_value = *ptr;
++  } while (!__sync_bool_compare_and_swap(ptr, prev_value, new_value));
++  return prev_value;
+ }
+ 
+ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+@@ -59,18 +34,15 @@ inline Atomic32 NoBarrier_AtomicIncremen
+ 
+ inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                         Atomic32 increment) {
+-  for (;;) {
+-    // Atomic exchange the old value with an incremented one.
+-    Atomic32 old_value = *ptr;
+-    Atomic32 new_value = old_value + increment;
+-    if (pLinuxKernelCmpxchg(old_value, new_value,
+-                            const_cast<Atomic32*>(ptr)) == 0) {
+-      // The exchange took place as expected.
+-      return new_value;
+-    }
+-    // Otherwise, *ptr changed mid-loop and we need to retry.
+-  }
++  Atomic32 old_value;
++  Atomic32 new_value;
+ 
++  do {
++    // Atomic exchange the old value with an incremented one.
++    old_value = *ptr;
++    new_value = old_value + increment;
++  } while (!__sync_bool_compare_and_swap(ptr, old_value, new_value));
++  return new_value;
+ }
+ 
+ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+@@ -90,7 +62,7 @@ inline void NoBarrier_Store(volatile Ato
+ }
+ 
+ inline void MemoryBarrier() {
+-  pLinuxKernelMemoryBarrier();
++  __sync_synchronize();
+ }
+ 
+ inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
Index: pkgsrc/www/arcticfox/patches/patch-media_libtheora_moz.build
diff -u /dev/null pkgsrc/www/arcticfox/patches/patch-media_libtheora_moz.build:1.1
--- /dev/null   Sun Jul 28 18:50:34 2024
+++ pkgsrc/www/arcticfox/patches/patch-media_libtheora_moz.build        Sun Jul 28 18:50:33 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-media_libtheora_moz.build,v 1.1 2024/07/28 18:50:33 nia Exp $
+
+The ARM ASM is broken on NetBSD.
+
+--- media/libtheora/moz.build.orig     2024-07-28 10:15:10.264850902 +0000
++++ media/libtheora/moz.build
+@@ -76,7 +76,7 @@ if '86' in CONFIG['OS_TEST']:
+         ]
+ 
+ if CONFIG['GNU_AS']:
+-    if 'arm' in CONFIG['OS_TEST']:
++    if 'arm' in CONFIG['OS_TEST'] and CONFIG['OS_ARCH'] != 'NetBSD':
+         SOURCES += [
+             'lib/arm/armcpu.c',
+             'lib/arm/armstate.c',
Index: pkgsrc/www/arcticfox/patches/patch-media_libyuv_source_scale__argb.cc
diff -u /dev/null pkgsrc/www/arcticfox/patches/patch-media_libyuv_source_scale__argb.cc:1.1
--- /dev/null   Sun Jul 28 18:50:34 2024
+++ pkgsrc/www/arcticfox/patches/patch-media_libyuv_source_scale__argb.cc       Sun Jul 28 18:50:33 2024
@@ -0,0 +1,20 @@
+$NetBSD: patch-media_libyuv_source_scale__argb.cc,v 1.1 2024/07/28 18:50:33 nia Exp $
+
+Fix building on NetBSD/evbarm
+(Function has wrong prototype for pointer type)
+
+--- media/libyuv/source/scale_argb.cc.orig     2024-07-27 10:57:29.310719802 +0000
++++ media/libyuv/source/scale_argb.cc
+@@ -144,12 +144,6 @@ static void ScaleARGBDownEven(int src_wi
+     ScaleARGBRowDownEven = filtering ? ScaleARGBRowDownEvenBox_SSE2 :
+         ScaleARGBRowDownEven_SSE2;
+   }
+-#elif defined(HAS_SCALEARGBROWDOWNEVEN_NEON)
+-  if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(dst_width, 4) &&
+-      IS_ALIGNED(src_argb, 4)) {
+-    ScaleARGBRowDownEven = filtering ? ScaleARGBRowDownEvenBox_NEON :
+-        ScaleARGBRowDownEven_NEON;
+-  }
+ #endif
+ 
+   if (filtering == kFilterLinear) {
Index: pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h
diff -u /dev/null pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h:1.1
--- /dev/null   Sun Jul 28 18:50:34 2024
+++ pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h        Sun Jul 28 18:50:33 2024
@@ -0,0 +1,26 @@
+$NetBSD: patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h,v 1.1 2024/07/28 18:50:33 nia Exp $
+
+Fixes for NetBSD/arm, taken from www/firefox52
+
+--- toolkit/components/protobuf/src/google/protobuf/stubs/atomicops.h.orig     2024-03-20 16:39:08.000000000 +0000
++++ toolkit/components/protobuf/src/google/protobuf/stubs/atomicops.h
+@@ -76,6 +76,11 @@ typedef intptr_t Atomic64;
+ #endif
+ #endif
+ 
++#if defined(__NetBSD__) && defined(__arm__)
++// NetBSD/arm uses long for intptr_t, which fails -fpermissive checks. So
++// explicitly use int32 here instead.
++typedef int32 AtomicWord;
++#else
+ // Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
+ // Atomic64 routines below, depending on your architecture.
+ #if defined(__OpenBSD__) && !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
+@@ -83,6 +88,7 @@ typedef Atomic32 AtomicWord;
+ #else
+ typedef intptr_t AtomicWord;
+ #endif
++#endif
+ 
+ // Atomically execute:
+ //      result = *ptr;
Index: pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops__internals__arm__gcc.h
diff -u /dev/null pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops__internals__arm__gcc.h:1.1
--- /dev/null   Sun Jul 28 18:50:34 2024
+++ pkgsrc/www/arcticfox/patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops__internals__arm__gcc.h   Sun Jul 28 18:50:33 2024
@@ -0,0 +1,91 @@
+$NetBSD: patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops__internals__arm__gcc.h,v 1.1 2024/07/28 18:50:33 nia Exp $
+
+Fixes for NetBSD/arm, taken from www/firefox52
+
+--- toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h.orig   2024-03-20 16:39:08.000000000 +0000
++++ toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h
+@@ -39,44 +39,19 @@ namespace google {
+ namespace protobuf {
+ namespace internal {
+ 
+-// 0xffff0fc0 is the hard coded address of a function provided by
+-// the kernel which implements an atomic compare-exchange. On older
+-// ARM architecture revisions (pre-v6) this may be implemented using
+-// a syscall. This address is stable, and in active use (hard coded)
+-// by at least glibc-2.7 and the Android C library.
+-typedef Atomic32 (*LinuxKernelCmpxchgFunc)(Atomic32 old_value,
+-                                           Atomic32 new_value,
+-                                           volatile Atomic32* ptr);
+-LinuxKernelCmpxchgFunc pLinuxKernelCmpxchg __attribute__((weak)) =
+-    (LinuxKernelCmpxchgFunc) 0xffff0fc0;
+-
+-typedef void (*LinuxKernelMemoryBarrierFunc)(void);
+-LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) =
+-    (LinuxKernelMemoryBarrierFunc) 0xffff0fa0;
+-
+-
+ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+                                          Atomic32 old_value,
+                                          Atomic32 new_value) {
+-  Atomic32 prev_value = *ptr;
+-  do {
+-    if (!pLinuxKernelCmpxchg(old_value, new_value,
+-                             const_cast<Atomic32*>(ptr))) {
+-      return old_value;
+-    }
+-    prev_value = *ptr;
+-  } while (prev_value == old_value);
+-  return prev_value;
++  return __sync_val_compare_and_swap(ptr, old_value, new_value);
+ }
+ 
+ inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+                                          Atomic32 new_value) {
+-  Atomic32 old_value;
++  Atomic32 prev_value;
+   do {
+-    old_value = *ptr;
+-  } while (pLinuxKernelCmpxchg(old_value, new_value,
+-                               const_cast<Atomic32*>(ptr)));
+-  return old_value;
++    prev_value = *ptr;
++  } while (!__sync_bool_compare_and_swap(ptr, prev_value, new_value));
++  return prev_value;
+ }
+ 
+ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+@@ -86,17 +61,15 @@ inline Atomic32 NoBarrier_AtomicIncremen
+ 
+ inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                         Atomic32 increment) {
+-  for (;;) {
++  Atomic32 old_value;
++  Atomic32 new_value;
++
++  do {
+     // Atomic exchange the old value with an incremented one.
+-    Atomic32 old_value = *ptr;
+-    Atomic32 new_value = old_value + increment;
+-    if (pLinuxKernelCmpxchg(old_value, new_value,
+-                            const_cast<Atomic32*>(ptr)) == 0) {
+-      // The exchange took place as expected.
+-      return new_value;
+-    }
+-    // Otherwise, *ptr changed mid-loop and we need to retry.
+-  }
++    old_value = *ptr;
++    new_value = old_value + increment;
++  } while (!__sync_bool_compare_and_swap(ptr, old_value, new_value));
++  return new_value;
+ }
+ 
+ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+@@ -116,7 +89,7 @@ inline void NoBarrier_Store(volatile Ato
+ }
+ 
+ inline void MemoryBarrier() {
+-  pLinuxKernelMemoryBarrier();
++  __sync_synchronize();
+ }
+ 
+ inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {



Home | Main Index | Thread Index | Old Index