aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2019-07-17 14:39:56 +0200
committerGitHub <noreply@github.com>2019-07-17 14:39:56 +0200
commitc8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a (patch)
treeb2c7bd9df0c5d492729a6d3ff38e7db9d5e7c559
parent40f0fdcdc1b6930382351571068d71c38484546d (diff)
downloadbrotli-c8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a.zip
brotli-c8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a.tar.gz
brotli-c8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a.tar.bz2
Update (#762)
* put LICENSE file into .jar * fix typo * add clarification comment in PY wrapper
-rw-r--r--c/tools/brotli.c6
-rw-r--r--java/BUILD12
-rw-r--r--java/org/brotli/dec/BUILD1
-rw-r--r--java/org/brotli/dec/pom.xml25
-rw-r--r--java/org/brotli/wrapper/common/BUILD1
-rw-r--r--java/org/brotli/wrapper/dec/BUILD1
-rw-r--r--java/org/brotli/wrapper/enc/BUILD1
-rw-r--r--python/_brotli.cc15
8 files changed, 52 insertions, 10 deletions
diff --git a/c/tools/brotli.c b/c/tools/brotli.c
index d2c0485..04606a8 100644
--- a/c/tools/brotli.c
+++ b/c/tools/brotli.c
@@ -263,7 +263,7 @@ static Command ParseParams(Context* params) {
return COMMAND_HELP;
} else if (c == 'j' || c == 'k') {
if (keep_set) {
- fprintf(stderr, "argument --rm / -j or --keep / -n already set\n");
+ fprintf(stderr, "argument --rm / -j or --keep / -k already set\n");
return COMMAND_INVALID;
}
keep_set = BROTLI_TRUE;
@@ -388,7 +388,7 @@ static Command ParseParams(Context* params) {
return COMMAND_HELP;
} else if (strcmp("keep", arg) == 0) {
if (keep_set) {
- fprintf(stderr, "argument --rm / -j or --keep / -n already set\n");
+ fprintf(stderr, "argument --rm / -j or --keep / -k already set\n");
return COMMAND_INVALID;
}
keep_set = BROTLI_TRUE;
@@ -401,7 +401,7 @@ static Command ParseParams(Context* params) {
params->copy_stat = BROTLI_FALSE;
} else if (strcmp("rm", arg) == 0) {
if (keep_set) {
- fprintf(stderr, "argument --rm / -j or --keep / -n already set\n");
+ fprintf(stderr, "argument --rm / -j or --keep / -k already set\n");
return COMMAND_INVALID;
}
keep_set = BROTLI_TRUE;
diff --git a/java/BUILD b/java/BUILD
index f7dd0c0..cd55c54 100644
--- a/java/BUILD
+++ b/java/BUILD
@@ -36,6 +36,18 @@ cc_library(
# <<< JNI headers
+genrule(
+ name = "license_resource",
+ srcs = ["@org_brotli//:LICENSE"],
+ outs = ["META-INF/LICENSE"],
+ cmd = "cp -f $< $@",
+)
+
+java_library(
+ name = "license",
+ resources = [":license_resource"],
+)
+
########################################################
# WARNING: do not (transitively) depend on this target!
########################################################
diff --git a/java/org/brotli/dec/BUILD b/java/org/brotli/dec/BUILD
index f17e512..0cc0cbf 100644
--- a/java/org/brotli/dec/BUILD
+++ b/java/org/brotli/dec/BUILD
@@ -17,6 +17,7 @@ java_library(
exclude = ["*Test*.java"],
),
proguard_specs = ["proguard.pgcfg"],
+ resource_jars = ["//:license"],
)
load(":build_defs.bzl", "brotli_java_test")
diff --git a/java/org/brotli/dec/pom.xml b/java/org/brotli/dec/pom.xml
index bf609dc..946fddf 100644
--- a/java/org/brotli/dec/pom.xml
+++ b/java/org/brotli/dec/pom.xml
@@ -133,6 +133,31 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.1.0</version>
+ <executions>
+ <execution>
+ <id>copy-license</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../../../../</directory>
+ <includes>
+ <include>LICENSE</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/java/org/brotli/wrapper/common/BUILD b/java/org/brotli/wrapper/common/BUILD
index 4f7ed84..7c3480a 100644
--- a/java/org/brotli/wrapper/common/BUILD
+++ b/java/org/brotli/wrapper/common/BUILD
@@ -18,6 +18,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
+ resource_jars = ["//:license"],
)
java_library(
diff --git a/java/org/brotli/wrapper/dec/BUILD b/java/org/brotli/wrapper/dec/BUILD
index 754541a..d1c8f5b 100644
--- a/java/org/brotli/wrapper/dec/BUILD
+++ b/java/org/brotli/wrapper/dec/BUILD
@@ -13,6 +13,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
+ resource_jars = ["//:license"],
)
java_library(
diff --git a/java/org/brotli/wrapper/enc/BUILD b/java/org/brotli/wrapper/enc/BUILD
index b3d10b9..9aea6ba 100644
--- a/java/org/brotli/wrapper/enc/BUILD
+++ b/java/org/brotli/wrapper/enc/BUILD
@@ -18,6 +18,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
+ resource_jars = ["//:license"],
)
java_library(
diff --git a/python/_brotli.cc b/python/_brotli.cc
index 5e1828e..d4075bd 100644
--- a/python/_brotli.cc
+++ b/python/_brotli.cc
@@ -703,13 +703,14 @@ PyDoc_STRVAR(brotli_doc, "Implementation module for the Brotli library.");
static struct PyModuleDef brotli_module = {
PyModuleDef_HEAD_INIT,
- "_brotli",
- brotli_doc,
- 0,
- brotli_methods,
- NULL,
- NULL,
- NULL
+ "_brotli", /* m_name */
+ brotli_doc, /* m_doc */
+ 0, /* m_size */
+ brotli_methods, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
};
#else
#define INIT_BROTLI init_brotli