Merge commit '97b86324d322309843cc5d9d93b039d706c5ae58' into mm
authorMike Looijmans <milo-software@users.sourceforge.net>
Sat, 18 Dec 2010 14:55:28 +0000 (15:55 +0100)
committerMike Looijmans <milo-software@users.sourceforge.net>
Sat, 18 Dec 2010 14:55:28 +0000 (15:55 +0100)
Conflicts:
configure.ac
lib/Makefile.am
lib/components/Makefile.am
lib/gdi/font.cpp
lib/gdi/font.h
main/Makefile.am

1  2 
configure.ac
lib/Makefile.am
lib/base/Makefile.am
lib/components/Makefile.am
lib/dvb/Makefile.am
lib/gdi/font.cpp
lib/gdi/font.h
lib/network/Makefile.am

diff --cc configure.ac
@@@ -1,64 -1,22 +1,66 @@@
- AC_INIT([enigma2],[2.4],[enigma2-devel@lists.elitedvb.net])
- AM_INIT_AUTOMAKE(enigma2,2.4)
+ AC_INIT([enigma2],[2.8.0],[enigma2-devel@lists.elitedvb.net])
+ AM_INIT_AUTOMAKE([dist-bzip2 no-define silent-rules])
+ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
  
- TUXBOX_APPS
  TUXBOX_APPS_DIRECTORY
 +TUXBOX_APPS_PKGCONFIG
  
  AC_PROG_CC
  AC_PROG_CXX
  LT_INIT
  AC_CONFIG_MACRO_DIR([m4])
  
 +AC_ARG_WITH(boxtype,
 +      [  --with-boxtype=NAME box type [[none,dm7025,dm800...]]],
 +      [BOXTYPE="$withval"],[BOXTYPE="dm800"])
 +
 +AC_SUBST(BOXTYPE)
 +AC_DEFINE_UNQUOTED(BOXTYPE,"$BOXTYPE",[box type])
 +
 +if test x"$BOXTYPE" == "xdm8000" ; then
 +      AC_DEFINE(KEY_PLAY_ACTUALLY_IS_KEY_PLAYPAUSE, 1,[define when rc sends a KEY_PLAY event for its KEY_PLAYPAUSE key])
 +fi
 +
  AC_ARG_WITH(libsdl,
        AS_HELP_STRING([--with-libsdl],[use sdl, yes or no]),
-       [[withsdl=$withval]],
-       [[withsdl=yes]]
+       [[with_sdl=$withval]],
+       [[with_sdl=no]]
  )
  
 +AC_ARG_WITH(alsa,
 +      AC_HELP_STRING([--with-alsa=mixername], [use alsa 'mixername' for volume control, e.g. Master]),
 +      [[withalsa=$withval]],
 +      [[withalsa=no]]
 +)
 +
 +if test x"$withalsa" != xno ; then
 +      _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(ALSA, alsa, HAVE_ALSA)
 +      LDFLAGS="$LDFLAGS $ALSA_LIBS"
 +      AC_DEFINE_UNQUOTED(ALSA_VOLUME_MIXER, "$withval",[Defines which alsa mixer to use for volume control])
 +fi
 +
 +AC_ARG_WITH(textlcd,
 +      AC_HELP_STRING([--with-textlcd], [use ascii based lcd, yes or no]),
 +      [[withtextlcd=$withval]],
 +      [[withtextlcd=no]]
 +)
 +if test x"$withtextlcd" != xno ; then
 +      AC_DEFINE(HAVE_TEXTLCD, 1,[Define when using an ascii based lcd device])
 +fi
 +AM_CONDITIONAL(HAVE_TEXTLCD, test x"$withtextlcd" != xno)
 +
 +AC_ARG_WITH(colorlcd,
 +      AC_HELP_STRING([--with-colorlcd], [use 96x64 16bpp color display, yes or no]),
 +      [[withcolorlcd=$withval]],
 +      [[withcolorlcd=no]]
 +)
 +if test x"$withcolorlcd" != xno ; then
 +      AC_DEFINE(HAVE_COLORLCD, 1,[Define when using a 96x64 color display device])
 +fi
 +AM_CONDITIONAL(HAVE_COLORLCD, test x"$withcolorlcd" != xno)
 +
  AC_CHECK_HEADER(dreamdvd/ddvdlib.h,have_ddvdlib="yes",have_ddvdlib="no")
  if test x"${have_ddvdlib}" = xyes ; then
        AC_DEFINE(HAVE_DDVDLIB, 1,[Define if ddvdlib is available])
@@@ -99,43 -46,21 +90,22 @@@ AC_CHECK_HEADERS(gif_lib.h
                [AC_CHECK_LIB(gif,DGifOpen,
                        [AC_DEFINE(HAVE_LIUNBGIF,1)
                        LIBUNGIF_LIBS="-lgif"])]))
+ AC_SUBST(LIBUNGIF_LIBS)
  
- TUXBOX_APPS_LIB_PKGCONFIG(XML2,libxml-2.0)
- # ok, we are in trouble: XMLCCWRAP only defines C++ symbols. So let's just check if linking works,
- # and assume everything will be ok. Then just check for the "exit" symbol, which should be always there.
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
- AC_LANG_RESTORE
- if test "$withsdl" = "yes" ; then
-       _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(SDL,sdl,WITH_SDL)
-       if test "$WITH_SDL" = "no" ; then
-               TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config)
-               AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL])
-       fi
+ if test "$with_sdl" = "yes" ; then
+       PKG_CHECK_MODULES(SDL, sdl)
+       AC_DEFINE([WITH_SDL],[1],[Define to 1 if you have libsdl])
  fi
  # allow 'if WITH_SDL' conditionals in Makefile.am
- AM_CONDITIONAL(WITH_SDL, test "$WITH_SDL" = "yes")
+ AM_CONDITIONAL(WITH_SDL, test "$with_sdl" = "yes")
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ CXXFLAGS="$CXXFLAGS $BASE_CFLAGS $LIBUNGIF_CFLAGS $LIBXINE_CFLAGS $PTHREAD_CFLAGS $SDL_CFLAGS -fno-rtti -fno-exceptions -Wall"
+ LDFLAGS="$LDFLAGS $BASE_LDFLAGS $PYTHON_LDFLAGS $SDL_LDFLAGS $LIBUNGIF_LDFLAGS $LIBXINE_LDFLAGS"
  
- CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)'
- CPPFLAGS="$CPPFLAGS -D_REENTRANT $PYTHON_CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SDL_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS $DVBSI_CFLAGS $GSTREAMER_CFLAGS $GSTREAMERPBUTILS_CFLAGS $LIBXINE_CFLAGS $LIBUNGIF_CFLAGS"
  #CPPFLAGS="$CPPFLAGS -DMEMLEAK_CHECK"
 +CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall"
  
- #if test "$GCC" = "yes"
- #then
- #        gccmajor=`$CC -dumpversion | head -n 1 | awk '{print $NF;}' | cut -d. -f1`
- #        if test "$gccmajor" -gt "3"
- #        then
- #                CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics"
- #        fi
- #fi
- LDFLAGS="$LDFLAGS -pthread $PYTHON_LDFLAGS $SDL_LDFLAGS $GSTREAMER_LDFLAGS $GSTREAMERPBUTILS_LDFLAGS $LIBXINE_LDFLAGS $LIBUNGIF_LDFLAGS"
- #LDFLAGS="-rdynamic $LDFLAGS"
  TUXBOX_APPS_GETTEXT
  
  AC_CONFIG_FILES([
diff --cc lib/Makefile.am
@@@ -1,4 -1,18 +1,21 @@@
  SUBDIRS = actions base components dvb dvb_ci gdi service driver nav gui python mmi
 +#PLi changes:
 +SUBDIRS += network
+ noinst_LTLIBRARIES = libenigma.la
+ libenigma_la_SOURCES =
+ libenigma_la_LIBADD = \
+       $(top_builddir)/lib/actions/libenigma_actions.la \
+       $(top_builddir)/lib/base/libenigma_base.la \
+       $(top_builddir)/lib/components/libenigma_components.la \
+       $(top_builddir)/lib/driver/libenigma_driver.la \
+       $(top_builddir)/lib/mmi/libenigma_mmi.la \
+       $(top_builddir)/lib/dvb/libenigma_dvb.la \
+       $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.la \
+       $(top_builddir)/lib/gdi/libenigma_gdi.la \
+       $(top_builddir)/lib/gui/libenigma_gui.la \
+       $(top_builddir)/lib/python/libenigma_python.la \
+       $(top_builddir)/lib/nav/libenigma_nav.la \
 -      $(top_builddir)/lib/service/libenigma_service.la
++      $(top_builddir)/lib/service/libenigma_service.la \
++      $(top_builddir)/lib/network/libenigma_network.la
Simple merge
@@@ -1,6 -1,8 +1,8 @@@
  AM_CPPFLAGS = \
-       -I$(top_srcdir)/include
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h
  
- noinst_LIBRARIES = libenigma_components.a
+ noinst_LTLIBRARIES = libenigma_components.la
  
- libenigma_components_a_SOURCES = scan.cpp file_eraser.cpp tuxtxtapp.cpp
 -libenigma_components_la_SOURCES = scan.cpp file_eraser.cpp
++libenigma_components_la_SOURCES = scan.cpp file_eraser.cpp tuxtxtapp.cpp
@@@ -1,12 -1,14 +1,14 @@@
  SUBDIRS = lowlevel
  
  AM_CPPFLAGS = \
-       -I$(top_srcdir)/include
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h
  
- noinst_LIBRARIES = libenigma_dvb.a
+ noinst_LTLIBRARIES = libenigma_dvb.la
  
- libenigma_dvb_a_SOURCES = dvb.cpp demux.cpp frontend.cpp esection.cpp db.cpp \
+ libenigma_dvb_la_SOURCES = dvb.cpp demux.cpp frontend.cpp esection.cpp db.cpp \
        sec.cpp scan.cpp crc32.cpp pmt.cpp decoder.cpp eit.cpp rotor_calc.cpp \
        epgcache.cpp dvbtime.cpp metaparser.cpp volume.cpp tstools.cpp pvrparse.cpp \
 -      pesparse.cpp teletext.cpp radiotext.cpp subtitle.cpp
 -
 +      pesparse.cpp teletext.cpp radiotext.cpp subtitle.cpp cahandler.cpp \
 +      fastscan.cpp cablescan.cpp
  // use this for init Freetype...
  #include <ft2build.h>
  #include FT_FREETYPE_H
- #ifdef HAVE_FREETYPE2
  #define FTC_Image_Cache_New(a,b)      FTC_ImageCache_New(a,b)
 -#define FTC_Image_Cache_Lookup(a,b,c,d)       FTC_ImageCache_Lookup(a,b,c,d,NULL)
  #define FTC_SBit_Cache_New(a,b)               FTC_SBitCache_New(a,b)
  #define FTC_SBit_Cache_Lookup(a,b,c,d)        FTC_SBitCache_Lookup(a,b,c,d,NULL)
- #endif
  
  #include <lib/base/eerror.h>
  #include <lib/gdi/lcd.h>
@@@ -308,10 -245,9 +293,9 @@@ void addFont(const char *filename, cons
  
  DEFINE_REF(Font);
  
 -Font::Font(fontRenderClass *render, FTC_FaceID faceid, int isize, int tw): tabwidth(tw)
 +Font::Font(fontRenderClass *render, FTC_FaceID faceid, int isize, int tw, int renderflags): tabwidth(tw)
  {
        renderer=render;
- #ifdef HAVE_FREETYPE2
        font.face_id = faceid;
        font.width = isize;
        font.height = isize;
@@@ -626,36 -490,6 +591,35 @@@ int eTextPara::renderString(const char 
        if (!current_font)
                return -1;
  
 +      if (!current_face)
 +              eFatal("eTextPara::renderString: no current_face");
 +      if (!current_face->size)
 +              eFatal("eTextPara::renderString: no current_face->size");
 +
 +      if (cursor.y()==-1)
 +      {
 +              int height = current_face->size->metrics.height;
 +              int ascender = current_face->size->metrics.ascender;
 +              if (!height || !ascender)
 +              {
 +                      int ymax = FT_MulFix(current_face->bbox.yMax, current_face->size->metrics.y_scale);
 +                      if (!height)
 +                      {
 +                              /* some fonts don't have height filled in. Estimate it based on the bbox dimensions. */
 +                              /* For the first line we calculate the full boundingbox height, this gives the best result when centering vertically */
 +                              height = ymax - FT_MulFix(current_face->bbox.yMin, current_face->size->metrics.y_scale);
 +                      }
 +                      if (!ascender)
 +                      {
 +                              /* some fonts don't have ascender filled in. Estimate it based on the bbox dimensions. */
 +                              ascender = ymax;
 +                      }
 +              }
 +              totalheight = height >> 6;
 +              cursor=ePoint(area.x(), area.y()+(ascender>>6));
 +              left=cursor.x();
 +      }
 +
- #ifdef HAVE_FREETYPE2
        if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
                                    current_font->scaler.face_id,
                                    &current_face) < 0) ||
                eDebug("FTC_Manager_Lookup_Size failed!");
                return -1;
        }
- #else
-       if (&current_font->font.font != cache_current_font)
-       {
-               if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, &current_font->font.font, &current_face, &current_font->size)<0)
-               {
-                       eDebug("FTC_Manager_Lookup_Size failed!");
-                       return -1;
-               }
-               cache_current_font=&current_font->font.font;
-       }
- #endif
  
 -      if (!current_face)
 -              eFatal("eTextPara::renderString: no current_face");
 -      if (!current_face->size)
 -              eFatal("eTextPara::renderString: no current_face->size");
 -
 -      if (cursor.y()==-1)
 -      {
 -              cursor=ePoint(area.x(), area.y()+(current_face->size->metrics.ascender>>6));
 -              left=cursor.x();
 -      }
 -
        std::vector<unsigned long> uc_string, uc_visual;
        if (string)
                uc_string.reserve(strlen(string));
        shape(uc_shape, uc_string);
        
                // now do the usual logical->visual reordering
- #ifdef HAVE_FRIBIDI   
 -      int size=uc_shape.size();
        FriBidiCharType dir=FRIBIDI_TYPE_ON;
 -      uc_visual.resize(size);
 -      // gaaanz lahm, aber anders geht das leider nicht, sorry.
 -      FriBidiChar array[size], target[size];
 -      std::copy(uc_shape.begin(), uc_shape.end(), array);
 -      fribidi_log2vis(array, size, &dir, target, 0, 0, 0);
 -      uc_visual.assign(target, target+size);
 -
 -      glyphs.reserve(size);
 +      {
 +              int size=uc_shape.size();
 +              uc_visual.resize(size);
 +              // gaaanz lahm, aber anders geht das leider nicht, sorry.
 +              FriBidiChar array[size], target[size];
 +              std::copy(uc_shape.begin(), uc_shape.end(), array);
 +              fribidi_log2vis(array, size, &dir, target, 0, 0, 0);
 +              uc_visual.assign(target, target+size);
 +      }
- #else
-       uc_visual=uc_shape;
- #endif
 +
 +      glyphs.reserve(uc_visual.size());
        
        int nextflags = 0;
        
@@@ -859,10 -663,19 +808,8 @@@ nprint:  isprintable=0
        }
        bboxValid=false;
        calc_bbox();
- #ifdef HAVE_FRIBIDI
        if (dir & FRIBIDI_MASK_RTL)
 -      {
                realign(dirRight);
- #endif
 -              doTopBottomReordering=true;
 -      }
 -
 -      if (charCount)
 -      {
 -              lineOffsets.push_back(cursor.y());
 -              lineChars.push_back(charCount);
 -              charCount=0;
 -      }
 -
        return 0;
  }
  
diff --cc lib/gdi/font.h
@@@ -8,13 -8,11 +8,11 @@@
  #include FT_CACHE_H
  #include FT_CACHE_IMAGE_H
  #include FT_CACHE_SMALL_BITMAPS_H
 +#include FT_STROKER_H
  typedef FTC_ImageCache FTC_Image_Cache;
  typedef FTC_ImageTypeRec FTC_Image_Desc;
  typedef FTC_SBitCache FTC_SBit_Cache;
- #endif
  #include <vector>
 -#include <list>
  
  #include <lib/gdi/fb.h>
  #include <lib/gdi/esize.h>
@@@ -211,18 -189,10 +209,16 @@@ class Font: public iObjec
  {
        DECLARE_REF(Font);
  public:
- #ifdef HAVE_FREETYPE2
        FTC_ScalerRec scaler;
- #endif
        FTC_Image_Desc font;
        fontRenderClass *renderer;
 +#ifdef HAVE_FREETYPE2
 +      FT_Error getGlyphBitmap(FT_UInt glyph_index, FTC_SBit *sbit);
 +      FT_Error getGlyphImage(FT_UInt glyph_index, FT_Glyph *glyph, FT_Glyph *borderglyph, int bordersize);
 +#else
        FT_Error getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit);
 +      FT_Error getGlyphImage(FT_ULong glyph_index, FT_Glyph *glyph, FT_Glyph *borderglyph, int bordersize);
 +#endif
        FT_Face face;
        FT_Size size;
        
index f9677a1,0000000..73b5a3e
mode 100644,000000..100644
--- /dev/null
@@@ -1,9 -1,0 +1,9 @@@
 +INCLUDES = \
 +      -I$(top_srcdir)/include
 +
- noinst_LIBRARIES = libenigma_network.a
++noinst_LTLIBRARIES = libenigma_network.la
 +
- libenigma_network_a_SOURCES = \
++libenigma_network_la_SOURCES = \
 +      httpd.cpp http_dyn.cpp http_file.cpp http.cpp serversocket.cpp socket.cpp
 +
 +# xmlrpc.cpp