summaryrefslogtreecommitdiff
path: root/dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch')
-rw-r--r--dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch b/dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch
new file mode 100644
index 000000000000..0c64240f12a3
--- /dev/null
+++ b/dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch
@@ -0,0 +1,38 @@
+From 1413a33ef00e722bacab2e17297b89bb55b2bd49 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Tue, 21 Dec 2021 07:33:52 -0800
+Subject: [PATCH] Makefile: Eliminate usage of the `perl` command
+
+dev-lang/perl is not an implicit system dependency, so we cannot assume
+its existence during build time. The Makefile uses the `perl` command
+to generate the name of the JAR being built with it, but the ebuild uses
+Ant and a custom build.xml to build the JAR, and it uses the Makefile to
+build only the JNI part, thus the name of JAR in the Makefile will not
+be used. For this reason, this package can still be built and installed
+without dev-lang/perl. However, a QA notice for absent `perl` command
+will appear in this case. Rather than declaring dev-lang/perl as a
+dependency, it might be better to eliminate usage of the `perl` command
+if it is never used in any meaningful way.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index a7bd87c..d1d3d32 100644
+--- a/Makefile
++++ b/Makefile
+@@ -138,7 +138,8 @@ NATIVE_DIR:=src/main/resources/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH)
+ NATIVE_TARGET_DIR:=$(TARGET)/classes/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH)
+ NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME)
+
+-snappy-jar-version:=snappy-java-$(shell perl -npe "s/version in ThisBuild\s+:=\s+\"(.*)\"/\1/" version.sbt | sed -e "/^$$/d")
++#snappy-jar-version:=snappy-java-$(shell perl -npe "s/version in ThisBuild\s+:=\s+\"(.*)\"/\1/" version.sbt | sed -e "/^$$/d")
++snappy-jar-version:=snappy
+
+ native: jni-header snappy-header $(NATIVE_DLL)
+ native-nocmake: jni-header $(NATIVE_DLL)
+--
+2.32.0
+