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 @@ -1,95 +1,95 @@ # Note to committers: # With each version update, a new maven repository must be created # and distributed so build is repeatable and cluster-safe. PORTNAME= snappy DISTVERSIONPREFIX= v DISTVERSION= 1.1.10.5 +PORTREVISION= 1 CATEGORIES= archivers java MASTER_SITES= LOCAL/otis:repo PKGNAMESUFFIX= java DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ ${PORTNAME}-${PKGNAMESUFFIX}-repository-${PORTVERSION}${EXTRACT_SUFX}:repo EXTRACT_ONLY= ${DISTFILE_DEFAULT} \ ${PORTNAME}-${PKGNAMESUFFIX}-repository-${PORTVERSION}${EXTRACT_SUFX} \ ${DISTFILE_google_benchmark} \ ${DISTFILE_google_googletest} MAINTAINER= language.devel@gmail.com COMMENT= Fast compressor/decompressor library 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 USES= gmake USE_GITHUB= yes GH_ACCOUNT= xerial GH_PROJECT= snappy-java GH_TAGNAME= ${DISTVERSIONFULL} GH_TUPLE= google:snappy:${DISTVERSION:R}:google \ google:benchmark:d572f47:google_benchmark/google_benchmark \ google:googletest:b796f7d:google_googletest/google_googletest \ kiyo-masui:bitshuffle:${BITSHUFFLE_V}:masui USE_JAVA= yes JAVA_BUILD= jre # prevent JAVA_RUN via bsd.java.mk USE_LDCONFIG= yes MAKE_ARGS+= CXX="${CXX}" TEST_TARGET= test BITSHUFFLE_V= 0.3.4 PLIST_FILES= ${JAVAJARDIR}/snappy-java.jar \ lib/libsnappyjava.so .include post-extract: ${MKDIR} ${WRKSRC}/target ${RM} ${WRKSRC}/sbt ${CP} ${DISTDIR}/${DISTFILE_google} ${WRKSRC}/target/snappy-${PORTVERSION:R}${EXTRACT_SUFX} ${CP} ${DISTDIR}/${DISTFILE_masui} ${WRKSRC}/target/bitshuffle-${BITSHUFFLE_V}${EXTRACT_SUFX} (cd ${WRKSRC}/google_benchmark && \ ${COPYTREE_SHARE} . ${WRKSRC}/target/snappy-${PORTVERSION:R}/third_party/benchmark) (cd ${WRKSRC}/google_googletest && \ ${COPYTREE_SHARE} . ${WRKSRC}/target/snappy-${PORTVERSION:R}/third_party/googletest) do-build: cd ${WRKSRC} && ${SETENV} JAVA_HOME=${JAVA_HOME} ${MAKE_ENV} \ ${MAKE_CMD} ${MAKE_ARGS} SBT_IVY_HOME=${WRKDIR}/repository SBT_BOOT_DIR=${WRKDIR}/sbt_boot SBT_GLOBAL_DIR=${WRKDIR}/sbt_global do-test: cd ${WRKSRC} && ${SETENV} JAVA_HOME=${JAVA_HOME} ${MAKE_ENV} \ ${MAKE_CMD} ${MAKE_ARGS} SBT_IVY_HOME=${WRKDIR}/repository SBT_BOOT_DIR=${WRKDIR}/sbt_boot SBT_GLOBAL_DIR=${WRKDIR}/sbt_global test .if ${OPSYS} == FreeBSD . if ${ARCH} == amd64 PLATFORM_DIR_SUFFIX= FreeBSD-x86_64 . elif ${ARCH} == i386 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 PLATFORM_DIR_SUFFIX= FreeBSD-ppc64le . else PLATFORM_DIR_SUFFIX= Default . endif .else PLATFORM_DIR_SUFFIX= Default .endif do-install: ${INSTALL_DATA} ${WRKSRC}/target/snappy-java-*.jar \ ${STAGEDIR}${JAVAJARDIR}/snappy-java.jar ${INSTALL_LIB} ${WRKSRC}/target/snappy-${PORTVERSION:R}-${PLATFORM_DIR_SUFFIX}/libsnappyjava.so \ ${STAGEDIR}${LOCALBASE}/lib .include 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,61 +1,68 @@ --- 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 -ENDIANESS:=$(shell lscpu | grep "Byte Order" |cut -d ":" -f2) +_btord:=$(shell sysctl -n hw.byteorder) +ifeq ($(_btord),1234) +ENDIANESS:="Little Endian" +else +ENDIANESS:="Big Endian" endif +endif # Windows uses different path separators ifeq ($(OS_NAME),Windows) @@ -51,7 +56,7 @@ endif # os=Default is meant to be generic unix/linux # 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 := + +FreeBSD-aarch64_CXX := $(CROSS_PREFIX)g++ +FreeBSD-aarch64_STRIP := $(CROSS_PREFIX)strip +FreeBSD-aarch64_CXXFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden +FreeBSD-aarch64_LINKFLAGS := -shared -static-libgcc +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 +FreeBSD-ppc64_LINKFLAGS := -shared -static-libgcc +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 +FreeBSD-x86_LINKFLAGS := -shared -static-libgcc +FreeBSD-x86_LIBNAME := libsnappyjava.so +FreeBSD-x86_SNAPPY_FLAGS := Mac-aarch64_CXX := c++ -arch arm64 Mac-aarch64_STRIP := strip -x