Skip to content

Commit 8a77a53

Browse files
authored
1 parent 18f8e2d commit 8a77a53

File tree

6 files changed

+171
-0
lines changed

6 files changed

+171
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module(
2+
name = "openjph",
3+
version = "0.24.5",
4+
bazel_compatibility = [">=7.2.1"],
5+
compatibility_level = 1,
6+
)
7+
8+
bazel_dep(name = "rules_cc", version = "0.2.14")
9+
bazel_dep(name = "rules_license", version = "1.0.0")
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
2+
load("@rules_license//rules:license.bzl", "license")
3+
4+
package(
5+
default_applicable_licenses = [":license"],
6+
)
7+
8+
exports_files([
9+
"LICENSE",
10+
])
11+
12+
license(
13+
name = "license",
14+
license_kinds = ["@rules_license//licenses/spdx:BSD-2-Clause"],
15+
license_text = "LICENSE",
16+
)
17+
18+
cc_binary(
19+
name = "ojph_compress",
20+
srcs = ["src/apps/ojph_compress/ojph_compress.cpp"],
21+
visibility = ["//visibility:public"],
22+
deps = [":ojph_expand"],
23+
)
24+
25+
cc_library(
26+
name = "ojph_expand",
27+
srcs = [
28+
"src/apps/ojph_expand/ojph_expand.cpp",
29+
"src/apps/others/ojph_img_io.cpp",
30+
],
31+
hdrs = [
32+
"src/apps/common/ojph_img_io.h",
33+
],
34+
includes = [
35+
"src/apps/common",
36+
],
37+
visibility = ["//visibility:public"],
38+
deps = [":openjph"],
39+
)
40+
41+
cc_library(
42+
name = "openjph_headers",
43+
hdrs = [
44+
"src/core/common/ojph_arch.h",
45+
"src/core/common/ojph_arg.h",
46+
"src/core/common/ojph_base.h",
47+
"src/core/common/ojph_codestream.h",
48+
"src/core/common/ojph_defs.h",
49+
"src/core/common/ojph_file.h",
50+
"src/core/common/ojph_mem.h",
51+
"src/core/common/ojph_message.h",
52+
"src/core/common/ojph_params.h",
53+
"src/core/common/ojph_version.h",
54+
],
55+
include_prefix = "openjph",
56+
strip_include_prefix = "src/core/common",
57+
visibility = ["//visibility:public"],
58+
)
59+
60+
cc_library(
61+
name = "openjph",
62+
srcs = [
63+
"src/core/codestream/ojph_codeblock.cpp",
64+
"src/core/codestream/ojph_codeblock_fun.cpp",
65+
"src/core/codestream/ojph_codestream.cpp",
66+
"src/core/codestream/ojph_codestream_gen.cpp",
67+
"src/core/codestream/ojph_codestream_local.cpp",
68+
"src/core/codestream/ojph_params.cpp",
69+
"src/core/codestream/ojph_precinct.cpp",
70+
"src/core/codestream/ojph_resolution.cpp",
71+
"src/core/codestream/ojph_subband.cpp",
72+
"src/core/codestream/ojph_tile.cpp",
73+
"src/core/codestream/ojph_tile_comp.cpp",
74+
"src/core/coding/ojph_block_common.cpp",
75+
"src/core/coding/ojph_block_decoder32.cpp",
76+
"src/core/coding/ojph_block_decoder64.cpp",
77+
"src/core/coding/ojph_block_encoder.cpp",
78+
"src/core/others/ojph_arch.cpp",
79+
"src/core/others/ojph_file.cpp",
80+
"src/core/others/ojph_mem.cpp",
81+
"src/core/others/ojph_message.cpp",
82+
"src/core/transform/ojph_colour.cpp",
83+
"src/core/transform/ojph_transform.cpp",
84+
],
85+
hdrs = [
86+
"src/core/codestream/ojph_bitbuffer_read.h",
87+
"src/core/codestream/ojph_bitbuffer_write.h",
88+
"src/core/codestream/ojph_codeblock.h",
89+
"src/core/codestream/ojph_codeblock_fun.h",
90+
"src/core/codestream/ojph_codestream_local.h",
91+
"src/core/codestream/ojph_params_local.h",
92+
"src/core/codestream/ojph_precinct.h",
93+
"src/core/codestream/ojph_resolution.h",
94+
"src/core/codestream/ojph_subband.h",
95+
"src/core/codestream/ojph_tile.h",
96+
"src/core/codestream/ojph_tile_comp.h",
97+
"src/core/coding/ojph_block_common.h",
98+
"src/core/coding/ojph_block_decoder.h",
99+
"src/core/coding/ojph_block_encoder.h",
100+
"src/core/coding/table0.h",
101+
"src/core/coding/table1.h",
102+
"src/core/transform/ojph_colour.h",
103+
"src/core/transform/ojph_colour_local.h",
104+
"src/core/transform/ojph_transform.h",
105+
"src/core/transform/ojph_transform_local.h",
106+
],
107+
defines = [
108+
"OJPH_DISABLE_SIMD",
109+
#"OJPH_DISABLE_SSE2",
110+
#"OJPH_DISABLE_SSSE3",
111+
#"OJPH_DISABLE_SSE4",
112+
#"OJPH_DISABLE_AVX",
113+
#"OJPH_DISABLE_AVX2",
114+
#"OJPH_DISABLE_AVX512",
115+
#"OJPH_DISABLE_NEON",
116+
],
117+
includes = [
118+
"src/core/codestream",
119+
"src/core/coding",
120+
"src/core/common",
121+
"src/core/others",
122+
"src/core/transform",
123+
],
124+
visibility = ["//visibility:public"],
125+
deps = [":openjph_headers"],
126+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module(
2+
name = "openjph",
3+
version = "0.24.5",
4+
bazel_compatibility = [">=7.2.1"],
5+
compatibility_level = 1,
6+
)
7+
8+
bazel_dep(name = "rules_cc", version = "0.2.14")
9+
bazel_dep(name = "rules_license", version = "1.0.0")
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
matrix:
2+
platform:
3+
- debian11
4+
- macos
5+
- macos_arm64
6+
- ubuntu2204
7+
- ubuntu2404
8+
- windows
9+
bazel: [7.x, 8.x, rolling]
10+
tasks:
11+
verify_targets:
12+
name: Verify build targets
13+
platform: ${{ platform }}
14+
bazel: ${{ bazel }}
15+
build_targets:
16+
- '@openjph'

modules/openjph/0.24.5/source.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"url": "https://github.com/aous72/OpenJPH/archive/refs/tags/0.24.5.tar.gz",
3+
"integrity": "sha256-RuM7XGF5i8D7Wu8ZvN0qqNIHzswNOJKT7jzwUkFlxkg=",
4+
"strip_prefix": "OpenJPH-0.24.5",
5+
"patch_strip": 0,
6+
"overlay": {
7+
"BUILD.bazel": "sha256-GCez0WmuSNf2oBC6VjMIV5clBTNJQ+WOUOwXiDirR20=",
8+
"MODULE.bazel": "sha256-D3FogHqo56c/hnEKcJJ3zcyXn9XpoNK8M8CVo/2mGes="
9+
}
10+
}

modules/openjph/metadata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"0.22.0",
2323
"0.24.1",
2424
"0.24.2",
25+
"0.24.5",
2526
"0.25.0",
2627
"0.25.2",
2728
"0.25.3"

0 commit comments

Comments
 (0)