mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 04:50:21 +00:00
mmtisobmff: init at 1.0.4
This commit is contained in:
109
pkgs/by-name/mm/mmtisobmff/demo.patch
Normal file
109
pkgs/by-name/mm/mmtisobmff/demo.patch
Normal file
@@ -0,0 +1,109 @@
|
||||
From 226e5da303449d034957621573eecaa1c9fca267 Mon Sep 17 00:00:00 2001
|
||||
From: jopejoe1 <jopejoe1@missing.ninja>
|
||||
Date: Fri, 31 Jul 2026 10:57:47 +0200
|
||||
Subject: [PATCH] install demo bins
|
||||
|
||||
---
|
||||
demo/CMakeLists.txt | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt
|
||||
index 38ab146..8e6632f 100644
|
||||
--- a/demo/CMakeLists.txt
|
||||
+++ b/demo/CMakeLists.txt
|
||||
@@ -16,6 +16,7 @@ add_executable(printMP4 print_mp4_boxes.cpp)
|
||||
target_link_libraries(printMP4 mmtisobmff)
|
||||
target_compile_features(printMP4 PUBLIC cxx_std_11)
|
||||
set_target_properties(printMP4 PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS printMP4 RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(printMP4 PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -27,6 +28,7 @@ add_executable(simpleFileReader simple_file_reader.cpp)
|
||||
target_link_libraries(simpleFileReader mmtisobmff)
|
||||
target_compile_features(simpleFileReader PUBLIC cxx_std_11)
|
||||
set_target_properties(simpleFileReader PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS simpleFileReader RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(simpleFileReader PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -38,6 +40,7 @@ add_executable(advancedFileReader advanced_file_reader.cpp)
|
||||
target_link_libraries(advancedFileReader mmtisobmff)
|
||||
target_compile_features(advancedFileReader PUBLIC cxx_std_11)
|
||||
set_target_properties(advancedFileReader PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS advancedFileReader RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(advancedFileReader PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -49,6 +52,7 @@ add_executable(simpleFileReader_c simple_file_reader_c.c)
|
||||
target_link_libraries(simpleFileReader_c mmtisobmff_c)
|
||||
target_compile_features(simpleFileReader_c PUBLIC cxx_std_11)
|
||||
set_target_properties(simpleFileReader_c PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS simpleFileReader_c RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(simpleFileReader_c PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -60,6 +64,7 @@ add_executable(simpleMemoryReader_c simple_memory_reader_c.c)
|
||||
target_link_libraries(simpleMemoryReader_c mmtisobmff_c)
|
||||
target_compile_features(simpleMemoryReader_c PUBLIC cxx_std_11)
|
||||
set_target_properties(simpleMemoryReader_c PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS simpleMemoryReader_c RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(simpleMemoryReader_c PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -71,6 +76,7 @@ add_executable(seekingAndTimestampsApiDemo seeking_and_timestamps_api_demo.cpp)
|
||||
target_link_libraries(seekingAndTimestampsApiDemo mmtisobmff)
|
||||
target_compile_features(seekingAndTimestampsApiDemo PUBLIC cxx_std_11)
|
||||
set_target_properties(seekingAndTimestampsApiDemo PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS seekingAndTimestampsApiDemo RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(seekingAndTimestampsApiDemo PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -82,6 +88,7 @@ add_executable(mp4Defragment mp4_defragment.cpp)
|
||||
target_link_libraries(mp4Defragment mmtisobmff)
|
||||
target_compile_features(mp4Defragment PUBLIC cxx_std_11)
|
||||
set_target_properties(mp4Defragment PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS mp4Defragment RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(mp4Defragment PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -93,6 +100,7 @@ add_executable( mp4SamplesDiff mp4_samples_diff.cpp )
|
||||
target_link_libraries( mp4SamplesDiff mmtisobmff )
|
||||
target_compile_features(mp4SamplesDiff PUBLIC cxx_std_11)
|
||||
set_target_properties(mp4SamplesDiff PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS mp4SamplesDiff RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(mp4SamplesDiff PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -104,6 +112,7 @@ add_executable(mp4Combine mp4_combine.cpp)
|
||||
target_link_libraries(mp4Combine mmtisobmff)
|
||||
target_compile_features(mp4Combine PUBLIC cxx_std_11)
|
||||
set_target_properties(mp4Combine PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS mp4Combine RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(mp4Combine PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -115,6 +124,7 @@ add_executable(mp4Fragment mp4_fragment.cpp)
|
||||
target_link_libraries(mp4Fragment mmtisobmff)
|
||||
target_compile_features(mp4Fragment PUBLIC cxx_std_11)
|
||||
set_target_properties(mp4Fragment PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS mp4Fragment RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(mp4Fragment PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -126,6 +136,7 @@ add_executable(mp4Segment mp4_segment.cpp)
|
||||
target_link_libraries(mp4Segment mmtisobmff)
|
||||
target_compile_features(mp4Segment PUBLIC cxx_std_11)
|
||||
set_target_properties(mp4Segment PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS mp4Segment RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(mp4Segment PUBLIC ${emscriptenLinkOptions})
|
||||
@@ -137,6 +148,7 @@ add_executable(simpleFileWriter simple_file_writer.cpp)
|
||||
target_link_libraries(simpleFileWriter mmtisobmff)
|
||||
target_compile_features(simpleFileWriter PUBLIC cxx_std_11)
|
||||
set_target_properties(simpleFileWriter PROPERTIES CXX_EXTENSIONS OFF)
|
||||
+install(TARGETS simpleFileWriter RUNTIME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
target_link_options(simpleFileWriter PUBLIC ${emscriptenLinkOptions})
|
||||
33
pkgs/by-name/mm/mmtisobmff/install-doc.patch
Normal file
33
pkgs/by-name/mm/mmtisobmff/install-doc.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 6b8302213d37c84a7d4d036c733f68116d738189 Mon Sep 17 00:00:00 2001
|
||||
From: jopejoe1 <jopejoe1@missing.ninja>
|
||||
Date: Fri, 31 Jul 2026 09:39:27 +0200
|
||||
Subject: [PATCH] Install documentation
|
||||
|
||||
This makes it so that documentation can be easly installed by distors
|
||||
---
|
||||
doc/CMakeLists.txt | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
|
||||
index e6c43a5277..880e6bc728 100644
|
||||
--- a/doc/CMakeLists.txt
|
||||
+++ b/doc/CMakeLists.txt
|
||||
@@ -38,6 +38,18 @@
|
||||
VERBATIM
|
||||
DEPENDS ${PROJECT_NAME}_doc
|
||||
)
|
||||
+
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
+ install(
|
||||
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/
|
||||
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
+ )
|
||||
+
|
||||
+ install(
|
||||
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/doc/latex/refman.pdf
|
||||
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
+ )
|
||||
else()
|
||||
message("Doxygen need to be installed to generate the doxygen documentation")
|
||||
endif()
|
||||
100
pkgs/by-name/mm/mmtisobmff/package.nix
Normal file
100
pkgs/by-name/mm/mmtisobmff/package.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
testers,
|
||||
gitUpdater,
|
||||
doxygen,
|
||||
pkg-config,
|
||||
texliveBasic,
|
||||
writableTmpDirAsHomeHook,
|
||||
ilo,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mmtisobmff";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Fraunhofer-IIS";
|
||||
repo = "mmtisobmff";
|
||||
tag = "r${finalAttrs.version}";
|
||||
hash = "sha256-2W5H4GfJu2tOOWp8x1z1DJe5yJ3htc0o8nIeEdwiMd4=";
|
||||
};
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
patches = [
|
||||
# https://github.com/Fraunhofer-IIS/mmtisobmff/pull/4
|
||||
./pkg-config.patch
|
||||
# https://github.com/Fraunhofer-IIS/mmtisobmff/pull/5
|
||||
./install-doc.patch
|
||||
# https://github.com/Fraunhofer-IIS/mmtisobmff/pull/6
|
||||
./demo.patch
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ilo
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
doxygen
|
||||
writableTmpDirAsHomeHook
|
||||
(texliveBasic.withPackages (ps: [
|
||||
ps.float
|
||||
ps.varwidth
|
||||
ps.xcolor
|
||||
ps.xltabular
|
||||
ps.ltablex
|
||||
ps.tabularray
|
||||
ps.ninecolors
|
||||
ps.fancyvrb
|
||||
ps.multirow
|
||||
ps.hanging
|
||||
ps.adjustbox
|
||||
ps.stackengine
|
||||
ps.enumitem
|
||||
ps.alphalph
|
||||
ps.ulem
|
||||
ps.wasysym
|
||||
ps.changepage
|
||||
ps.tocloft
|
||||
ps.newunicodechar
|
||||
ps.caption
|
||||
ps.etoc
|
||||
ps.helvetic
|
||||
ps.wasy
|
||||
ps.courier
|
||||
]))
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "mmtisobmff_BUILD_BINARIES" true)
|
||||
(lib.cmakeBool "mmtisobmff_BUILD_DOC" true)
|
||||
(lib.cmakeBool "USE_PKGCONFIG_DEPS" true)
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"doc"
|
||||
"bin"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
updateScript = gitUpdater { rev-prefix = "r"; };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "ISOBMFF reader and writer library with MPEG-H 3D Audio support";
|
||||
homepage = "https://github.com/Fraunhofer-IIS/mmtisobmff";
|
||||
license = lib.licenses.fraunhofer-fdk;
|
||||
maintainers = [ lib.maintainers.jopejoe1 ];
|
||||
pkgConfigModules = [ "mmtisobmff" ];
|
||||
};
|
||||
})
|
||||
23
pkgs/by-name/mm/mmtisobmff/pkg-config.patch
Normal file
23
pkgs/by-name/mm/mmtisobmff/pkg-config.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
From c4faec1c717fb9d2edd2c967c180c3a3f6b4c268 Mon Sep 17 00:00:00 2001
|
||||
From: jopejoe1 <jopejoe1@missing.ninja>
|
||||
Date: Fri, 31 Jul 2026 10:34:31 +0200
|
||||
Subject: [PATCH] fix pkgconfig generation when install dirs are absolute paths
|
||||
|
||||
This makes the .pc files work correctly on destibutions like NixOS and GUIX
|
||||
---
|
||||
mmtisobmff.pc.in | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mmtisobmff.pc.in b/mmtisobmff.pc.in
|
||||
index 752c038..4c0f4ee 100644
|
||||
--- a/mmtisobmff.pc.in
|
||||
+++ b/mmtisobmff.pc.in
|
||||
@@ -1,6 +1,6 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: @PROJECT_DESCRIPTION@
|
||||
Reference in New Issue
Block a user