pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
folly: add incomplete package
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By: wiz
Date: Wed Nov 22 19:03:18 2023 +0100
Changeset: 4aff3a79944e4eaa1a5e422f4bd2f3c017ca9ce7
Modified Files:
Makefile
Added Files:
folly/DESCR
folly/Makefile
folly/PLIST
folly/TODO
folly/distinfo
folly/patches/patch-CMake_folly-deps.cmake
folly/patches/patch-folly_Memory.h
folly/patches/patch-folly_Subprocess.cpp
folly/patches/patch-folly_experimental_EnvUtil.cpp
Log Message:
folly: add incomplete package
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4aff3a79944e4eaa1a5e422f4bd2f3c017ca9ce7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
folly/DESCR | 17 ++++++++++++++
folly/Makefile | 23 +++++++++++++++++++
folly/PLIST | 4 ++++
folly/TODO | 1 +
folly/distinfo | 9 ++++++++
folly/patches/patch-CMake_folly-deps.cmake | 16 +++++++++++++
folly/patches/patch-folly_Memory.h | 15 +++++++++++++
folly/patches/patch-folly_Subprocess.cpp | 26 ++++++++++++++++++++++
folly/patches/patch-folly_experimental_EnvUtil.cpp | 17 ++++++++++++++
10 files changed, 129 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index ca226a8d15..8d2ceaccaf 100644
--- a/Makefile
+++ b/Makefile
@@ -905,6 +905,7 @@ SUBDIR+= fnaify-extralibs
SUBDIR+= fnord
SUBDIR+= fnteditfs
SUBDIR+= fogleman-craft
+SUBDIR+= folly
SUBDIR+= fontaine
SUBDIR+= fonttosfnt
SUBDIR+= forgejo
diff --git a/folly/DESCR b/folly/DESCR
new file mode 100644
index 0000000000..7dc912d70e
--- /dev/null
+++ b/folly/DESCR
@@ -0,0 +1,17 @@
+iFolly (acronymed loosely after Facebook Open Source Library) is
+a library of C++14 components designed with practicality and
+efficiency in mind. Folly contains a variety of core library
+components used extensively at Facebook. In particular, it's often
+a dependency of Facebook's other open source C++ efforts and place
+where those projects can share code.
+
+It complements (as opposed to competing against) offerings such as
+Boost and of course std. In fact, we embark on defining our own
+component only when something we need is either not available, or
+does not meet the needed performance profile. We endeavor to remove
+things from folly if or when std or Boost obsoletes them.
+
+Performance concerns permeate much of Folly, sometimes leading to
+designs that are more idiosyncratic than they would otherwise be
+(see e.g. PackedSyncPtr.h, SmallLocks.h). Good performance at large
+scale is a unifying theme in all of Folly.
diff --git a/folly/Makefile b/folly/Makefile
new file mode 100644
index 0000000000..283a586c35
--- /dev/null
+++ b/folly/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+DISTNAME= folly-2023.11.20.00
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=facebook/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/facebook/folly
+COMMENT= Open-source C++ library developed and used at Facebook
+LICENSE= apache-2.0
+
+USE_LANGUAGES= c c++
+
+.include "../../archivers/lz4/buildlink3.mk"
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/gflags/buildlink3.mk"
+.include "../../devel/google-glog/buildlink3.mk"
+.include "../../math/double-conversion/buildlink3.mk"
+.include "../../textproc/fmtlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/folly/PLIST b/folly/PLIST
new file mode 100644
index 0000000000..92ba51a2d7
--- /dev/null
+++ b/folly/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/bin/make package"
+@comment TODO: 2. run "/usr/bin/make print-PLIST"
diff --git a/folly/TODO b/folly/TODO
new file mode 100644
index 0000000000..6e40eb09b4
--- /dev/null
+++ b/folly/TODO
@@ -0,0 +1 @@
+Doesn't build on NetBSD.
diff --git a/folly/distinfo b/folly/distinfo
new file mode 100644
index 0000000000..9d9e9b0295
--- /dev/null
+++ b/folly/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+BLAKE2s (folly-2023.11.20.00.tar.gz) = 1b75f0452a75aca70e2a97d224bab657eed4b52264c89a2459c270fbedd35a7e
+SHA512 (folly-2023.11.20.00.tar.gz) = 3b2f8a32065c7867a46cd14983029808ad578bc38153e55674ffd965eece84836b4ee58034c33b33cac6f6b966d13331dc309ad45e2b7e9edb5a47c146781043
+Size (folly-2023.11.20.00.tar.gz) = 3945184 bytes
+SHA1 (patch-CMake_folly-deps.cmake) = 3b6aad5f0f1b1cd223b9f5c25cee65c7001097dd
+SHA1 (patch-folly_Memory.h) = c5faa5ff1652ab1d206e466841a0ad71818d2b84
+SHA1 (patch-folly_Subprocess.cpp) = eade5cb85ecb73ffa1232252ce2a99bc2df44cd2
+SHA1 (patch-folly_experimental_EnvUtil.cpp) = 2017f085ebd8b59148bca3df1418891d4c973af1
diff --git a/folly/patches/patch-CMake_folly-deps.cmake b/folly/patches/patch-CMake_folly-deps.cmake
new file mode 100644
index 0000000000..4ef374916a
--- /dev/null
+++ b/folly/patches/patch-CMake_folly-deps.cmake
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Avoid using libdwarf because the version coming with NetBSD is too old
+and doesn't provide all needed symbols.
+
+--- CMake/folly-deps.cmake.orig 2023-11-22 17:56:23.282105254 +0000
++++ CMake/folly-deps.cmake
+@@ -173,7 +173,7 @@ CHECK_INCLUDE_FILE_CXX(elf.h FOLLY_HAVE_
+ find_package(Backtrace)
+
+ set(FOLLY_HAVE_BACKTRACE ${Backtrace_FOUND})
+-set(FOLLY_HAVE_DWARF ${LIBDWARF_FOUND})
++set(FOLLY_HAVE_DWARF FALSE)
+ if (NOT WIN32 AND NOT APPLE)
+ set(FOLLY_USE_SYMBOLIZER ON)
+ endif()
diff --git a/folly/patches/patch-folly_Memory.h b/folly/patches/patch-folly_Memory.h
new file mode 100644
index 0000000000..212a7dcabc
--- /dev/null
+++ b/folly/patches/patch-folly_Memory.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use posix_memalign on NetBSD too.
+
+--- folly/Memory.h.orig 2023-11-19 20:05:55.000000000 +0000
++++ folly/Memory.h
+@@ -48,7 +48,7 @@ namespace folly {
+ (defined(__APPLE__) && \
+ (__MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || \
+ __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_0)) || \
+- defined(__FreeBSD__) || defined(__wasm32__)
++ defined(__FreeBSD__) || defined(__NetBSD__) || defined(__wasm32__)
+
+ inline void* aligned_malloc(size_t size, size_t align) {
+ // use posix_memalign, but mimic the behaviour of memalign
diff --git a/folly/patches/patch-folly_Subprocess.cpp b/folly/patches/patch-folly_Subprocess.cpp
new file mode 100644
index 0000000000..e229ba6142
--- /dev/null
+++ b/folly/patches/patch-folly_Subprocess.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+NetBSD fixes.
+
+--- folly/Subprocess.cpp.orig 2023-11-19 20:05:55.000000000 +0000
++++ folly/Subprocess.cpp
+@@ -49,6 +49,10 @@
+ #include <folly/system/AtFork.h>
+ #include <folly/system/Shell.h>
+
++#ifdef __NetBSD__
++extern char **environ;
++#endif
++
+ constexpr int kExecFailure = 127;
+ constexpr int kChildFailure = 126;
+
+@@ -685,7 +689,7 @@ int Subprocess::prepareChild(
+ #endif
+
+ if (options.processGroupLeader_) {
+-#if !defined(__FreeBSD__)
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ if (setpgrp() == -1) {
+ #else
+ if (setpgrp(getpid(), getpgrp()) == -1) {
diff --git a/folly/patches/patch-folly_experimental_EnvUtil.cpp b/folly/patches/patch-folly_experimental_EnvUtil.cpp
new file mode 100644
index 0000000000..29bfbda828
--- /dev/null
+++ b/folly/patches/patch-folly_experimental_EnvUtil.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+NetBSD fixes.
+
+--- folly/experimental/EnvUtil.cpp.orig 2023-11-22 17:54:59.165151934 +0000
++++ folly/experimental/EnvUtil.cpp
+@@ -22,6 +22,10 @@
+ #include <folly/portability/Stdlib.h>
+ #include <folly/portability/Unistd.h>
+
++#ifdef __NetBSD__
++extern char **environ;
++#endif
++
+ using namespace folly;
+ using namespace folly::experimental;
+
Home |
Main Index |
Thread Index |
Old Index