configure.ac                                |    2 +-
 external/lcms2/ExternalPackage_lcms2.mk     |    4 +++-
 external/openssl/ExternalProject_openssl.mk |    4 +++-
 external/pdfium/UnpackedTarball_pdfium.mk   |    1 +
 external/pdfium/bsd-time.patch.1            |   12 ++++++++++++
 external/python3/ExternalPackage_python3.mk |    8 +++++++-
 6 files changed, 27 insertions(+), 4 deletions(-)

New commits:
commit 3615d2f0e1531dbb1f89e00672c52faa5316f23c
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Tue May 25 14:12:12 2021 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Feb 13 19:09:04 2022 +0100

    FreeBSD: fix python3 packaging
    
    Change-Id: Ia5a32c8c33f74cb00c3c270774e5982443298243

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index faddf06fc36a..dd470ef37f4e 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -106,7 +106,7 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
        LO_lib/_sha3.$(python3_EXTENSION_MODULE_SUFFIX).so \
        LO_lib/_sha512.$(python3_EXTENSION_MODULE_SUFFIX).so \
        LO_lib/_socket.$(python3_EXTENSION_MODULE_SUFFIX).so \
-       LO_lib/spwd.$(python3_EXTENSION_MODULE_SUFFIX).so \
+       $(if $(filter FREEBSD,$(OS)),,  
LO_lib/spwd.$(python3_EXTENSION_MODULE_SUFFIX).so) \
        $(if $(ENABLE_OPENSSL), \
                LO_lib/_ssl.$(python3_EXTENSION_MODULE_SUFFIX).so \
        ) \
@@ -137,6 +137,11 @@ endif
 endif
 
 # that one is generated...
+ifeq ($(HOST_PLATFORM),x86_64-unknown-freebsd12.2)
+$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+       LO_lib/_sysconfigdata__freebsd12_.py \
+))
+else
 # note: python configure overrides config.guess with something that doesn't
 # put -pc in its linux platform triplets, so filter that...
 ifneq ($(OS),WNT)
@@ -150,6 +155,7 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
 ))
 endif
 endif
+endif
 
 
 # packages not shipped:
commit c4ab0cd8ca50eeb0f2c329b085b993a6d9b948ac
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Mon May 24 20:16:45 2021 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Feb 13 19:06:36 2022 +0100

    Fix pdfium build on BSD
    
    Change-Id: I30b10e71c120e59d1da7b69728c742afcb4bbe83

diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index 3a19feed8ea2..ac19d21c770b 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -18,6 +18,7 @@ pdfium_patches += c++20-comparison.patch
 pdfium_patches += cg-instead-of-carbon.patch.1
 # Android NDK 19 - that is known to work well - does not have 2 defines
 pdfium_patches += AndroidNDK19.patch.1
+pdfium_patches += bsd-time.patch.1
 
 # Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94141> "c++20 
rewritten operator==
 # recursive call mixing friend and external operators for template class" in 
GCC with
diff --git a/external/pdfium/bsd-time.patch.1 b/external/pdfium/bsd-time.patch.1
new file mode 100644
index 000000000000..7c08071d8d20
--- /dev/null
+++ b/external/pdfium/bsd-time.patch.1
@@ -0,0 +1,12 @@
+diff -ur pdfium.org/core/fxcrt/cfx_datetime.cpp 
pdfium/core/fxcrt/cfx_datetime.cpp
+--- pdfium.org/core/fxcrt/cfx_datetime.cpp     2021-05-24 18:49:42.500750000 
+0200
++++ pdfium/core/fxcrt/cfx_datetime.cpp 2021-05-24 18:50:28.360272000 +0200
+@@ -10,7 +10,7 @@
+ #include "core/fxcrt/fx_system.h"
+ 
+ #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
+-    defined(OS_APPLE) || defined(OS_ASMJS)
++    defined(OS_APPLE) || defined(OS_ASMJS) || defined(OS_BSD)
+ #include <sys/time.h>
+ #include <time.h>
+ #endif
commit da027986398213c1c5b54661fc6f024827eb46a6
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Mon May 24 20:15:14 2021 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Feb 13 19:05:37 2022 +0100

    FreeBSD: fix OPENSSL_PLATFORM
    
    Change-Id: I0f48d572edaed7e996be7a75d524c7d540a76ecd

diff --git a/external/openssl/ExternalProject_openssl.mk 
b/external/openssl/ExternalProject_openssl.mk
index e44ccf5f3436..81a7c5ff6c67 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -26,7 +26,9 @@ OPENSSL_PLATFORM := \
         $(if $(filter GNU/kFreeBSD,$(shell uname)),\
           debian-kfreebsd-amd64\
         ,\
-          $(if $(filter TRUE, $(ENABLE_DBGUTIL)), debug-linux-generic64, 
linux-generic64) no-asm\
+          $(if $(filter FreeBSD,$(shell uname)), BSD-x86_64,\
+            $(if $(filter TRUE, $(ENABLE_DBGUTIL)), debug-linux-generic64, 
linux-generic64) no-asm\
+          )\
         )\
       ,\
         $(if $(filter TRUE, $(ENABLE_DBGUTIL)), debug-linux-generic32, 
linux-generic32)\
commit 5eb1c2d4c82c0d276b721f76841109b1315f9d16
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Mon May 24 20:14:37 2021 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Feb 13 19:05:28 2022 +0100

    FreeBSD: fix packaging of liblcms2.so.2
    
    Change-Id: I820a44ff5ae4ab6a3a0201857ceaa2017dbae54d

diff --git a/external/lcms2/ExternalPackage_lcms2.mk 
b/external/lcms2/ExternalPackage_lcms2.mk
index ede9e66acfa9..ff5c99dc183a 100644
--- a/external/lcms2/ExternalPackage_lcms2.mk
+++ b/external/lcms2/ExternalPackage_lcms2.mk
@@ -20,7 +20,9 @@ $(eval $(call 
gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/liblcms2-2.dl
 else ifeq ($(COM),MSC)
 $(eval $(call 
gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/lcms2.dll,bin/lcms2.dll))
 endif # $(COM)
-else  # $(OS) != WNT/MACOSX
+else ifeq ($(OS),FREEBSD)
+$(eval $(call 
gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/liblcms2.so.2,src/.libs/liblcms2.so.2))
+else  # $(OS) != WNT/MACOSX/FREEBSD
 $(eval $(call 
gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/liblcms2.so.2,src/.libs/liblcms2.so.2.0.12))
 endif # $(OS)
 endif # $(DISABLE_DYNLOADING)
commit 9e2a2c3598346e889f4bea558d4369102c1fc390
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Mon May 24 20:12:36 2021 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Feb 13 19:04:32 2022 +0100

    FreeBSD: evaluate --with-gnu-patch
    
    Change-Id: I41e2cc8dc74022c840dac6355ed29cc0c4c40b17

diff --git a/configure.ac b/configure.ac
index ee8a65315d71..af5badf8c0df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11438,7 +11438,7 @@ if test -z "$PATCH"; then
 fi
 
 dnl On Solaris or macOS, check if --with-gnu-patch was used
-if test "$_os" = "SunOS" -o "$_os" = "Darwin"; then
+if test "$_os" = "SunOS" -o "$_os" = "Darwin" -o "$_os" = "FreeBSD"; then
     if test -z "$with_gnu_patch"; then
         GNUPATCH=$PATCH
     else

Reply via email to