aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2019-08-12 13:22:22 -0700
committerGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-08-12 13:22:22 -0700
commitea2360b7f375072bbc4956045608a217ce37e83b (patch)
tree83a3795fcccaf152b42f3baab5e286f7bbe4d340
parent8c42dc553ebe078a7ba0aa85fff520f9226dc8cf (diff)
downloadvcpkg-ea2360b7f375072bbc4956045608a217ce37e83b.tar.gz
vcpkg-ea2360b7f375072bbc4956045608a217ce37e83b.zip
[bento4] Add new port (#7595)
-rw-r--r--ports/bento4/CONTROL5
-rw-r--r--ports/bento4/LICENSE6
-rw-r--r--ports/bento4/fix-install-and-c4996-error.patch43
-rw-r--r--ports/bento4/portfile.cmake25
4 files changed, 79 insertions, 0 deletions
diff --git a/ports/bento4/CONTROL b/ports/bento4/CONTROL
new file mode 100644
index 000000000..eff84ed98
--- /dev/null
+++ b/ports/bento4/CONTROL
@@ -0,0 +1,5 @@
+Source: bento4
+Version: 1.5.1-628
+Homepage: https://github.com/axiomatic-systems/Bento4
+Description: Bento4 is a C++ class library and tools designed to read and write ISO-MP4 files. This format is defined in international specifications ISO/IEC 14496-12, 14496-14 and 14496-15.
+
diff --git a/ports/bento4/LICENSE b/ports/bento4/LICENSE
new file mode 100644
index 000000000..c1d00b26c
--- /dev/null
+++ b/ports/bento4/LICENSE
@@ -0,0 +1,6 @@
+Bento4 is developed by Axiomatic Systems LLC in San Francisco, California.
+
+This software is available under two different licenses
+For applications that are entirely distributable under the terms of the GPL(https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html), the Bento4 GPL license applies.
+For applications that cannot be entirely distributable under the terms of the GPL (either the application, or code modules linked with the application are not compatible with the terms of the GPL licence), a non-GPL commercial license is available from Axiomatic Systems LLC.
+Contact Gilles Boccon-Gibod (licensing@axiosys.com or bok@bok.net) for more information. \ No newline at end of file
diff --git a/ports/bento4/fix-install-and-c4996-error.patch b/ports/bento4/fix-install-and-c4996-error.patch
new file mode 100644
index 000000000..c99fdc411
--- /dev/null
+++ b/ports/bento4/fix-install-and-c4996-error.patch
@@ -0,0 +1,43 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2f08b2f..fccf2a8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -35,6 +35,8 @@ endif()
+
+ add_library(ap4 STATIC ${AP4_SOURCES})
+
++add_definitions(-D_CRT_SECURE_NO_WARNINGS)
++
+ # Includes
+ include_directories(
+ ${SOURCE_CORE}
+@@ -43,6 +45,14 @@ include_directories(
+ ${SOURCE_METADATA}
+ )
+
++# AP4 includes
++file(GLOB AP4_INCLUDES
++ ${SOURCE_CODECS}/*.h
++ ${SOURCE_CORE}/*.h
++ ${SOURCE_CRYPTO}/*.h
++ ${SOURCE_METADATA}/*.h
++)
++
+ # Apps
+ file(GLOB BENTO4_APPS RELATIVE ${SOURCE_ROOT}/Apps ${SOURCE_ROOT}/Apps/*)
+ foreach(app ${BENTO4_APPS})
+@@ -50,3 +60,13 @@ foreach(app ${BENTO4_APPS})
+ add_executable(${binary_name} ${SOURCE_ROOT}/Apps/${app}/${app}.cpp)
+ target_link_libraries(${binary_name} ap4)
+ endforeach()
++
++# Install targets
++install(TARGETS ap4
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
++)
++
++# Install headers
++install(FILES ${AP4_INCLUDES} DESTINATION include)
+\ No newline at end of file
diff --git a/ports/bento4/portfile.cmake b/ports/bento4/portfile.cmake
new file mode 100644
index 000000000..b485fbb19
--- /dev/null
+++ b/ports/bento4/portfile.cmake
@@ -0,0 +1,25 @@
+include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO axiomatic-systems/Bento4
+ REF v1.5.1-628
+ SHA512 2bf44f55307178cc9128e323904acbfaa2f88e06beff26cf27fc0a7707875942de89778a0ee1a8315ef2c3b19754edad77d32fdb74f3d651f03c2623e7a9122d
+ HEAD_REF master
+ PATCHES fix-install-and-c4996-error.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)