summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkfg2023-12-20 18:28:19 +0100
committerkfg2023-12-20 18:32:19 +0100
commit40b4dc3c9b0cbaeed6eb4f6643970682b4b65d01 (patch)
treea5391a42bbd9ffd77dd2129c6f0a9e7925ebd71f
downloadaur-40b4dc3c9b0cbaeed6eb4f6643970682b4b65d01.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD71
-rw-r--r--configure.patch33
-rw-r--r--libtool.patch12
-rw-r--r--x86_64_cputest.patch12
5 files changed, 150 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ac5ec8a4ccbb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = mingw-w64-gavl
+ pkgdesc = Low level library, upon which multimedia APIs can be built (mingw-w64)
+ pkgver = 1.4.0
+ pkgrel = 1
+ url = https://gmerlin.sourceforge.net/
+ arch = any
+ license = GPL
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-crt
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = https://downloads.sourceforge.net/gmerlin/gavl-1.4.0.tar.gz
+ source = configure.patch
+ source = x86_64_cputest.patch
+ source = libtool.patch
+ sha256sums = 51aaac41391a915bd9bad07710957424b046410a276e7deaff24a870929d33ce
+ sha256sums = df2a64a3698856035c603bb28529208dc36b0d685c338a726c149d1157a6a0df
+ sha256sums = 86a7411fb43a6bb335661b1f38d6315efb3dc57cfafb274c911ee4a433837d1f
+ sha256sums = 7cc4329580294fbf62ec892acd56a43b4d914e86d534f658964a5b5ea256bf6e
+
+pkgname = mingw-w64-gavl
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f41cd36f876a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer : Karl-Felix Glatzer <karl[dot]glatzer[at]gmx[dot]de>
+# Contributor: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
+# Contributor: Robert Emil Berge <filoktetes@linuxophic.org>
+# Contributor: Mateusz Herych <heniekk@gmail.com>
+
+pkgname=mingw-w64-gavl
+_pkgname=gavl
+pkgver=1.4.0
+pkgrel=1
+pkgdesc='Low level library, upon which multimedia APIs can be built (mingw-w64)'
+arch=('any')
+url='https://gmerlin.sourceforge.net/'
+license=('GPL')
+depends=('mingw-w64-crt')
+options=(!strip !buildflags staticlibs)
+makedepends=('mingw-w64-configure')
+source=("https://downloads.sourceforge.net/gmerlin/$_pkgname-$pkgver.tar.gz"
+ "configure.patch"
+ "x86_64_cputest.patch"
+ "libtool.patch")
+sha256sums=('51aaac41391a915bd9bad07710957424b046410a276e7deaff24a870929d33ce'
+ 'df2a64a3698856035c603bb28529208dc36b0d685c338a726c149d1157a6a0df'
+ '86a7411fb43a6bb335661b1f38d6315efb3dc57cfafb274c911ee4a433837d1f'
+ '7cc4329580294fbf62ec892acd56a43b4d914e86d534f658964a5b5ea256bf6e')
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd $_pkgname-$pkgver
+ # ignore test program for clock monotonic
+ # (maybe change to running with wine?)
+ patch -Np1 -i "${srcdir}/configure.patch"
+ # 64 bit assembly throws an error. Use fall back to pure C.
+ patch -Np1 -i "${srcdir}/x86_64_cputest.patch"
+ # add file magic for 64 bit
+ patch -Np1 -i "${srcdir}/libtool.patch"
+
+ # Fix build
+ sed -i 's|volume_test_LDADD = ../gavl/libgavl.la|volume_test_LDADD = -lm ../gavl/libgavl.la|' src/Makefile.{am,in}
+ sed -i 's/LDFLAGS="$GMERLIN_DEP_RPATH"/LDFLAGS="$LDFLAGS $GMERLIN_DEP_RPATH"/' configure{,.ac}
+ sed -i 's|-Xlinker --out-implib -Xlinker \$lib|-Wl,--out-implib .libs/libgavl.dll.a|' aclocal.m4
+ sed -i 's|-Xlinker --out-implib -Xlinker \$lib|-Wl,--out-implib .libs/libgavl.dll.a|' configure
+}
+
+build() {
+ for _arch in ${_architectures}; do
+ mkdir -p ${srcdir}/$_pkgname-$pkgver/build-${_arch} && cd ${srcdir}/$_pkgname-$pkgver/build-${_arch}
+
+ export LDFLAGS="-lssp"
+
+ ${_arch}-configure --with-cpuflags=none --without-doxygen
+ make
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd ${srcdir}/$_pkgname-$pkgver/build-${_arch}
+
+ # install shared libraries
+ mkdir -p ${pkgdir}/usr/${_arch}/bin
+ mkdir -p ${pkgdir}/usr/${_arch}/lib
+ install -m755 gavl/.libs/libgavl*.dll ${pkgdir}/usr/${_arch}/bin
+ install -m755 gavl/.libs/libgavl*.dll.a ${pkgdir}/usr/${_arch}/lib
+
+ make DESTDIR="$pkgdir" install
+
+ ${_arch}-strip -x -g ${pkgdir}/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g ${pkgdir}/usr/${_arch}/lib/*.a
+ done
+}
diff --git a/configure.patch b/configure.patch
new file mode 100644
index 000000000000..7391d395c221
--- /dev/null
+++ b/configure.patch
@@ -0,0 +1,33 @@
+diff -ruN gavl-1.4.0/configure patched/configure
+--- gavl-1.4.0/configure 2012-06-08 13:49:51.000000000 +0200
++++ patched/configure 2023-12-07 16:46:25.036667046 +0100
+@@ -11189,10 +11189,9 @@
+ $as_echo_n "checking for CLOCK_MONOTONIC... " >&6; }
+
+ if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "cannot run test program while cross compiling
+-See \`config.log' for more details." "$LINENO" 5; }
++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: in \`$ac_pwd':" >&5
++printf "%s\n" "$as_me: warning: in \`$ac_pwd':" >&2;}
++printf "%s\n" "ignoring test program while cross compiling" >&6;}
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+diff -ruN gavl-1.4.0/configure.ac patched/configure.ac
+--- gavl-1.4.0/configure.ac 2012-06-08 13:49:47.000000000 +0200
++++ patched/configure.ac 2023-12-07 16:46:11.283333712 +0100
+@@ -177,8 +177,12 @@
+ HAVE_CLOCK_MONOTONIC="true"
+
+ ],
++ [
+ # program could not be run
+ AC_MSG_RESULT(no)
++ ],
++ [
++ ]
+ )
+
+ if test "x$HAVE_CLOCK_MONOTONIC" = "xtrue"; then
diff --git a/libtool.patch b/libtool.patch
new file mode 100644
index 000000000000..1a540fe916ef
--- /dev/null
+++ b/libtool.patch
@@ -0,0 +1,12 @@
+diff -ruN gavl-1.4.0/ltmain.sh patched/ltmain.sh
+--- gavl-1.4.0/ltmain.sh 2012-06-08 13:49:50.000000000 +0200
++++ patched/ltmain.sh 2023-12-07 23:10:44.283333945 +0100
+@@ -2560,7 +2560,7 @@
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
diff --git a/x86_64_cputest.patch b/x86_64_cputest.patch
new file mode 100644
index 000000000000..366413e3636f
--- /dev/null
+++ b/x86_64_cputest.patch
@@ -0,0 +1,12 @@
+--- gavl-1.4.0/gavl/cputest.c 2012-06-08 13:49:47.000000000 +0200
++++ patched/gavl/cputest.c 2023-12-07 17:09:28.613333697 +0100
+@@ -65,7 +65,8 @@
+
+ int gavl_accel_supported()
+ {
+-#ifdef ARCH_X86
++//FIXME: 64 bit mingw throws an error
++#if defined(ARCH_X86) && !defined(ARCH_X86_64)
+ int rval = 0;
+ int eax, ebx, ecx, edx;
+ int max_std_level, max_ext_level, std_caps=0, ext_caps=0;