diff --git a/README.md b/README.md index 0fa2a24..2e9f5c9 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,13 @@ These instructions will get you a copy of the project up and running on your loc - OSX (macOS) + Following packages on homebrew * automake * autoconf * libtool - * osxfuse (brew cask install osxfuse) + * macfuse (brew install --cask macfuse) * ossp-uuid * libxml2 * icu4c @@ -217,9 +218,19 @@ Currently, automatic build checking is working on GitHub Actions and Travis CI. For Ubuntu20.04 and Debian10, dummy `icu-config` is needed in the build machine. See Issue [#153](https://github.com/LinearTapeFileSystem/ltfs/issues/153). -### Build and install on OSX (macOS) +### Build and install on macOS + +#### New Homebrew system setup + +Before build on macOS, you need to configure the environment like below. +``` +ICU_FRAMEWORK="$(brew --prefix icu4c)" +export PATH=${PATH}:${ICU_FRAMEWORK}/bin +export DYLD_LIBRARY_PATH=${ICU_FRAMEWORK}/lib +export PKG_CONFIG_PATH="${ICU_FRAMEWORK}/lib/pkgconfig:$PKG_CONFIG_PATH" +``` -#### Recent Homedrew system setup +#### Old Homebrew system setup Before build on macOS, you need to configure the environment like below. @@ -230,16 +241,9 @@ export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libxml export PATH="$PATH:$ICU_PATH:$LIBXML2_PATH" ``` -#### Old Homedrew system setup -Before build on OSX (macOS), some include path adjustment is required. - -``` -brew link --force icu4c -brew link --force libxml2 -``` #### Building LTFS -On OSX (macOS), snmp cannot be supported, you need to disable it on configure script. And may be, you need to specify LDFLAGS while running configure script to link some required frameworks, CoreFundation and IOKit. +On macOS, snmp cannot be supported, you need to disable it on configure script. And may be, you need to specify LDFLAGS while running configure script to link some required frameworks, CoreFundation and IOKit. ``` ./autogen.sh @@ -252,9 +256,12 @@ make install #### Buildable systems - | OS | Xcode | Package system | Status | - |:-: |:-: |:-: |:-: | - | macOS 10.14.6 | 11.3 | Homebrew | Probably OK | +| OS | Xcode | Package system | Status | +|:-: |:-: |:-: |:-: | +| macOS 14 | 15.x | Homebrew | OK - Not checked automatically | +| macOS 15 | 16.x | Homebrew | OK - Not checked automatically | +| macOS 26 | 26.x | Homebrew | OK - Not checked automatically | + ### Build and install on FreeBSD diff --git a/messages/make_message_src.sh b/messages/make_message_src.sh index 82488e8..8e3781d 100755 --- a/messages/make_message_src.sh +++ b/messages/make_message_src.sh @@ -4,14 +4,24 @@ set -e KERNEL_NAME=`uname -s` if [ "$KERNEL_NAME" = "Darwin" ]; then - ICU_FRAMEWORK=/Library/Frameworks/ICU.framework + # Compilation with brew help + ICU_FRAMEWORK="$(brew --prefix icu4c)" + if [ -n "$ICU_FRAMEWORK" ]; then + GENRB=${ICU_FRAMEWORK}/bin/genrb + PKGDATA=${ICU_FRAMEWORK}/bin/pkgdata + ICUBREW_INSTALLED=true + else + ICUBREW_INSTALLED=false + ICU_FRAMEWORK=/Library/Frameworks/ICU.framework + fi - if [ -d ${ICU_FRAMEWORK} ]; then + # Old compilation + if [ "$ICUBREW_INSTALLED" = false ] && [ -d ${ICU_FRAMEWORK} ]; then export PATH=${PATH}:${ICU_FRAMEWORK}/Versions/Current/usr/bin export DYLD_LIBRARY_PATH=${ICU_FRAMEWORK}/Versions/Current/usr/lib GENRB=${ICU_FRAMEWORK}/Versions/Current/usr/bin/genrb PKGDATA=${ICU_FRAMEWORK}/Versions/Current/usr/bin/pkgdata - else + elif [ "$ICUBREW_INSTALLED" = false ]; then GENRB=genrb PKGDATA=pkgdata fi diff --git a/src/libltfs/ltfs.h b/src/libltfs/ltfs.h index cdbd9fe..cb05bf2 100644 --- a/src/libltfs/ltfs.h +++ b/src/libltfs/ltfs.h @@ -94,7 +94,7 @@ extern "C" { #include #include - +#include "ltfs_fuse_version.h" #include "libltfs/arch/signal_internal.h" #include "libltfs/arch/arch_info.h" #include "libltfs/ltfs_error.h" @@ -161,7 +161,7 @@ struct device_data; #define LTFS_NO_BARCODE "NO_BARCODE" -#ifndef __APPLE_MAKEFILE__ +#ifndef __APPLE_CONFIG__ #include "config.h" #endif