- from PLD
authorMarcin Krol <hawk@tld-linux.org>
Wed, 27 May 2015 09:12:49 +0000 (09:12 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 27 May 2015 09:12:49 +0000 (09:12 +0000)
gpac-amr.patch [new file with mode: 0644]
gpac-apps.patch [new file with mode: 0644]
gpac-ffmpeg-0.8.patch [new file with mode: 0644]
gpac-flags.patch [new file with mode: 0644]
gpac-install-is-not-clean.patch [new file with mode: 0644]
gpac-install.patch [new file with mode: 0644]
gpac-js.patch [new file with mode: 0644]
gpac-xulrunner.patch [new file with mode: 0644]
gpac.spec [new file with mode: 0644]
wxWidgets3.patch [new file with mode: 0644]

diff --git a/gpac-amr.patch b/gpac-amr.patch
new file mode 100644 (file)
index 0000000..4d011fc
--- /dev/null
@@ -0,0 +1,52 @@
+--- gpac/modules/amr_float_dec/Makefile.orig   2011-04-21 17:06:51.000000000 +0200
++++ gpac/modules/amr_float_dec/Makefile        2012-06-15 19:19:05.988610730 +0200
+@@ -18,19 +18,19 @@
+ #common obj
+ OBJS=../amr_dec/amr_in.o amr_float_dec.o
++AMR_LIBS=
++
+ #AMR NB obj
+ CFLAGS+=-DGPAC_HAS_AMR_FT
+ ifeq ($(CONFIG_AMR_NB_FT), yes)
+-OBJS+=./amr_nb_ft/interf_dec.o ./amr_nb_ft/interf_enc.o ./amr_nb_ft/sp_dec.o ./amr_nb_ft/sp_enc.o
++AMR_LIBS+=-lamrnb
+ endif
+ #AMR WB obj
+ CFLAGS+=-DGPAC_HAS_AMR_FT_WB
+ ifeq ($(CONFIG_AMR_WB_FT), yes)
+-OBJS+=./amr_wb_ft/dec_acelp.o ./amr_wb_ft/dec_dtx.o ./amr_wb_ft/dec_gain.o ./amr_wb_ft/dec_if.o ./amr_wb_ft/dec_lpc.o ./amr_wb_ft/dec_main.o \
+-      ./amr_wb_ft/dec_rom.o ./amr_wb_ft/dec_util.o ./amr_wb_ft/enc_acelp.o ./amr_wb_ft/enc_dtx.o ./amr_wb_ft/enc_gain.o ./amr_wb_ft/enc_if.o \
+-      ./amr_wb_ft/enc_lpc.o ./amr_wb_ft/enc_main.o ./amr_wb_ft/enc_rom.o ./amr_wb_ft/enc_util.o ./amr_wb_ft/if_rom.o 
++AMR_LIBS+=-lamrwb
+ endif
+@@ -45,7 +45,7 @@
+ $(LIB): $(OBJS)
+-      $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac
++      $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac $(AMR_LIBS)
+ %.o: %.c
+--- gpac/modules/amr_float_dec/amr_float_dec.c.orig    2012-03-28 14:43:41.000000000 +0200
++++ gpac/modules/amr_float_dec/amr_float_dec.c 2012-06-15 19:20:41.675273381 +0200
+@@ -45,12 +45,12 @@
+ #ifdef GPAC_HAS_AMR_FT
+ /*AMR WB*/
+-#include "amr_nb_ft/interf_dec.h"
++#include "amrnb/interf_dec.h"
+ #endif
+ #ifdef GPAC_HAS_AMR_FT_WB
+ /*AMR WB*/
+-#include "amr_wb_ft/dec_if.h"
++#include "amrwb/dec_if.h"
+ #endif
+ #endif
diff --git a/gpac-apps.patch b/gpac-apps.patch
new file mode 100644 (file)
index 0000000..e976018
--- /dev/null
@@ -0,0 +1,22 @@
+--- gpac/applications/Makefile.orig    2012-05-22 23:29:22.000000000 +0200
++++ gpac/applications/Makefile 2012-06-16 18:26:34.918450437 +0200
+@@ -17,15 +17,15 @@
+ INSTDIRS=mp4client
+ ifeq ($(CONFIG_XUL),no)
+ else
+-#INSTDIRS+=osmozilla
+-#APPDIRS+=osmozilla
++INSTDIRS+=osmozilla
++APPDIRS+=osmozilla
+ endif
+ #disable due to version incompatibilities
+ ifeq ($(USE_WXWIDGETS), yes)
+-#APPDIRS+=osmo4_wx
++APPDIRS+=osmo4_wx
+ #V4STUDIODIR=V4Studio
+-#INSTDIRS+=osmo4_wx
++INSTDIRS+=osmo4_wx
+ endif
+ ALLDIRS=$(APPDIRS)
diff --git a/gpac-ffmpeg-0.8.patch b/gpac-ffmpeg-0.8.patch
new file mode 100644 (file)
index 0000000..85b0334
--- /dev/null
@@ -0,0 +1,160 @@
+--- gpac/modules/ffmpeg_in/ffmpeg_decode.c.orig        2011-06-27 18:51:07.878588020 +0200
++++ gpac/modules/ffmpeg_in/ffmpeg_decode.c     2011-06-27 20:18:43.345430660 +0200
+@@ -24,6 +24,7 @@
+ #include "ffmpeg_in.h"
+ #include <gpac/avparse.h>
++#include <libavutil/avutil.h>
+ static AVCodec *ffmpeg_get_codec(u32 codec_4cc)
+ {
+@@ -111,7 +112,7 @@
+               bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ);
+               codec_id = gf_bs_read_u32(bs);
+               if (ffd->st==GF_STREAM_AUDIO) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
+                       ffd->ctx->sample_rate = gf_bs_read_u32(bs);
+                       ffd->ctx->channels = gf_bs_read_u16(bs);
+                       ffd->ctx->frame_size = gf_bs_read_u16(bs);
+@@ -121,7 +122,7 @@
+                       /*ffmpeg specific*/
+                       ffd->ctx->block_align = gf_bs_read_u16(bs);
+               } else if (ffd->st==GF_STREAM_VISUAL) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
+                       ffd->ctx->width = gf_bs_read_u16(bs);
+                       ffd->ctx->height = gf_bs_read_u16(bs);
+               }
+@@ -138,7 +139,7 @@
+               bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ);
+               codec_id = gf_bs_read_u32(bs);
+               if (ffd->st==GF_STREAM_AUDIO) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
+                       ffd->ctx->sample_rate = gf_bs_read_u32(bs);
+                       ffd->ctx->channels = gf_bs_read_u16(bs);
+                       ffd->ctx->frame_size = gf_bs_read_u16(bs);
+@@ -151,7 +152,7 @@
+                         ffd->ctx->frame_size = 160;
+                       }
+               } else if (ffd->st==GF_STREAM_VISUAL) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
+                       ffd->ctx->width = gf_bs_read_u16(bs);
+                       ffd->ctx->height = gf_bs_read_u16(bs);
+               }
+@@ -163,7 +164,7 @@
+       else {
+               u32 codec_id = 0;
+               if (ffd->st==GF_STREAM_VISUAL) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
+                       switch (ffd->oti) {
+                       case 0x20:
+                               codec_id = CODEC_ID_MPEG4;
+@@ -190,7 +191,7 @@
+                               break;
+                       }
+               } else if (ffd->st==GF_STREAM_AUDIO) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
+                       switch (ffd->oti) {
+                       case 0x69:
+                       case 0x6B:
+@@ -412,20 +413,20 @@
+       /*WARNING: this breaks H264 (and maybe others) decoding, disabled for now*/
+ #if 1
+-      if (!ffd->ctx->hurry_up) {
++      if (ffd->ctx->skip_frame < AVDISCARD_NONREF) {
+               switch (mmlevel) {
+               case GF_CODEC_LEVEL_SEEK:
+               case GF_CODEC_LEVEL_DROP:
+                       /*skip as much as possible*/
+-                      ffd->ctx->hurry_up = 5;
++                      ffd->ctx->skip_frame = AVDISCARD_NONKEY;
+                       break;
+               case GF_CODEC_LEVEL_VERY_LATE:
+               case GF_CODEC_LEVEL_LATE:
+                       /*skip B-frames*/
+-                      ffd->ctx->hurry_up = 1;
++                      ffd->ctx->skip_frame = AVDISCARD_NONREF;
+                       break;
+               default:
+-                      ffd->ctx->hurry_up = 0;
++                      ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
+                       break;
+               }
+       }
+@@ -451,7 +452,7 @@
+               if (len<0) { ffd->frame_start = 0; return GF_NON_COMPLIANT_BITSTREAM; }
+               if (gotpic<0) { ffd->frame_start = 0; return GF_OK; }
+-              ffd->ctx->hurry_up = 0;
++              ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
+               if (ffd->ctx->frame_size < gotpic) ffd->ctx->frame_size = gotpic;
+@@ -552,7 +553,7 @@
+                               }
+                       }
+               }
+-              ffd->ctx->hurry_up = 0;
++              ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
+               /*recompute outsize in case on-the-fly change*/
+               if ((w != ffd->ctx->width) || (h != ffd->ctx->height)) {
+                       outsize = ffd->ctx->width * ffd->ctx->height * 3;
+--- gpac/modules/ffmpeg_in/ffmpeg_demux.c.orig 2008-11-28 18:21:48.000000000 +0100
++++ gpac/modules/ffmpeg_in/ffmpeg_demux.c      2011-06-27 21:20:51.252222149 +0200
+@@ -31,6 +31,7 @@
+ #if !defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+ #include <errno.h>
+ #endif
++#include <libavutil/avutil.h>
+ static u32 FFDemux_Run(void *par)
+ {
+@@ -233,10 +234,10 @@
+     for(i = 0; i < ctx->nb_streams; i++) {
+         AVCodecContext *enc = ctx->streams[i]->codec;
+         switch(enc->codec_type) {
+-        case CODEC_TYPE_AUDIO:
++        case AVMEDIA_TYPE_AUDIO:
+             if (!has_audio) has_audio = 1;
+             break;
+-        case CODEC_TYPE_VIDEO:
++        case AVMEDIA_TYPE_VIDEO:
+             if (!has_video) has_video= 1;
+             break;
+         default:
+@@ -531,10 +532,10 @@
+       switch (i) {
+       case 0: e = GF_OK; break;
+-      case AVERROR_IO: e = GF_URL_ERROR; goto err_exit;
++      case AVERROR(EIO): e = GF_URL_ERROR; goto err_exit;
+       case AVERROR_INVALIDDATA: e = GF_NON_COMPLIANT_BITSTREAM; goto err_exit;
+-      case AVERROR_NOMEM: e = GF_OUT_OF_MEM; goto err_exit;
+-      case AVERROR_NOFMT: e = GF_NOT_SUPPORTED; goto err_exit;
++      case AVERROR(ENOMEM): e = GF_OUT_OF_MEM; goto err_exit;
++      case AVERROR(EILSEQ): e = GF_NOT_SUPPORTED; goto err_exit;
+       default: e = GF_SERVICE_ERROR; goto err_exit;
+       }
+@@ -552,13 +553,13 @@
+     for (i = 0; i < ffd->ctx->nb_streams; i++) {
+         AVCodecContext *enc = ffd->ctx->streams[i]->codec;
+         switch(enc->codec_type) {
+-        case CODEC_TYPE_AUDIO:
++        case AVMEDIA_TYPE_AUDIO:
+             if ((ffd->audio_st<0) && (ffd->service_type!=1)) {
+                               ffd->audio_st = i;
+                               ffd->audio_tscale = ffd->ctx->streams[i]->time_base;
+                       }
+             break;
+-        case CODEC_TYPE_VIDEO:
++        case AVMEDIA_TYPE_VIDEO:
+             if ((ffd->video_st<0) && (ffd->service_type!=2)) {
+                               ffd->video_st = i;
+                               ffd->video_tscale = ffd->ctx->streams[i]->time_base;
diff --git a/gpac-flags.patch b/gpac-flags.patch
new file mode 100644 (file)
index 0000000..3b7ece8
--- /dev/null
@@ -0,0 +1,40 @@
+--- gpac/applications/osmo4_wx/Makefile.orig   2012-06-17 07:51:02.389758176 +0200
++++ gpac/applications/osmo4_wx/Makefile        2012-06-17 08:25:05.746339091 +0200
+@@ -45,7 +45,7 @@
+ all: $(PROG)
+ Osmo4$(EXE): $(OBJS)
+-      $(CC) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) -L../../bin/gcc -lgpac $(WX_LFLAGS) $(LINKFLAGS)
++      $(CXX) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) -L../../bin/gcc -lgpac $(WX_LFLAGS) `pkg-config --libs gtk+-2.0` $(LINKFLAGS)
+ %.o: %.cpp
+       $(CXX) $(CFLAGS) $(WX_CFLAGS) -c -o $@ $< 
+--- gpac/src/Makefile.orig     2012-05-23 20:57:42.000000000 +0200
++++ gpac/src/Makefile  2012-06-15 20:44:50.881728154 +0200
+@@ -195,15 +195,6 @@
+ ## libgpac compositor compilation options
+ COMPOSITOR_CFLAGS=
+-## Add prefix before every lib
+-ifneq ($(prefix), /usr/local)
+-EXTRALIBS+=-L$(prefix)/lib
+-else
+-ifneq ($(prefix), /usr)
+-EXTRALIBS+=-L$(prefix)/lib
+-endif
+-endif
+-
+ ## OpenGL available
+ ifeq ($(HAS_OPENGL),yes)
+ EXTRALIBS+= $(OGL_LIBS)
+--- gpac/modules/jack/Makefile.orig    2012-04-05 14:38:11.000000000 +0200
++++ gpac/modules/jack/Makefile 2012-06-15 20:46:05.045058375 +0200
+@@ -25,7 +25,7 @@
+ all: $(LIB)
+ $(LIB): $(OBJS)
+-      $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib  -ljack
++      $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -ljack
+ %.o: %.c
diff --git a/gpac-install-is-not-clean.patch b/gpac-install-is-not-clean.patch
new file mode 100644 (file)
index 0000000..81bca57
--- /dev/null
@@ -0,0 +1,21 @@
+--- gpac/applications/osmo4_wx/Makefile.orig   2011-10-21 14:41:56.000000000 +0200
++++ gpac/applications/osmo4_wx/Makefile        2012-06-15 20:20:49.688455299 +0200
+@@ -67,7 +67,6 @@
+             $(DESTDIR)$(mac_apps)/Osmo4.app/Contents/MacOS
+       echo -n 'APPLOsm4' > $(DESTDIR)$(mac_apps)/Osmo4.app/Contents/PkgInfo
+ else
+-      rm -f wxOsmo4.o
+       mkdir -p $(DESTDIR)$(prefix)/bin
+       install -m 755 $(INSTFLAGS) ../../bin/gcc/Osmo4 "$(DESTDIR)$(prefix)/bin"
+ endif
+--- gpac/applications/mp4client/Makefile.orig  2011-05-20 19:11:05.000000000 +0200
++++ gpac/applications/mp4client/Makefile       2012-06-15 20:20:27.218456243 +0200
+@@ -44,7 +44,7 @@
+ clean: 
+       rm -f $(OBJS) ../../bin/gcc/$(PROG)
+-install: clean
++install:
+       install -m 755 $(INSTFLAGS) ../../bin/gcc/MP4Client "$(DESTDIR)$(prefix)/bin"
+ uninstall:
diff --git a/gpac-install.patch b/gpac-install.patch
new file mode 100644 (file)
index 0000000..099d77e
--- /dev/null
@@ -0,0 +1,48 @@
+--- gpac/Makefile.orig 2008-10-23 17:40:38.000000000 +0200
++++ gpac/Makefile      2011-02-05 07:18:41.996686361 +0100
+@@ -59,9 +59,6 @@
+ ifeq ($(CONFIG_WIN32),yes)
+       install $(INSTFLAGS) -m 755 bin/gcc/libgpac.dll $(prefix)/$(libdir)
+ else
+-ifeq ($(DEBUGBUILD),no)
+-      $(STRIP) bin/gcc/libgpac.$(DYN_LIB_SUFFIX)
+-endif
+ ifeq ($(CONFIG_DARWIN),yes)
+       install -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac-$(VERSION).$(DYN_LIB_SUFFIX)
+       ln -sf libgpac-$(VERSION).$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX)
+--- gpac/applications/osmozilla/Makefile.orig  2008-11-24 09:54:12.000000000 +0100
++++ gpac/applications/osmozilla/Makefile       2011-02-05 07:20:46.968690551 +0100
+@@ -6,10 +6,6 @@
+ USER_NAME=root
+ else
+ USER_NAME=$(shell whoami)
+-ifeq ($(USER_NAME), root)
+-else
+-MOZILLA_DIR=local
+-endif
+ endif
+ CFLAGS=$(CPPFLAGS) $(XUL_CFLAGS) -I$(SRC_PATH)/include
+@@ -68,19 +68,8 @@ ifeq ($(CONFIG_WIN32),yes)
+ endif
+ install: 
+-ifeq ($(MOZILLA_DIR), local)
+-ifeq ($(USER_NAME), root)
+-      @echo "*** Root cannot install local mozilla plugins! ***"
+-      @echo "*** Exit root mode and reinstall mozilla plugin! ***"
+-else
+-      $(MAKE) $(LIB)
+-      $(INSTALL) -D -m 755 ../../bin/gcc/$(LIB) "$(HOME)/.mozilla/plugins/$(LIB)"
+-      $(INSTALL) -D -m 755 ../../bin/gcc/nposmozilla.xpt "$(HOME)/.mozilla/components/nposmozilla.xpt"
+-endif
+-else
+-      $(INSTALL) -D -m 755 ../../bin/gcc/$(LIB) "$(MOZILLA_DIR)/components/$(LIB)"
+-      $(INSTALL) -D -m 755 ../../bin/gcc/nposmozilla.xpt "$(MOZILLA_DIR)/components/nposmozilla.xpt"
+-endif
++      $(INSTALL) -D -m 755 ../../bin/gcc/$(LIB) "$(MOZILLA_DIR)/$(LIB)"
++      $(INSTALL) -D -m 755 ../../bin/gcc/nposmozilla.xpt "$(MOZILLA_DIR)/nposmozilla.xpt"
+ uninstall:
+ ifeq ($(MOZILLA_DIR), local)
+
diff --git a/gpac-js.patch b/gpac-js.patch
new file mode 100644 (file)
index 0000000..f0e6498
--- /dev/null
@@ -0,0 +1,57 @@
+--- gpac/configure.orig        2012-06-15 21:26:23.188290228 +0200
++++ gpac/configure     2012-06-15 22:10:36.141512228 +0200
+@@ -727,11 +727,11 @@ EOF
+         #dc added
+     elif test "$pkg_config" != "no"; then
+         #try pkg-config
+-        if $pkg_config --exists mozilla-js 2> /dev/null  ; then
++        if $pkg_config --exists nomozilla-js 2> /dev/null  ; then
+             mozjs_pkgcfg="mozilla-js"
+-        elif $pkg_config --exists mozjs 2> /dev/null  ; then
++        elif $pkg_config --exists nomozjs 2> /dev/null  ; then
+             mozjs_pkgcfg="mozjs"
+-        elif $pkg_config --exists mozjs185 2> /dev/null  ; then
++        elif $pkg_config --exists nomozjs185 2> /dev/null  ; then
+             mozjs_pkgcfg="mozjs185"
+       fi
+@@ -699,29 +699,13 @@
+                 js_lib=`$pkg_config --libs mozilla-js`
+             fi
+         #try firefox folders (starting at ubuntu 11.10, no pkg-config)
+-        elif ls -d /usr/lib/firefox* > /dev/null 2>&1 ; then
+-            firefox_version=`cd /usr/lib ; ls -d firefox* | grep -v addons | grep -v devel ; cd - > /dev/null`
+-            for i in $firefox_version ; do
+-                if test "$has_js" = "no" ; then
+-                    js_inc="/usr/include/$i"
+-                    js_flags="-DXP_UNIX -I$js_inc"
+-                    js_lib="-L/usr/lib/$i/ -lxul -lmozsqlite3 -lmozalloc -lnssutil3 -lnss3 -lnspr4 -lsmime3"
+-                    if $cc -o $TMPO $TMPC $js_flags $js_lib 2> /dev/null  ; then
+-                        has_js="$i"
+-                    elif $cc -o $TMPO $TMPC $js_flags -lnssutil3 $js_lib -lssl3 2> /dev/null  ; then
+-                        #firefox 11 compatibility
+-                        has_js="$i"
+-                        js_lib="-lnssutil3 $js_lib -lssl3"
+-                    fi
+-                fi
+-            done
+         fi
+         if test "$has_js" = "no" ; then
+             #try prefix (DC)
+             js_inc="$prefix/include/js"
+             js_flags="-DXP_UNIX -I$prefix/include/js"
+-            if $cc -o $TMPO $TMPC $js_flags -L$prefix/lib -ljs -lpthread 2> /dev/null  ; then
++            if $cc -o $TMPO $TMPC $js_flags -ljs -lpthread 2> /dev/null  ; then
+                 has_js="prefix"
+                 #dc added end
+             else
+@@ -782,7 +766,7 @@
+         #try prefix (DC)
+         js_inc="$prefix/include/js"
+         js_flags="-DXP_UNIX -I$prefix/include/js"
+-        if $cc -o $TMPO $TMPC $js_flags -L$prefix/lib -ljs 2> /dev/null  ; then
++        if $cc -o $TMPO $TMPC $js_flags -ljs 2> /dev/null  ; then
+             has_js="prefix"
+             #dc added end
+         else
diff --git a/gpac-xulrunner.patch b/gpac-xulrunner.patch
new file mode 100644 (file)
index 0000000..7139b0c
--- /dev/null
@@ -0,0 +1,12 @@
+--- gpac/applications/osmozilla/osmo_npapi.cpp.orig    2012-04-04 17:04:39.000000000 +0200
++++ gpac/applications/osmozilla/osmo_npapi.cpp 2012-06-17 07:42:36.879779391 +0200
+@@ -372,7 +372,7 @@
+       /* explicit plugin call */ \\r
+       "application/x-gpac::GPAC plugin;" \\r
+  \r
+-char * NP_GetMIMEDescription(void)\r
++const char * NP_GetMIMEDescription(void)\r
+ {\r
+       return (char *) GPAC_PLUGIN_MIMETYPES;\r
+ }\r
+
diff --git a/gpac.spec b/gpac.spec
new file mode 100644 (file)
index 0000000..5ac4b0b
--- /dev/null
+++ b/gpac.spec
@@ -0,0 +1,267 @@
+# TODO:
+# - Platinum UPnP: http://www.plutinosoft.com/platinum
+# - AVCap: http://libavcap.sourceforge.net/
+# - OpenSVCDecoder: http://opensvcdecoder.sourceforge.net/
+# - libfreenect: http://openkinect.org/wiki/Main_Page
+#
+# Conditional build:
+%bcond_with    amr             # AMR-NB and AMR-WB (floating-point) support
+%bcond_without directfb        # DirectFB support
+%bcond_without faad            # AAC decoding support
+%bcond_without ffmpeg          # ffmpeg support
+%bcond_without freetype        # freetype support
+%bcond_without jpeg            # JPEG support
+%bcond_with    js              # JavaScript support
+%bcond_without mad             # MP3 support
+%bcond_without png             # PNG support
+%bcond_without xvid            # xvid support
+%bcond_without wx              # wxWidgets support
+%bcond_without plugin          # don't build xulrunner/firefox/iceweasel plugin
+#
+%define        snap    20141007
+#
+%ifarch x32
+%undefine      with_plugin
+%endif
+Summary:       GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-1)
+Summary(pl.UTF-8):     GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
+Name:          gpac
+Version:       0.5.0
+Release:       15.%{snap}.1
+License:       LGPL v2+
+Group:         Applications/Multimedia
+# Source0:     http://downloads.sourceforge.net/gpac/%{name}-%{version}.tar.gz
+Source0:       %{name}-%{snap}.tar.bz2
+# Source0-md5: 9e37b324e490d3118622d77bf238cb16
+Patch0:                %{name}-install.patch
+Patch1:                %{name}-xulrunner.patch
+Patch2:                %{name}-amr.patch
+Patch3:                %{name}-install-is-not-clean.patch
+Patch4:                %{name}-flags.patch
+Patch5:                wxWidgets3.patch
+Patch6:                %{name}-js.patch
+Patch7:                %{name}-apps.patch
+URL:           http://gpac.sourceforge.net/
+%{?with_directfb:BuildRequires:        DirectFB-devel}
+BuildRequires: OpenGL-GLU-devel
+BuildRequires: SDL-devel
+BuildRequires: a52dec-libs-devel
+BuildRequires: alsa-lib-devel >= 0.9
+%{?with_amr:BuildRequires:     amrnb-devel}
+%{?with_amr:BuildRequires:     amrwb-devel}
+%{?with_faad:BuildRequires:    faad2-devel}
+%{?with_ffmpeg:BuildRequires:  ffmpeg-devel >= 0.6}
+%{?with_freetype:BuildRequires:        freetype-devel}
+%{?with_wx:BuildRequires:      gtk+2-devel >= 2:2.20.1}
+BuildRequires: jack-audio-connection-kit-devel
+%{?with_js:BuildRequires:      js-devel < 2:1.8.5}
+%{?with_jpeg:BuildRequires:    libjpeg-devel}
+%{?with_mad:BuildRequires:     libmad-devel}
+BuildRequires: libogg-devel
+%{?with_png:BuildRequires:     libpng-devel}
+BuildRequires: libtheora-devel
+BuildRequires: libvorbis-devel
+BuildRequires: libxml2-devel
+BuildRequires: openjpeg-devel
+BuildRequires: openssl-devel
+BuildRequires: pkgconfig
+BuildRequires: pulseaudio-devel
+BuildRequires: rpmbuild(macros) >= 1.357
+BuildRequires: sed >= 4.0
+BuildRequires: unzip
+%{?with_wx:BuildRequires:      wxGTK2-unicode-devel >= 2.6.0}
+BuildRequires: xmlrpc-c-server-devel
+BuildRequires: xorg-lib-libXext-devel
+BuildRequires: xorg-lib-libXv-devel
+%{?with_plugin:BuildRequires:  xulrunner-devel >= 2:9.0.0}
+%{?with_xvid:BuildRequires:    xvid-devel}
+BuildRequires: zlib-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+GPAC is an implementation of the MPEG-4 Systems standard (ISO/IEC
+14496-1) developed from scratch in ANSI C.
+
+The main development goal is to provide a clean (a.k.a. readable by as
+many people as possible), small and flexible alternative to the MPEG-4
+Systems reference software (known as IM1 and distributed in ISO/IEC
+14496-5). The MPEG-4 Reference software is indeed a very large piece
+of software, designed to verify the standard rather than provide a
+small, production-stable software. GPAC is written in ANSI C for
+portability reasons (embedded platforms and DSPs) with a simple goal:
+keep the memory footprint as low as possible. The project will at term
+provide player(s), systems encoders and publishing tools for content
+distribution.
+
+%description -l pl.UTF-8
+GPAC to implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
+stworzona od zera w ANSI C.
+
+Głównym celem tworzenia jej jest dostarczenie czystej (tzn. czytelnej
+dla jak największej liczby ludzi), małej i elastycznej alternatywy dla
+wzorcowego oprogramowania MPEG-4 Systems (znanego jako IM1 i
+rozprowadzanego w ISO/IEC 14496-5). Wzorcowe oprogramowanie MPEG-4
+jest bardzo dużą porcją kodu, zaprojektowaną raczej do zweryfikowania
+standardu niż dostarczenia małej, stabilnej wersji produkcyjnej. GPAC
+jest pisany w ANSI C ze względu na przenośność (platformy wbudowane i
+DSP) z prostym celem: wymagać tak mało pamięci, jak to tylko możliwe.
+Projekt docelowo dostarczy odtwarzacz(e), kodery systemowe i narzędzia
+do publikacji w celu dystrybucji materiałów.
+
+%package devel
+Summary:       Header files for GPAC library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki GPAC
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for GPAC library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki GPAC.
+
+%package static
+Summary:       Static GPAC library
+Summary(pl.UTF-8):     Statyczna biblioteka GPAC
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static GPAC library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka GPAC.
+
+%package gui
+Summary:       wxWidgets-based GUI for GPAC
+Summary(pl.UTF-8):     Oparty na wxWidgets graficzny interfejs do GPAC
+Group:         X11/Applications/Multimedia
+Requires:      %{name} = %{version}-%{release}
+
+%description gui
+Osmo4 - wxWidgets-based GUI for GPAC.
+
+%description gui -l pl.UTF-8
+Osmo4 - oparty na wxWidgets graficzny interfejs do GPAC.
+
+%package -n browser-plugin-%{name}
+Summary:       GPAC browser plugin
+Summary(pl.UTF-8):     Wtyczka GPAC do przegląderek WWW
+Group:         X11/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      browser-plugins >= 2.0
+Requires:      browser-plugins(%{_target_base_arch})
+
+%description -n browser-plugin-%{name}
+GPAC plugin for Netscape-compatible WWW browsers.
+
+%description -n browser-plugin-%{name} -l pl.UTF-8
+Wtyczka GPAC dla przeglądarek WWW zgodnych z Netscape.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+
+sed -i -e 's/wx-config/wx-gtk2-unicode-config/' configure
+chmod a+x configure
+
+%build
+# not autoconf configure
+./configure \
+       --prefix=%{_prefix} \
+       --libdir=%{_lib} \
+       --mandir=%{_mandir} \
+       --X11-path=/usr \
+       --cc="%{__cc}" \
+       --cpp="%{__cxx}" \
+       --disable-opt \
+       %{!?with_wx:--disable-wx} \
+       %{?with_amr:--enable-amr} \
+       --enable-pic \
+       --extra-cflags="%{rpmcflags} -DFF_API_CLOSE_INPUT_FILE" \
+       --extra-ldflags="%{rpmldflags}" \
+       %{?with_plugin:--mozdir=%{_browserpluginsdir}} \
+       %{?with_plugin:--xulsdk-path="/usr/include/xulrunner -I/usr/include/nspr"} \
+       %{!?with_faad:--use-faad=no} \
+       %{!?with_ffmpeg:--use-ffmpeg=no} \
+       %{!?with_freetype:--use-ft=no} \
+       %{!?with_jpeg:--use-jpeg=no} \
+       %{!?with_js:--use-js=no} \
+       %{!?with_mad:--use-mad=no} \
+       %{!?with_png:--use-png=no} \
+       %{!?with_xvid:--use-xvid=no} \
+       --enable-joystick
+
+%{!?with_directfb: sed -i 's/CONFIG_DIRECTFB.*/CONFIG_DIRECTFB=no/' config.mak}
+
+%{__make} -j1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+
+%{__make} -j1 install install-lib \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%{__make} -j1 -C applications install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       MOZILLA_DIR=$RPM_BUILD_ROOT%{_browserpluginsdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%post -n browser-plugin-%{name}
+%update_browser_plugins
+
+%postun -n browser-plugin-%{name}
+if [ "$1" = 0 ]; then
+       %update_browser_plugins
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS BUGS Changelog README TODO
+%attr(755,root,root) %{_bindir}/MP4Box
+%attr(755,root,root) %{_bindir}/MP4Client
+%attr(755,root,root) %{_libdir}/libgpac.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgpac.so.3
+%dir %{_libdir}/gpac
+%attr(755,root,root) %{_libdir}/gpac/gm_*.so
+%{_datadir}/gpac
+%{_mandir}/man1/gpac.1*
+%{_mandir}/man1/mp4box.1*
+%{_mandir}/man1/mp4client.1*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgpac.so
+%{_includedir}/gpac
+%{_pkgconfigdir}/gpac.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libgpac_static.a
+
+%if %{with wx}
+%files gui
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/DashCast
+%attr(755,root,root) %{_bindir}/Osmo4
+%endif
+
+%if %{with plugin}
+%files -n browser-plugin-%{name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_browserpluginsdir}/nposmozilla.so
+%{_browserpluginsdir}/nposmozilla.xpt
+%endif
diff --git a/wxWidgets3.patch b/wxWidgets3.patch
new file mode 100644 (file)
index 0000000..e17c6ca
--- /dev/null
@@ -0,0 +1,255 @@
+diff -ur gpac/applications/osmo4_wx/Playlist.cpp gpac.wx3/applications/osmo4_wx/Playlist.cpp
+--- gpac/applications/osmo4_wx/Playlist.cpp    2010-07-28 17:53:09.000000000 +0200
++++ gpac.wx3/applications/osmo4_wx/Playlist.cpp        2014-01-18 19:00:08.102059900 +0100
+@@ -292,7 +292,7 @@
+ void wxPlaylist::OnAddFile(wxCommandEvent &WXUNUSED(event)) 
+ {
+-      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), m_pApp->GetFileFilter(), wxOPEN | wxCHANGE_DIR | /*wxHIDE_READONLY |*/ wxMULTIPLE);
++      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), m_pApp->GetFileFilter(), wxFD_OPEN | wxFD_CHANGE_DIR | /*wxFD_HIDE_READONLY |*/ wxFD_MULTIPLE);
+       if (dlg.ShowModal() == wxID_OK) {
+               wxArrayString stra;
+@@ -448,7 +448,7 @@
+       char szPath[GF_MAX_PATH];
+       if (!gf_list_count(m_entries)) return;
+-      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxSAVE | wxCHANGE_DIR | wxOVERWRITE_PROMPT);
++      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxFD_SAVE | wxFD_CHANGE_DIR | wxFD_OVERWRITE_PROMPT);
+       if (dlg.ShowModal() != wxID_OK) return;
+       strcpy(szPath, dlg.GetPath().mb_str(wxConvUTF8));
+@@ -497,7 +497,7 @@
+ void wxPlaylist::OnOpen(wxCommandEvent & WXUNUSED(event)) 
+ {
+-      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U & PLS Playlists|*.m3u;*.pls|M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxOPEN | wxCHANGE_DIR/* | wxHIDE_READONLY*/);
++      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U & PLS Playlists|*.m3u;*.pls|M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxFD_OPEN | wxFD_CHANGE_DIR/* | wxFD_HIDE_READONLY*/);
+       if (dlg.ShowModal() != wxID_OK) return;
+       Clear();
+diff -ur gpac/applications/osmo4_wx/wxOsmo4.cpp gpac.wx3/applications/osmo4_wx/wxOsmo4.cpp
+--- gpac/applications/osmo4_wx/wxOsmo4.cpp     2011-07-29 15:14:43.000000000 +0200
++++ gpac.wx3/applications/osmo4_wx/wxOsmo4.cpp 2014-01-18 18:59:09.155393660 +0100
+@@ -224,9 +224,9 @@
+ #if 0
+               /*log*/
+               if (evt->message.error)
+-                      ::wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(") ") + wxString(gf_error_to_string(evt->message.error), wxConvUTF8) );
++                      wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(") ") + wxString(gf_error_to_string(evt->message.error), wxConvUTF8) );
+               else
+-                      ::wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
++                      wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
+ #endif
+       }
+               break;
+@@ -286,7 +286,7 @@
+                       {
+                               wxGPACEvent wxevt(app);
+                               wxevt.gpac_evt = *evt;
+-                              app->AddPendingEvent(wxevt);
++                              app->GetEventHandler()->AddPendingEvent(wxevt);
+                       }
+                               break;
+                       }
+@@ -299,7 +299,7 @@
+               wxevt.gpac_evt.type = GF_EVENT_CONNECT;
+               wxevt.gpac_evt.connect.is_connected = evt->connect.is_connected;
+               if (!evt->connect.is_connected) app->m_duration = 0;
+-              app->AddPendingEvent(wxevt);
++              app->GetEventHandler()->AddPendingEvent(wxevt);
+       }
+               break;
+       case GF_EVENT_NAVIGATE:
+@@ -307,7 +307,7 @@
+               wxGPACEvent wxevt(app);
+               wxevt.to_url = wxString(evt->navigate.to_url, wxConvUTF8);
+               wxevt.gpac_evt.type = evt->type;
+-              app->AddPendingEvent(wxevt);
++              app->GetEventHandler()->AddPendingEvent(wxevt);
+       }
+               return 1;
+       case GF_EVENT_SET_CAPTION:
+@@ -315,7 +315,7 @@
+               wxGPACEvent wxevt(app);
+               wxevt.to_url = wxString(evt->caption.caption, wxConvUTF8);
+               wxevt.gpac_evt.type = evt->type;
+-              app->AddPendingEvent(wxevt);
++              app->GetEventHandler()->AddPendingEvent(wxevt);
+       }
+               return 1;
+@@ -327,7 +327,7 @@
+       {
+               wxGPACEvent wxevt(app);
+               wxevt.gpac_evt = *evt;
+-              app->AddPendingEvent(wxevt);
++              app->GetEventHandler()->AddPendingEvent(wxevt);
+       }
+               break;
+       case GF_EVENT_DBLCLICK:
+@@ -536,7 +536,7 @@
+     wxString abs_gpac_path = wxT("");
+       char *gpac_cfg, *sep;
+-      ::wxLogMessage(wxT("Looking for GPAC configuration file"));
++      wxLogMessage(wxT("Looking for GPAC configuration file"));
+       /*load config*/
+       Bool first_launch = 0;
+@@ -565,7 +565,7 @@
+       gf_sys_init(0);
+-      ::wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
++      wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
+       m_user.modules = gf_modules_new(str, m_user.config);
+       /*initial launch*/
+@@ -591,12 +591,12 @@
+-      ::wxLogMessage(wxT("%d modules found:"), gf_modules_get_count(m_user.modules));
++      wxLogMessage(wxT("%d modules found:"), gf_modules_get_count(m_user.modules));
+       for (u32 i=0; i<gf_modules_get_count(m_user.modules); i++) {
+-              ::wxLogMessage(wxT("\t") + wxString(gf_modules_get_file_name(m_user.modules, i), wxConvUTF8) );
++              wxLogMessage(wxT("\t") + wxString(gf_modules_get_file_name(m_user.modules, i), wxConvUTF8) );
+       }
+-      ::wxLogMessage(wxT("Starting GPAC Terminal"));
++      wxLogMessage(wxT("Starting GPAC Terminal"));
+       /*now load terminal*/
+       m_user.opaque = this;
+       m_user.EventProc = GPAC_EventProc;
+@@ -608,7 +608,7 @@
+               wxMessageDialog(NULL, wxT("Fatal Error"), wxT("Cannot load GPAC Terminal"), wxOK).ShowModal();
+               return 0;
+       } else {
+-              ::wxLogMessage(wxT("GPAC Terminal started") );
++              wxLogMessage(wxT("GPAC Terminal started") );
+       }
+       return 1;
+ }
+@@ -877,7 +877,7 @@ wxOsmo4Frame::wxOsmo4Frame() :
+       sOpt = gf_cfg_get_key(m_user.config, "Audio", "DriverName");
+       if (!strcmp(sOpt, "No Audio Output Available")) {
+-              ::wxLogMessage(wxT("WARNING: no audio output availble - make sure no other program is locking the sound card"));
++              wxLogMessage(wxT("WARNING: no audio output availble - make sure no other program is locking the sound card"));
+               SetStatus(wxT("No audio ouput available"));
+       } else {
+@@ -1137,7 +1137,7 @@
+ void wxOsmo4Frame::OnFileOpen(wxCommandEvent & WXUNUSED(event))
+ {
+-      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), GetFileFilter(), wxOPEN | wxMULTIPLE | wxCHANGE_DIR /*| wxHIDE_READONLY*/);
++      wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), GetFileFilter(), wxFD_OPEN | wxFD_MULTIPLE | wxFD_CHANGE_DIR /*| wxHIDE_READONLY*/);
+       if (dlg.ShowModal() != wxID_OK) return;
+@@ -1900,7 +1900,7 @@
+               evt.SetEventType(wxEVT_COMMAND_COMBOBOX_SELECTED);
+               evt.SetEventObject(this);
+               evt.SetId(GetId());
+-              GetParent()->AddPendingEvent(evt);
++              GetParent()->GetEventHandler()->AddPendingEvent(evt);
+       }
+ }
+@@ -2135,7 +2135,7 @@
+ void wxOsmo4Frame::OnAddSub(wxCommandEvent &WXUNUSED(event))
+ {
+-      wxFileDialog dlg(this, wxT("Add Subtitle"), wxT(""), wxT(""), wxT("All Subtitles|*.srt;*.ttxt|SRT Subtitles|*.srt|3GPP TimedText|*.ttxt|"), wxOPEN | wxCHANGE_DIR /* | wxHIDE_READONLY*/);
++      wxFileDialog dlg(this, wxT("Add Subtitle"), wxT(""), wxT(""), wxT("All Subtitles|*.srt;*.ttxt|SRT Subtitles|*.srt|3GPP TimedText|*.ttxt|"), wxFD_OPEN | wxFD_CHANGE_DIR /* | wxHIDE_READONLY*/);
+       if (dlg.ShowModal() == wxID_OK) {
+               AddSubtitle(dlg.GetPath().mb_str(wxConvUTF8), 1);
+--- gpac/applications/osmo4_wx/wxGPACControl.cpp~      2014-10-07 23:09:59.000000000 +0200
++++ gpac/applications/osmo4_wx/wxGPACControl.cpp       2014-10-07 23:36:33.313608359 +0200
+@@ -398,7 +398,7 @@
+       /*audio dec enum*/
+       sOpt = gf_cfg_get_key(cfg, "Systems", "DefAudioDec");
+-      u32 count = gf_modules_get_count(m_pApp->m_user.modules);
++      count = gf_modules_get_count(m_pApp->m_user.modules);
+       GF_BaseDecoder *ifc_d;
+       select = 0;
+       s32 to_sel = 0;
+
+--- gpac/applications/osmo4_wx/menubtn.cpp~    2014-10-07 23:09:59.000000000 +0200
++++ gpac/applications/osmo4_wx/menubtn.cpp     2014-10-07 23:42:37.356710868 +0200
+@@ -86,7 +86,7 @@ bool wxCustomButton::Create(wxWindow* pa
+       wxSize bestSize = DoGetBestSize();
+       SetSize(wxSize(size.x<0 ? bestSize.x:size.x, size.y<0 ? bestSize.y:size.y));
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+       SetBestSize(GetSize());
+ #else
+       SetInitialSize(GetSize());
+@@ -161,7 +161,7 @@ void wxCustomButton::OnMouseEvents(wxMou
+               m_eventType = wxEVT_LEFT_UP;
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+               if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
+ #else
+               if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
+@@ -200,7 +200,7 @@ void wxCustomButton::OnMouseEvents(wxMou
+               m_eventType = wxEVT_RIGHT_UP;
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+               if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
+ #else
+               if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
+@@ -319,7 +319,7 @@ void wxCustomButton::Redraw()
+ void wxCustomButton::Paint( wxDC &dc )
+ {
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+       dc.BeginDrawing();
+ #endif
+@@ -407,7 +407,7 @@ void wxCustomButton::Paint( wxDC &dc )
+       dc.SetBackground(wxNullBrush);
+       dc.SetBrush(wxNullBrush);
+       dc.SetPen(wxNullPen);
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+       dc.EndDrawing();
+ #endif
+ }
+@@ -580,7 +580,7 @@ public:
+               {
+                       wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+                       if (GetRect().Inside(p) || labelBut->GetRect().Inside(p))
+ #else
+                       if (GetRect().Contains(p) || labelBut->GetRect().Contains(p))
+@@ -628,7 +628,7 @@ public:
+               {
+                       wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+                       if (GetRect().Inside(p) || dropBut->GetRect().Inside(p))
+ #else
+                       if (GetRect().Contains(p) || dropBut->GetRect().Contains(p))
+@@ -706,7 +706,7 @@ bool wxMenuButton::Create( wxWindow* par
+       SetSize( wxSize(size.x < 0 ? bestSize.x : size.x,
+                       size.y < 0 ? bestSize.y : size.y) );
+-#if (wxMINOR_VERSION<8)
++#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
+       SetBestSize(GetSize());
+ #else
+       SetInitialSize(GetSize());