summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Bezerra2018-08-18 23:01:04 -0300
committerRodrigo Bezerra2018-08-18 23:01:04 -0300
commitf6b4fb55c0b69c2264aca8f9aefc241ca77be79d (patch)
treeceed5e67b6843b9f4677429885f94152aaf978af
downloadaur-f6b4fb55c0b69c2264aca8f9aefc241ca77be79d.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD62
-rw-r--r--no-rpath.diff12
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ca4b281f8276
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = lib32-srt
+ pkgdesc = Secure Reliable Transport library (32-bit)
+ pkgver = 1.3.1
+ pkgrel = 1
+ url = https://www.srtalliance.org/
+ arch = x86_64
+ license = MPL2
+ makedepends = git
+ makedepends = cmake
+ makedepends = ninja
+ depends = lib32-gcc-libs
+ depends = lib32-openssl
+ source = git+https://github.com/Haivision/srt#commit=d6499ca374fe1bff5ccfd959786309b18a8e7388
+ source = no-rpath.diff
+ sha256sums = SKIP
+ sha256sums = ce9a97d661d796da85a7e4faf9c70c27368d00eb505f85c03a31bba8f22e6847
+
+pkgname = lib32-srt
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..440bf3edf84e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com>
+
+_basename=srt
+pkgname=lib32-srt
+pkgver=1.3.1
+pkgrel=1
+pkgdesc="Secure Reliable Transport library (32-bit)"
+url="https://www.srtalliance.org/"
+arch=(x86_64)
+license=(MPL2)
+depends=(lib32-gcc-libs lib32-openssl)
+makedepends=(git cmake ninja)
+_commit=d6499ca374fe1bff5ccfd959786309b18a8e7388 # tags/v1.3.1
+source=("git+https://github.com/Haivision/srt#commit=$_commit"
+ no-rpath.diff)
+sha256sums=('SKIP'
+ 'ce9a97d661d796da85a7e4faf9c70c27368d00eb505f85c03a31bba8f22e6847')
+
+pkgver() {
+ cd $_basename
+
+ git describe --tags | sed 's/^v//;s/-/+/g'
+}
+
+prepare() {
+ mkdir build
+
+ cd $_basename
+
+ patch -Np1 -i ../no-rpath.diff
+}
+
+build() {
+ cd build
+
+ export CC='gcc -m32'
+ export CXX='g++ -m32'
+ export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
+
+ cmake -G Ninja ../srt \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_BINDIR=bin \
+ -DCMAKE_INSTALL_LIBDIR=lib32 \
+ -DCMAKE_INSTALL_INCLUDEDIR=include \
+ -DENABLE_TESTING=True
+
+ cmake --build .
+}
+
+check() {
+ cd build
+
+ ./utility-test
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --build build --target install
+
+ cd "$pkgdir"/usr
+
+ rm -r bin include
+}
diff --git a/no-rpath.diff b/no-rpath.diff
new file mode 100644
index 000000000000..364a81beb5c7
--- /dev/null
+++ b/no-rpath.diff
@@ -0,0 +1,12 @@
+diff --git i/CMakeLists.txt w/CMakeLists.txt
+index e913122..2cc3c3d 100644
+--- i/CMakeLists.txt
++++ w/CMakeLists.txt
+@@ -634,7 +634,6 @@ macro(srt_make_application name)
+ # be placed into the binrary directory anyway.
+ # XXX not sure about Mac.
+ # See this name used already in install(${TARGET_srt} LIBRARY DESTINATION...).
+- set(FORCE_RPATH LINK_FLAGS -Wl,-rpath,.,-rpath,../${CMAKE_INSTALL_LIBDIR} BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH_USE_LINK_PATH TRUE)
+ endif()
+
+ # We state that Darwin always uses CLANG compiler, which honors this flag the same way.