summaryrefslogtreecommitdiffstats
path: root/solenv/buck
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /solenv/buck
parentInitial commit. (diff)
downloadlibreoffice-upstream.tar.xz
libreoffice-upstream.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'solenv/buck')
-rw-r--r--solenv/buck/build.defs49
1 files changed, 49 insertions, 0 deletions
diff --git a/solenv/buck/build.defs b/solenv/buck/build.defs
new file mode 100644
index 000000000..b7b81ec8c
--- /dev/null
+++ b/solenv/buck/build.defs
@@ -0,0 +1,49 @@
+def java_sources(
+ name,
+ srcs,
+ visibility = []
+ ):
+ java_library(
+ name = name,
+ resources = srcs,
+ visibility = visibility,
+ )
+
+def java_doc(
+ name,
+ title,
+ pkgs,
+ paths,
+ srcs = [],
+ deps = [],
+ visibility = [],
+ do_it_wrong = False,
+ ):
+ if do_it_wrong:
+ sourcepath = paths
+ else:
+ sourcepath = ['$SRCDIR/' + n for n in paths]
+ genrule(
+ name = name,
+ cmd = ' '.join([
+ 'while ! test -f .buckconfig; do cd ..; done;',
+ 'javadoc',
+ '-quiet',
+ '-protected',
+ '-encoding UTF-8',
+ '-charset UTF-8',
+ '-notimestamp',
+ '-windowtitle "' + title + '"',
+ '-link http://docs.oracle.com/javase/7/docs/api',
+ '-subpackages ',
+ ':'.join(pkgs),
+ '-sourcepath ',
+ ':'.join(sourcepath),
+ ' -classpath ',
+ ':'.join(['$(location %s)' % n for n in deps]),
+ '-d $TMP',
+ ]) + ';jar cf $OUT -C $TMP .',
+ srcs = srcs,
+ out = name + '.jar',
+ visibility = visibility,
+)