From 3960f408f9bd3b0d60c1574234bcfd5152ce4ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=9Aled=C5=BA?= Date: Tue, 13 Feb 2024 13:30:24 +0100 Subject: [PATCH 1/3] Fix compilation on macos --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fdab0e2..5ed1fcf 100644 --- a/Makefile +++ b/Makefile @@ -17,11 +17,15 @@ HEADERS = $(XAV_DIR)/reader.h $(XAV_DIR)/decoder.h $(XAV_DIR)/utils.h SOURCES = $(XAV_DIR)/xav_nif.c $(XAV_DIR)/reader.c $(XAV_DIR)/decoder.c $(XAV_DIR)/utils.c ifeq ($(USE_BUNDLED_FFMPEG), true) -CFLAGS = -fPIC -I$(ERTS_INCLUDE_DIR) -I${FFMPEG_INCLUDE_DIR} -I${XAV_DIR} -shared $(XAV_DEBUG_LOGS) -LDFLAGS = -L$(FFMPEG_LIB_DIR) -Wl,--whole-archive -lavcodec -lswscale -lavutil -lavformat -Wl,--no-whole-archive + CFLAGS = -fPIC -I$(ERTS_INCLUDE_DIR) -I${FFMPEG_INCLUDE_DIR} -I${XAV_DIR} -shared $(XAV_DEBUG_LOGS) + LDFLAGS = -L$(FFMPEG_LIB_DIR) -Wl,--whole-archive -lavcodec -lswscale -lavutil -lavformat -Wl,--no-whole-archive else -CFLAGS = -fPIC -I$(ERTS_INCLUDE_DIR) -I${XAV_DIR} -shared $(XAV_DEBUG_LOGS) -LDFLAGS = -lavcodec -lswscale -lavutil -lavformat -lavdevice -lswresample + CFLAGS = -fPIC -I$(ERTS_INCLUDE_DIR) -I${XAV_DIR} -shared $(XAV_DEBUG_LOGS) + LDFLAGS = -lavcodec -lswscale -lavutil -lavformat -lavdevice -lswresample +endif + +ifeq ($(shell uname -s),Darwin) + CFLAGS += -undefined dynamic_lookup endif $(XAV_SO): Makefile $(SOURCES) $(HEADERS) From d52effbd9710800719fb3cb35611611dffca129b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=9Aled=C5=BA?= Date: Tue, 13 Feb 2024 13:34:38 +0100 Subject: [PATCH 2/3] Add macos workflow --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 605e67e..161f7f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,3 +39,14 @@ jobs: - run: sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavdevice-dev - run: mix deps.get - run: mix test + + test-macos: + runs-on: macos-latest + name: test-macos-x86-64 OTP latest / Elixir latest + env: + MIX_ENV: test + steps: + - uses: actions/checkout@v2 + - run: brew install ffmpeg elixir + - run: mix deps.get + - run: mix test From cba54ad03ad37c83c75cee6a02a35baf87e80915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=9Aled=C5=BA?= Date: Tue, 13 Feb 2024 13:49:11 +0100 Subject: [PATCH 3/3] Bump version to 0.2.1 --- README.md | 2 +- mix.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ab4502..df5e422 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Make sure you have installed FFMpeg development packages on your system ```elixir def deps do [ - {:xav, "~> 0.2.0"} + {:xav, "~> 0.2.1"} ] end ``` diff --git a/mix.exs b/mix.exs index 5c06ebe..65a1cdd 100644 --- a/mix.exs +++ b/mix.exs @@ -8,7 +8,7 @@ defmodule Xav.MixProject do def project do [ app: :xav, - version: "0.2.0", + version: "0.2.1", elixir: "~> 1.14", start_permanent: Mix.env() == :prod, description: "Elixir media library built on top of FFmpeg",