pkgsrc-Bugs archive

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

Re: pkg/51695: www/firefox FreeBSD and DragonFly build fixes and audio playback options



The following reply was made to PR pkg/51695; it has been noted by GNATS.

From: David Shao <davshao%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/51695: www/firefox FreeBSD and DragonFly build fixes and
 audio playback options
Date: Sat, 4 Feb 2017 12:06:51 -0800

 Last night I combed through DragonFly dports and compared its
 www/firefox patches.  The problem is I am not sure whether
 recent kernel changes to DragonFly are causing lockups running
 Firefox, even running DragonFly dports version.
 
 I had actually been running the following
 patch for a few weeks that fixed the malloc.h build problems on
 DragonFly:
 
 diff -Nur -x CVS
 www/firefox.orig/patches/patch-build_moz.configure_memory.configure
 www/firefox/patches/patch-build_moz.configure_memory.configure
 --- www/firefox.orig/patches/patch-build_moz.configure_memory.configure
    1969-12-31 16:00:00.000000000 -0800
 +++ www/firefox/patches/patch-build_moz.configure_memory.configure
 2017-01-10 09:07:56.000000000 -0800
 @@ -0,0 +1,13 @@
 +$NetBSD$
 +
 +--- build/moz.configure/memory.configure.orig    2016-10-31
 20:15:27.000000000 +0000
 ++++ build/moz.configure/memory.configure
 +@@ -66,7 +66,7 @@ def jemalloc_os_define(jemalloc, jemallo
 +             return 'MOZ_MEMORY_LINUX'
 +         if target.kernel == 'Darwin':
 +             return 'MOZ_MEMORY_DARWIN'
 +-        if target.kernel in ('kFreeBSD', 'FreeBSD', 'NetBSD'):
 ++        if target.kernel in ('kFreeBSD', 'FreeBSD', 'NetBSD', 'DragonFly'):
 +             return 'MOZ_MEMORY_BSD'
 +         die('--enable-jemalloc is not supported on %s', target.kernel)
 +
 
 Other relevant DragonFly-only patches, which I don't think are
 necessarily needed
 for building, are:
 
 diff -Nur -x CVS www/firefox.orig/patches/patch-as www/firefox/patches/patch-as
 --- www/firefox.orig/patches/patch-as    2017-01-25 15:03:59.677614000 -0800
 +++ www/firefox/patches/patch-as    2017-02-02 21:52:48.022541000 -0800
 @@ -15,3 +15,21 @@
   dnl Special win32 checks
   dnl ========================================================
 
 +@@ -1053,7 +1056,7 @@ dnl Checks for header files.
 + dnl ========================================================
 + AC_HEADER_DIRENT
 + case "$target_os" in
 +-freebsd*)
 ++freebsd*|dragonfly*)
 + # for stuff like -lXshm
 +     CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
 +     ;;
 +@@ -1184,7 +1187,7 @@ then
 +     fi
 +
 +     case "$target" in
 +-        *-*-freebsd*)
 ++        *-*-freebsd*|*-*-dragonfly*)
 +             AC_DEFINE(_REENTRANT)
 +             AC_DEFINE(_THREAD_SAFE)
 +             dnl -pthread links in -lpthread, so don't specify it explicitly.
 
 diff -Nur -x CVS
 www/firefox.orig/patches/patch-js_src_jsnativestack.cpp
 www/firefox/patches/patch-js_src_jsnativestack.cpp
 --- www/firefox.orig/patches/patch-js_src_jsnativestack.cpp
 1969-12-31 16:00:00.000000000 -0800
 +++ www/firefox/patches/patch-js_src_jsnativestack.cpp    2017-02-02
 21:50:16.549421000 -0800
 @@ -0,0 +1,16 @@
 +$NetBSD$
 +
 +From DragonFly dports
 +
 +--- js/src/jsnativestack.cpp.orig    2016-05-12 17:13:19.000000000 +0000
 ++++ js/src/jsnativestack.cpp
 +@@ -102,7 +102,8 @@ js::GetNativeStackBaseImpl()
 +     pthread_attr_init(&sattr);
 + #  if defined(__OpenBSD__)
 +     stack_t ss;
 +-#  elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD)
 ++#  elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD)  \
 ++     || defined(__DragonFly__)
 +     /* e.g. on FreeBSD 4.8 or newer, neundorf%kde.org@localhost */
 +     pthread_attr_get_np(thread, &sattr);
 + #  else
 
 There are also a couple of DragonFly specific patches for functions
 moved to sys/lwp.h, but I think that might have even been reverted.
 
 And I believe neither FreeBSD nor DragonFly support Google
 widevine, but I might be wrong:
 
 diff -Nur -x CVS www/firefox.orig/mozilla-common.mk
 www/firefox/mozilla-common.mk
 --- www/firefox.orig/mozilla-common.mk    2017-01-27 16:08:20.804346000 -0800
 +++ www/firefox/mozilla-common.mk    2017-01-26 18:13:39.140741000 -0800
 @@ -10,9 +10,11 @@
  .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
  BUILD_DEPENDS+=        yasm>=1.1:../../devel/yasm
 
 +.if ${OPSYS} != "DragonFly" && ${OPSYS} != "FreeBSD"
  # Enable Google widevine CDM. This requires external libwidevinecdm.so.
  CONFIGURE_ARGS+=    --enable-eme=widevine
  .endif
 +.endif
 
  HAS_CONFIGURE=        yes
  CONFIGURE_ARGS+=    --prefix=${PREFIX}
 


Home | Main Index | Thread Index | Old Index