git: 28a93b275570 - main - archivers/snappy-java: enable armv6 and armv7

From: Ronald Klop <ronald_at_FreeBSD.org>
Date: Sun, 27 Oct 2024 10:02:37 UTC
The branch main has been updated by ronald:

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

commit 28a93b27557094699ee751eacf29f6466b9e0c57
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2024-10-24 10:36:53 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2024-10-27 10:01:31 +0000

    archivers/snappy-java: enable armv6 and armv7
    
    PR:     282272
    Approved by:    Angelo Polo (maintainer)
---
 archivers/snappy-java/Makefile                    |  6 +++---
 archivers/snappy-java/files/patch-Makefile.common | 13 ++++++++++---
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/archivers/snappy-java/Makefile b/archivers/snappy-java/Makefile
index bd46c3334633..e8cc14d88d72 100644
--- a/archivers/snappy-java/Makefile
+++ b/archivers/snappy-java/Makefile
@@ -5,6 +5,7 @@
 PORTNAME=	snappy
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.1.10.5
+PORTREVISION=	1
 CATEGORIES=	archivers java
 MASTER_SITES=	LOCAL/otis:repo
 PKGNAMESUFFIX=	java
@@ -21,9 +22,6 @@ WWW=		https://github.com/xerial/snappy-java
 
 LICENSE=	APACHE20
 
-BROKEN_armv6=	fails to build: maven-assembly-plugin: Failed to retrieve numeric file attributes
-BROKEN_armv7=	fails to build: maven-assembly-plugin: Failed to retrieve numeric file attributes
-
 BUILD_DEPENDS=	cmake:devel/cmake-core \
 		sbt:devel/sbt
 
@@ -75,6 +73,8 @@ PLATFORM_DIR_SUFFIX=	FreeBSD-x86_64
 PLATFORM_DIR_SUFFIX=	FreeBSD-x86
 . elif ${ARCH} == aarch64
 PLATFORM_DIR_SUFFIX=	FreeBSD-aarch64
+. elif ${ARCH} == armv6 || ${ARCH} == armv7
+PLATFORM_DIR_SUFFIX=	FreeBSD-arm
 . elif ${ARCH} == powerpc64
 PLATFORM_DIR_SUFFIX=	FreeBSD-ppc64
 . elif ${ARCH} == powerpc64le
diff --git a/archivers/snappy-java/files/patch-Makefile.common b/archivers/snappy-java/files/patch-Makefile.common
index 83e2fc1af300..fde6de71a02b 100644
--- a/archivers/snappy-java/files/patch-Makefile.common
+++ b/archivers/snappy-java/files/patch-Makefile.common
@@ -1,6 +1,6 @@
 --- Makefile.common.orig	2023-09-27 02:22:20 UTC
 +++ Makefile.common
-@@ -29,8 +29,13 @@ IBM_JDK_LIB := lib/inc_ibm
+@@ -29,8 +29,13 @@ else
  ifeq ($(OS_NAME),Mac)
  ENDIANESS:="Little Endian"
  else
@@ -20,11 +20,11 @@
  
  # To support new CPU architecture, add a new target name here
 -known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-android-aarch64 Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 Mac-aarch64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 Windows-aarch64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 Linux-riscv Linux-riscv64
-+known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-android-aarch64 Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 Mac-aarch64 FreeBSD-aarch64 FreeBSD-ppc64 FreeBSD-ppc64le FreeBSD-x86 FreeBSD-x86_64 Windows-x86 Windows-x86_64 Windows-aarch64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 Linux-riscv Linux-riscv64
++known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-android-aarch64 Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 Mac-aarch64 FreeBSD-arm FreeBSD-aarch64 FreeBSD-ppc64 FreeBSD-ppc64le FreeBSD-x86 FreeBSD-x86_64 Windows-x86 Windows-x86_64 Windows-aarch64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 Linux-riscv Linux-riscv64
  os_arch := $(OS_NAME)-$(OS_ARCH)
  IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7"))
  
-@@ -262,6 +267,34 @@ Mac-x86_64_CXXFLAGS  := -Ilib/inc_mac -I$(JAVA_HOME)/i
+@@ -262,6 +267,41 @@ Mac-x86_64_SNAPPY_FLAGS  :=
  Mac-x86_64_LINKFLAGS := -dynamiclib
  Mac-x86_64_LIBNAME   := libsnappyjava.dylib
  Mac-x86_64_SNAPPY_FLAGS  :=
@@ -36,6 +36,13 @@
 +FreeBSD-aarch64_LIBNAME      := libsnappyjava.so
 +FreeBSD-aarch64_SNAPPY_FLAGS :=
 +
++FreeBSD-arm_CXX          := $(CROSS_PREFIX)g++
++FreeBSD-arm_STRIP        := $(CROSS_PREFIX)strip
++FreeBSD-arm_CXXFLAGS     := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden
++FreeBSD-arm_LINKFLAGS    := -shared -static-libgcc
++FreeBSD-arm_LIBNAME      := libsnappyjava.so
++FreeBSD-arm_SNAPPY_FLAGS :=
++
 +FreeBSD-ppc64_CXX          := $(CROSS_PREFIX)g++
 +FreeBSD-ppc64_STRIP        := $(CROSS_PREFIX)strip
 +FreeBSD-ppc64_CXXFLAGS     := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden