[gnash/gnash-git] Use system ltdl

Hicham HAOUARI hicham at fedoraproject.org
Mon Feb 28 23:33:01 UTC 2011


commit 699fcfe33f50f2e9dc04410203fddef3783f5e92
Author: Hicham HAOUARI <hicham.haouari at gmail.com>
Date:   Mon Feb 28 23:32:21 2011 +0000

    Use system ltdl

 .gitignore                 |    1 +
 0001-Use-system-ltdl.patch |  230 ++++++++++++++++++++++++++++++++++++++++++++
 gnash.spec                 |   10 +-
 sources                    |    2 +-
 4 files changed, 237 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 815a9d3..4f2a1e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ gnash-0.8.7.tar.bz2
 /gnash-0.8.9-20110214git.tar.bz2
 /gnash-0.8.9-20110223git.tar.bz2
 /gnash-0.8.9-20110226git.tar.bz2
+/gnash-0.8.9-20110228git.tar.bz2
diff --git a/0001-Use-system-ltdl.patch b/0001-Use-system-ltdl.patch
new file mode 100644
index 0000000..fdda7b1
--- /dev/null
+++ b/0001-Use-system-ltdl.patch
@@ -0,0 +1,230 @@
+From 7a68d3ebdfaaa50e567f1895f576ac4a0739f962 Mon Sep 17 00:00:00 2001
+From: Hicham HAOUARI <hicham.haouari at gmail.com>
+Date: Mon, 28 Feb 2011 22:58:31 +0000
+Subject: [PATCH] Use system ltdl
+
+---
+ Makefile.am         |   14 +---------
+ configure.ac        |   63 ++++++++++++--------------------------------------
+ libbase/Makefile.am |   22 ++---------------
+ 3 files changed, 20 insertions(+), 79 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1843ce8..f6193af 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -63,16 +63,12 @@ STD_DIRS = \
+ 	po \
+ 	$(NULL)
+ 
+-if LIBLTDL2
+-LIBLTDLDIR = libltdl
+-endif
+-
+ if HAVE_VAAPI
+ VAAPI_DIR = libvaapi
+ endif
+ 
+-SUBDIRS = $(LIBLTDLDIR) $(VAAPI_DIR) $(STD_DIRS)
+-DIST_SUBDIRS = $(STD_DIRS) cygnal extensions testsuite libltdl libvaapi
++SUBDIRS = $(VAAPI_DIR) $(STD_DIRS)
++DIST_SUBDIRS = $(STD_DIRS) cygnal extensions testsuite libvaapi
+ 
+ if TESTSUITE
+ SUBDIRS += testsuite
+@@ -109,10 +105,6 @@ EXTRA_DIST =  \
+ 	packaging/klash.xpm \
+ 	revno.h
+ 
+-if LIBLTDL1
+-EXTRA_DIST += libltdl/ltdl.h libltdl/ltdl.c
+-endif
+-
+ # dist-hook:
+ # 	@test -d "$(distdir)/packaging" || $(mkinstalldirs) "$(distdir)/packaging"
+ # 	cp -p $(srcdir)/*.am $(top_distdir)/packaging/
+@@ -292,8 +284,6 @@ endif
+ 	@echo "	X11_CFLAGS is $(X11_CFLAGS)"
+ 	@echo "	X11_LIBS is $(X11_LIBS)"
+ 	@echo "Support libraries..."
+-	@echo "	INCLTDL $(INCLTDL) "
+-	@echo "	LIBLTDL $(LIBLTDL) "
+ 	@echo "	GLIB_CFLAGS is $(GLIB_CFLAGS)"
+ 	@echo "	GLIB_LIBS is $(GLIB_LIBS)"
+ 	@echo "	Z_CFLAGS is $(Z_CFLAGS)"
+diff --git a/configure.ac b/configure.ac
+index 13e4f61..dcfb7ea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,7 +21,6 @@ AC_CONFIG_SRCDIR([libcore/as_object.h])
+ AC_CONFIG_HEADERS([gnashconfig.h])
+ AC_CONFIG_MACRO_DIR([macros])
+ 
+-dnl AC_CONFIG_SUBDIRS(libltdl)
+ AC_CANONICAL_BUILD
+ AC_CANONICAL_HOST
+ 
+@@ -1278,57 +1277,26 @@ AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
+ 
+ GNASH_PKG_CLASSFILE
+ 
+-ltmajor=0
+-AC_MSG_CHECKING([For the version of libtool])
+-if test -d ${srcdir}/libltdl/libltdl; then
+-  ltver=2.x
+-else
+-  ltver=1.x
+-fi
+-ltmajor=`echo $ltver | cut -d '.' -f 1`
+-AC_MSG_RESULT([$ltver])
+-dnl Libtool version 1.5
+-if test $ltmajor -eq 1; then
+-  AC_LIBLTDL_CONVENIENCE
+-  AC_LIBTOOL_DLOPEN
+-  if test x"${windows}" = x"yes"; then
+-    dnl The following macro may be empty; the colon is necessary
+-    dnl in this case to avoid an empty if statement (which is a syntax error).
+-    AC_LIBTOOL_WIN32_DLL
+-    :
+-  fi
+-  AC_DISABLE_STATIC
+-  dnl FIXME: there should really be a test here to make sure it's really there,
+-  dnl but because libltdl requires us to use their config code, it's a lot harder
+-  dnl to do that. So if we get this far without errors, we just blindly assume
+-  dnl the header exists too. This is only used by libtool 1.5, which appears to
+-  dnl mostly only effect Debian lenny or OpenBSD. Libtool; 2.x defines this, but
+-  dnl libtool 1.5 doesn't, and we need it for dlopen() so extensions work.
+-  AC_DEFINE(HAVE_LTDL, [1], [Libtool 2.x defines this, but libtool 1.5 doesn't])
+-dnl libtool version 2.x
+-else
+-  dnl LT_CONFIG_LTDL_DIR([libltdl])
+-  LT_INIT([dlopen win32-dll disable-static])
+-  LTDL_INIT([convenience recursive])
+-fi
+-AC_LIB_LTDL
++dnl --------------------------------------------------------
++dnl Libtool
++dnl --------------------------------------------------------
+ 
++AC_LIBTOOL_DLOPEN
++AC_LIBTOOL_WIN32_DLL
++AC_DISABLE_STATIC
++AC_PROG_LIBTOOL
++AC_SUBST(LIBTOOL_DEPS)
+ DLOPEN="-dlopen"
+ DLPREOPEN="-dlpreopen"
+ AC_SUBST(DLOPEN)
+ AC_SUBST(DLPREOPEN)
+ 
+-dnl dnl Substitute INCLTDL and LIBLTDL in the Makefiles
+-AC_SUBST(INCLTDL)
+-AC_SUBST(LIBLTDL)
+-
+-AC_PROG_LIBTOOL
+-AC_SUBST(LIBTOOL_DEPS)
+-
+-AM_CONDITIONAL(LIBLTDL2, [test $ltmajor -eq 2])
+-AM_CONDITIONAL(LIBLTDL1, [test $ltmajor -eq 1])
+-AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
+-AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
++AC_CHECK_HEADER([ltdl.h],
++    [AC_CHECK_LIB([ltdl],
++                  [lt_dlinit],
++                  AC_DEFINE(HAVE_LTDL, [1], [Libtool 2.x defines this, but libtool 1.5 doesn't]),
++                  AC_MSG_ERROR([Can't find any suitable libltdl to link against]))],
++    AC_MSG_ERROR([Can't find libltdl]))
+ 
+ dnl --------------------------------------------------------
+ dnl SOL dir
+@@ -2947,7 +2915,7 @@ SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
+ AC_SUBST(SUPPORTED_GUIS)
+ 
+ dnl AC_CONFIG_LINKS(doc/C/images)
+-dnl AC_CONFIG_LINKS(gnashconfig.h,libltdl/config.h)
++dnl AC_CONFIG_LINKS(gnashconfig.h)
+ AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
+ AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
+ AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
+@@ -2961,7 +2929,6 @@ desktop/gnash-qt-launcher:desktop/gnash-qt-launcher.in
+ AC_OUTPUT(Makefile
+ desktop/Makefile
+ po/Makefile
+-libltdl/Makefile
+ libmedia/Makefile
+ libsound/Makefile
+ libbase/Makefile
+diff --git a/libbase/Makefile.am b/libbase/Makefile.am
+index cb66fa2..db011ca 100644
+--- a/libbase/Makefile.am
++++ b/libbase/Makefile.am
+@@ -23,13 +23,10 @@ sysconf_DATA = gnashrc gnashpluginrc
+ # this is where Gnash plugins get installed
+ pluginsdir = $(prefix)/lib/gnash/plugins
+ 
+-# If we are using an installable libltdl, then it needs to be built
+-# before libgnash, as libgnash depends on it for extensions.
+ pkglib_LTLIBRARIES = libgnashbase.la
+ 
+ libgnashbase_la_CPPFLAGS = -DPLUGINSDIR=\"$(pluginsdir)\" \
+ 	-DSYSCONFDIR=\"$(sysconfdir)\" \
+-	-I$(top_srcdir)/libltdl \
+ 	$(PTHREAD_CFLAGS) \
+ 	$(PNG_CFLAGS) \
+ 	$(GIF_CFLAGS) \
+@@ -40,7 +37,6 @@ libgnashbase_la_CPPFLAGS = -DPLUGINSDIR=\"$(pluginsdir)\" \
+ 	$(Z_CFLAGS) \
+ 	$(JPEG_CFLAGS) \
+ 	$(BOOST_CFLAGS) \
+-	$(INCLTDL) \
+ 	$(NULL)
+ 
+ if ANDROID
+@@ -130,17 +126,7 @@ if USE_GIF
+ libgnashbase_la_SOURCES += GnashImageGif.cpp
+ endif
+ 
+-if LIBLTDL1
+-noinst_LTLIBRARIES = libltdlc.la
+-libltdlc_la_CPPFLAGS = $(LTDLINCL) -I$(top_srcdir)/libltdl
+-libltdlc_la_SOURCES = $(top_srcdir)/libltdl/ltdl.c
+-libgnashbase_la_LIBADD += $(top_builddir)/libbase/libltdlc.la
+-endif
+-
+-if LIBLTDL2
+-libgnashbase_la_LIBADD += $(top_builddir)/libltdl/libltdlc.la
+-endif
+-
++libgnashbase_la_LIBADD += -lltdl
+ 
+ if HAIKU
+   libgnashbase_la_LIBADD += $(HAIKU_LIBS)
+@@ -163,7 +149,6 @@ endif
+ noinst_HEADERS =
+ 
+ inst_HEADERS = \
+-	$(LIBLTDLHEAD) \
+ 	accumulator.h \
+ 	SimpleBuffer.h \
+ 	extension.h \
+@@ -234,8 +219,7 @@ EXTENSIONS_API = \
+ instdir = $(includedir)/gnash
+ inst_HEADERS += $(EXTENSIONS_API)
+ 
+-libgnashbase_la_LDFLAGS = -release $(VERSION) 
+-libgnashbase_la_DEPENDENCIES = $(LIBLTDLLIB)
++libgnashbase_la_LDFLAGS = -release $(VERSION)
+ 
+ if BUILD_OGL_RENDERER
+    libgnashbase_la_SOURCES += \
+@@ -291,7 +275,7 @@ if ENABLE_PCH
+ AM_CXXFLAGS = $(PCH_FLAGS)
+ endif
+ 
+-CLEANFILES = libltdl.la libltdlc.la gnashrc gnashpluginrc
++CLEANFILES = gnashrc gnashpluginrc
+ 
+ # Rebuild with GCC 4.x Mudflap support
+ mudflap:
+-- 
+1.7.4
+
diff --git a/gnash.spec b/gnash.spec
index 76e6166..7415115 100644
--- a/gnash.spec
+++ b/gnash.spec
@@ -1,4 +1,4 @@
-%define gitdate 20110226
+%define gitdate 20110228
 %filter_provides_in %{python_sitearch}/.*\.so$ 
 %filter_setup
 
@@ -14,6 +14,8 @@ URL:            http://www.gnu.org/software/gnash/
 #Source0:        http://ftp.gnu.org/gnu/gnash/%{version}/%{name}-%{version}.tar.bz2
 Source0:        %{name}-%{version}-%{gitdate}git.tar.bz2
 
+Patch0:         0001-Use-system-ltdl.patch
+
 BuildRequires:  libxml2-devel libpng-devel libjpeg-devel libogg-devel
 BuildRequires:  boost-devel curl-devel freetype-devel fontconfig-devel
 BuildRequires:  SDL-devel agg-devel
@@ -87,9 +89,7 @@ application.
 
 %prep
 %setup -q
-iconv -f iso-8859-1 -t utf8 < AUTHORS > AUTHORS.utf8
-touch -r AUTHORS AUTHORS.utf8
-mv AUTHORS.utf8 AUTHORS
+%patch0 -p1 -b .use-system-ltdl
 
 autoreconf -if
 
@@ -230,7 +230,7 @@ touch --no-create %{_datadir}/icons/hicolor
 %{python_sitearch}/gtk-2.0/gnash.so
 
 %changelog
-* Sat Feb 26 2011 Hicham HAOUARI <hicham.haouari at gmail.com> - 1:0.8.9-0.1.20110226git
+* Mon Feb 28 2011 Hicham HAOUARI <hicham.haouari at gmail.com> - 1:0.8.9-0.1.20110228git
 - Switch to 0.8.9 branch
 
 * Wed Oct 06 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 1:0.8.8-4
diff --git a/sources b/sources
index 1a08ae8..7b9a800 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-03d4bd06eeacb89cef7963749ae7dcbf  gnash-0.8.9-20110226git.tar.bz2
+15eeecd00ff604805d5853d77755730c  gnash-0.8.9-20110228git.tar.bz2


More information about the scm-commits mailing list