summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vidstab-1-fixes.patch28
-rw-r--r--src/vidstab.mk4
2 files changed, 30 insertions, 2 deletions
diff --git a/src/vidstab-1-fixes.patch b/src/vidstab-1-fixes.patch
new file mode 100644
index 0000000..935c339
--- /dev/null
+++ b/src/vidstab-1-fixes.patch
@@ -0,0 +1,28 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Sat, 17 Mar 2018 12:34:39 +1100
+Subject: [PATCH 1/1] CMake pc file - libgomp requires pthreads for static
+ linking
+
+See:
+https://github.com/georgmartius/vid.stab/pull/56
+
+Libgomp uses pthreads internally and it's usually sufficient to to specify `-fopenmp` in CFLAGS to pick up the required libs. Some configure scripts (e.g. ffmpeg) don't pass these through from pkg-config and only use `--libs`, so setting it here is necessary for static builds.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1111111..2222222 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -74,7 +74,7 @@ set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} ${ORC_LIBRARIES}")
+ endif()
+ if(USE_OMP)
+ target_link_libraries(vidstab gomp)
+-set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} -lgomp")
++set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} -lgomp -lpthread")
+ endif()
+
+
diff --git a/src/vidstab.mk b/src/vidstab.mk
index 515a1ce..22f35aa 100644
--- a/src/vidstab.mk
+++ b/src/vidstab.mk
@@ -7,7 +7,7 @@ $(PKG)_IGNORE :=
$(PKG)_VERSION := 1.1.0
$(PKG)_CHECKSUM := 14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb
$(PKG)_GH_CONF := georgmartius/vid.stab/tags,v
-$(PKG)_DEPS := cc pthreads
+$(PKG)_DEPS := cc
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)'
@@ -17,5 +17,5 @@ define $(PKG)_BUILD
'$(TARGET)-gcc' \
-W -Wall -Werror -pedantic \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-vidstab.exe' \
- `'$(TARGET)-pkg-config' --static --cflags --libs vidstab pthreads`
+ `'$(TARGET)-pkg-config' --static --cflags --libs vidstab`
endef