Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce macosx-arm64 to presets for libpostal #1205

Merged
merged 2 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/libpostal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
container: centos:7
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions
macosx-arm64:
runs-on: macos-11
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-macosx@actions
macosx-x86_64:
runs-on: macos-11
steps:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

* Build Leptonica with OpenJPEG for JPEG 2000 support
* Introduce `linux-arm64` to presets for libpostal ([pull #1199](https://github.com/bytedeco/javacpp-presets/pull/1199))
* Introduce `linux-arm64` and `macosx-arm64` builds to presets for libpostal ([pull #1199](https://github.com/bytedeco/javacpp-presets/pull/1199) and [pull #1205](https://github.com/bytedeco/javacpp-presets/pull/1205))
* Map missing factory functions in `torch::` namespace using `torch_` as prefix in presets for PyTorch ([issue #1197](https://github.com/bytedeco/javacpp-presets/issues/1197))
* Add presets for the nvJPEG module of CUDA ([issue #1193](https://github.com/bytedeco/javacpp-presets/issues/1193))
* Introduce Android builds for TensorFlow Lite ([discussion #1180](https://github.com/bytedeco/javacpp-presets/discussions/1180))
Expand Down
10 changes: 9 additions & 1 deletion libpostal/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ case $PLATFORM in
make -j $MAKEJ V=0
make install
;;
macosx-*)
macosx-arm64)
./bootstrap.sh
./configure --prefix=$INSTALL_PATH --disable-data-download --disable-sse2 --host=aarch64-apple-darwin
#./configure --prefix=$INSTALL_PATH --datadir=[...some dir with a few GB of space...]
make -j $MAKEJ V=0
make install
;;

macosx-x86_64)
./bootstrap.sh
sed -i="" 's/-install_name \\$rpath/-install_name @rpath/g' configure
./configure --prefix=$INSTALL_PATH --disable-data-download
Expand Down
9 changes: 8 additions & 1 deletion libpostal/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<version>${project.version}</version>
<classifier>${javacpp.platform.linux-x86_64}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.macosx-arm64}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
Expand All @@ -66,7 +72,7 @@
<configuration>
<archive>
<manifestEntries>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-arm64.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-x86_64.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-arm64.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-arm64.jar ${javacpp.moduleId}-macosx-x86_64.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Expand Down Expand Up @@ -113,6 +119,7 @@
module org.bytedeco.${javacpp.moduleId}.platform {
requires static org.bytedeco.${javacpp.moduleId}.linux.arm64;
requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64;
requires static org.bytedeco.${javacpp.moduleId}.macosx.arm64;
requires static org.bytedeco.${javacpp.moduleId}.macosx.x86_64;
requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
inherit = javacpp.class,
value = {
@Platform(
value = {"linux-arm64", "linux-x86_64", "macosx-x86_64", "windows-x86_64"},
value = {"linux-arm64", "linux-x86_64", "macosx-arm64", "macosx-x86_64", "windows-x86_64"},
cinclude = "libpostal/libpostal.h",
link = "postal@.1",
preload = "libpostal-1"
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@
<module>openblas</module>
<module>llvm</module>
<module>libffi</module>
<module>libpostal</module>
<module>leptonica</module>
<module>tesseract</module>
</modules>
Expand Down