Hi,
I've been through the issues at http://code.google.com/p/iulib/issues/list,
and have tried to produce a current (i.e. works against current tip of the
iulib hg repo), portable (autoconf, not scons) summary patch that will get you
from a clean checkout to something that passes make / make check.
That patch is attached. Please test and tell me if it works for you. I only
tested it on my Fedora 11 box.
Looking at the issues.
http://code.google.com/p/iulib/issues/detail?id=2 describes two problems, one
associated with not having the C++ compiler installed, and the other with an
API change in ffmpeg libs. That appears to be fixed (with an autoconf check to
handle either old or new API).
Recommend it be closed.
http://code.google.com/p/iulib/issues/detail?id=3 says that we don't respect
DESTDIR, and suggests deletion of the custom install targets. That might be
possible, but there is an alternative. See below.
Recommend it be closed if the summary patch works for most people.
http://code.google.com/p/iulib/issues/detail?id=5 isn't very clear. Possibly
already fixed.
Recommend it stay open pending feedback from the originator.
http://code.google.com/p/iulib/issues/detail?id=6 is actually a suggestion for
enhancement. Included in the summary patch.
Recommend it be closed if the summary path works for most people.
http://code.google.com/p/iulib/issues/detail?id=7 is a set of changes to use
libtool. I didn't investigate this, although it seems like a useful set of
changes to fold in after we get the basics working, and figure out what the
common subset is.
Recommend it stay open.
http://code.google.com/p/iulib/issues/detail?id=8 is about a build failure
associated with missing sources. Appears to be fixed.
Recommend it be closed.
http://code.google.com/p/iulib/issues/detail?id=9 is about MacOS port -
perhaps more than one issue in this one. Haven't looked at that.
Recommend it stay open.
http://code.google.com/p/iulib/issues/detail?id=10 is probably caused by not
having ImageMagick. I added a documentation note to my summary patch.
Recommend it be closed if the summary patch is applied.
http://code.google.com/p/iulib/issues/detail?id=12 is about cygwin SDK. Didn't
test that.
Recommend it stay open.
http://code.google.com/p/iulib/issues/detail?id=15 has a couple of fixes - one
for ffmpeg headers and the other for DESTDIR (per issue 3). I updated the patch
and it is included in my summary patch.
Recommend it be closed if the summary patch is applied.
http://code.google.com/p/iulib/issues/detail?id=16 is about missing include
directives in the genAM.py script. A partial fix was included in rev
2040eecf79, but it missed the unit tests. Fix included in the summary patch.
Recommend it be closed if the summary patch is applied.
http://code.google.com/p/iulib/issues/detail?id=17 reports a missing header
problem, however I can't reproduce it.
Recommend it stay open pending further investigation.
http://code.google.com/p/iulib/issues/detail?id=18 looks like a packaging
problem in iulib-0.4. I can only suggest repackaging it as 0.4.1.
Recommend it be closed after the next release.
Here is an annotated version of the patch. My review comments are prefaced
with ****** BH: and relate to the text below.
diff -r 457f2f8db802 INSTALL
--- a/INSTALL Tue Jul 07 21:56:59 2009 +0200
+++ b/INSTALL Thu Jul 09 16:47:17 2009 +1000
@@ -37,6 +37,18 @@
--------------------------------------------------------------------------------
****** BH: Just a little extra documentation, aimed at issue 10.
+Running tests
+--------------------------------------------------------------------------------
+Tests are intended for developers and porters. You do not need to run them
+if you are just intending to use iulib.
+
+To run the tests, use:
+ make check
+
+If you get errors relating to "convert" not being found, you may need to
+install the ImageMagick tools.
+
+--------------------------------------------------------------------------------
Clean-up and uninstall
--------------------------------------------------------------------------------
In order to clean the iulib folder, i.e. remove all compiled files, run:
diff -r 457f2f8db802 configure.ac
--- a/configure.ac Tue Jul 07 21:56:59 2009 +0200
+++ b/configure.ac Thu Jul 09 16:47:17 2009 +1000
@@ -55,16 +55,30 @@
****** BH: fix up headers, make ffmpeg support optional.
# --- vidio (optional video in-/output) ---
AC_SUBST(novidio, 0)
-AC_CHECK_HEADER(ffmpeg/avcodec.h,,AC_SUBST(novidio, 1))
-AC_CHECK_HEADER(ffmpeg/avformat.h,,AC_SUBST(novidio, 1))
-AC_TRY_COMPILE([#include <ffmpeg/avio.h>
- #include <ffmpeg/avformat.h>],
- [AVFormatContext fc; url_fclose(fc.pb);],
- [], [AC_DEFINE(HAVE_OLD_AVFORMAT)])
+CPPFLAGS+=" -I/usr/include/ffmpeg"
+AC_ARG_WITH(vidio,[ --without-vidio disable video i/o support (using
ffmpeg)],
+ [ac_cv_use_vidio=$withval], [ac_cv_use_vidio=yes])
+if test x$ac_cv_use_vidio != xno; then
+ AC_CHECK_HEADER(libavutil/avutil.h, [], AC_SUBST(novidio, 1))
+ AC_CHECK_HEADER(libavcodec/avcodec.h, [], AC_SUBST(novidio, 1), [#include
<libavutil/avutil.h>])
+ AC_CHECK_HEADER(libavformat/avformat.h,,AC_SUBST(novidio, 1))
+ AC_TRY_COMPILE([#include <libavformat/avio.h>
+ #include <libavformat/avformat.h>],
+ [AVFormatContext fc; url_fclose(fc.pb);],
+ [], [AC_DEFINE(HAVE_OLD_AVFORMAT)])
+else
+ AC_SUBST(novidio, 1)
+fi
AM_CONDITIONAL([have_vidio], [test "$novidio" != 1])
AC_SUBST(nov4l2, 0)
****** BH: Make V4L2 support optional.
-AC_CHECK_HEADER(linux/videodev2.h,,AC_SUBST(nov4l2, 1))
+AC_ARG_WITH(v4l2,[ --without-v4l2 disable v4l2 support],
+ [ac_cv_use_v4l2=$withval], [ac_cv_use_v4l2=yes])
+if test x$ac_cv_use_v4l2 != xno; then
+ AC_CHECK_HEADER(linux/videodev2.h,,AC_SUBST(nov4l2, 1))
+else
+ AC_SUBST(nov4l2, 1)
+fi
AM_CONDITIONAL([have_v4l2], [test "$nov4l2" != 1])
AC_TYPE_INT64_T
@@ -76,6 +90,23 @@
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
****** BH: This make a nice summary display at the end of the configure run.
****** BH: Useful for analysis / debugging.
+if [[ "$novidio" != "1" ]]; then
+ use_vidio="yes"
+else
+ use_vidio="no"
+fi
+
+if [[ "$nov4l2" != "1" ]]; then
+ use_v4l2="yes"
+else
+ use_v4l2="no"
+fi
+
+echo
+echo "IULIB configuration:"
+echo " SDL (debugging): $ac_cv_use_sdl"
+echo " Video IO: $use_vidio"
+echo " Video for Linux 2: $use_v4l2"
echo
echo "OK! You can build and install iulib the usual way:"
echo
diff -r 457f2f8db802 genAM.py
--- a/genAM.py Tue Jul 07 21:56:59 2009 +0200
+++ b/genAM.py Thu Jul 09 16:47:17 2009 +1000
@@ -74,7 +74,7 @@
tName = os.path.basename(t)[:-3].replace('-','_')
print tName + "_SOURCES = $(srcdir)/" + t
print tName + "_LDADD = libiulib.a"
****** BH: As for r=2040eecf79, but this time for unit tests.
- print tName + "_CPPFLAGS = -I$(srcdir)/colib -I$(srcdir)/imgio -
I$(srcdir)/imglib"
+ print tName + "_CPPFLAGS = -I$(srcdir)/colib -I$(srcdir)/imgio -
I$(srcdir)/imglib -I$(srcdir)/imgbits -I$(srcdir)/vidio -I$(srcdir)/utils"
@@ -103,14 +103,16 @@
# make installation of colib a separate target
install-colib:
- install -d $(colibdir)
- install $(colib_HEADERS) $(colibdir)
****** BH: respect DESTDIR, fix permissions
+ install -d -m 0755 $(DESTDIR)$(colibdir)
+ install -m 0644 $(colib_HEADERS) $(DESTDIR)$(colibdir)
+
install: all install-colib
- install -d $(includedir)
- install -d $(libdir)
- install $(include_HEADERS) $(includedir)
- install $(lib_LIBRARIES) $(libdir)
****** BH: respect DESTDIR, fix permissions
+ install -d -m 0755 $(DESTDIR)$(includedir)
+ install -d -m 0755 $(DESTDIR)$(libdir)
+ install -m 0644 $(include_HEADERS) $(DESTDIR)$(includedir)
+ install -m 0644 $(lib_LIBRARIES) $(DESTDIR)$(libdir)
+
"""
print
I ask that this patch be applied.
Brad
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ocropus" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ocropus?hl=en
-~----------~----~----~----~------~----~------~--~---
diff -r 457f2f8db802 INSTALL
--- a/INSTALL Tue Jul 07 21:56:59 2009 +0200
+++ b/INSTALL Thu Jul 09 16:47:17 2009 +1000
@@ -37,6 +37,18 @@
--------------------------------------------------------------------------------
+Running tests
+--------------------------------------------------------------------------------
+Tests are intended for developers and porters. You do not need to run them
+if you are just intending to use iulib.
+
+To run the tests, use:
+ make check
+
+If you get errors relating to "convert" not being found, you may need to
+install the ImageMagick tools.
+
+--------------------------------------------------------------------------------
Clean-up and uninstall
--------------------------------------------------------------------------------
In order to clean the iulib folder, i.e. remove all compiled files, run:
diff -r 457f2f8db802 configure.ac
--- a/configure.ac Tue Jul 07 21:56:59 2009 +0200
+++ b/configure.ac Thu Jul 09 16:47:17 2009 +1000
@@ -55,16 +55,30 @@
# --- vidio (optional video in-/output) ---
AC_SUBST(novidio, 0)
-AC_CHECK_HEADER(ffmpeg/avcodec.h,,AC_SUBST(novidio, 1))
-AC_CHECK_HEADER(ffmpeg/avformat.h,,AC_SUBST(novidio, 1))
-AC_TRY_COMPILE([#include <ffmpeg/avio.h>
- #include <ffmpeg/avformat.h>],
- [AVFormatContext fc; url_fclose(fc.pb);],
- [], [AC_DEFINE(HAVE_OLD_AVFORMAT)])
+CPPFLAGS+=" -I/usr/include/ffmpeg"
+AC_ARG_WITH(vidio,[ --without-vidio disable video i/o support (using ffmpeg)],
+ [ac_cv_use_vidio=$withval], [ac_cv_use_vidio=yes])
+if test x$ac_cv_use_vidio != xno; then
+ AC_CHECK_HEADER(libavutil/avutil.h, [], AC_SUBST(novidio, 1))
+ AC_CHECK_HEADER(libavcodec/avcodec.h, [], AC_SUBST(novidio, 1), [#include <libavutil/avutil.h>])
+ AC_CHECK_HEADER(libavformat/avformat.h,,AC_SUBST(novidio, 1))
+ AC_TRY_COMPILE([#include <libavformat/avio.h>
+ #include <libavformat/avformat.h>],
+ [AVFormatContext fc; url_fclose(fc.pb);],
+ [], [AC_DEFINE(HAVE_OLD_AVFORMAT)])
+else
+ AC_SUBST(novidio, 1)
+fi
AM_CONDITIONAL([have_vidio], [test "$novidio" != 1])
AC_SUBST(nov4l2, 0)
-AC_CHECK_HEADER(linux/videodev2.h,,AC_SUBST(nov4l2, 1))
+AC_ARG_WITH(v4l2,[ --without-v4l2 disable v4l2 support],
+ [ac_cv_use_v4l2=$withval], [ac_cv_use_v4l2=yes])
+if test x$ac_cv_use_v4l2 != xno; then
+ AC_CHECK_HEADER(linux/videodev2.h,,AC_SUBST(nov4l2, 1))
+else
+ AC_SUBST(nov4l2, 1)
+fi
AM_CONDITIONAL([have_v4l2], [test "$nov4l2" != 1])
AC_TYPE_INT64_T
@@ -76,6 +90,23 @@
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
+if [[ "$novidio" != "1" ]]; then
+ use_vidio="yes"
+else
+ use_vidio="no"
+fi
+
+if [[ "$nov4l2" != "1" ]]; then
+ use_v4l2="yes"
+else
+ use_v4l2="no"
+fi
+
+echo
+echo "IULIB configuration:"
+echo " SDL (debugging): $ac_cv_use_sdl"
+echo " Video IO: $use_vidio"
+echo " Video for Linux 2: $use_v4l2"
echo
echo "OK! You can build and install iulib the usual way:"
echo
diff -r 457f2f8db802 genAM.py
--- a/genAM.py Tue Jul 07 21:56:59 2009 +0200
+++ b/genAM.py Thu Jul 09 16:47:17 2009 +1000
@@ -74,7 +74,7 @@
tName = os.path.basename(t)[:-3].replace('-','_')
print tName + "_SOURCES = $(srcdir)/" + t
print tName + "_LDADD = libiulib.a"
- print tName + "_CPPFLAGS = -I$(srcdir)/colib -I$(srcdir)/imgio -I$(srcdir)/imglib"
+ print tName + "_CPPFLAGS = -I$(srcdir)/colib -I$(srcdir)/imgio -I$(srcdir)/imglib -I$(srcdir)/imgbits -I$(srcdir)/vidio -I$(srcdir)/utils"
@@ -103,14 +103,16 @@
# make installation of colib a separate target
install-colib:
- install -d $(colibdir)
- install $(colib_HEADERS) $(colibdir)
+ install -d -m 0755 $(DESTDIR)$(colibdir)
+ install -m 0644 $(colib_HEADERS) $(DESTDIR)$(colibdir)
+
install: all install-colib
- install -d $(includedir)
- install -d $(libdir)
- install $(include_HEADERS) $(includedir)
- install $(lib_LIBRARIES) $(libdir)
+ install -d -m 0755 $(DESTDIR)$(includedir)
+ install -d -m 0755 $(DESTDIR)$(libdir)
+ install -m 0644 $(include_HEADERS) $(DESTDIR)$(includedir)
+ install -m 0644 $(lib_LIBRARIES) $(DESTDIR)$(libdir)
+
"""
print