[MacPorts] #24350: proposed new Portfiles for wxWidgets and wxPython

MacPorts noreply at macports.org
Thu Jun 10 05:48:39 PDT 2010


#24350: proposed new Portfiles for wxWidgets and wxPython
-------------------------------+--------------------------------------------
 Reporter:  jjstickel@…        |       Owner:  macports-tickets@…                   
     Type:  enhancement        |      Status:  new                                  
 Priority:  Normal             |   Milestone:                                       
Component:  ports              |     Version:  1.8.2                                
 Keywords:                     |        Port:  wxWidgets-python py26-wxpython       
-------------------------------+--------------------------------------------

Comment(by totonixsame@…):

 Hi all,

 I tried to install wxpython using this portfile with carbon variant, but I
 had this problem:

 {{{

 /Applications/wxMac/osx-build/bk-deps g++ -c -o corelib_webkit.o
 -I./.pch/wxprec_corelib -D__WXMAC__ -I../src/tiff -I../src/jpeg
 -I../src/png -DwxUSE_BASE=0 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
 -I/Applications/wxMac/osx-build/lib/wx/include/mac-ansi-release-static-2.8
 -I../include -fpascal-strings -I../src/mac/carbon/morefilex
 -I/Developer/Headers/FlatCarbon -Wall -Wundef -Wno-ctor-dtor-privacy -O2
 -fno-strict-aliasing ../src/html/htmlctrl/webkit/webkit.mm
 ../src/html/htmlctrl/webkit/webkit.mm: In function ‘wxString
 wxStringWithNSString(NSString*)’:
 ../src/html/htmlctrl/webkit/webkit.mm:335: warning: ‘lossyCString’ is
 deprecated (declared at
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:368)
 ../src/html/htmlctrl/webkit/webkit.mm: In function ‘NSString*
 wxNSStringWithWxString(const wxString&)’:
 ../src/html/htmlctrl/webkit/webkit.mm:344: warning:
 ‘stringWithCString:length:’ is deprecated (declared at
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:385)
 ../src/html/htmlctrl/webkit/webkit.mm: In member function ‘bool
 wxWebKitCtrl::Create(wxWindow*, wxWindowID, const wxString&, const
 wxPoint&, const wxSize&, long int, const wxValidator&, const wxString&)’:
 ../src/html/htmlctrl/webkit/webkit.mm:439: error: ‘WebInitForCarbon’ was
 not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm:440: error: ‘HIWebViewCreate’ was
 not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm:442: error: ‘HIWebViewGetWebView’
 was not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm:445: error: ‘HIViewSetVisible’ was
 not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm:449: error: ‘HIViewChangeFeatures’
 was not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm:451: error:
 ‘GetControlEventTarget’ was not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm: In member function ‘void
 wxWebKitCtrl::OnSize(wxSizeEvent&)’:
 ../src/html/htmlctrl/webkit/webkit.mm:726: error: ‘HIViewGetRoot’ was
 not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm:726: error: ‘HIViewConvertRect’
 was not declared in this scope
 ../src/html/htmlctrl/webkit/webkit.mm: In member function ‘virtual void
 wxWebKitCtrl::MacVisibilityChanged()’:
 ../src/html/htmlctrl/webkit/webkit.mm:754: error: ‘IsControlVisible’ was
 not declared in this scope
 make: *** [corelib_webkit.o] Error 1
 }}}

 Then I tried to change the portfile, and it works! The diferences are
 between lines 88-92, the CFLAGS, LDFLAGS ... Here comes my portfile, or if
 you prefer [http://paste.pocoo.org/show/223888/]:


 {{{
 # -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c
 -basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
 # $Id: Portfile 67817 2010-05-18 22:24:02Z macsforever2000 at macports.org $

 PortSystem      1.0
 PortGroup       archcheck 1.0

 name            wxWidgets-python
 conflicts       wxgtk
 version         2.8.10.1
 categories      graphics devel
 platforms       darwin
 maintainers     nomaintainer

 description     mature cross-platform C++ GUI framework
 long_description    wxWidgets is a mature open-source cross-platform C++ \
     GUI framework for Mac OS, Unix, Linux, Windows. It can \
     make use of a variety of native widget sets as well as \
     its own widget set: Mac OS, GTK+, Motif, WIN32. \
     wxWidgets will even run on embedded systems using \
     Linux and X11.  This port version is meant to be in sync with
 py*-wxpython.

 homepage        http://www.wxwidgets.org/
 distname        wxWidgets
 master_sites    sourceforge:wxpython

 use_bzip2       yes

 distname        wxPython-src
 distfiles       ${distname}-${version}${extract.suffix}
 checksums           md5     65d5ef166f23fe8b4c67f58df164f93e \
                     sha1    6598fbafd979a91f20100171fa23a91779f6dc62 \
                     rmd160  bb606046d140623041b988e64ab268ced9aa958f

 depends_lib \
     port:jpeg \
     port:tiff \
     port:libpng \
     port:zlib \
     port:libiconv \
     port:expat \
     path:lib/pkgconfig/sdl.pc:libsdl \
     port:libsdl_mixer

 archcheck.files lib/libjpeg.dylib \
                 lib/libtiff.dylib \
                 lib/libpng.dylib \
                 lib/libz.dylib \
                 lib/libiconv.dylib \
                 lib/libexpat.dylib \
                 lib/libSDL.dylib \
                 lib/libSDL_mixer.dylib

 set worksrcdir  ${distname}-${version}/build

 extract.only    ${distname}-${version}${extract.suffix}

 patchfiles  changeset_r61009.diff
 patch.dir   ${workpath}/${distname}-${version}
 patch.pre_args  -p4

 configure.cmd       ../configure
 configure.ldflags   -L${build.dir}/lib -L${prefix}/lib
 configure.args      --mandir=${prefix}/share/man \
                     --with-libiconv-prefix=${prefix} \
                     --with-libjpeg \
                     --with-libtiff \
                     --with-libpng \
                     --with-zlib \
                     --with-sdl \
                     --with-opengl \
                     --disable-sdltest \
                     --enable-unicode \
                     --enable-display \
                     --enable-monolithic

 set contrib         "gizmos stc ogl"
 set installtype     release

 build.target

 universal_variant   no
 use_parallel_build  no

 variant carbon conflicts gtk description {use carbon} {
     configure.args-append --with-mac
     if {$build_arch == "x86_64"} {
         configure.build_arch i386
         configure.cflags-append -arch i386
         configure.ldflags-append -arch i386
         configure.cxxflags-append -arch i386
         configure.cppflags-append -arch i386
         configure.objcflags-append -arch i386
     } elseif {$build_arch == "ppc64"} {
         configure.build_arch ppc
     }
     if {![info exists configure.ld_archflags]} {
         eval configure.ldflags-append ${configure.cc_archflags}
     }
 }
 variant gtk conflicts carbon description {use gtk} {
     depends_lib-append    port:gtk2
     depends_lib-delete    path:lib/pkgconfig/sdl.pc:libsdl
     depends_lib-delete    port:libsdl_mixer
     configure.args-delete --with-sdl
     configure.args-append --with-gtk
 }
 variant nonmonolithic description {build libraries separately} {
     configure.args-delete   --enable-monolithic
 }
 variant debug description {add debug info to libraries} {
     configure.args-append   --enable-debug
     set installtype debug
 }
 if {![variant_isset carbon]} {
     default_variants-append +gtk
 }

 post-configure {
     if {[variant_isset gtk]} {
         # for some reason, 'configure --with-gtk' does not specify to link
 the X11 opengl libs
         # not sure what happens if quartz variant of gtk2 is used
         reinplace "s|EXTRALIBS_OPENGL = |EXTRALIBS_OPENGL = -lGL -lGLU
 -lglut|g" ${worksrcpath}/Makefile
     }
 }
 post-build {
     foreach c { ${contrib} } {
         system "cd ${build.dir} && make -C contrib/src/${c}"
     }
 }
 post-destroot {
     foreach c { ${contrib} } {
         system "cd ${build.dir} && make -C contrib/src/${c} install
 ${destroot.destdir}"
     }
     xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
     #xinstall -m 644 -W ${workpath}/${distname}-${version} \
     #    install-mac.txt install-mgl.txt install-motif.txt \
     #    INSTALL-OS2.txt install-x11.txt readme-cocoa.txt \
     #    readme-gtk.txt readme-mac.txt \
     #    readme-mgl.txt readme-motif.txt readme-x11.txt \
     #    ${destroot}${prefix}/share/doc/${name}
     if {[variant_isset carbon]} {
         set confscript ${prefix}/lib/wx/config/mac-
 unicode-${installtype}-2.8
     }
     if {[variant_isset gtk]} {
         set confscript
 ${prefix}/lib/wx/config/gtk2-unicode-${installtype}-2.8
     }
     reinplace "s|-L${build.dir}/lib||" ${destroot}${confscript}
     ln -sf ${confscript} ${destroot}${prefix}/bin/wx-config
 }

 livecheck.type      regex
 livecheck.url       ${homepage}/downloads/
 livecheck.regex     Current Stable Release.*(2\\.\[0-9\]\\.\[0-9\]+)
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/24350#comment:27>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list