parent
f693398bc0
commit
65d7466804
|
@ -2,9 +2,8 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= adplay
|
||||
PORTVERSION= 1.8
|
||||
PORTVERSION= 1.8.1
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= audio
|
||||
|
||||
MAINTAINER= ehaupt@FreeBSD.org
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TIMESTAMP = 1511100939
|
||||
SHA256 (adplug-adplay-unix-v1.8_GH0.tar.gz) = dcb4dbf886b6087900012d00034a85fbaa29d7488d54d923122af625d8b918aa
|
||||
SIZE (adplug-adplay-unix-v1.8_GH0.tar.gz) = 42111
|
||||
TIMESTAMP = 1590309553
|
||||
SHA256 (adplug-adplay-unix-v1.8.1_GH0.tar.gz) = 5fa1d475740bf88f5a618c1a79b52d1b0faf0c70b1c3f181114711fd2c84aa2d
|
||||
SIZE (adplug-adplay-unix-v1.8.1_GH0.tar.gz) = 42222
|
||||
SHA256 (adplug-database-v1.0_GH0.tar.gz) = 1c2cfd08bbaba19209893d5a6ef18287251aa34c82c2704570255e19a2535a99
|
||||
SIZE (adplug-database-v1.0_GH0.tar.gz) = 4462
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
--- configure.ac.orig 2017-11-19 00:42:12 UTC
|
||||
+++ configure.ac
|
||||
@@ -73,7 +73,6 @@ AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]))
|
||||
# Check if AdPlug supports the new surround/harmonic synth
|
||||
AC_MSG_CHECKING([whether AdPlug supports the surround/harmonic synth])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <adplug/surroundopl.h>], [CSurroundopl *dummy;])],
|
||||
- AC_DEFINE(HAVE_ADPLUG_SURROUND,, [Defined if AdPlug supports the surround/harmonic synth])
|
||||
AC_MSG_RESULT([yes]), AC_MSG_RESULT([no - AdPlug >= 2.2 required]))
|
||||
|
||||
# Check if AdPlug supports NukedOPL
|
|
@ -2,7 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= fio
|
||||
PORTVERSION= 3.19
|
||||
PORTVERSION= 3.20
|
||||
CATEGORIES= benchmarks
|
||||
MASTER_SITES= http://brick.kernel.dk/snaps/
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1585069321
|
||||
SHA256 (fio-3.19.tar.bz2) = 4b6db7eaee26d6fd33bf210eb73b6d37f5d45adcc88726866ad030565f3ccc06
|
||||
SIZE (fio-3.19.tar.bz2) = 902391
|
||||
TIMESTAMP = 1590310844
|
||||
SHA256 (fio-3.20.tar.bz2) = 87a539ecebce3d8281ff9c653e9978302f91c72534273e85ef37a980ac5398d7
|
||||
SIZE (fio-3.20.tar.bz2) = 912040
|
||||
|
|
|
@ -42,6 +42,8 @@ man/man1/fio_generate_plots.1.gz
|
|||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libiscsi.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libhdfs.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libpmem.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libzbc-rand-write.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libzbc-seq-read.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mtd.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nbd.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/netio.fio
|
||||
|
@ -61,4 +63,6 @@ man/man1/fio_generate_plots.1.gz
|
|||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/surface-scan.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tiobench-example.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/waitfor.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zbd-rand-write.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zbd-seq-read.fio
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zipf.fio
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= dnaio
|
||||
DISTVERSION= 0.4.1
|
||||
DISTVERSION= 0.4.2
|
||||
CATEGORIES= biology python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1574517285
|
||||
SHA256 (dnaio-0.4.1.tar.gz) = 371a461bac0e821ff52f6235f0de4533ac73b0e990b470e9625486f2e6df2cd7
|
||||
SIZE (dnaio-0.4.1.tar.gz) = 123246
|
||||
TIMESTAMP = 1589846766
|
||||
SHA256 (dnaio-0.4.2.tar.gz) = fa55a45bfd5d9272409b714158fb3a7de5dceac1034a0af84502c7f503ee84f8
|
||||
SIZE (dnaio-0.4.2.tar.gz) = 125495
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= fidocadj
|
||||
PORTVERSION= 0.24.6
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 0.24.7
|
||||
PORTREVISION= 0
|
||||
CATEGORIES= cad java
|
||||
# No USE_GITHUB here because GITHUB_EXTRACT_SUFX is hardcoded to .tar.gz
|
||||
MASTER_SITES= https://github.com/DarwinNE/FidoCadJ/releases/download/v${PORTVERSION}/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TIMESTAMP = 1586040218
|
||||
SHA256 (fidocadj/fidocadj.jar) = 43317930b20af0f2491cb22f03df6cc61f8367ccfffe4c4bbc946390f78235aa
|
||||
SIZE (fidocadj/fidocadj.jar) = 689142
|
||||
TIMESTAMP = 1590333888
|
||||
SHA256 (fidocadj/fidocadj.jar) = 18782a9f60a1611d83487a3d7209dc67d72e6b24d1924ff2e6ba71c5111e43a8
|
||||
SIZE (fidocadj/fidocadj.jar) = 664563
|
||||
SHA256 (fidocadj/manual_en.pdf) = 8da975735cd4a62350387984fec682d4e6de8c6a261c0422f6d65d8b80857dde
|
||||
SIZE (fidocadj/manual_en.pdf) = 2772362
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
# Created by: Palle Girgensohn <girgen@pingpong.net>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTREVISION= 1
|
||||
WANT_PGSQL_VER=9.4
|
||||
|
||||
DEPRECATED= PostgreSQL-9.4 has reached end-of-life
|
||||
EXPIRATION_DATE=2020-07-24
|
||||
|
||||
.include "${.CURDIR}/../postgresql12-docs/Makefile"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
PKGNAMESUFFIX= -postgresql94
|
||||
|
||||
CONFLICTS= pgtcl-[0-9]* pgtcl-postgresql9[0123]-[0-9]*
|
||||
|
@ -8,4 +8,7 @@ CONFLICTS= pgtcl-[0-9]* pgtcl-postgresql9[0123]-[0-9]*
|
|||
PGTCL_SLAVE= 9.4
|
||||
MASTERDIR= ${.CURDIR}/../pgtcl
|
||||
|
||||
DEPRECATED= PostgreSQL-9.4 has reached end-of-life
|
||||
EXPIRATION_DATE=2020-07-24
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
# Created by: Palle Girgensohn <girgen@partitur.se>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTREVISION= 1
|
||||
WANT_PGSQL_VER= 9.4
|
||||
|
||||
INSTALL_DIRS= src/pl/plperl
|
||||
|
||||
DEPRECATED= PostgreSQL-9.4 has reached end-of-life
|
||||
EXPIRATION_DATE=2020-07-24
|
||||
|
||||
.include "${.CURDIR}/../postgresql12-plperl/Makefile"
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTREVISION= 1
|
||||
WANT_PGSQL_VER= 9.4
|
||||
|
||||
INSTALL_DIRS= src/pl/plpython contrib/hstore_plpython contrib/ltree_plpython
|
||||
INSTALL_DIRS= src/pl/plpython
|
||||
|
||||
DEPRECATED= PostgreSQL-9.4 has reached end-of-life
|
||||
EXPIRATION_DATE=2020-07-24
|
||||
|
||||
.include "${.CURDIR}/../postgresql12-plpython/Makefile"
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
# Created by: Palle Girgensohn <girgen@partitur.se>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTREVISION= 1
|
||||
WANT_PGSQL_VER= 9.4
|
||||
|
||||
DEPRECATED= PostgreSQL-9.4 has reached end-of-life
|
||||
EXPIRATION_DATE=2020-07-24
|
||||
|
||||
.include "${.CURDIR}/../postgresql12-pltcl/Makefile"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
DISTVERSION?= 9.4.26
|
||||
# PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and
|
||||
# not their own. Probably best to keep it at ?=0 when reset here too.
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
PKGNAMESUFFIX?= ${PORTVERSION:R:S/.//}${COMPONENT}
|
||||
|
||||
MAINTAINER?= pgsql@FreeBSD.org
|
||||
|
@ -22,4 +22,7 @@ PG_USER?= pgsql
|
|||
PG_GROUP?= pgsql
|
||||
PG_UID?= 70
|
||||
|
||||
DEPRECATED= PostgreSQL-9.4 has reached end-of-life
|
||||
EXPIRATION_DATE=2020-07-24
|
||||
|
||||
.include "${.CURDIR}/../postgresql12-server/Makefile"
|
||||
|
|
|
@ -248,7 +248,6 @@
|
|||
SUBDIR += boost_build
|
||||
SUBDIR += bossa
|
||||
SUBDIR += bpython
|
||||
SUBDIR += breakpad
|
||||
SUBDIR += brz
|
||||
SUBDIR += bsdbuild
|
||||
SUBDIR += bsdcflow
|
||||
|
@ -520,6 +519,7 @@
|
|||
SUBDIR += egypt
|
||||
SUBDIR += eiffelstudio
|
||||
SUBDIR += electron4
|
||||
SUBDIR += electron5
|
||||
SUBDIR += electron6
|
||||
SUBDIR += electron7
|
||||
SUBDIR += elf
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= optparse
|
||||
DISTVERSION= 1.6.4
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 1.6.6
|
||||
CATEGORIES= devel
|
||||
DISTNAME= ${PORTNAME}_${DISTVERSION}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1573918581
|
||||
SHA256 (optparse_1.6.4.tar.gz) = cd7855ebc2303da4ab0615282667c7eeef5329faf51bd2bf2e4b0d250561d973
|
||||
SIZE (optparse_1.6.4.tar.gz) = 37654
|
||||
TIMESTAMP = 1589846703
|
||||
SHA256 (optparse_1.6.6.tar.gz) = 51779d497146e9354b1153713d939e81551e08948c2b00e4b117b1377c0b60d0
|
||||
SIZE (optparse_1.6.6.tar.gz) = 37896
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
# Created by: Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= breakpad
|
||||
DISTVERSION= g20170811
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= pizzamig@FreeBSD.org
|
||||
COMMENT= Client/server based crash-reporting system
|
||||
|
||||
BROKEN= unfetchable
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-05-05
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
USES= autoreconf compiler:c++11-lib
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= google
|
||||
GH_TAGNAME= 38cbbfed71efcb28931b5e4a83e3c0d4661f1548
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-extract:
|
||||
@${MKDIR} ${WRKSRC}/src/third_party/lss
|
||||
@${CP} ${FILESDIR}/linux_syscall_support.h ${WRKSRC}/src/third_party/lss
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -1,3 +0,0 @@
|
|||
TIMESTAMP = 1502792874
|
||||
SHA256 (google-breakpad-g20170811-38cbbfed71efcb28931b5e4a83e3c0d4661f1548_GH0.tar.gz) = 26d5a35d032294a9f14ad4254fee6bdfa7217a4e458ad2957e2632998c30299d
|
||||
SIZE (google-breakpad-g20170811-38cbbfed71efcb28931b5e4a83e3c0d4661f1548_GH0.tar.gz) = 5256786
|
|
@ -1,10 +0,0 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define sys_readlink readlink
|
||||
|
||||
#define sys_open open
|
||||
#define sys_close close
|
||||
#define sys_fstat fstat
|
||||
#define sys_mmap mmap
|
||||
#define sys_munmap munmap
|
|
@ -1,115 +0,0 @@
|
|||
--- Makefile.am.orig 2017-07-12 17:53:15 UTC
|
||||
+++ Makefile.am
|
||||
@@ -69,7 +69,7 @@ dist_doc_DATA = \
|
||||
README.md
|
||||
|
||||
## Headers
|
||||
-if LINUX_HOST
|
||||
+#if LINUX_HOST
|
||||
includeclhdir = $(includedir)/$(PACKAGE)/client/linux/handler
|
||||
includeclh_HEADERS = $(top_srcdir)/src/client/linux/handler/*.h
|
||||
|
||||
@@ -82,12 +82,14 @@ includeclm_HEADERS = $(top_srcdir)/src/c
|
||||
includeclcdir = $(includedir)/$(PACKAGE)/client/linux/crash_generation
|
||||
includeclc_HEADERS = $(top_srcdir)/src/client/linux/crash_generation/*.h
|
||||
|
||||
+if LINUX_HOST
|
||||
includelssdir = $(includedir)/$(PACKAGE)/third_party/lss
|
||||
includelss_HEADERS = $(top_srcdir)/src/third_party/lss/*.h
|
||||
+endif
|
||||
|
||||
includecldir = $(includedir)/$(PACKAGE)/common/linux
|
||||
includecl_HEADERS = $(top_srcdir)/src/common/linux/*.h
|
||||
-endif
|
||||
+#endif
|
||||
|
||||
includegbcdir = $(includedir)/$(PACKAGE)/google_breakpad/common
|
||||
includegbc_HEADERS = $(top_srcdir)/src/google_breakpad/common/*.h
|
||||
@@ -344,6 +346,9 @@ bin_PROGRAMS += \
|
||||
src/processor/minidump_stackwalk
|
||||
endif !DISABLE_PROCESSOR
|
||||
|
||||
+bin_PROGRAMS += \
|
||||
+ src/tools/linux/dump_syms/dump_syms
|
||||
+
|
||||
if LINUX_HOST
|
||||
EXTRA_PROGRAMS += \
|
||||
src/client/linux/linux_dumper_unittest_helper
|
||||
@@ -353,7 +358,6 @@ CLEANFILES += \
|
||||
if !DISABLE_TOOLS
|
||||
bin_PROGRAMS += \
|
||||
src/tools/linux/core2md/core2md \
|
||||
- src/tools/linux/dump_syms/dump_syms \
|
||||
src/tools/linux/md2core/minidump-2-core \
|
||||
src/tools/linux/symupload/minidump_upload \
|
||||
src/tools/linux/symupload/sym_upload
|
||||
@@ -448,6 +452,34 @@ else
|
||||
LOG_DRIVER = $(top_srcdir)/autotools/test-driver
|
||||
endif
|
||||
|
||||
+src_tools_linux_dump_syms_dump_syms_SOURCES = \
|
||||
+ src/common/dwarf_cfi_to_module.cc \
|
||||
+ src/common/dwarf_cu_to_module.cc \
|
||||
+ src/common/dwarf_line_to_module.cc \
|
||||
+ src/common/language.cc \
|
||||
+ src/common/module.cc \
|
||||
+ src/common/stabs_reader.cc \
|
||||
+ src/common/stabs_to_module.cc \
|
||||
+ src/common/dwarf/bytereader.cc \
|
||||
+ src/common/dwarf/dwarf2diehandler.cc \
|
||||
+ src/common/dwarf/dwarf2reader.cc \
|
||||
+ src/common/dwarf/elf_reader.cc \
|
||||
+ src/common/linux/crc32.cc \
|
||||
+ src/common/linux/dump_symbols.cc \
|
||||
+ src/common/linux/dump_symbols.h \
|
||||
+ src/common/linux/elf_symbols_to_module.cc \
|
||||
+ src/common/linux/elf_symbols_to_module.h \
|
||||
+ src/common/linux/elfutils.cc \
|
||||
+ src/common/linux/file_id.cc \
|
||||
+ src/common/linux/linux_libc_support.cc \
|
||||
+ src/common/linux/memory_mapped_file.cc \
|
||||
+ src/common/linux/safe_readlink.cc \
|
||||
+ src/tools/linux/dump_syms/dump_syms.cc
|
||||
+src_tools_linux_dump_syms_dump_syms_CXXFLAGS = \
|
||||
+ $(RUST_DEMANGLE_CFLAGS)
|
||||
+src_tools_linux_dump_syms_dump_syms_LDADD = \
|
||||
+ $(RUST_DEMANGLE_LIBS)
|
||||
+
|
||||
if LINUX_HOST
|
||||
src_client_linux_linux_dumper_unittest_helper_SOURCES = \
|
||||
src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
@@ -562,34 +594,6 @@ src_tools_linux_core2md_core2md_SOURCES
|
||||
src_tools_linux_core2md_core2md_LDADD = \
|
||||
src/client/linux/libbreakpad_client.a
|
||||
|
||||
-src_tools_linux_dump_syms_dump_syms_SOURCES = \
|
||||
- src/common/dwarf_cfi_to_module.cc \
|
||||
- src/common/dwarf_cu_to_module.cc \
|
||||
- src/common/dwarf_line_to_module.cc \
|
||||
- src/common/language.cc \
|
||||
- src/common/module.cc \
|
||||
- src/common/stabs_reader.cc \
|
||||
- src/common/stabs_to_module.cc \
|
||||
- src/common/dwarf/bytereader.cc \
|
||||
- src/common/dwarf/dwarf2diehandler.cc \
|
||||
- src/common/dwarf/dwarf2reader.cc \
|
||||
- src/common/dwarf/elf_reader.cc \
|
||||
- src/common/linux/crc32.cc \
|
||||
- src/common/linux/dump_symbols.cc \
|
||||
- src/common/linux/dump_symbols.h \
|
||||
- src/common/linux/elf_symbols_to_module.cc \
|
||||
- src/common/linux/elf_symbols_to_module.h \
|
||||
- src/common/linux/elfutils.cc \
|
||||
- src/common/linux/file_id.cc \
|
||||
- src/common/linux/linux_libc_support.cc \
|
||||
- src/common/linux/memory_mapped_file.cc \
|
||||
- src/common/linux/safe_readlink.cc \
|
||||
- src/tools/linux/dump_syms/dump_syms.cc
|
||||
-src_tools_linux_dump_syms_dump_syms_CXXFLAGS = \
|
||||
- $(RUST_DEMANGLE_CFLAGS)
|
||||
-src_tools_linux_dump_syms_dump_syms_LDADD = \
|
||||
- $(RUST_DEMANGLE_LIBS)
|
||||
-
|
||||
src_tools_linux_md2core_minidump_2_core_SOURCES = \
|
||||
src/common/linux/memory_mapped_file.cc \
|
||||
src/tools/linux/md2core/minidump-2-core.cc \
|
|
@ -1,11 +0,0 @@
|
|||
--- src/common/dwarf/elf_reader.cc.orig 2017-07-12 17:53:15 UTC
|
||||
+++ src/common/dwarf/elf_reader.cc
|
||||
@@ -56,7 +56,7 @@
|
||||
#endif
|
||||
|
||||
// Map Linux macros to their Apple equivalents.
|
||||
-#if __APPLE__
|
||||
+#if __APPLE__ || __FreeBSD__
|
||||
#ifndef __LITTLE_ENDIAN
|
||||
#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
|
||||
#endif // __LITTLE_ENDIAN
|
|
@ -1,13 +0,0 @@
|
|||
--- src/common/linux/dump_symbols.cc.orig 2017-07-12 17:53:15 UTC
|
||||
+++ src/common/linux/dump_symbols.cc
|
||||
@@ -53,6 +53,10 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
+#if __FreeBSD__
|
||||
+#include <libgen.h>
|
||||
+#endif
|
||||
+
|
||||
#include "common/dwarf/bytereader-inl.h"
|
||||
#include "common/dwarf/dwarf2diehandler.h"
|
||||
#include "common/dwarf_cfi_to_module.h"
|
|
@ -1,15 +0,0 @@
|
|||
--- src/common/linux/elfutils.cc.orig 2017-07-12 17:53:15 UTC
|
||||
+++ src/common/linux/elfutils.cc
|
||||
@@ -35,6 +35,12 @@
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
#include "common/linux/elfutils-inl.h"
|
||||
|
||||
+#ifndef ElfW
|
||||
+#define ElfW(type) _ElfW (Elf, __ELF_WORD_SIZE, type)
|
||||
+#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
|
||||
+#define _ElfW_1(e,w,t) e##w##t
|
||||
+#endif
|
||||
+
|
||||
namespace google_breakpad {
|
||||
|
||||
namespace {
|
|
@ -1,15 +0,0 @@
|
|||
--- src/common/linux/memory_mapped_file.cc.orig 2017-07-12 17:53:15 UTC
|
||||
+++ src/common/linux/memory_mapped_file.cc
|
||||
@@ -65,9 +65,10 @@ bool MemoryMappedFile::Map(const char* p
|
||||
}
|
||||
|
||||
#if defined(__x86_64__) || defined(__aarch64__) || \
|
||||
- (defined(__mips__) && _MIPS_SIM == _ABI64)
|
||||
+ (defined(__mips__) && _MIPS_SIM == _ABI64) || \
|
||||
+ defined(__FreeBSD__)
|
||||
|
||||
- struct kernel_stat st;
|
||||
+ struct stat st;
|
||||
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
|
||||
#else
|
||||
struct kernel_stat64 st;
|
|
@ -1,11 +0,0 @@
|
|||
--- src/common/memory.h.orig 2017-07-12 17:53:15 UTC
|
||||
+++ src/common/memory.h
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sanitizer/msan_interface.h>
|
||||
#endif
|
||||
|
||||
-#ifdef __APPLE__
|
||||
+#if __APPLE__ || __FreeBSD__
|
||||
#define sys_mmap mmap
|
||||
#define sys_munmap munmap
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
|
@ -1,4 +0,0 @@
|
|||
Breakpad is a set of client and server components which implement
|
||||
a crash-reporting system.
|
||||
|
||||
WWW: https://github.com/google/breakpad
|
|
@ -1,143 +0,0 @@
|
|||
bin/dump_syms
|
||||
bin/microdump_stackwalk
|
||||
bin/minidump_dump
|
||||
bin/minidump_stackwalk
|
||||
include/breakpad/client/linux/crash_generation/client_info.h
|
||||
include/breakpad/client/linux/crash_generation/crash_generation_client.h
|
||||
include/breakpad/client/linux/crash_generation/crash_generation_server.h
|
||||
include/breakpad/client/linux/dump_writer_common/mapping_info.h
|
||||
include/breakpad/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
include/breakpad/client/linux/dump_writer_common/thread_info.h
|
||||
include/breakpad/client/linux/dump_writer_common/ucontext_reader.h
|
||||
include/breakpad/client/linux/handler/exception_handler.h
|
||||
include/breakpad/client/linux/handler/microdump_extra_info.h
|
||||
include/breakpad/client/linux/handler/minidump_descriptor.h
|
||||
include/breakpad/client/linux/minidump_writer/cpu_set.h
|
||||
include/breakpad/client/linux/minidump_writer/directory_reader.h
|
||||
include/breakpad/client/linux/minidump_writer/line_reader.h
|
||||
include/breakpad/client/linux/minidump_writer/linux_core_dumper.h
|
||||
include/breakpad/client/linux/minidump_writer/linux_dumper.h
|
||||
include/breakpad/client/linux/minidump_writer/linux_ptrace_dumper.h
|
||||
include/breakpad/client/linux/minidump_writer/minidump_writer.h
|
||||
include/breakpad/client/linux/minidump_writer/minidump_writer_unittest_utils.h
|
||||
include/breakpad/client/linux/minidump_writer/proc_cpuinfo_reader.h
|
||||
include/breakpad/common/basictypes.h
|
||||
include/breakpad/common/byte_cursor.h
|
||||
include/breakpad/common/convert_UTF.h
|
||||
include/breakpad/common/dwarf_cfi_to_module.h
|
||||
include/breakpad/common/dwarf_cu_to_module.h
|
||||
include/breakpad/common/dwarf_line_to_module.h
|
||||
include/breakpad/common/language.h
|
||||
include/breakpad/common/linux/crc32.h
|
||||
include/breakpad/common/linux/dump_symbols.h
|
||||
include/breakpad/common/linux/eintr_wrapper.h
|
||||
include/breakpad/common/linux/elf_core_dump.h
|
||||
include/breakpad/common/linux/elf_gnu_compat.h
|
||||
include/breakpad/common/linux/elf_symbols_to_module.h
|
||||
include/breakpad/common/linux/elfutils-inl.h
|
||||
include/breakpad/common/linux/elfutils.h
|
||||
include/breakpad/common/linux/file_id.h
|
||||
include/breakpad/common/linux/google_crashdump_uploader.h
|
||||
include/breakpad/common/linux/guid_creator.h
|
||||
include/breakpad/common/linux/http_upload.h
|
||||
include/breakpad/common/linux/ignore_ret.h
|
||||
include/breakpad/common/linux/libcurl_wrapper.h
|
||||
include/breakpad/common/linux/linux_libc_support.h
|
||||
include/breakpad/common/linux/memory_mapped_file.h
|
||||
include/breakpad/common/linux/safe_readlink.h
|
||||
include/breakpad/common/linux/symbol_upload.h
|
||||
include/breakpad/common/linux/synth_elf.h
|
||||
include/breakpad/common/md5.h
|
||||
include/breakpad/common/memory.h
|
||||
include/breakpad/common/memory_range.h
|
||||
include/breakpad/common/minidump_type_helper.h
|
||||
include/breakpad/common/module.h
|
||||
include/breakpad/common/scoped_ptr.h
|
||||
include/breakpad/common/simple_string_dictionary.h
|
||||
include/breakpad/common/stabs_reader.h
|
||||
include/breakpad/common/stabs_to_module.h
|
||||
include/breakpad/common/stdio_wrapper.h
|
||||
include/breakpad/common/string_conversion.h
|
||||
include/breakpad/common/symbol_data.h
|
||||
include/breakpad/common/test_assembler.h
|
||||
include/breakpad/common/unordered.h
|
||||
include/breakpad/common/using_std_string.h
|
||||
include/breakpad/google_breakpad/common/breakpad_types.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_amd64.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_arm.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_arm64.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_mips.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_ppc.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_ppc64.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_sparc.h
|
||||
include/breakpad/google_breakpad/common/minidump_cpu_x86.h
|
||||
include/breakpad/google_breakpad/common/minidump_exception_linux.h
|
||||
include/breakpad/google_breakpad/common/minidump_exception_mac.h
|
||||
include/breakpad/google_breakpad/common/minidump_exception_ps3.h
|
||||
include/breakpad/google_breakpad/common/minidump_exception_solaris.h
|
||||
include/breakpad/google_breakpad/common/minidump_exception_win32.h
|
||||
include/breakpad/google_breakpad/common/minidump_format.h
|
||||
include/breakpad/google_breakpad/common/minidump_size.h
|
||||
include/breakpad/processor/address_map-inl.h
|
||||
include/breakpad/processor/address_map.h
|
||||
include/breakpad/processor/basic_code_module.h
|
||||
include/breakpad/processor/basic_code_modules.h
|
||||
include/breakpad/processor/basic_source_line_resolver_types.h
|
||||
include/breakpad/processor/cfi_frame_info-inl.h
|
||||
include/breakpad/processor/cfi_frame_info.h
|
||||
include/breakpad/processor/contained_range_map-inl.h
|
||||
include/breakpad/processor/contained_range_map.h
|
||||
include/breakpad/processor/disassembler_x86.h
|
||||
include/breakpad/processor/exploitability_linux.h
|
||||
include/breakpad/processor/exploitability_win.h
|
||||
include/breakpad/processor/fast_source_line_resolver_types.h
|
||||
include/breakpad/processor/linked_ptr.h
|
||||
include/breakpad/processor/logging.h
|
||||
include/breakpad/processor/map_serializers-inl.h
|
||||
include/breakpad/processor/map_serializers.h
|
||||
include/breakpad/processor/module_comparer.h
|
||||
include/breakpad/processor/module_factory.h
|
||||
include/breakpad/processor/module_serializer.h
|
||||
include/breakpad/processor/pathname_stripper.h
|
||||
include/breakpad/processor/postfix_evaluator-inl.h
|
||||
include/breakpad/processor/postfix_evaluator.h
|
||||
include/breakpad/processor/range_map-inl.h
|
||||
include/breakpad/processor/range_map.h
|
||||
include/breakpad/processor/simple_serializer-inl.h
|
||||
include/breakpad/processor/simple_serializer.h
|
||||
include/breakpad/processor/simple_symbol_supplier.h
|
||||
include/breakpad/processor/source_line_resolver_base_types.h
|
||||
include/breakpad/processor/stackwalk_common.h
|
||||
include/breakpad/processor/stackwalker_address_list.h
|
||||
include/breakpad/processor/stackwalker_amd64.h
|
||||
include/breakpad/processor/stackwalker_arm.h
|
||||
include/breakpad/processor/stackwalker_arm64.h
|
||||
include/breakpad/processor/stackwalker_mips.h
|
||||
include/breakpad/processor/stackwalker_ppc.h
|
||||
include/breakpad/processor/stackwalker_ppc64.h
|
||||
include/breakpad/processor/stackwalker_sparc.h
|
||||
include/breakpad/processor/stackwalker_unittest_utils.h
|
||||
include/breakpad/processor/stackwalker_x86.h
|
||||
include/breakpad/processor/static_address_map-inl.h
|
||||
include/breakpad/processor/static_address_map.h
|
||||
include/breakpad/processor/static_contained_range_map-inl.h
|
||||
include/breakpad/processor/static_contained_range_map.h
|
||||
include/breakpad/processor/static_map-inl.h
|
||||
include/breakpad/processor/static_map.h
|
||||
include/breakpad/processor/static_map_iterator-inl.h
|
||||
include/breakpad/processor/static_map_iterator.h
|
||||
include/breakpad/processor/static_range_map-inl.h
|
||||
include/breakpad/processor/static_range_map.h
|
||||
include/breakpad/processor/symbolic_constants_win.h
|
||||
include/breakpad/processor/synth_minidump.h
|
||||
include/breakpad/processor/synth_minidump_unittest_data.h
|
||||
include/breakpad/processor/tokenize.h
|
||||
include/breakpad/processor/windows_frame_info.h
|
||||
lib/libbreakpad.a
|
||||
libdata/pkgconfig/breakpad.pc
|
||||
%%PORTDOCS%%%%DOCSDIR%%-0.1/AUTHORS
|
||||
%%PORTDOCS%%%%DOCSDIR%%-0.1/ChangeLog
|
||||
%%PORTDOCS%%%%DOCSDIR%%-0.1/INSTALL
|
||||
%%PORTDOCS%%%%DOCSDIR%%-0.1/LICENSE
|
||||
%%PORTDOCS%%%%DOCSDIR%%-0.1/NEWS
|
||||
%%PORTDOCS%%%%DOCSDIR%%-0.1/README.md
|
|
@ -2,57 +2,43 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= cscout
|
||||
PORTVERSION= 2.7
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 3.01
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.spinellis.gr/cscout/ \
|
||||
http://www.dmst.aueb.gr/dds/cscout/
|
||||
DISTFILES= ${DISTNAME}-neutral${EXTRACT_SUFX} \
|
||||
${DISTNAME}-fbsd-${ARCH}${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= dds@FreeBSD.org
|
||||
COMMENT= Source code analyzer and refactoring browser for C program collections
|
||||
|
||||
BROKEN= unfetchable
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-05-05
|
||||
LICENSE= GPLv3
|
||||
|
||||
LIB_DEPENDS+= libc.so.6:misc/compat6x
|
||||
BUILD_DEPENDS= unzip:archivers/unzip
|
||||
RUN_DEPENDS= dot:graphics/graphviz
|
||||
|
||||
NO_BUILD= yes
|
||||
ONLY_FOR_ARCHS= i386 amd64 sparc64
|
||||
ONLY_FOR_ARCHS_REASON= The port fetches and installs precompiled binaries
|
||||
USES= perl5 shebangfix
|
||||
USE_PERL5= run
|
||||
SHEBANG_FILES= bin/csmake bin/cswc
|
||||
USES= gmake perl5 shebangfix
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= dspinellis dspinellis:swill,btyacc
|
||||
GH_PROJECT= cscout swill:swill btyacc:btyacc
|
||||
GH_TAGNAME= bd7dfac fafde76:swill 4d0be15:btyacc
|
||||
GH_SUBDIR= swill:swill btyacc:btyacc
|
||||
USE_PERL5= run build
|
||||
SHEBANG_FILES= src/csmake.pl src/cswc.pl
|
||||
|
||||
OPTIONS_DEFINE= DOCS EXAMPLES
|
||||
# DOCS temporary disabled, need XML -> HTML conversion
|
||||
OPTIONS_DEFINE= EXAMPLES #DOCS
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
post-patch:
|
||||
.if exists(/usr/include/g++/)
|
||||
${REINPLACE_CMD} -i "" -e 's:g++-3:g++:g' \
|
||||
${WRKSRC}/etc/cscout_incs.FBSD_GCC
|
||||
.endif
|
||||
(${SED} -n '1,/Platform defines begin/p' \
|
||||
${WRKSRC}/etc/cscout_defs.FBSD_GCC && \
|
||||
${CPP} -O -dM /dev/null | ${SORT} && \
|
||||
${SED} -n '/Platform defines end/,$$p' \
|
||||
${WRKSRC}/etc/cscout_defs.FBSD_GCC ) \
|
||||
> ${WRKDIR}/cscout_defs.h
|
||||
${CP} ${WRKDIR}/cscout_defs.h ${WRKSRC}/etc/cscout_defs.FBSD_GCC
|
||||
${REINPLACE_CMD} -e 's|install -d \"|install -d \"${STAGEDIR}/|g' ${WRKSRC}/src/Makefile
|
||||
${REINPLACE_CMD} -e 's|install -Ds $$< \"|install -s $$< \"${STAGEDIR}/|g' ${WRKSRC}/src/Makefile
|
||||
${REINPLACE_CMD} -e 's|./dest-install.sh \"|./dest-install.sh \"${STAGEDIR}/|g' ${WRKSRC}/src/Makefile
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/cscout ${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/cswc ${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/csmake ${STAGEDIR}${PREFIX}/bin
|
||||
cd ${WRKSRC}/etc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/etc/cscout_incs.FBSD_GCC ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/
|
||||
${INSTALL_DATA} ${WRKSRC}/etc/cscout_defs.FBSD_GCC ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/
|
||||
${INSTALL_MAN} ${WRKSRC}/man/cscout.1 ${STAGEDIR}${PREFIX}/man/man1
|
||||
${INSTALL_MAN} ${WRKSRC}/man/cswc.1 ${STAGEDIR}${PREFIX}/man/man1
|
||||
${INSTALL_MAN} ${WRKSRC}/man/cscc.1 ${STAGEDIR}${PREFIX}/man/man1
|
||||
${INSTALL_MAN} ${WRKSRC}/man/csmake.1 ${STAGEDIR}${PREFIX}/man/man1
|
||||
|
||||
do-install-DOCS-on:
|
||||
cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
|
||||
#do-install-DOCS-on:
|
||||
# cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
do-install-EXAMPLES-on:
|
||||
cd ${WRKSRC}/example && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
SHA256 (cscout-2.7-fbsd-i386.tar.gz) = e6cc7d5f0bc5dd7b787865ece4a9b2d1672617b2ab8cc66ef481c4b1e2a6426c
|
||||
SIZE (cscout-2.7-fbsd-i386.tar.gz) = 652845
|
||||
SHA256 (cscout-2.7-fbsd-amd64.tar.gz) = 2197bee348e0dd163cdc233dc0ae283acf9e09e237699b55857a23fded08bf6f
|
||||
SIZE (cscout-2.7-fbsd-amd64.tar.gz) = 680558
|
||||
SHA256 (cscout-2.7-fbsd-sparc64.tar.gz) = ed18ee49cd533151075adbe62ec37c96539fdc5ceea649634254b5ca9461cad7
|
||||
SIZE (cscout-2.7-fbsd-sparc64.tar.gz) = 692352
|
||||
SHA256 (cscout-2.7-neutral.tar.gz) = ef0d3442756077f0623be3e5f9592d78bcd702c215a6766d1c6fc3b39b753cf2
|
||||
SIZE (cscout-2.7-neutral.tar.gz) = 730328
|
||||
TIMESTAMP = 1575242282
|
||||
SHA256 (dspinellis-cscout-3.01-bd7dfac_GH0.tar.gz) = d2e0af80a0e581e36020c319931cac67337b5c6d6d33b73d2d1cd4c7edef116d
|
||||
SIZE (dspinellis-cscout-3.01-bd7dfac_GH0.tar.gz) = 1165610
|
||||
SHA256 (dspinellis-swill-fafde76_GH0.tar.gz) = 52303d4e83f170f1c454314471b5d4c76cfbb3e41828272416d6370e8bac4052
|
||||
SIZE (dspinellis-swill-fafde76_GH0.tar.gz) = 119107
|
||||
SHA256 (dspinellis-btyacc-4d0be15_GH0.tar.gz) = 18d71bcfff135167f7a3997bdf36796ed0a53f3a82b97aa6c06cf378599b78b2
|
||||
SIZE (dspinellis-btyacc-4d0be15_GH0.tar.gz) = 87570
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
--- Makefile.orig 2019-11-04 16:42:35 UTC
|
||||
+++ Makefile
|
||||
@@ -25,6 +25,8 @@ HSQLDB_URL=http://downloads.sourceforge.net/project/hs
|
||||
DEFAULT_HSQLDB_DIR=$(CSCOUT_DIR)/hsqldb-$(HSQLDB_VERSION)/hsqldb
|
||||
export HSQLDB_DIR?=$(DEFAULT_HSQLDB_DIR)
|
||||
|
||||
+all: .PHONY install
|
||||
+
|
||||
.PHONY: src/build/cscout swill/libswill.a btyacc/btyacc
|
||||
|
||||
src/build/cscout: swill/libswill.a btyacc/btyacc
|
||||
@@ -33,15 +35,16 @@ src/build/cscout: swill/libswill.a btyacc/btyacc
|
||||
swill/libswill.a: swill
|
||||
cd swill && $(MAKE)
|
||||
|
||||
-swill:
|
||||
- git clone https://github.com/dspinellis/swill.git
|
||||
+swill: swillconfig
|
||||
+
|
||||
+swillconfig:
|
||||
cd swill && ./configure
|
||||
|
||||
btyacc/btyacc: btyacc
|
||||
cd btyacc && $(MAKE)
|
||||
|
||||
btyacc:
|
||||
- git clone https://github.com/dspinellis/btyacc
|
||||
+ #git clone https://github.com/dspinellis/btyacc
|
||||
|
||||
# Default installation of HSQLDB
|
||||
$(DEFAULT_HSQLDB_DIR): hsqldb-$(HSQLDB_VERSION).zip
|
|
@ -0,0 +1,10 @@
|
|||
--- example/.cscout/host-incs.h.orig 2019-12-02 21:11:13 UTC
|
||||
+++ example/.cscout/host-incs.h
|
||||
@@ -8,6 +8,6 @@
|
||||
*/
|
||||
|
||||
|
||||
-#pragma includepath "../../include/stdc"
|
||||
+#pragma includepath "/usr/local/include/cscout/stdc"
|
||||
/* To avoid unused include file warnings */
|
||||
static void _cscout_dummy2(void) { _cscout_dummy2(); }
|
|
@ -0,0 +1,27 @@
|
|||
--- src/Makefile.orig 2019-11-04 16:42:35 UTC
|
||||
+++ src/Makefile
|
||||
@@ -207,12 +207,13 @@ mkerr:
|
||||
|
||||
# This ensures that the version.cpp is regenerated iff its SHA doesn't
|
||||
# match the current one.
|
||||
-ifneq ($(shell sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp), $(shell git log -n 1 --format='%H' || sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp))
|
||||
+# Without git available, we will just generate a semi-static version.cpp
|
||||
+#ifneq ($(shell sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp), $(shell git log -n 1 --format='%H' || sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp))
|
||||
version.cpp:
|
||||
sh make-version.sh >$@
|
||||
|
||||
-.PHONY: version.cpp
|
||||
-endif
|
||||
+#.PHONY: version.cpp
|
||||
+#endif
|
||||
|
||||
|
||||
test:
|
||||
@@ -264,6 +265,7 @@ obfuscation:
|
||||
)
|
||||
|
||||
install: build/cscout
|
||||
+ install -d "${INSTALL_PREFIX}/bin"
|
||||
install -Ds $< "$(INSTALL_PREFIX)/bin/cscout"
|
||||
./dest-install.sh "$(INSTALL_PREFIX)"
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
--- src/dest-install.sh.orig 2019-12-02 12:30:03 UTC
|
||||
+++ src/dest-install.sh
|
||||
@@ -35,6 +35,7 @@ INSTALL_PREFIX="${1-/usr/local}"
|
||||
TMPFILE="/tmp/$0-$$"
|
||||
INC=../include
|
||||
INCLUDE_DIR="$INSTALL_PREFIX/include/cscout"
|
||||
+FINAL_INCLUDE_DIR="/usr/local/include/cscout"
|
||||
# Permissions for header files
|
||||
HMODE=644
|
||||
|
||||
@@ -52,7 +53,7 @@ install -m $HMODE $TMPFILE "$INCLUDE_DIR/stdc-defs.h"
|
||||
|
||||
# Generic C include path specification
|
||||
cat <<EOF >$TMPFILE
|
||||
-#pragma includepath "$INCLUDE_DIR/stdc"
|
||||
+#pragma includepath "$LATER_INCLUDE_DIR/stdc"
|
||||
|
||||
/* Avoid unused include file warnings */
|
||||
static void _cscout_dummy2(void) { _cscout_dummy2(); }
|
||||
@@ -93,7 +94,7 @@ install -m $HMODE $TMPFILE "$INCLUDE_DIR/host-incs.h"
|
||||
|
||||
# Perl scripts (keep csmake.pl in the end)
|
||||
for f in cswc.pl csmake.pl ; do
|
||||
- sed "s|INSTALL_INCLUDE|$INCLUDE_DIR|g" $f >$TMPFILE
|
||||
+ sed "s|INSTALL_INCLUDE|$LATER_INCLUDE_DIR|g" $f >$TMPFILE
|
||||
install $TMPFILE "$INSTALL_PREFIX/bin/$(basename $f .pl)"
|
||||
done
|
||||
# Install as cscc
|
|
@ -0,0 +1,12 @@
|
|||
--- src/make-version.sh.orig 2019-12-01 11:12:07 UTC
|
||||
+++ src/make-version.sh
|
||||
@@ -11,7 +11,7 @@ using namespace std;
|
||||
|
||||
#include "version.h"
|
||||
|
||||
-char Version::revision[] = "$(git log -n 1 --format='%H' || echo UNKNOWN)";
|
||||
-char Version::date[] = "$(git log -n 1 --format='%ci' || echo UNKNOWN)";
|
||||
+char Version::revision[] = "bd7dfac09b760b87b86158e903459a765b0acf43";
|
||||
+char Version::date[] = "2019-11-04 18:42:35 +0200";
|
||||
char Version::compiled[] = "$(date +'%F %T')";
|
||||
EOF
|
|
@ -0,0 +1,4 @@
|
|||
The include files cscout needs in its installation directory (e.g. ~/.cscout/)
|
||||
can be found in %%PREFIX%%/include/cscout/.
|
||||
For an example, go to %%EXAMPLESDIR%% and try "cscout awk.cs".
|
||||
|
|
@ -12,8 +12,5 @@ scopes and namespaces. CScout has already been applied on projects
|
|||
ranging from tens of thousands of lines, like the FreeBSD and
|
||||
Linux kernels, and the Apache web server.
|
||||
|
||||
This free unsupported version of CScout is distributed under the terms
|
||||
of the CScout Public License, which is available in the accompanying
|
||||
documentation.
|
||||
|
||||
WWW: https://www.spinellis.gr/cscout/
|
||||
WWW: https://github.com/dspinellis/cscout
|
||||
|
|
|
@ -1,93 +1,38 @@
|
|||
bin/cscc
|
||||
bin/cscout
|
||||
bin/csmake
|
||||
bin/cswc
|
||||
etc/cscout/SWILL-License
|
||||
etc/cscout/acl
|
||||
etc/cscout/cscout_defs.BORLAND
|
||||
@sample etc/cscout/cscout_defs.FBSD_GCC etc/cscout/cscout_defs.h
|
||||
etc/cscout/cscout_defs.GENERIC
|
||||
etc/cscout/cscout_defs.GENERIC_GCC
|
||||
etc/cscout/cscout_defs.LINUX_GCC
|
||||
etc/cscout/cscout_defs.WIN32_MINGW
|
||||
etc/cscout/cscout_defs.WIN32_MSC
|
||||
@sample etc/cscout/cscout_incs.FBSD_GCC etc/cscout/cscout_incs.h
|
||||
etc/cscout/cscout_incs.GENERIC
|
||||
etc/cscout/cscout_incs.LINUX_GCC
|
||||
etc/cscout/cscout_incs.WIN32_MINGW
|
||||
etc/cscout/cscout_incs.WIN32_MSC
|
||||
include/cscout/csmake-post-defs.h
|
||||
include/cscout/csmake-pre-defs.h
|
||||
include/cscout/host-defs.h
|
||||
include/cscout/host-incs.h
|
||||
include/cscout/stdc-defs.h
|
||||
include/cscout/stdc-incs.h
|
||||
include/cscout/stdc/_ansi.h
|
||||
include/cscout/stdc/assert.h
|
||||
include/cscout/stdc/complex.h
|
||||
include/cscout/stdc/ctype.h
|
||||
include/cscout/stdc/errno.h
|
||||
include/cscout/stdc/float.h
|
||||
include/cscout/stdc/limits.h
|
||||
include/cscout/stdc/locale.h
|
||||
include/cscout/stdc/math.h
|
||||
include/cscout/stdc/setjmp.h
|
||||
include/cscout/stdc/signal.h
|
||||
include/cscout/stdc/stdarg.h
|
||||
include/cscout/stdc/stddef.h
|
||||
include/cscout/stdc/stdio.h
|
||||
include/cscout/stdc/stdlib.h
|
||||
include/cscout/stdc/string.h
|
||||
include/cscout/stdc/time.h
|
||||
man/man1/cscc.1.gz
|
||||
man/man1/cscout.1.gz
|
||||
man/man1/csmake.1.gz
|
||||
man/man1/cswc.1.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/access.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/awkinc.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/bib.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/cg.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/change.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/concept.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/contents.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/context.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/copy_file.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/csmake.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/cvs.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/dbschema.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/egglos.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/error.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ext.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/faq.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/fgraph-opt.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/file.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/filefuncall.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/fileq.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/flow.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/flow.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/fun.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/funarg.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/funq.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/geglos.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/hedit.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/id.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/idq.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/idxprint.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ig.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/index.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/indexw.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/intro.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/license.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/main-inc.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/maincall.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/mainpage.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/mancscout.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/mancswc.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/metrics.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/mismash.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/name.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/obf.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/op.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/opt.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/optf.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/pragma.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/proto-inc.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/qeg.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/re.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/run.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/setfile.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/setup.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/short.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/simul.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/smlogo.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/sql.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/style.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/tree.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/walk.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/web.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/wrk-inc.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/wsp.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/wspd.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/yacc.html
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/cscout_defs.h
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/cscout_incs.h
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/host-defs.h
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/host-incs.h
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/options
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/style.css
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README.md
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk.cs
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk.prj
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk/FIXES
|
||||
|
@ -115,5 +60,4 @@ man/man1/cswc.1.gz
|
|||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk/ytabc.bak
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk/ytabh.bak
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin.prj
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mkproj
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sh.prj
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= dwarf2json
|
||||
DISTVERSION= g20191016
|
||||
DISTVERSION= g20200326
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= antoine@FreeBSD.org
|
||||
|
@ -14,7 +14,7 @@ LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
|||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= volatilityfoundation
|
||||
GH_TAGNAME= 282454f
|
||||
GH_TAGNAME= 224af56
|
||||
GH_TUPLE= spf13:pflag:v1.0.5:spf13_pflag/vendor/github.com/spf13/pflag
|
||||
|
||||
USES= go:modules
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TIMESTAMP = 1577697586
|
||||
SHA256 (volatilityfoundation-dwarf2json-g20191016-282454f_GH0.tar.gz) = 1fcc223976ae80f54164459e7ba5b3c5ccca73b0d3b027a08c619da7bfff3942
|
||||
SIZE (volatilityfoundation-dwarf2json-g20191016-282454f_GH0.tar.gz) = 9880
|
||||
TIMESTAMP = 1590173861
|
||||
SHA256 (volatilityfoundation-dwarf2json-g20200326-224af56_GH0.tar.gz) = 2a09eae0f1e3d63fbaf4f14bbd3519e84ddd3b90f70981b538dd8525dece988a
|
||||
SIZE (volatilityfoundation-dwarf2json-g20200326-224af56_GH0.tar.gz) = 10084
|
||||
SHA256 (spf13-pflag-v1.0.5_GH0.tar.gz) = 9a2cae1f8e8ab0d2cc8ebe468e871af28d9ac0962cf0520999e3ba85f0c7b808
|
||||
SIZE (spf13-pflag-v1.0.5_GH0.tar.gz) = 50796
|
||||
|
|
|
@ -0,0 +1,302 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= electron
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= ${ELECTRON_VER:S/-beta./.b/}
|
||||
CATEGORIES= devel java
|
||||
MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v5.0.1/:chromium \
|
||||
https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \
|
||||
https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \
|
||||
https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts
|
||||
PKGNAMESUFFIX= ${ELECTRON_VER_MAJOR}
|
||||
DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}:chromium \
|
||||
chromium-${CHROMIUM_OFFICIAL_VER}${EXTRACT_SUFX}:chromium_official \
|
||||
${CHROMIUM_NODE_MODULES_HASH}:chromium_node \
|
||||
${CHROMIUM_TEST_FONTS_HASH}:chromium_testfonts \
|
||||
electron-npm-modules-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
|
||||
MAINTAINER= tagattie@FreeBSD.org
|
||||
COMMENT= Build cross-platform desktop apps with JavaScript, HTML, and CSS
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/electron/LICENSE
|
||||
|
||||
ONLY_FOR_ARCHS= amd64
|
||||
|
||||
FETCH_DEPENDS= npm-node12>0:www/npm-node12
|
||||
PATCH_DEPENDS= git:devel/git
|
||||
BUILD_DEPENDS= ${LOCALBASE}/bin/ar:devel/binutils \
|
||||
gperf:devel/gperf \
|
||||
yasm:devel/yasm \
|
||||
${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \
|
||||
node12>0:www/node12 \
|
||||
npm-node12>0:www/npm-node12
|
||||
LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \
|
||||
libatspi.so:accessibility/at-spi2-core \
|
||||
libsnappy.so:archivers/snappy \
|
||||
libFLAC.so:audio/flac \
|
||||
libopus.so:audio/opus \
|
||||
libdbus-1.so:devel/dbus \
|
||||
libnotify.so:devel/libnotify \
|
||||
libpci.so:devel/libpci \
|
||||
libnspr4.so:devel/nspr \
|
||||
libre2.so:devel/re2 \
|
||||
liblcms2.so:graphics/lcms2 \
|
||||
libdrm.so:graphics/libdrm \
|
||||
libwebp.so:graphics/webp \
|
||||
libavcodec.so:multimedia/ffmpeg \
|
||||
libvpx.so:multimedia/libvpx \
|
||||
libopenh264.so:multimedia/openh264 \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libharfbuzz.so:print/harfbuzz \
|
||||
libsecret-1.so:security/libsecret \
|
||||
libnss3.so:security/nss \
|
||||
libexpat.so:textproc/expat2 \
|
||||
libfontconfig.so:x11-fonts/fontconfig
|
||||
RUN_DEPENDS= xdg-open:devel/xdg-utils
|
||||
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR} \
|
||||
npm-node12>0:www/npm-node12
|
||||
|
||||
USES= bison dos2unix gettext-tools gl gnome jpeg localbase:ldflags \
|
||||
ninja pkgconfig python:2.7,build,test tar:xz xorg
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_TAGNAME= ${DISTVERSIONPREFIX}${ELECTRON_VER}
|
||||
# See ${WRKSRC}/electron/DEPS for GH_TAGNAME_node
|
||||
GH_TUPLE= electron:node:666c67e078bddc32f25409f4a929c1e9b5f47373:node
|
||||
|
||||
# Official chromium version containing "gn" which is known to work
|
||||
CHROMIUM_OFFICIAL_VER= 76.0.3809.132
|
||||
# See ${WRKSRC}/electron/DEPS for CHROMIUM_VER
|
||||
CHROMIUM_VER= 73.0.3683.121
|
||||
# See ${WRKSRC}/third_party/node/node_modules.tar.gz.sha1 for CHROMIUM_NODE_MODULES_HASH
|
||||
CHROMIUM_NODE_MODULES_HASH= c0e0f34498afb3f363cc37cd2e9c1a020cb020d9
|
||||
# See ${WRKSRC}/third_party/test_fonts/test_fonts.tar.gz.sha1 for CHROMIUM_TEST_FONTS_HASH
|
||||
CHROMIUM_TEST_FONTS_HASH= a22de844e32a3f720d219e3911c3da3478039f89
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
WRKSRC_SUBDIR= src
|
||||
|
||||
DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
|
||||
|
||||
DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h
|
||||
BINARY_ALIAS= python=${PYTHON_CMD}
|
||||
|
||||
USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \
|
||||
xrender xscrnsaver xtst
|
||||
USE_GL= gl glesv2
|
||||
USE_GNOME= atk cairo pango gdkpixbuf2 gtk30 libxml2 libxslt
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.8
|
||||
JAVA_BUILD= yes
|
||||
|
||||
USE_LDCONFIG= ${DATADIR}
|
||||
|
||||
GN_ARGS+= clang_use_chrome_plugins=false \
|
||||
enable_hangout_services_extension=true \
|
||||
enable_nacl=false \
|
||||
enable_remoting=false \
|
||||
fieldtrial_testing_like_official_build=true \
|
||||
is_clang=true \
|
||||
jumbo_file_merge_limit=8 \
|
||||
toolkit_views=true \
|
||||
treat_warnings_as_errors=false \
|
||||
use_allocator="none" \
|
||||
use_allocator_shim=false \
|
||||
use_aura=true \
|
||||
use_custom_libcxx=false \
|
||||
use_gnome_keyring=false \
|
||||
use_jumbo_build=true \
|
||||
use_lld=true \
|
||||
use_sysroot=false \
|
||||
use_system_freetype=true \
|
||||
use_system_harfbuzz=true \
|
||||
use_system_lcms2=true \
|
||||
use_system_libdrm=true \
|
||||
use_system_libjpeg=true \
|
||||
extra_cxxflags="${CXXFLAGS}" \
|
||||
extra_ldflags="${LDFLAGS}"
|
||||
GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles
|
||||
|
||||
ALL_TARGET= electron third_party/electron_node:headers
|
||||
MAKE_ARGS= -C out/${BUILDTYPE}
|
||||
MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \
|
||||
CPLUS_INCLUDE_PATH=${LOCALBASE}/include
|
||||
|
||||
OPTIONS_DEFINE= CUPS DEBUG DIST DRIVER KERBEROS
|
||||
DIST_DESC= Build distribution zip files
|
||||
DRIVER_DESC= Install chromedriver
|
||||
OPTIONS_GROUP= AUDIO
|
||||
OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO
|
||||
OPTIONS_DEFAULT= CUPS DRIVER KERBEROS ALSA
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
|
||||
ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
|
||||
ALSA_VARS= GN_ARGS+=use_alsa=true
|
||||
ALSA_VARS_OFF= GN_ARGS+=use_alsa=false
|
||||
|
||||
CUPS_LIB_DEPENDS= libcups.so:print/cups
|
||||
CUPS_VARS= GN_ARGS+=use_cups=true
|
||||
CUPS_VARS_OFF= GN_ARGS+=use_cups=false
|
||||
|
||||
DEBUG_VARS= BUILDTYPE=Debug \
|
||||
GN_ARGS+=is_component_build=false
|
||||
DEBUG_VARS_OFF= BUILDTYPE=Release
|
||||
|
||||
DIST_IMPLIES= DRIVER
|
||||
|
||||
DRIVER_ALL_TARGET= chromedriver
|
||||
|
||||
KERBEROS_VARS= GN_ARGS+=use_kerberos=true
|
||||
KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false
|
||||
|
||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
|
||||
PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true
|
||||
PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false
|
||||
|
||||
POST_BUILD_TARGETS= licenses version
|
||||
POST_BUILD_DIST_TARGETS= electron_dist_zip electron_chromedriver_zip electron_mksnapshot_zip
|
||||
|
||||
NPM_TIMESTAMP= 1576733942
|
||||
|
||||
PLIST_SUB= ELECTRON_VER=${ELECTRON_VER} \
|
||||
ELECTRON_VER_MAJOR=${ELECTRON_VER_MAJOR}
|
||||
|
||||
.include "Makefile.version"
|
||||
.include "Makefile.tests"
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == "amd64"
|
||||
PLIST_SUB+= AMD64=""
|
||||
.else
|
||||
PLIST_SUB+= AMD64="@comment "
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "i386"
|
||||
PLIST_SUB+= I386=""
|
||||
.else
|
||||
PLIST_SUB+= I386="@comment "
|
||||
.endif
|
||||
|
||||
pre-fetch:
|
||||
@${MKDIR} ${DISTDIR}/${DIST_SUBDIR}
|
||||
if [ ! -f ${DISTDIR}/${DIST_SUBDIR}/electron-npm-modules-${ELECTRON_VER}${EXTRACT_SUFX} ]; \
|
||||
then ${MKDIR} ${WRKDIR}/npm-cache; \
|
||||
${CP} ${FILESDIR}/package.json \
|
||||
${FILESDIR}/package-lock.json ${WRKDIR}/npm-cache; \
|
||||
cd ${WRKDIR}/npm-cache && \
|
||||
${SETENV} HOME=${WRKDIR} npm ci --verbose --no-progress && \
|
||||
${MV} node_modules npm_modules; \
|
||||
${MTREE_CMD} -cbnSp npm_modules | ${MTREE_CMD} -C | ${SED} \
|
||||
-e 's:time=[0-9.]*:time=${NPM_TIMESTAMP}.000000000:' \
|
||||
-e 's:\([gu]id\)=[0-9]*:\1=0:g' \
|
||||
-e 's:flags=.*:flags=none:' \
|
||||
-e 's:^\.:./npm_modules:' > npm_modules.mtree; \
|
||||
${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-npm-modules-${ELECTRON_VER}${EXTRACT_SUFX} \
|
||||
@npm_modules.mtree; \
|
||||
${RM} -r ${WRKDIR}/npm-cache; \
|
||||
fi
|
||||
|
||||
post-extract:
|
||||
${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_VER} ${WRKSRC}
|
||||
${RM} -r ${WRKSRC}/tools/gn
|
||||
${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_OFFICIAL_VER}/tools/gn \
|
||||
${WRKSRC}/tools/gn
|
||||
${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${PORTNAME}-${ELECTRON_VER} ${WRKSRC}/electron
|
||||
${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_node}-${GH_TAGNAME_node} \
|
||||
${WRKSRC}/third_party/${GH_ACCOUNT_node}_${GH_PROJECT_node}
|
||||
${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/node_modules ${WRKSRC}/third_party/node
|
||||
${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/test_fonts ${WRKSRC}/third_party/test_fonts
|
||||
${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/npm_modules ${WRKSRC}/electron/node_modules
|
||||
|
||||
pre-patch:
|
||||
${SH} ${FILESDIR}/apply-electron-patches.sh ${WRKSRC}
|
||||
# ${FIND} ${WRKSRC} -type f -name '*.orig' -print -delete
|
||||
# ${FIND} ${WRKSRC} -type f -name '*~' -print -delete
|
||||
|
||||
pre-configure:
|
||||
# We used to remove bundled libraries to be sure that chromium uses
|
||||
# system libraries and not shipped ones.
|
||||
# cd ${WRKSRC} && ${PYTHON_CMD} \
|
||||
#./build/linux/unbundle/remove_bundled_libraries.py [list of preserved]
|
||||
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
|
||||
./build/linux/unbundle/replace_gn_files.py --system-libraries \
|
||||
ffmpeg flac fontconfig freetype harfbuzz-ng libdrm libjpeg \
|
||||
libusb libvpx libwebp libxml libxslt openh264 opus re2 snappy \
|
||||
yasm || ${FALSE}
|
||||
|
||||
do-configure:
|
||||
# GN generator bootstrapping and generating ninja files
|
||||
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \
|
||||
READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \
|
||||
./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS}
|
||||
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn gen out/${BUILDTYPE} \
|
||||
--args='import("//electron/build/args/${BUILDTYPE:tl}.gn") ${GN_ARGS}'
|
||||
# Setup nodejs dependency
|
||||
${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin
|
||||
${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node
|
||||
# Setup java dependency
|
||||
${MKDIR} ${WRKDIR}/bin
|
||||
${LN} -sf ${LOCALBASE}/openjdk8/bin/java ${WRKDIR}/bin/java
|
||||
|
||||
post-build:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_TARGETS}
|
||||
|
||||
post-build-DIST-on:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_DIST_TARGETS}
|
||||
cd ${WRKSRC}/out/${BUILDTYPE} && \
|
||||
${CP} chromedriver.zip chromedriver-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \
|
||||
${CP} dist.zip electron-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \
|
||||
${CP} mksnapshot.zip mksnapshot-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \
|
||||
${SHA256} -r *-v${ELECTRON_VER}-freebsd-*.zip | ${SED} -e 's/ / */' > SHASUMS256.txt
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
.for f in electron mksnapshot v8_context_snapshot_generator
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
|
||||
.endfor
|
||||
.for f in libEGL.so libGLESv2.so
|
||||
${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
|
||||
.endfor
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader
|
||||
.for f in libEGL.so libGLESv2.so
|
||||
${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${f} ${STAGEDIR}${DATADIR}/swiftshader
|
||||
.endfor
|
||||
.for f in LICENSE LICENSES.chromium.html icudtl.dat natives_blob.bin snapshot_blob.bin v8_context_snapshot.bin version
|
||||
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
|
||||
.endfor
|
||||
.for f in chrome_100_percent.pak chrome_200_percent.pak resources.pak
|
||||
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
|
||||
.endfor
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/locales
|
||||
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/locales/*.pak ${STAGEDIR}${DATADIR}/locales
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/resources
|
||||
.for f in default_app.asar electron.asar
|
||||
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/resources/${f} ${STAGEDIR}${DATADIR}/resources
|
||||
.endfor
|
||||
cd ${WRKSRC}/out/${BUILDTYPE}/gen && ${COPYTREE_SHARE} node_headers ${STAGEDIR}${DATADIR}
|
||||
${RLN} ${STAGEDIR}${DATADIR}/electron ${STAGEDIR}${PREFIX}/bin/electron${PKGNAMESUFFIX}
|
||||
|
||||
post-install-DIST-on:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/releases
|
||||
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/SHASUMS256.txt ${STAGEDIR}${DATADIR}/releases
|
||||
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*-v${ELECTRON_VER}-freebsd-*.zip ${STAGEDIR}${DATADIR}/releases
|
||||
|
||||
post-install-DRIVER-on:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver ${STAGEDIR}${DATADIR}
|
||||
|
||||
do-test:
|
||||
# Note 1: "npm install" will run before actual tests are executed
|
||||
# Note 2: Xvfb or something similar is necessary for headless testing
|
||||
# Note 3: unit test won't run. (robotjs doesn't build.)
|
||||
.for t in ${TEST_MODULES}
|
||||
cd ${WRKSRC}/electron && \
|
||||
${SETENV} ${TEST_ENV} ELECTRON_OUT_DIR=${BUILDTYPE} \
|
||||
npm run test -- --ci -g '${t}' || ${TRUE}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.post.mk>
|
|
@ -0,0 +1,55 @@
|
|||
# $FreeBSD$
|
||||
|
||||
TEST_MODULES= electron\ module \
|
||||
app\ module \
|
||||
default\ behavior \
|
||||
autoUpdater\ module \
|
||||
BrowserView\ module \
|
||||
BrowserWindow\ with\ affinity\ module \
|
||||
BrowserWindow\ module \
|
||||
CallbacksRegistry\ module \
|
||||
clipboard\ module \
|
||||
contentTracing \
|
||||
debugger\ module \
|
||||
deprecations \
|
||||
desktopCapturer \
|
||||
dialog\ module \
|
||||
globalShortcut\ module \
|
||||
ipc\ main\ module \
|
||||
ipc\ renderer\ module \
|
||||
MenuItems \
|
||||
Menu\ module \
|
||||
nativeImage\ module \
|
||||
netLog\ module \
|
||||
net\ module \
|
||||
Notification\ module \
|
||||
powerMonitor \
|
||||
powerSaveBlocker\ module \
|
||||
process\ module \
|
||||
protocol\ module \
|
||||
remote\ module \
|
||||
screen\ module \
|
||||
session\ module \
|
||||
shell\ module \
|
||||
renderer\ nodeIntegrationInSubFrames \
|
||||
systemPreferences\ module \
|
||||
TouchBar\ module \
|
||||
tray\ module \
|
||||
View \
|
||||
webContents\ module \
|
||||
WebContentsView \
|
||||
webFrame\ module \
|
||||
webRequest\ module \
|
||||
asar\ package \
|
||||
chromium\ feature \
|
||||
font\ fallback \
|
||||
feature-string\ parsing \
|
||||
modules\ support \
|
||||
node\ feature \
|
||||
security\ warnings \
|
||||
bump-version\ utils \
|
||||
bump-version\ script \
|
||||
<webview>\ tag
|
||||
|
||||
# crashReporter\ module \
|
||||
# inAppPurchase\ module \
|
|
@ -0,0 +1,4 @@
|
|||
# $FreeBSD$
|
||||
|
||||
ELECTRON_VER= 5.0.13
|
||||
ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//}
|
|
@ -0,0 +1,15 @@
|
|||
TIMESTAMP = 1576734588
|
||||
SHA256 (electron/chromium-73.0.3683.121.tar.xz) = 1adbc4b118c55cb24ca82e87bfa251dc5d6e46a1f946719b961c15c499e007df
|
||||
SIZE (electron/chromium-73.0.3683.121.tar.xz) = 1447269608
|
||||
SHA256 (electron/chromium-76.0.3809.132.tar.xz) = d54e4640b5e399d170dffbc5bcff65157eb1b29314b94b5d808f727d9ce45241
|
||||
SIZE (electron/chromium-76.0.3809.132.tar.xz) = 728899912
|
||||
SHA256 (electron/c0e0f34498afb3f363cc37cd2e9c1a020cb020d9) = 656d38e92fc26271822cc07add8993e926b367da135d349f88f30d3b7f5f3719
|
||||
SIZE (electron/c0e0f34498afb3f363cc37cd2e9c1a020cb020d9) = 4436810
|
||||
SHA256 (electron/electron-npm-modules-5.0.13.tar.xz) = fe7d5946412513d7930acfc22072791eba72f1284d0b96acaf057690ef76a020
|
||||
SIZE (electron/electron-npm-modules-5.0.13.tar.xz) = 15849284
|
||||
SHA256 (electron/a22de844e32a3f720d219e3911c3da3478039f89) = 6e331676d098a57c53c1250821dc47ed84c47f823901bf30c4704df90d8a34be
|
||||
SIZE (electron/a22de844e32a3f720d219e3911c3da3478039f89) = 17469927
|
||||
SHA256 (electron/electron-electron-v5.0.13_GH0.tar.gz) = 318e8ebd41c0ed3935c05b0b781e0a42525131fea1b15a8eeb94cde3136b20a4
|
||||
SIZE (electron/electron-electron-v5.0.13_GH0.tar.gz) = 4026612
|
||||
SHA256 (electron/electron-node-666c67e078bddc32f25409f4a929c1e9b5f47373_GH0.tar.gz) = e788406fc7818eeae9fa48d6d75e142655c890ccec5a8401e5fb17631194476a
|
||||
SIZE (electron/electron-node-666c67e078bddc32f25409f4a929c1e9b5f47373_GH0.tar.gz) = 71509702
|
|
@ -0,0 +1,20 @@
|
|||
#! /bin/sh
|
||||
|
||||
PATH=/bin:/usr/bin:/usr/local/bin
|
||||
|
||||
PATCH_CMD="git apply"
|
||||
#PATCH_FLAGS="--numstat --check" # for debugging
|
||||
PATCH_FLAGS="--verbose --reject"
|
||||
|
||||
WRKSRC=$1
|
||||
PATCH_CONF=${WRKSRC}/electron/patches/common/config.json
|
||||
|
||||
PATCHD_REPOD_PAIRS=$(sed -e '1d; $d; /^$/d; s/[",]//g; s/: */:/' "${PATCH_CONF}")
|
||||
for prp in ${PATCHD_REPOD_PAIRS}; do
|
||||
pd=$(echo "${prp}" | awk -F: '{print $1}' | sed -e 's/src/./')
|
||||
rd=$(echo "${prp}" | awk -F: '{print $2}' | sed -e 's/src/./')
|
||||
(cd "${WRKSRC}/${rd}" && \
|
||||
while read -r p; do
|
||||
${PATCH_CMD} ${PATCH_FLAGS} "${WRKSRC}/${pd}/${p}"
|
||||
done < "${WRKSRC}/${pd}/.patches")
|
||||
done
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"name": "electron",
|
||||
"version": "5.0.13",
|
||||
"repository": "https://github.com/electron/electron",
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
"@octokit/rest": "^16.3.2",
|
||||
"aliasify": "^2.1.0",
|
||||
"asar": "^0.11.0",
|
||||
"browserify": "^13.1.0",
|
||||
"check-for-leaks": "^1.0.2",
|
||||
"clang-format": "^1.2.3",
|
||||
"colors": "^1.1.2",
|
||||
"dotenv-safe": "^4.0.4",
|
||||
"dugite": "^1.45.0",
|
||||
"electron-docs-linter": "^2.4.0",
|
||||
"electron-typescript-definitions": "^7.0.0",
|
||||
"eslint": "^5.6.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
"eslint-plugin-mocha": "^5.2.0",
|
||||
"folder-hash": "^2.1.1",
|
||||
"got": "^9.6.0",
|
||||
"husky": "^0.14.3",
|
||||
"lint": "^1.1.2",
|
||||
"lint-staged": "^8.1.0",
|
||||
"minimist": "^1.2.0",
|
||||
"nugget": "^2.0.1",
|
||||
"octicons": "^7.3.0",
|
||||
"plist": "^3.0.1",
|
||||
"remark-cli": "^4.0.0",
|
||||
"remark-preset-lint-markdown-style-guide": "^2.1.1",
|
||||
"request": "^2.88.0",
|
||||
"semver": "^5.6.0",
|
||||
"serve": "^6.5.8",
|
||||
"standard-markdown": "^5.0.0",
|
||||
"sumchecker": "^2.0.2",
|
||||
"temp": "^0.8.3"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"asar": "asar",
|
||||
"browserify": "browserify",
|
||||
"bump-version": "./script/bump-version.js",
|
||||
"check-tls": "python ./script/tls.py",
|
||||
"clang-format": "find atom/ chromium_src/ -iname *.h -o -iname *.cc -o -iname *.mm | xargs clang-format -i",
|
||||
"lint": "node ./script/lint.js && npm run lint:clang-format && npm run lint:docs",
|
||||
"lint:js": "node ./script/lint.js --js",
|
||||
"lint:clang-format": "python script/run-clang-format.py -r -c atom/ chromium_src/ || (echo \"\\nCode not formatted correctly.\" && exit 1)",
|
||||
"lint:cpp": "node ./script/lint.js --cc",
|
||||
"lint:py": "node ./script/lint.js --py",
|
||||
"lint:gn": "node ./script/lint.js --gn",
|
||||
"lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links",
|
||||
"lint:docs-relative-links": "python ./script/check-relative-doc-links.py",
|
||||
"lint:js-in-markdown": "standard-markdown docs",
|
||||
"create-api-json": "electron-docs-linter docs --outfile=electron-api.json",
|
||||
"create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --in=electron-api.json --out=electron.d.ts && node spec/ts-smoke/runner.js",
|
||||
"preinstall": "node -e 'process.exit(0)'",
|
||||
"precommit": "lint-staged",
|
||||
"prepack": "check-for-leaks",
|
||||
"prepush": "check-for-leaks",
|
||||
"repl": "node ./script/start.js --interactive",
|
||||
"start": "node ./script/start.js",
|
||||
"test": "node ./script/spec-runner.js electron/spec"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Electron Community",
|
||||
"keywords": [
|
||||
"electron"
|
||||
],
|
||||
"aliasify": {
|
||||
"replacements": {
|
||||
"@electron/internal/(.+)": "./lib/$1"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,ts}": [
|
||||
"node script/lint.js --js --fix --only --",
|
||||
"git add"
|
||||
],
|
||||
"*.{cc,mm,c,h}": [
|
||||
"python script/run-clang-format.py -r -c --fix",
|
||||
"git add"
|
||||
],
|
||||
"*.md": [
|
||||
"remark -qf"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
--- BUILD.gn.orig 2019-04-08 08:32:35 UTC
|
||||
+++ BUILD.gn
|
||||
@@ -381,7 +381,7 @@ group("gn_all") {
|
||||
]
|
||||
}
|
||||
|
||||
- if (is_linux || is_android) {
|
||||
+ if ((is_linux && !is_bsd) || is_android) {
|
||||
deps += [
|
||||
"//third_party/breakpad:breakpad_unittests",
|
||||
"//third_party/breakpad:core-2-minidump",
|
||||
@@ -422,8 +422,6 @@ group("gn_all") {
|
||||
"//net:disk_cache_memory_test",
|
||||
"//net:quic_client",
|
||||
"//net:quic_server",
|
||||
- "//sandbox/linux:chrome_sandbox",
|
||||
- "//sandbox/linux:sandbox_linux_unittests",
|
||||
"//testing:empty_main",
|
||||
]
|
||||
|
||||
@@ -480,10 +478,6 @@ group("gn_all") {
|
||||
"//chrome/test/chromedriver:chromedriver",
|
||||
"//chrome/test/chromedriver:chromedriver_tests",
|
||||
"//components/sync:run_sync_testserver",
|
||||
- "//courgette:courgette",
|
||||
- "//courgette:courgette_fuzz",
|
||||
- "//courgette:courgette_minimal_tool",
|
||||
- "//courgette:courgette_unittests",
|
||||
"//media/cast:generate_barcode_video",
|
||||
"//media/cast:generate_timecode_audio",
|
||||
"//net:crash_cache",
|
||||
@@ -538,10 +532,6 @@ group("gn_all") {
|
||||
"//mojo:mojo_perftests",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//testing/gmock:gmock_main",
|
||||
- "//third_party/breakpad:dump_syms($host_toolchain)",
|
||||
- "//third_party/breakpad:microdump_stackwalk($host_toolchain)",
|
||||
- "//third_party/breakpad:minidump_dump($host_toolchain)",
|
||||
- "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
|
||||
]
|
||||
|
||||
if (!is_android) {
|
||||
@@ -615,7 +605,7 @@ group("gn_all") {
|
||||
host_os == "win") {
|
||||
deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
|
||||
}
|
||||
- } else if (!is_android && !is_ios && !is_fuchsia) {
|
||||
+ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) {
|
||||
deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
|
||||
}
|
||||
|
||||
@@ -873,7 +863,6 @@ if (is_chromeos) {
|
||||
"//ppapi/examples/video_decode",
|
||||
"//sandbox/linux:chrome_sandbox",
|
||||
"//sandbox/linux:sandbox_linux_unittests",
|
||||
- "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
|
||||
|
||||
# Blocked on https://github.com/catapult-project/catapult/issues/2297
|
||||
#"//third_party/catapult/telemetry:bitmaptools",
|
||||
@@ -1001,7 +990,7 @@ if (!is_ios) {
|
||||
]
|
||||
}
|
||||
|
||||
- if (!is_win && !is_android) {
|
||||
+ if (!is_win && !is_android && !is_bsd) {
|
||||
data_deps +=
|
||||
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
|
||||
}
|
||||
@@ -1010,7 +999,7 @@ if (!is_ios) {
|
||||
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
|
||||
}
|
||||
|
||||
- if (is_linux) {
|
||||
+ if (is_linux && !is_bsd) {
|
||||
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
|
||||
}
|
||||
|
||||
@@ -1150,9 +1139,6 @@ group("chromium_builder_perf") {
|
||||
|
||||
if (is_win) {
|
||||
data_deps += [ "//chrome/installer/mini_installer:mini_installer" ]
|
||||
- } else {
|
||||
- data_deps +=
|
||||
- [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
|
||||
}
|
||||
if (is_win || is_android) {
|
||||
data_deps += [
|
|
@ -0,0 +1,11 @@
|
|||
--- apps/ui/views/app_window_frame_view.cc.orig 2019-04-08 08:32:35 UTC
|
||||
+++ apps/ui/views/app_window_frame_view.cc
|
||||
@@ -132,7 +132,7 @@ gfx::Rect AppWindowFrameView::GetBoundsForClientView()
|
||||
gfx::Rect AppWindowFrameView::GetWindowBoundsForClientBounds(
|
||||
const gfx::Rect& client_bounds) const {
|
||||
gfx::Rect window_bounds = client_bounds;
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
|
||||
// Get the difference between the widget's client area bounds and window
|
||||
// bounds, and grow |window_bounds| by that amount.
|
||||
gfx::Insets native_frame_insets =
|
|
@ -0,0 +1,14 @@
|
|||
--- ash/display/mirror_window_controller.cc.orig 2019-04-08 08:32:36 UTC
|
||||
+++ ash/display/mirror_window_controller.cc
|
||||
@@ -274,7 +274,11 @@ void MirrorWindowController::UpdateWindow(
|
||||
return info.id() == iter->first;
|
||||
}) == display_info_list.end()) {
|
||||
CloseAndDeleteHost(iter->second, true);
|
||||
+#if defined(__llvm__)
|
||||
+ mirroring_host_info_map_.erase(iter++);
|
||||
+#else
|
||||
iter = mirroring_host_info_map_.erase(iter);
|
||||
+#endif
|
||||
} else {
|
||||
++iter;
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
--- base/BUILD.gn.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/BUILD.gn
|
||||
@@ -1185,7 +1185,7 @@ jumbo_component("base") {
|
||||
# Needed for <atomic> if using newer C++ library than sysroot, except if
|
||||
# building inside the cros_sdk environment - use host_toolchain as a
|
||||
# more robust check for this.
|
||||
- if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) &&
|
||||
+ if (!use_sysroot && (is_android || (is_linux && !is_chromecast) && !is_clang) &&
|
||||
host_toolchain != "//build/toolchain/cros:host") {
|
||||
libs += [ "atomic" ]
|
||||
}
|
||||
@@ -1211,7 +1211,7 @@ jumbo_component("base") {
|
||||
"allocator/allocator_shim_override_glibc_weak_symbols.h",
|
||||
]
|
||||
deps += [ "//base/allocator:tcmalloc" ]
|
||||
- } else if (is_linux && use_allocator == "none") {
|
||||
+ } else if ((is_linux && !is_bsd) && use_allocator == "none") {
|
||||
sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
|
||||
} else if (is_android && use_allocator == "none") {
|
||||
sources += [
|
||||
@@ -1751,6 +1751,33 @@ jumbo_component("base") {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (is_bsd) {
|
||||
+ sources -= [
|
||||
+ "files/file_path_watcher_linux.cc",
|
||||
+ "files/file_util_linux.cc",
|
||||
+ "process/memory_linux.cc",
|
||||
+ "process/process_handle_linux.cc",
|
||||
+ "process/process_iterator_linux.cc",
|
||||
+ "process/process_metrics_linux.cc",
|
||||
+ "system/sys_info_linux.cc"
|
||||
+ ]
|
||||
+ sources += [
|
||||
+ "files/file_path_watcher_kqueue.cc",
|
||||
+ "files/file_path_watcher_kqueue.h",
|
||||
+ "files/file_path_watcher_stub.cc",
|
||||
+ "process/memory_stubs.cc",
|
||||
+ "process/process_handle_freebsd.cc",
|
||||
+ "process/process_iterator_freebsd.cc",
|
||||
+ "process/process_metrics_freebsd.cc",
|
||||
+ "system/sys_info_freebsd.cc",
|
||||
+ ]
|
||||
+ libs = [
|
||||
+ "execinfo", # logging.cc
|
||||
+ "kvm", # process_metrics_freebsd
|
||||
+ "util" # process_metrics_freebsd
|
||||
+ ]
|
||||
+ }
|
||||
+
|
||||
# iOS
|
||||
if (is_ios) {
|
||||
set_sources_assignment_filter([])
|
||||
@@ -2808,6 +2835,12 @@ test("base_unittests") {
|
||||
]
|
||||
set_sources_assignment_filter(sources_assignment_filter)
|
||||
}
|
||||
+
|
||||
+ if (is_bsd) {
|
||||
+ sources -= [
|
||||
+ "debug/proc_maps_linux_unittest.cc",
|
||||
+ ]
|
||||
+ }
|
||||
|
||||
if (is_win) {
|
||||
deps += [ "//base:scoped_handle_test_dll" ]
|
|
@ -0,0 +1,11 @@
|
|||
--- base/allocator/allocator_shim.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/allocator/allocator_shim.cc
|
||||
@@ -70,7 +70,7 @@ inline const allocator::AllocatorDispatch* GetChainHea
|
||||
// Unfortunately due to that bug NoBarrier_Load() is mistakenly fully
|
||||
// barriered on Linux+Clang, and that causes visible perf regressons.
|
||||
return reinterpret_cast<const allocator::AllocatorDispatch*>(
|
||||
-#if defined(OS_LINUX) && defined(__clang__)
|
||||
+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(__clang__)
|
||||
*static_cast<const volatile subtle::AtomicWord*>(&g_chain_head)
|
||||
#else
|
||||
subtle::NoBarrier_Load(&g_chain_head)
|
|
@ -0,0 +1,77 @@
|
|||
--- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/allocator/allocator_shim_default_dispatch_to_glibc.cc
|
||||
@@ -3,19 +3,28 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/allocator/allocator_shim.h"
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <malloc_np.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
-
|
||||
// This translation unit defines a default dispatch for the allocator shim which
|
||||
// routes allocations to libc functions.
|
||||
-// The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
|
||||
+// The code here is strongly inspired from tcmalloc's override_glibc.h.
|
||||
|
||||
extern "C" {
|
||||
-void* __libc_malloc(size_t size);
|
||||
-void* __libc_calloc(size_t n, size_t size);
|
||||
-void* __libc_realloc(void* address, size_t size);
|
||||
-void* __libc_memalign(size_t alignment, size_t size);
|
||||
-void __libc_free(void* ptr);
|
||||
+void* __malloc(size_t size);
|
||||
+void* __calloc(size_t n, size_t size);
|
||||
+void* __realloc(void* address, size_t size);
|
||||
+void* __memalign(size_t alignment, size_t size) {
|
||||
+ void *ret;
|
||||
+ if (__posix_memalign(&ret, alignment, size) != 0) {
|
||||
+ return nullptr;
|
||||
+ } else {
|
||||
+ return ret;
|
||||
+ }
|
||||
+}
|
||||
+int __posix_memalign(void **ptr, size_t alignment, size_t size);
|
||||
+void __free(void* ptr);
|
||||
} // extern "C"
|
||||
|
||||
namespace {
|
||||
@@ -23,32 +32,32 @@ namespace {
|
||||
using base::allocator::AllocatorDispatch;
|
||||
|
||||
void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) {
|
||||
- return __libc_malloc(size);
|
||||
+ return __malloc(size);
|
||||
}
|
||||
|
||||
void* GlibcCalloc(const AllocatorDispatch*,
|
||||
size_t n,
|
||||
size_t size,
|
||||
void* context) {
|
||||
- return __libc_calloc(n, size);
|
||||
+ return __calloc(n, size);
|
||||
}
|
||||
|
||||
void* GlibcRealloc(const AllocatorDispatch*,
|
||||
void* address,
|
||||
size_t size,
|
||||
void* context) {
|
||||
- return __libc_realloc(address, size);
|
||||
+ return __realloc(address, size);
|
||||
}
|
||||
|
||||
void* GlibcMemalign(const AllocatorDispatch*,
|
||||
size_t alignment,
|
||||
size_t size,
|
||||
void* context) {
|
||||
- return __libc_memalign(alignment, size);
|
||||
+ return __memalign(alignment, size);
|
||||
}
|
||||
|
||||
void GlibcFree(const AllocatorDispatch*, void* address, void* context) {
|
||||
- __libc_free(address);
|
||||
+ __free(address);
|
||||
}
|
||||
|
||||
size_t GlibcGetSizeEstimate(const AllocatorDispatch*,
|
|
@ -0,0 +1,11 @@
|
|||
--- base/allocator/allocator_shim_override_libc_symbols.h.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/allocator/allocator_shim_override_libc_symbols.h
|
||||
@@ -10,7 +10,7 @@
|
||||
#endif
|
||||
#define BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_LIBC_SYMBOLS_H_
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#include "base/allocator/allocator_shim_internals.h"
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
--- base/allocator/allocator_shim_unittest.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/allocator/allocator_shim_unittest.cc
|
||||
@@ -348,7 +348,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) {
|
||||
ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u);
|
||||
#endif // !OS_WIN
|
||||
|
||||
-#if !defined(OS_WIN) && !defined(OS_MACOSX)
|
||||
+#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
void* memalign_ptr = memalign(128, 53);
|
||||
ASSERT_NE(nullptr, memalign_ptr);
|
||||
ASSERT_EQ(0u, reinterpret_cast<uintptr_t>(memalign_ptr) % 128);
|
||||
@@ -361,7 +361,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) {
|
||||
ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u);
|
||||
// pvalloc rounds the size up to the next page.
|
||||
ASSERT_GE(aligned_allocs_intercepted_by_size[kPageSize], 1u);
|
||||
-#endif // !OS_WIN && !OS_MACOSX
|
||||
+#endif // !OS_WIN && !OS_MACOSX && !OS_BSD
|
||||
|
||||
char* realloc_ptr = static_cast<char*>(malloc(10));
|
||||
strcpy(realloc_ptr, "foobar");
|
||||
@@ -377,13 +377,13 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) {
|
||||
free(zero_alloc_ptr);
|
||||
ASSERT_GE(frees_intercepted_by_addr[Hash(zero_alloc_ptr)], 1u);
|
||||
|
||||
-#if !defined(OS_WIN) && !defined(OS_MACOSX)
|
||||
+#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
free(memalign_ptr);
|
||||
ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u);
|
||||
|
||||
free(pvalloc_ptr);
|
||||
ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u);
|
||||
-#endif // !OS_WIN && !OS_MACOSX
|
||||
+#endif // !OS_WIN && !OS_MACOSX && !OS_BSD
|
||||
|
||||
#if !defined(OS_WIN)
|
||||
free(posix_memalign_ptr);
|
|
@ -0,0 +1,11 @@
|
|||
--- base/allocator/partition_allocator/page_allocator.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/allocator/partition_allocator/page_allocator.cc
|
||||
@@ -115,7 +115,7 @@ void* AllocPages(void* address,
|
||||
uintptr_t align_base_mask = ~align_offset_mask;
|
||||
DCHECK(!(reinterpret_cast<uintptr_t>(address) & align_offset_mask));
|
||||
|
||||
-#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)
|
||||
+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)
|
||||
// On 64 bit Linux, we may need to adjust the address space limit for
|
||||
// guarded allocations.
|
||||
if (length >= kMinimumGuardedMemorySize) {
|
|
@ -0,0 +1,38 @@
|
|||
--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/allocator/partition_allocator/page_allocator_internals_posix.h
|
||||
@@ -14,7 +14,7 @@
|
||||
#if defined(OS_MACOSX)
|
||||
#include <mach/mach.h>
|
||||
#endif
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_BSD) || defined(OS_LINUX)
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -48,7 +48,7 @@ int GetAccessFlags(PageAccessibilityConfiguration acce
|
||||
}
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)
|
||||
+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)
|
||||
|
||||
// Multiple guarded memory regions may exceed the process address space limit.
|
||||
// This function will raise or lower the limit by |amount|.
|
||||
@@ -68,7 +68,7 @@ bool AdjustAddressSpaceLimit(int64_t amount) {
|
||||
// schemes that reduce that to 4 GiB.
|
||||
constexpr size_t kMinimumGuardedMemorySize = 1ULL << 32; // 4 GiB
|
||||
|
||||
-#endif // defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)
|
||||
+#endif // (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)
|
||||
|
||||
void* SystemAllocPagesInternal(void* hint,
|
||||
size_t length,
|
||||
@@ -134,7 +134,7 @@ void SetSystemPagesAccessInternal(
|
||||
void FreePagesInternal(void* address, size_t length) {
|
||||
CHECK(!munmap(address, length));
|
||||
|
||||
-#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)
|
||||
+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)
|
||||
// Restore the address space limit.
|
||||
if (length >= kMinimumGuardedMemorySize) {
|
||||
CHECK(AdjustAddressSpaceLimit(-base::checked_cast<int64_t>(length)));
|
|
@ -0,0 +1,56 @@
|
|||
--- base/debug/debugger_posix.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/debug/debugger_posix.cc
|
||||
@@ -86,7 +86,7 @@ bool BeingDebugged() {
|
||||
KERN_PROC,
|
||||
KERN_PROC_PID,
|
||||
getpid()
|
||||
-#if defined(OS_OPENBSD)
|
||||
+#if defined(OS_BSD)
|
||||
, sizeof(struct kinfo_proc),
|
||||
0
|
||||
#endif
|
||||
@@ -94,33 +94,35 @@ bool BeingDebugged() {
|
||||
|
||||
// Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and
|
||||
// binary interfaces may change.
|
||||
- struct kinfo_proc info;
|
||||
- size_t info_size = sizeof(info);
|
||||
+ struct kinfo_proc *info;
|
||||
+ size_t info_size;
|
||||
|
||||
-#if defined(OS_OPENBSD)
|
||||
if (sysctl(mib, base::size(mib), NULL, &info_size, NULL, 0) < 0)
|
||||
return -1;
|
||||
|
||||
+ info = (struct kinfo_proc *)malloc(info_size);
|
||||
mib[5] = (info_size / sizeof(struct kinfo_proc));
|
||||
-#endif
|
||||
|
||||
- int sysctl_result = sysctl(mib, base::size(mib), &info, &info_size, NULL, 0);
|
||||
+ int sysctl_result = sysctl(mib, base::size(mib), info, &info_size, NULL, 0);
|
||||
DCHECK_EQ(sysctl_result, 0);
|
||||
if (sysctl_result != 0) {
|
||||
is_set = true;
|
||||
being_debugged = false;
|
||||
- return being_debugged;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
// This process is being debugged if the P_TRACED flag is set.
|
||||
is_set = true;
|
||||
#if defined(OS_FREEBSD)
|
||||
- being_debugged = (info.ki_flag & P_TRACED) != 0;
|
||||
+ being_debugged = (info->ki_flag & P_TRACED) != 0;
|
||||
#elif defined(OS_BSD)
|
||||
- being_debugged = (info.p_flag & P_TRACED) != 0;
|
||||
+ being_debugged = (info->p_flag & P_TRACED) != 0;
|
||||
#else
|
||||
- being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
|
||||
+ being_debugged = (info->kp_proc.p_flag & P_TRACED) != 0;
|
||||
#endif
|
||||
+
|
||||
+out:
|
||||
+ free(info);
|
||||
return being_debugged;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
--- base/debug/elf_reader_linux.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/debug/elf_reader_linux.cc
|
||||
@@ -41,8 +41,10 @@ Optional<std::string> ElfSegmentBuildIDNoteAsString(co
|
||||
const void* section_end = segment.data() + segment.size_bytes();
|
||||
const Nhdr* note_header = reinterpret_cast<const Nhdr*>(segment.data());
|
||||
while (note_header < section_end) {
|
||||
+#if !defined(OS_BSD)
|
||||
if (note_header->n_type == NT_GNU_BUILD_ID)
|
||||
break;
|
||||
+#endif
|
||||
note_header = reinterpret_cast<const Nhdr*>(
|
||||
reinterpret_cast<const char*>(note_header) + sizeof(Nhdr) +
|
||||
bits::Align(note_header->n_namesz, 4) +
|
|
@ -0,0 +1,11 @@
|
|||
--- base/debug/proc_maps_linux.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/debug/proc_maps_linux.cc
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "base/strings/string_split.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID)
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- base/debug/stack_trace.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/debug/stack_trace.cc
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
#include <pthread.h>
|
||||
#include "base/process/process_handle.h"
|
||||
#include "base/threading/platform_thread.h"
|
|
@ -0,0 +1,10 @@
|
|||
--- base/debug/stack_trace.h.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/debug/stack_trace.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
+#include <sys/stdint.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
--- base/debug/stack_trace_posix.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/debug/stack_trace_posix.cc
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#include "base/debug/proc_maps_linux.h"
|
||||
#endif
|
||||
|
||||
@@ -653,6 +653,11 @@ class SandboxSymbolizeHelper {
|
||||
// for the modules that are loaded in the current process.
|
||||
// Returns true on success.
|
||||
bool CacheMemoryRegions() {
|
||||
+#if defined(OS_BSD)
|
||||
+ // TODO (rene) avoid link error, implement something?
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return false;
|
||||
+#else
|
||||
// Reads /proc/self/maps.
|
||||
std::string contents;
|
||||
if (!ReadProcMaps(&contents)) {
|
||||
@@ -670,6 +675,7 @@ class SandboxSymbolizeHelper {
|
||||
|
||||
is_initialized_ = true;
|
||||
return true;
|
||||
+#endif
|
||||
}
|
||||
|
||||
// Opens all object files and caches their file descriptors.
|
|
@ -0,0 +1,11 @@
|
|||
--- base/files/file_path_unittest.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/files/file_path_unittest.cc
|
||||
@@ -1138,7 +1138,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe)
|
||||
"\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" },
|
||||
};
|
||||
|
||||
-#if !defined(SYSTEM_NATIVE_UTF8) && defined(OS_LINUX)
|
||||
+#if !defined(SYSTEM_NATIVE_UTF8) && (defined(OS_LINUX) || defined(OS_BSD))
|
||||
ScopedLocale locale("en_US.UTF-8");
|
||||
#endif
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
--- base/files/file_path_watcher_kqueue.h.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/files/file_path_watcher_kqueue.h
|
||||
@@ -5,6 +5,10 @@
|
||||
#ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
|
||||
#define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/stdint.h>
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
#include <sys/event.h>
|
||||
|
||||
#include <memory>
|
|
@ -0,0 +1,51 @@
|
|||
--- base/files/file_path_watcher_stub.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/files/file_path_watcher_stub.cc
|
||||
@@ -1,14 +1,15 @@
|
||||
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
-// This file exists for Unix systems which don't have the inotify headers, and
|
||||
-// thus cannot build file_watcher_inotify.cc
|
||||
|
||||
-#include "base/files/file_path_watcher.h"
|
||||
+#include <memory>
|
||||
|
||||
+#include "base/files/file_path_watcher.h"
|
||||
+#include "base/files/file_path_watcher_kqueue.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
+#include "build/build_config.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
@@ -22,12 +23,26 @@ class FilePathWatcherImpl : public FilePathWatcher::Pl
|
||||
bool Watch(const FilePath& path,
|
||||
bool recursive,
|
||||
const FilePathWatcher::Callback& callback) override {
|
||||
- return false;
|
||||
+ DCHECK(!impl_.get());
|
||||
+ if (recursive) {
|
||||
+ if (!FilePathWatcher::RecursiveWatchAvailable())
|
||||
+ return false;
|
||||
+ } else {
|
||||
+ impl_ = std::make_unique<FilePathWatcherKQueue>();
|
||||
+ }
|
||||
+ DCHECK(impl_.get());
|
||||
+ return impl_->Watch(path, recursive, callback);
|
||||
}
|
||||
|
||||
- void Cancel() override {}
|
||||
+ void Cancel() override {
|
||||
+ if (impl_.get())
|
||||
+ impl_->Cancel();
|
||||
+ set_cancelled();
|
||||
+ }
|
||||
|
||||
private:
|
||||
+ std::unique_ptr<PlatformDelegate> impl_;
|
||||
+
|
||||
DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl);
|
||||
};
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- base/files/file_path_watcher_unittest.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/files/file_path_watcher_unittest.cc
|
||||
@@ -436,7 +436,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) {
|
||||
VLOG(1) << "Waiting for file1 creation";
|
||||
ASSERT_TRUE(WaitForEvents());
|
||||
|
||||
-#if !defined(OS_MACOSX)
|
||||
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
// Mac implementation does not detect files modified in a directory.
|
||||
ASSERT_TRUE(WriteFile(file1, "content v2"));
|
||||
VLOG(1) << "Waiting for file1 modification";
|
|
@ -0,0 +1,11 @@
|
|||
--- base/files/file_util.h.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/files/file_util.h
|
||||
@@ -445,7 +445,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas
|
||||
// the directory |path|, in the number of FilePath::CharType, or -1 on failure.
|
||||
BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path);
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_AIX)
|
||||
+#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
|
||||
// Broad categories of file systems as returned by statfs() on Linux.
|
||||
enum FileSystemType {
|
||||
FILE_SYSTEM_UNKNOWN, // statfs failed.
|
|
@ -0,0 +1,11 @@
|
|||
--- base/files/file_util_posix.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/files/file_util_posix.cc
|
||||
@@ -407,7 +407,7 @@ bool CopyDirectoryExcl(const FilePath& from_path,
|
||||
#endif // !defined(OS_NACL_NONSFI)
|
||||
|
||||
bool CreateLocalNonBlockingPipe(int fds[2]) {
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
return pipe2(fds, O_CLOEXEC | O_NONBLOCK) == 0;
|
||||
#else
|
||||
int raw_fds[2];
|
|
@ -0,0 +1,11 @@
|
|||
--- base/files/memory_mapped_file_posix.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/files/memory_mapped_file_posix.cc
|
||||
@@ -110,6 +110,8 @@ bool MemoryMappedFile::MapFileRegionToMemory(
|
||||
// Only Android API>=21 supports the fallocate call. Older versions need
|
||||
// to manually extend the file by writing zeros at block intervals.
|
||||
do_manual_extension = true;
|
||||
+#elif defined(OS_BSD)
|
||||
+ do_manual_extension = true;
|
||||
#elif defined(OS_MACOSX)
|
||||
// MacOS doesn't support fallocate even though their new APFS filesystem
|
||||
// does support sparse files. It does, however, have the functionality
|
|
@ -0,0 +1,20 @@
|
|||
--- base/i18n/icu_util.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/i18n/icu_util.cc
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "third_party/icu/source/common/unicode/putil.h"
|
||||
#include "third_party/icu/source/common/unicode/udata.h"
|
||||
-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID)
|
||||
+#if (defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID)
|
||||
#include "third_party/icu/source/i18n/unicode/timezone.h"
|
||||
#endif
|
||||
|
||||
@@ -315,7 +315,7 @@ bool InitializeICU() {
|
||||
// TODO(jungshik): Some callers do not care about tz at all. If necessary,
|
||||
// add a boolean argument to this function to init'd the default tz only
|
||||
// when requested.
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
|
||||
if (result)
|
||||
std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
|
||||
#endif
|
|
@ -0,0 +1,18 @@
|
|||
--- base/linux_util.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/linux_util.cc
|
||||
@@ -90,12 +90,14 @@ char g_linux_distro[kDistroSize] =
|
||||
"CrOS";
|
||||
#elif defined(OS_ANDROID)
|
||||
"Android";
|
||||
+#elif defined(OS_BSD)
|
||||
+ "BSD";
|
||||
#else // if defined(OS_LINUX)
|
||||
"Unknown";
|
||||
#endif
|
||||
|
||||
std::string GetLinuxDistro() {
|
||||
-#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
return g_linux_distro;
|
||||
#elif defined(OS_LINUX)
|
||||
LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance();
|
|
@ -0,0 +1,11 @@
|
|||
--- base/logging_unittest.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/logging_unittest.cc
|
||||
@@ -420,7 +420,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo
|
||||
// need the arch-specific boilerplate below, which is inspired by breakpad.
|
||||
// At the same time, on OSX, ucontext.h is deprecated but si_addr works fine.
|
||||
uintptr_t crash_addr = 0;
|
||||
-#if defined(OS_MACOSX)
|
||||
+#if defined(OS_MACOSX) || defined(OS_BSD)
|
||||
crash_addr = reinterpret_cast<uintptr_t>(info->si_addr);
|
||||
#else // OS_POSIX && !OS_MACOSX
|
||||
ucontext_t* context = reinterpret_cast<ucontext_t*>(context_ptr);
|
|
@ -0,0 +1,11 @@
|
|||
--- base/native_library_posix.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/native_library_posix.cc
|
||||
@@ -29,7 +29,7 @@ NativeLibrary LoadNativeLibraryWithOptions(const FileP
|
||||
// http://crbug.com/17943, http://crbug.com/17557, http://crbug.com/36892,
|
||||
// and http://crbug.com/40794.
|
||||
int flags = RTLD_LAZY;
|
||||
-#if defined(OS_ANDROID) || !defined(RTLD_DEEPBIND)
|
||||
+#if defined(OS_ANDROID) || !defined(RTLD_DEEPBIND) || defined(OS_BSD)
|
||||
// Certain platforms don't define RTLD_DEEPBIND. Android dlopen() requires
|
||||
// further investigation, as it might vary across versions. Crash here to
|
||||
// warn developers that they're trying to rely on uncertain behavior.
|
|
@ -0,0 +1,11 @@
|
|||
--- base/native_library_unittest.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/native_library_unittest.cc
|
||||
@@ -120,7 +120,7 @@ TEST(NativeLibraryTest, LoadLibrary) {
|
||||
// Android dlopen() requires further investigation, as it might vary across
|
||||
// versions with respect to symbol resolution scope.
|
||||
// TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255
|
||||
-#if !defined(OS_ANDROID) && !defined(THREAD_SANITIZER) && \
|
||||
+#if !defined(OS_ANDROID) && !defined(OS_BSD) && !defined(THREAD_SANITIZER) && \
|
||||
!defined(MEMORY_SANITIZER)
|
||||
|
||||
// Verifies that the |prefer_own_symbols| option satisfies its guarantee that
|
|
@ -0,0 +1,13 @@
|
|||
--- base/numerics/safe_math_shared_impl.h.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/numerics/safe_math_shared_impl.h
|
||||
@@ -19,9 +19,7 @@
|
||||
|
||||
// Where available use builtin math overflow support on Clang and GCC.
|
||||
#if !defined(__native_client__) && \
|
||||
- ((defined(__clang__) && \
|
||||
- ((__clang_major__ > 3) || \
|
||||
- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
|
||||
+ ((defined(__clang__) && (__clang_major__ > 6)) || \
|
||||
(defined(__GNUC__) && __GNUC__ >= 5))
|
||||
#include "base/numerics/safe_math_clang_gcc_impl.h"
|
||||
#define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
|
|
@ -0,0 +1,20 @@
|
|||
--- base/posix/can_lower_nice_to.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/posix/can_lower_nice_to.cc
|
||||
@@ -31,6 +31,9 @@ bool CanLowerNiceTo(int nice_value) {
|
||||
if (geteuid() == 0)
|
||||
return true;
|
||||
|
||||
+#if defined(OS_BSD)
|
||||
+ return false;
|
||||
+#else
|
||||
// 2. Skip checking the CAP_SYS_NICE permission because it would require
|
||||
// libcap.so.
|
||||
|
||||
@@ -54,6 +57,7 @@ bool CanLowerNiceTo(int nice_value) {
|
||||
// And lowering niceness to |nice_value| is allowed if it is greater than or
|
||||
// equal to the limit:
|
||||
return nice_value >= lowest_nice_allowed;
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace internal
|
|
@ -0,0 +1,49 @@
|
|||
--- base/posix/unix_domain_socket.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/posix/unix_domain_socket.cc
|
||||
@@ -5,7 +5,10 @@
|
||||
#include "base/posix/unix_domain_socket.h"
|
||||
|
||||
#include <errno.h>
|
||||
+#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/ucred.h>
|
||||
#if !defined(OS_NACL_NONSFI)
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
@@ -28,6 +31,14 @@ namespace base {
|
||||
|
||||
const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
|
||||
|
||||
+#ifndef SCM_CREDENTIALS
|
||||
+# define SCM_CREDENTIALS 0x9001
|
||||
+#endif
|
||||
+
|
||||
+#ifndef SO_PASSCRED
|
||||
+# define SO_PASSCRED 0x9002
|
||||
+#endif
|
||||
+
|
||||
#if !defined(OS_NACL_NONSFI)
|
||||
bool CreateSocketPair(ScopedFD* one, ScopedFD* two) {
|
||||
int raw_socks[2];
|
||||
@@ -150,7 +161,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
|
||||
#if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX)
|
||||
// The PNaCl toolchain for Non-SFI binary build and macOS do not support
|
||||
// ucred. macOS supports xucred, but this structure is insufficient.
|
||||
- + CMSG_SPACE(sizeof(struct ucred))
|
||||
+ + CMSG_SPACE(sizeof(struct cmsgcred))
|
||||
#endif // OS_NACL_NONSFI or OS_MACOSX
|
||||
;
|
||||
char control_buffer[kControlBufferSize];
|
||||
@@ -180,9 +191,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
|
||||
// SCM_CREDENTIALS.
|
||||
if (cmsg->cmsg_level == SOL_SOCKET &&
|
||||
cmsg->cmsg_type == SCM_CREDENTIALS) {
|
||||
- DCHECK_EQ(payload_len, sizeof(struct ucred));
|
||||
+ DCHECK_EQ(payload_len, sizeof(struct cmsgcred));
|
||||
DCHECK_EQ(pid, -1);
|
||||
- pid = reinterpret_cast<struct ucred*>(CMSG_DATA(cmsg))->pid;
|
||||
+ pid = getpid();
|
||||
}
|
||||
#endif // !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX)
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
--- base/posix/unix_domain_socket_unittest.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/posix/unix_domain_socket_unittest.cc
|
||||
@@ -8,6 +8,9 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
+#if defined(OS_BSD)
|
||||
+#include <signal.h>
|
||||
+#endif
|
||||
#include <unistd.h>
|
||||
|
||||
#include "base/bind.h"
|
|
@ -0,0 +1,16 @@
|
|||
--- base/process/internal_linux.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/process/internal_linux.cc
|
||||
@@ -60,10 +60,13 @@ bool ReadProcFile(const FilePath& file, std::string* b
|
||||
// Synchronously reading files in /proc is safe.
|
||||
ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
|
||||
+#if !defined(OS_BSD)
|
||||
if (!ReadFileToString(file, buffer)) {
|
||||
DLOG(WARNING) << "Failed to read " << file.MaybeAsASCII();
|
||||
return false;
|
||||
}
|
||||
+#endif
|
||||
+
|
||||
return !buffer->empty();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- base/process/internal_linux.h.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/internal_linux.h
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
+#include <unistd.h> /* pid_t */
|
||||
+
|
||||
namespace base {
|
||||
|
||||
class Time;
|
|
@ -0,0 +1,11 @@
|
|||
--- base/process/kill.h.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/kill.h
|
||||
@@ -111,7 +111,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro
|
||||
BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus(
|
||||
ProcessHandle handle, int* exit_code);
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// Spawns a thread to wait asynchronously for the child |process| to exit
|
||||
// and then reaps it.
|
||||
BASE_EXPORT void EnsureProcessGetsReaped(Process process);
|
|
@ -0,0 +1,11 @@
|
|||
--- base/process/kill_posix.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/kill_posix.cc
|
||||
@@ -168,7 +168,7 @@ void EnsureProcessTerminated(Process process) {
|
||||
0, new BackgroundReaper(std::move(process), TimeDelta::FromSeconds(2)));
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
void EnsureProcessGetsReaped(Process process) {
|
||||
DCHECK(!process.is_current());
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- base/process/launch.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/launch.cc
|
||||
@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = default;
|
||||
|
||||
LaunchOptions LaunchOptionsForTest() {
|
||||
LaunchOptions options;
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// To prevent accidental privilege sharing to an untrusted child, processes
|
||||
// are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
|
||||
// new child will be used for testing only.
|
|
@ -0,0 +1,20 @@
|
|||
--- base/process/launch.h.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/process/launch.h
|
||||
@@ -175,7 +175,7 @@ struct BASE_EXPORT LaunchOptions {
|
||||
FileHandleMappingVector fds_to_remap;
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// If non-zero, start the process using clone(), using flags as provided.
|
||||
// Unlike in clone, clone_flags may not contain a custom termination signal
|
||||
// that is sent to the parent when the child dies. The termination signal will
|
||||
@@ -188,7 +188,7 @@ struct BASE_EXPORT LaunchOptions {
|
||||
|
||||
// Sets parent process death signal to SIGKILL.
|
||||
bool kill_on_parent_death = false;
|
||||
-#endif // defined(OS_LINUX)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_BSD)
|
||||
|
||||
#if defined(OS_FUCHSIA)
|
||||
// If valid, launches the application in that job object.
|
|
@ -0,0 +1,10 @@
|
|||
--- base/process/launch_posix.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/process/launch_posix.cc
|
||||
@@ -64,6 +64,7 @@
|
||||
#error "macOS should use launch_mac.cc"
|
||||
#endif
|
||||
|
||||
+#pragma weak environ
|
||||
extern char** environ;
|
||||
|
||||
namespace base {
|
|
@ -0,0 +1,20 @@
|
|||
--- base/process/memory.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/memory.cc
|
||||
@@ -10,7 +10,7 @@
|
||||
namespace base {
|
||||
|
||||
// Defined in memory_win.cc for Windows.
|
||||
-#if !defined(OS_WIN)
|
||||
+#if !defined(OS_WIN) && !defined(OS_BSD)
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -31,7 +31,7 @@ void TerminateBecauseOutOfMemory(size_t size) {
|
||||
#endif
|
||||
|
||||
// Defined in memory_mac.mm for Mac.
|
||||
-#if !defined(OS_MACOSX)
|
||||
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
|
||||
bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
|
||||
const size_t alloc_size = num_items * size;
|
|
@ -0,0 +1,11 @@
|
|||
--- base/process/memory.h.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/memory.h
|
||||
@@ -32,7 +32,7 @@ BASE_EXPORT void EnableTerminationOnOutOfMemory();
|
||||
// Crash reporting classifies such crashes as OOM.
|
||||
BASE_EXPORT void TerminateBecauseOutOfMemory(size_t size);
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
|
||||
BASE_EXPORT extern size_t g_oom_size;
|
||||
|
||||
// The maximum allowed value for the OOM score.
|
|
@ -0,0 +1,18 @@
|
|||
--- base/process/memory_unittest.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/memory_unittest.cc
|
||||
@@ -104,7 +104,7 @@ TEST(MemoryTest, AllocatorShimWorking) {
|
||||
// OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan
|
||||
// configurations: only test the real allocator.
|
||||
// Windows only supports these tests with the allocator shim in place.
|
||||
-#if !defined(OS_OPENBSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \
|
||||
+#if !defined(OS_BSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \
|
||||
!defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
|
||||
|
||||
namespace {
|
||||
@@ -529,5 +529,5 @@ TEST_F(OutOfMemoryHandledTest, UncheckedCalloc) {
|
||||
EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
|
||||
EXPECT_TRUE(value_ == nullptr);
|
||||
}
|
||||
-#endif // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
|
||||
+#endif // !defined(OS_BSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
|
||||
// !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
|
|
@ -0,0 +1,11 @@
|
|||
--- base/process/process_handle.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/process_handle.cc
|
||||
@@ -39,7 +39,7 @@ uint32_t GetUniqueIdForProcess() {
|
||||
return g_unique_id;
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_AIX)
|
||||
+#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
|
||||
|
||||
void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) {
|
||||
g_unique_id = MangleProcessId(pid_outside_of_namespace);
|
|
@ -0,0 +1,11 @@
|
|||
--- base/process/process_handle.h.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/process_handle.h
|
||||
@@ -64,7 +64,7 @@ BASE_EXPORT ProcessId GetCurrentProcId();
|
||||
// a process's PID.
|
||||
BASE_EXPORT uint32_t GetUniqueIdForProcess();
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// When a process is started in a different PID namespace from the browser
|
||||
// process, this function must be called with the process's PID in the browser's
|
||||
// PID namespace in order to initialize its unique ID. Not thread safe.
|
|
@ -0,0 +1,17 @@
|
|||
--- base/process/process_handle_freebsd.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/process_handle_freebsd.cc
|
||||
@@ -16,10 +16,13 @@ namespace base {
|
||||
|
||||
ProcessId GetParentProcessId(ProcessHandle process) {
|
||||
struct kinfo_proc info;
|
||||
- size_t length;
|
||||
+ size_t length = sizeof(struct kinfo_proc);
|
||||
int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
|
||||
|
||||
if (sysctl(mib, base::size(mib), &info, &length, NULL, 0) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (length < sizeof(struct kinfo_proc))
|
||||
return -1;
|
||||
|
||||
return info.ki_ppid;
|
|
@ -0,0 +1,44 @@
|
|||
--- base/process/process_iterator_freebsd.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/process_iterator_freebsd.cc
|
||||
@@ -10,6 +10,10 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+/* getuid() */
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
#include "base/logging.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_split.h"
|
||||
@@ -40,7 +44,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter*
|
||||
num_of_kinfo_proc += 16;
|
||||
kinfo_procs_.resize(num_of_kinfo_proc);
|
||||
len = num_of_kinfo_proc * sizeof(struct kinfo_proc);
|
||||
- if (sysctl(mib, base::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) {
|
||||
+ if (sysctl(mib, base::size(mib), kinfo_procs_.data(), &len, NULL, 0) < 0) {
|
||||
// If we get a mem error, it just means we need a bigger buffer, so
|
||||
// loop around again. Anything else is a real error and give up.
|
||||
if (errno != ENOMEM) {
|
||||
@@ -72,18 +76,13 @@ bool ProcessIterator::CheckForNextProcess() {
|
||||
for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
|
||||
size_t length;
|
||||
struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_];
|
||||
- int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid };
|
||||
+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid };
|
||||
|
||||
if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB))
|
||||
continue;
|
||||
|
||||
- length = 0;
|
||||
- if (sysctl(mib, base::size(mib), NULL, &length, NULL, 0) < 0) {
|
||||
- LOG(ERROR) << "failed to figure out the buffer size for a command line";
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- data.resize(length);
|
||||
+ data.resize(ARG_MAX);
|
||||
+ length = ARG_MAX;
|
||||
|
||||
if (sysctl(mib, base::size(mib), &data[0], &length, NULL, 0) < 0) {
|
||||
LOG(ERROR) << "failed to fetch a commandline";
|
|
@ -0,0 +1,18 @@
|
|||
--- base/process/process_linux.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/process/process_linux.cc
|
||||
@@ -88,6 +88,7 @@ Time Process::CreationTime() const {
|
||||
return Time(boot_time + start_offset);
|
||||
}
|
||||
|
||||
+#if !defined(OS_BSD)
|
||||
// static
|
||||
bool Process::CanBackgroundProcesses() {
|
||||
#if defined(OS_CHROMEOS)
|
||||
@@ -139,6 +140,7 @@ bool Process::SetProcessBackgrounded(bool background)
|
||||
DPCHECK(result == 0);
|
||||
return result == 0;
|
||||
}
|
||||
+#endif // !defined(OS_BSD)
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
bool IsProcessBackgroundedCGroup(const StringPiece& cgroup_contents) {
|
|
@ -0,0 +1,20 @@
|
|||
--- base/process/process_metrics.cc.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/process/process_metrics.cc
|
||||
@@ -126,7 +126,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage(
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
|
||||
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
|
||||
int ProcessMetrics::CalculateIdleWakeupsPerSecond(
|
||||
uint64_t absolute_idle_wakeups) {
|
||||
return CalculateEventsPerSecond(absolute_idle_wakeups,
|
||||
@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() {
|
||||
NOTIMPLEMENTED(); // http://crbug.com/120488
|
||||
return 0;
|
||||
}
|
||||
-#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
|
||||
+#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
int ProcessMetrics::CalculatePackageIdleWakeupsPerSecond(
|
|
@ -0,0 +1,112 @@
|
|||
--- base/process/process_metrics.h.orig 2019-04-08 08:32:37 UTC
|
||||
+++ base/process/process_metrics.h
|
||||
@@ -41,7 +41,7 @@ namespace base {
|
||||
// Full declaration is in process_metrics_iocounters.h.
|
||||
struct IoCounters;
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
// Minor and major page fault counts since the process creation.
|
||||
// Both counts are process-wide, and exclude child processes.
|
||||
//
|
||||
@@ -51,7 +51,7 @@ struct PageFaultCounts {
|
||||
int64_t minor;
|
||||
int64_t major;
|
||||
};
|
||||
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
|
||||
// Convert a POSIX timeval to microseconds.
|
||||
BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv);
|
||||
@@ -92,7 +92,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
// convenience wrapper for CreateProcessMetrics().
|
||||
static std::unique_ptr<ProcessMetrics> CreateCurrentProcessMetrics();
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
// Resident Set Size is a Linux/Android specific memory concept. Do not
|
||||
// attempt to extend this to other platforms.
|
||||
BASE_EXPORT size_t GetResidentSetSize() const;
|
||||
@@ -199,14 +199,14 @@ class BASE_EXPORT ProcessMetrics {
|
||||
int GetOpenFdSoftLimit() const;
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
// Bytes of swap as reported by /proc/[pid]/status.
|
||||
uint64_t GetVmSwapBytes() const;
|
||||
|
||||
// Minor and major page fault count as reported by /proc/[pid]/stat.
|
||||
// Returns true for success.
|
||||
bool GetPageFaultCounts(PageFaultCounts* counts) const;
|
||||
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
|
||||
// Returns total memory usage of malloc.
|
||||
size_t GetMallocUsage();
|
||||
@@ -218,7 +218,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
ProcessMetrics(ProcessHandle process, PortProvider* port_provider);
|
||||
#endif // !defined(OS_MACOSX) || defined(OS_IOS)
|
||||
|
||||
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
|
||||
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
|
||||
int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
|
||||
#endif
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -247,7 +247,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
// Number of bytes transferred to/from disk in bytes.
|
||||
uint64_t last_cumulative_disk_usage_ = 0;
|
||||
|
||||
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
|
||||
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
|
||||
// Same thing for idle wakeups.
|
||||
TimeTicks last_idle_wakeups_time_;
|
||||
uint64_t last_absolute_idle_wakeups_;
|
||||
@@ -293,7 +293,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
|
||||
- defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA)
|
||||
+ defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) || defined(OS_BSD)
|
||||
// Data about system-wide memory consumption. Values are in KB. Available on
|
||||
// Windows, Mac, Linux, Android and Chrome OS.
|
||||
//
|
||||
@@ -326,7 +326,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
|
||||
int avail_phys = 0;
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
|
||||
// This provides an estimate of available memory as described here:
|
||||
// https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
|
||||
// NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always
|
||||
@@ -341,7 +341,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
|
||||
#endif
|
||||
|
||||
#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || \
|
||||
- defined(OS_FUCHSIA)
|
||||
+ defined(OS_FUCHSIA) || defined(OS_BSD)
|
||||
int buffers = 0;
|
||||
int cached = 0;
|
||||
int active_anon = 0;
|
||||
@@ -351,7 +351,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
|
||||
int dirty = 0;
|
||||
int reclaimable = 0;
|
||||
#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) ||
|
||||
- // defined(OS_FUCHSIA)
|
||||
+ // defined(OS_FUCHSIA) || defined(OS_BSD)
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
int shmem = 0;
|
||||
@@ -377,9 +377,9 @@ struct BASE_EXPORT SystemMemoryInfoKB {
|
||||
BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo);
|
||||
|
||||
#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
|
||||
- // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA)
|
||||
+ // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) || defined(OS_BSD)
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
|
||||
// Parse the data found in /proc/<pid>/stat and return the sum of the
|
||||
// CPU-related ticks. Returns -1 on parse error.
|
||||
// Exposed for testing.
|
|
@ -0,0 +1,122 @@
|
|||
--- base/process/process_metrics_freebsd.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/process_metrics_freebsd.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "base/process/process_metrics.h"
|
||||
|
||||
#include <stddef.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/user.h>
|
||||
#include <unistd.h>
|
||||
@@ -14,11 +15,15 @@
|
||||
#include "base/process/process_metrics_iocounters.h"
|
||||
#include "base/stl_util.h"
|
||||
|
||||
+#include <unistd.h> /* getpagesize() */
|
||||
+#include <fcntl.h> /* O_RDONLY */
|
||||
+#include <kvm.h>
|
||||
+#include <libutil.h>
|
||||
+
|
||||
namespace base {
|
||||
|
||||
ProcessMetrics::ProcessMetrics(ProcessHandle process)
|
||||
- : process_(process),
|
||||
- last_cpu_(0) {}
|
||||
+ : process_(process) {}
|
||||
|
||||
// static
|
||||
std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
|
||||
@@ -69,4 +74,93 @@ size_t GetSystemCommitCharge() {
|
||||
return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
|
||||
}
|
||||
|
||||
+int GetNumberOfThreads(ProcessHandle process) {
|
||||
+ // Taken from FreeBSD top (usr.bin/top/machine.c)
|
||||
+
|
||||
+ kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
|
||||
+ if (kd == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ struct kinfo_proc* pbase;
|
||||
+ int nproc;
|
||||
+ pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc);
|
||||
+ if (pbase == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (kvm_close(kd) == -1)
|
||||
+ return 0;
|
||||
+
|
||||
+ return nproc;
|
||||
+}
|
||||
+
|
||||
+bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) {
|
||||
+ unsigned int mem_total, mem_free, swap_total, swap_used;
|
||||
+ size_t length;
|
||||
+ int pagesizeKB;
|
||||
+
|
||||
+ pagesizeKB = getpagesize() / 1024;
|
||||
+
|
||||
+ length = sizeof(mem_total);
|
||||
+ if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total,
|
||||
+ &length, NULL, 0) != 0 || length != sizeof(mem_total))
|
||||
+ return false;
|
||||
+
|
||||
+ length = sizeof(mem_free);
|
||||
+ if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0)
|
||||
+ != 0 || length != sizeof(mem_free))
|
||||
+ return false;
|
||||
+
|
||||
+ length = sizeof(swap_total);
|
||||
+ if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0)
|
||||
+ != 0 || length != sizeof(swap_total))
|
||||
+ return false;
|
||||
+
|
||||
+ length = sizeof(swap_used);
|
||||
+ if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0)
|
||||
+ != 0 || length != sizeof(swap_used))
|
||||
+ return false;
|
||||
+
|
||||
+ meminfo->total = mem_total * pagesizeKB;
|
||||
+ meminfo->free = mem_free * pagesizeKB;
|
||||
+ meminfo->swap_total = swap_total * pagesizeKB;
|
||||
+ meminfo->swap_free = (swap_total - swap_used) * pagesizeKB;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+int ProcessMetrics::GetOpenFdCount() const {
|
||||
+ struct kinfo_file * kif;
|
||||
+ int cnt;
|
||||
+
|
||||
+ if ((kif = kinfo_getfile(process_, &cnt)) == NULL)
|
||||
+ return -1;
|
||||
+
|
||||
+ free(kif);
|
||||
+
|
||||
+ return cnt;
|
||||
+}
|
||||
+
|
||||
+int ProcessMetrics::GetOpenFdSoftLimit() const {
|
||||
+ size_t length;
|
||||
+ int total_count = 0;
|
||||
+ int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC };
|
||||
+
|
||||
+ length = sizeof(total_count);
|
||||
+
|
||||
+ if (sysctl(mib, base::size(mib), &total_count, &length, NULL, 0) < 0) {
|
||||
+ total_count = -1;
|
||||
+ }
|
||||
+
|
||||
+ return total_count;
|
||||
+}
|
||||
+
|
||||
+uint64_t ProcessMetrics::GetVmSwapBytes() const {
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int ProcessMetrics::GetIdleWakeupsPerSecond() {
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return 0;
|
||||
+}
|
||||
} // namespace base
|
|
@ -0,0 +1,20 @@
|
|||
--- base/process/process_metrics_posix.cc.orig 2019-04-08 08:18:04 UTC
|
||||
+++ base/process/process_metrics_posix.cc
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include <malloc/malloc.h>
|
||||
+#elif defined(OS_FREEBSD)
|
||||
+#include <stdlib.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
@@ -107,7 +109,7 @@ size_t ProcessMetrics::GetMallocUsage() {
|
||||
#else
|
||||
return minfo.hblkhd + minfo.arena;
|
||||
#endif
|
||||
-#elif defined(OS_FUCHSIA)
|
||||
+#elif defined(OS_FUCHSIA) || defined(OS_BSD)
|
||||
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
|
||||
return 0;
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue