git: fd836055d62c - main - archivers/snappy-java: fix build on powerpc64le

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 13 Oct 2021 10:50:35 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fd836055d62c103ebe767de0f7e9a2f428eeb0e6

commit fd836055d62c103ebe767de0f7e9a2f428eeb0e6
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-10-13 10:48:33 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-10-13 10:48:33 +0000

    archivers/snappy-java: fix build on powerpc64le
---
 archivers/snappy-java/Makefile                    |  2 ++
 archivers/snappy-java/files/patch-Makefile.common | 11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/archivers/snappy-java/Makefile b/archivers/snappy-java/Makefile
index a880e62cb419..3d020076df3b 100644
--- a/archivers/snappy-java/Makefile
+++ b/archivers/snappy-java/Makefile
@@ -68,6 +68,8 @@ PLATFORM_DIR_SUFFIX=	FreeBSD-x86
 PLATFORM_DIR_SUFFIX=	FreeBSD-aarch64
 .	elif ${ARCH} == powerpc64
 PLATFORM_DIR_SUFFIX=	FreeBSD-ppc64
+.	elif ${ARCH} == powerpc64le
+PLATFORM_DIR_SUFFIX=	FreeBSD-ppc64le
 .	else
 PLATFORM_DIR_SUFFIX=	Default
 .	endif
diff --git a/archivers/snappy-java/files/patch-Makefile.common b/archivers/snappy-java/files/patch-Makefile.common
index cc0feacdc828..a047a3fffb3a 100644
--- a/archivers/snappy-java/files/patch-Makefile.common
+++ b/archivers/snappy-java/files/patch-Makefile.common
@@ -5,11 +5,11 @@
  # os=Default is meant to be generic unix/linux
  
 -known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64
-+known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-aarch64 FreeBSD-ppc64 FreeBSD-x86 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64
++known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-aarch64 FreeBSD-ppc64 FreeBSD-ppc64le FreeBSD-x86 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64
  os_arch := $(OS_NAME)-$(OS_ARCH)
  IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7"))
  
-@@ -249,6 +249,27 @@ Mac-x86_64_CXXFLAGS  := -Ilib/inc_mac -I$(JAVA_HOME)/i
+@@ -249,6 +249,34 @@ Mac-x86_64_CXXFLAGS  := -Ilib/inc_mac -I$(JAVA_HOME)/i
  Mac-x86_64_LINKFLAGS := -dynamiclib
  Mac-x86_64_LIBNAME   := libsnappyjava.jnilib
  Mac-x86_64_SNAPPY_FLAGS  :=
@@ -28,6 +28,13 @@
 +FreeBSD-ppc64_LIBNAME      := libsnappyjava.so
 +FreeBSD-ppc64_SNAPPY_FLAGS :=
 +
++FreeBSD-ppc64le_CXX          := $(CROSS_PREFIX)g++
++FreeBSD-ppc64le_STRIP        := $(CROSS_PREFIX)strip
++FreeBSD-ppc64le_CXXFLAGS     := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden
++FreeBSD-ppc64le_LINKFLAGS    := -shared -static-libgcc
++FreeBSD-ppc64le_LIBNAME      := libsnappyjava.so
++FreeBSD-ppc64le_SNAPPY_FLAGS :=
++
 +FreeBSD-x86_CXX          := $(CROSS_PREFIX)g++
 +FreeBSD-x86_STRIP        := $(CROSS_PREFIX)strip
 +FreeBSD-x86_CXXFLAGS     := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden