[109933] users/mojca/wxports/x11/xchm

mojca at macports.org mojca at macports.org
Thu Aug 22 02:54:39 PDT 2013


Revision: 109933
          https://trac.macports.org/changeset/109933
Author:   mojca at macports.org
Date:     2013-08-22 02:54:39 -0700 (Thu, 22 Aug 2013)
Log Message:
-----------
mojca/xchm: it seems to work with ok with wxWidgets 2.9 after a few patches

Modified Paths:
--------------
    users/mojca/wxports/x11/xchm/Portfile
    users/mojca/wxports/x11/xchm/files/patch-src-chmhtmlwindow.cpp.diff

Added Paths:
-----------
    users/mojca/wxports/x11/xchm/files/patch-src-Makefile.diff

Modified: users/mojca/wxports/x11/xchm/Portfile
===================================================================
--- users/mojca/wxports/x11/xchm/Portfile	2013-08-22 09:52:58 UTC (rev 109932)
+++ users/mojca/wxports/x11/xchm/Portfile	2013-08-22 09:54:39 UTC (rev 109933)
@@ -2,6 +2,7 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           app 1.0
 PortGroup           wxWidgets 1.0
 
 name                xchm
@@ -22,53 +23,28 @@
 checksums           rmd160  28727c08049fb0a338433ce9ae1989a61e7a1884 \
                     sha256  30801106d5ce08481c97084a540cb7a67fb271a27e95ca61170063c6cc134559
 
-depends_lib         port:chmlib
+set icon_name       xchm-128
+app.name            xCHM
+app.executable      xchm
+app.icon            ${worksrcpath}/art/${icon_name}.png
 
-patchfiles          patch-src-chmhtmlwindow.cpp.diff
+wxWidgets.use       wxWidgets-3.0
 
-variant wxwidgets30 conflicts wxgtk28 wxwidgets28 description {Use wxWidgets 2.9 (experimental)} {
-    wxWidgets.use           wxWidgets-3.0
-    depends_lib-append      port:${wxWidgets.port}
-    configure.args-append   --with-wxdir=${wxWidgets.wxdir}
-}
+depends_lib         port:chmlib \
+                    port:${wxWidgets.port}
 
-variant wxwidgets28 conflicts wxgtk28 wxwidgets30 description {Use 32-bit Carbon-based wxWidgets 2.8} {
-    wxWidgets.use           wxWidgets-2.8
-    depends_lib-append      port:${wxWidgets.port}
-    configure.args-append   --with-wxdir=${wxWidgets.wxdir}
-}
+# TODO: ImageMagick is only needed to convert the image to png
+# if there is a more lightweight program to do the same, that one should be used
+# or the icon as png/icns should be fetched from elsewhere, for example from
+# http://xchm.cvs.sourceforge.net/viewvc/xchm/xchm/art/xchm-128.png?revision=1.1
+depends_build-append port:ImageMagick
+depends_skip_archcheck-append ImageMagick
 
-variant wxgtk28 conflicts wxwidgets28 wxwidgets30 description {Use wxWidgets 2.8 with GTK} {
-    wxWidgets.use           wxGTK-2.8
-    depends_lib-append      port:${wxWidgets.port}
-    configure.args-append   --with-wxdir=${wxWidgets.wxdir}
-}
+patchfiles          patch-src-chmhtmlwindow.cpp.diff \
+                    patch-src-Makefile.diff
 
-# - this seems to work nice with wxWidgets 2.8
-# - wxWidgets 2.9 support is experimental
-# - the reason for excluding wxGTK is the following mystery when trying to launch the app:
-#   LSOpenURLsWithRole() failed with error -10810 for the file /Applications/MacPorts/xCHM.app
-if {![variant_isset wxgtk28]} {
-    PortGroup               app 1.0
-    set icon_name           xchm-128
-    app.name                xCHM
-    app.executable          xchm
-    app.icon                ${worksrcpath}/art/${icon_name}.png
-    # TODO: ImageMagick is only needed to convert the image to png
-    # if there is a more lightweight program to do the same, that one should be used
-    # or the icon as png/icns should be fetched from elsewhere
-    depends_build-append    port:ImageMagick
-    depends_skip_archcheck-append \
-                            ImageMagick
-    post-build {
-        system -W ${worksrcpath}/art "${prefix}/bin/convert ${icon_name}.xpm ${icon_name}.png"
-    }
-}
+configure.args      --with-wxdir=${wxWidgets.wxdir}
 
-if {![variant_isset wxwidgets30] && ![variant_isset wxwidgets28] && ![variant_isset wxgtk28]} {
-    if {[vercmp $xcodeversion 4.4] >= 0} {
-        default_variants +wxgtk28
-    } else {
-        default_variants +wxwidgets28
-    }
+post-build {
+    system -W ${worksrcpath}/art "${prefix}/bin/convert ${icon_name}.xpm ${icon_name}.png"
 }

Added: users/mojca/wxports/x11/xchm/files/patch-src-Makefile.diff
===================================================================
--- users/mojca/wxports/x11/xchm/files/patch-src-Makefile.diff	                        (rev 0)
+++ users/mojca/wxports/x11/xchm/files/patch-src-Makefile.diff	2013-08-22 09:54:39 UTC (rev 109933)
@@ -0,0 +1,40 @@
+avoid problems with spantag.cpp
+--- src/Makefile.am.orig
++++ src/Makefile.am
+@@ -4,7 +4,7 @@ bin_PROGRAMS = xchm
+ xchm_SOURCES = chmapp.cpp chmfile.cpp chmframe.cpp chmfshandler.cpp \
+ 	chminputstream.cpp chmfontdialog.cpp chmhtmlnotebook.cpp \
+ 	chmsearchpanel.cpp chmhtmlwindow.cpp chmfinddialog.cpp \
+-	chmindexpanel.cpp chmlistctrl.cpp spantag.cpp hhcparser.cpp
++	chmindexpanel.cpp chmlistctrl.cpp hhcparser.cpp
+ 
+ noinst_HEADERS = chmapp.h chmfile.h chmframe.h chmfshandler.h \
+ 	chminputstream.h chmfontdialog.h chmhtmlnotebook.h \
+--- src/Makefile.in.orig
++++ src/Makefile.in
+@@ -61,7 +61,7 @@ am_xchm_OBJECTS = chmapp.$(OBJEXT) chmfile.$(OBJEXT) \
+ 	chmhtmlnotebook.$(OBJEXT) chmsearchpanel.$(OBJEXT) \
+ 	chmhtmlwindow.$(OBJEXT) chmfinddialog.$(OBJEXT) \
+ 	chmindexpanel.$(OBJEXT) chmlistctrl.$(OBJEXT) \
+-	spantag.$(OBJEXT) hhcparser.$(OBJEXT)
++	hhcparser.$(OBJEXT)
+ xchm_OBJECTS = $(am_xchm_OBJECTS)
+ xchm_DEPENDENCIES =
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+@@ -203,7 +203,7 @@ INCLUDES = -I$(top_srcdir)/art
+ xchm_SOURCES = chmapp.cpp chmfile.cpp chmframe.cpp chmfshandler.cpp \
+ 	chminputstream.cpp chmfontdialog.cpp chmhtmlnotebook.cpp \
+ 	chmsearchpanel.cpp chmhtmlwindow.cpp chmfinddialog.cpp \
+-	chmindexpanel.cpp chmlistctrl.cpp spantag.cpp hhcparser.cpp
++	chmindexpanel.cpp chmlistctrl.cpp hhcparser.cpp
+ 
+ noinst_HEADERS = chmapp.h chmfile.h chmframe.h chmfshandler.h \
+ 	chminputstream.h chmfontdialog.h chmhtmlnotebook.h \
+@@ -290,7 +290,6 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/chmlistctrl.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/chmsearchpanel.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hhcparser.Po at am__quote@
+- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/spantag.Po at am__quote@
+ 
+ .cpp.o:
+ @am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \

Modified: users/mojca/wxports/x11/xchm/files/patch-src-chmhtmlwindow.cpp.diff
===================================================================
--- users/mojca/wxports/x11/xchm/files/patch-src-chmhtmlwindow.cpp.diff	2013-08-22 09:52:58 UTC (rev 109932)
+++ users/mojca/wxports/x11/xchm/files/patch-src-chmhtmlwindow.cpp.diff	2013-08-22 09:54:39 UTC (rev 109933)
@@ -1,11 +1,11 @@
---- src/chmhtmlwindow.cpp
+avoid a crash with wxWidgets 2.9 at startup
+--- src/chmhtmlwindow.cpp.orig
 +++ src/chmhtmlwindow.cpp
-@@ -446,7 +446,7 @@ void CHMHtmlWindow::OnSetTitle(const wxString& title)
+@@ -446,7 +446,6 @@ void CHMHtmlWindow::OnSetTitle(const wxString& title)
  	if(parent)
  		parent->OnChildrenTitleChanged(title);
  
 -	wxHtmlWindow::OnSetTitle(title);
-+	// wxHtmlWindow::OnSetTitle(title);
  }
  
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130822/8a6c70ac/attachment-0001.html>


More information about the macports-changes mailing list