summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2020-10-08 00:54:25 +0000
committerDaniel Bermond2020-10-08 00:54:25 +0000
commit294f47d65f2e8ebd187187275c0f51c0ef6c1eed (patch)
tree14d94c44a7731dea2cbcd3e34a460886cf83e93d
downloadaur-294f47d65f2e8ebd187187275c0f51c0ef6c1eed.tar.gz
Initial commit of uavs3e-git
-rw-r--r--.SRCINFO19
-rw-r--r--010-uavs3e-10bit.patch40
-rw-r--r--PKGBUILD54
3 files changed, 113 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5f129858de5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = uavs3e-git
+ pkgdesc = An AVS3 encoder supporting AVS3-P2 baseline profile (git version)
+ pkgver = r187.g0a4e7c4
+ pkgrel = 1
+ url = https://github.com/uavs3/uavs3e/
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = cmake
+ depends = glibc
+ provides = uavs3e
+ conflicts = uavs3e
+ source = git+https://github.com/uavs3/uavs3e.git
+ source = 010-uavs3e-10bit.patch
+ sha256sums = SKIP
+ sha256sums = 8004c81cc9ee9bab08d179e4e8ecb5d4abe53d7eefefd16f9c6b36662587debb
+
+pkgname = uavs3e-git
+
diff --git a/010-uavs3e-10bit.patch b/010-uavs3e-10bit.patch
new file mode 100644
index 00000000000..e3bfb2dae93
--- /dev/null
+++ b/010-uavs3e-10bit.patch
@@ -0,0 +1,40 @@
+--- a/inc/com_api.h
++++ b/inc/com_api.h
+@@ -43,7 +43,7 @@ extern "C"
+ {
+ #endif
+
+-#define BIT_DEPTH 8
++#define BIT_DEPTH 10
+
+ #if (BIT_DEPTH == 8)
+ typedef unsigned char pel; /* pixel type */
+@@ -111,4 +111,4 @@ struct uavs3e_com_img_t {
+ #endif
+
+
+-#endif // #ifndef _COM_API_H_
+\ No newline at end of file
++#endif // #ifndef _COM_API_H_
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -32,8 +32,8 @@ MESSAGE(STATUS "uavs3e version \t\t: ${uavs3e_version}")
+ # pkg-config
+ find_package(Threads REQUIRED)
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
+-set(includedir "include")
+-set(libdir "lib")
++set(includedir "include/uavs3e-10bit")
++set(libdir "lib/uavs3e-10bit")
+ set(pc_file "${CONFIG_DIR}/${LIBNAME}.pc")
+
+ set(CMAKE_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${includedir}")
+@@ -73,6 +73,6 @@ target_link_libraries(${LIBNAME} pthread)
+ endif()
+
+ install(TARGETS uavs3e LIBRARY DESTINATION ${CMAKE_INSTALL_LIB_DIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIB_DIR})
+-install(FILES ../inc/uavs3e.h DESTINATION ${CMAKE_INSTALL_INCLUDE_DIR}/uavs3e/)
+-install(FILES ../inc/com_api.h DESTINATION ${CMAKE_INSTALL_INCLUDE_DIR}/uavs3e/)
++install(FILES ../inc/uavs3e.h DESTINATION ${CMAKE_INSTALL_INCLUDE_DIR})
++install(FILES ../inc/com_api.h DESTINATION ${CMAKE_INSTALL_INCLUDE_DIR})
+ install(FILES ${CONFIG_DIR}/${LIBNAME}.pc DESTINATION ${CMAKE_INSTALL_PKGCONFIG_DIR})
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1681044dc61
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=uavs3e-git
+pkgver=r187.g0a4e7c4
+pkgrel=1
+pkgdesc='An AVS3 encoder supporting AVS3-P2 baseline profile (git version)'
+arch=('x86_64')
+url='https://github.com/uavs3/uavs3e/'
+license=('BSD')
+depends=('glibc')
+makedepends=('git' 'cmake')
+provides=('uavs3e')
+conflicts=('uavs3e')
+source=('git+https://github.com/uavs3/uavs3e.git'
+ '010-uavs3e-10bit.patch')
+sha256sums=('SKIP'
+ '8004c81cc9ee9bab08d179e4e8ecb5d4abe53d7eefefd16f9c6b36662587debb')
+
+prepare() {
+ cp -a uavs3e uavs3e-10bit
+ patch -d uavs3e-10bit -Np1 -i "${srcdir}/010-uavs3e-10bit.patch"
+}
+
+pkgver() {
+ printf 'r%s.g%s' "$(git -C uavs3e rev-list --count HEAD)" "$(git -C uavs3e rev-parse --short HEAD)"
+}
+
+build() {
+ cd uavs3e
+ cmake -B build/linux -S . \
+ -DCMAKE_BUILD_TYPE:STRING='None' \
+ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+ -DCMAKE_SKIP_RPATH:BOOL='YES' \
+ -DBUILD_SHARED_LIBS:BOOL='ON' \
+ -Wno-dev
+ make -C build/linux
+
+ cd "${srcdir}/uavs3e-10bit"
+ cmake -B build/linux -S . \
+ -DCMAKE_BUILD_TYPE:STRING='None' \
+ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+ -DCMAKE_SKIP_RPATH:BOOL='YES' \
+ -DBUILD_SHARED_LIBS:BOOL='ON' \
+ -Wno-dev
+ make -C build/linux
+}
+
+package() {
+ make -C uavs3e/build/linux DESTDIR="$pkgdir" install
+ make -C uavs3e-10bit/build/linux DESTDIR="$pkgdir" install
+ install -D -m755 uavs3e/build/linux/uavs3enc -t "${pkgdir}/usr/bin"
+ install -D -m755 uavs3e-10bit/build/linux/uavs3enc "${pkgdir}/usr/bin/uavs3enc-10bit"
+ install -D -m644 uavs3e/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}