ogmtools: fix cross compiling

+ Modernize and fix autoconf files
+ Remove extra ogg-devel which is a dependency of vorbis-devel
This commit is contained in:
Jürgen Buchmüller 2015-08-30 14:21:07 +02:00
parent f01760bcd0
commit 81e2aaf5b1
5 changed files with 131 additions and 2 deletions

View file

@ -0,0 +1,11 @@
--- Makefile.am 2003-05-04 11:41:26.000000000 +0200
+++ Makefile.am 2015-08-30 13:35:53.976381119 +0200
@@ -7,7 +7,7 @@
if HAVE_LIBDVDREAD
DVDXCHAP=dvdxchap
DVDXCHAP_MAN=dvdxchap.1
-INCLUDES=$(DVDREAD_CFLAGS)
+AM_CPPFLAGS=$(DVDREAD_CFLAGS)
endif
bin_PROGRAMS = ogmmerge ogmdemux ogminfo ogmsplit ogmcat $(DVDXCHAP)

View file

@ -0,0 +1,56 @@
--- acinclude.m4 2003-05-04 11:41:26.000000000 +0200
+++ acinclude.m4 2015-08-30 14:11:25.882425946 +0200
@@ -1,7 +1,7 @@
dnl PATH_AVILIB([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for avilib, and define AVILIB_CFLAGS and AVILIB_LIBS
dnl
-AC_DEFUN(PATH_AVILIB,
+AC_DEFUN([PATH_AVILIB],
[dnl
dnl Get the cflags and libraries
dnl
@@ -23,7 +23,7 @@
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
dnl
-AC_DEFUN(XIPH_PATH_OGG,
+AC_DEFUN([XIPH_PATH_OGG],
[dnl
dnl Get the cflags and libraries
dnl
@@ -118,7 +118,7 @@
dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
dnl
-AC_DEFUN(XIPH_PATH_VORBIS,
+AC_DEFUN([XIPH_PATH_VORBIS],
[dnl
dnl Get the cflags and libraries
dnl
@@ -227,7 +227,7 @@
ifelse([$3],[],[:],[$3])
fi])
-AC_DEFUN(PATH_DEBUG,[
+AC_DEFUN([PATH_DEBUG],[
AC_ARG_ENABLE([debug],
[ --enable-debug compile with debug information])
if test x"$enable_debug" = x"yes"; then
@@ -239,7 +239,7 @@
AC_SUBST(DEBUG_CFLAGS)
])
-AC_DEFUN(PATH_PROFILING,[
+AC_DEFUN([PATH_PROFILING],[
AC_ARG_ENABLE([profiling],
[ --enable-profiling compile with profiling information])
if test x"$enable_profiling" = x"yes"; then
@@ -258,7 +258,7 @@
dnl Test for LIBDVDREAD, and define LIBDVDREAD_CFLAGS and LIBDVDREAD_LIBS
dnl
-AC_DEFUN(AM_PATH_LIBDVDREAD,
+AC_DEFUN([AM_PATH_LIBDVDREAD],
[
AC_ARG_WITH(dvdread,[ --with-dvdread use installed libdvdread library (default=yes)],[case "${withval}" in

View file

@ -0,0 +1,11 @@
--- avilib/Makefile.am 2004-03-29 22:00:28.000000000 +0200
+++ avilib/Makefile.am 2015-08-30 13:57:05.720407860 +0200
@@ -5,7 +5,7 @@
noinst_LIBRARIES = libavi.a
-INCLUDES = -I./
+CFLAGS = -I$(top_srcdir)/avilib
CFLAGS=-O3 -funroll-loops -ffast-math -DLINUX -Wall @CFLAGS@
libavi_a_SOURCES = avilib.c avidump.c avimisc.c xio.c

View file

@ -0,0 +1,32 @@
--- configure.in 2004-11-07 11:01:34.000000000 +0100
+++ configure.in 2015-08-30 13:46:25.944394407 +0200
@@ -1,7 +1,8 @@
dnl process this file with autoconf to generate the configure script
-AC_INIT(ogmmerge.cpp)
-AM_INIT_AUTOMAKE(ogmtools,1.5)
+AC_INIT([ogmtools],[1.5])
+AC_CONFIG_SRCDIR([ogmmerge.cpp])
+AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_CXX
@@ -19,7 +20,7 @@
dnl libdvdread support
dnl
-have_dvdread=no
+have_dvdread=yes
AM_PATH_LIBDVDREAD(AC_DEFINE(HAVE_LIBDVDREAD))
AM_CONDITIONAL(HAVE_LIBDVDREAD, test x"$have_dvdread" = "xyes")
@@ -31,7 +32,7 @@
dnl Check for headers
AC_HEADER_STDC()
-CFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
-CXXFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
+AM_CFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
+AM_CXXFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
AC_OUTPUT(Makefile avilib/Makefile)

View file

@ -4,9 +4,28 @@ version=1.5
revision=2
short_desc="Tools for information,extractions or creation of OGG media streams"
maintainer="Martin Riese <grauehaare@gmx.de>"
license="GPL"
license="GPL-2"
homepage="http://www.bunkus.org/videotools/ogmtools/"
distfiles="http://www.bunkus.org/videotools/ogmtools/ogmtools-1.5.tar.bz2"
checksum="c8d61d1dbceb981dc7399c1a85e43b509fd3d071fb8d3ca89ea9385e6e40fdea"
build_style=gnu-configure
makedepends="libogg-devel libvorbis-devel libdvdread-devel"
configure_args="--disable-oggtest --disable-vorbistest --with-dvdread
--with-dvdread-includes=${XBPS_CROSS_BASE}/usr
--with-dvdread-libs=${XBPS_CROSS_BASE}/usr/lib"
hostmakedepends="automake libtool pkg-config"
makedepends="libvorbis-devel libdvdread-devel"
LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib"
CFLAGS="-I./avilib"
CXXFLAGS="${CFLAGS}"
pre_configure() {
mv configure.{in,ac}
autoreconf -if
if [ "$CROSS_BUILD" ]; then
# Fix unneeded error when cross compiling
sed -i configure \
-e '/.*test "$cross_compiling" = yes &&/d' \
-e '/.*as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5/d'
fi
}