[54045] trunk/dports/devel
Ryan Schmidt
ryandesign at macports.org
Sun Jul 19 23:00:21 PDT 2009
On Jul 19, 2009, at 14:14, jameskyle at macports.org wrote:
> Revision: 54045
> http://trac.macports.org/changeset/54045
> Author: jameskyle at macports.org
> Date: 2009-07-19 12:14:08 -0700 (Sun, 19 Jul 2009)
> Log Message:
> -----------
> Provides drivers and development files for activewire board.
Just a few comments:
> +maintainers
I see you already fixed this; thanks. All ports must list a
maintainer listed. If nobody wants to maintain the port, you can put
"nomaintainer".
> +use_bzip2 no
No need for this line; that's already the default.
> +extract.suffix .dmg
> +extract {
> + file mkdir /tmp/${distname}
> + system "hdiutil attach ${distpath}/${distname}.dmg -private -
> nobrowse -mountpoint /tmp/${distname}"
> +
> + file mkdir ${workpath}/${distname}
> + file copy /tmp/${distname}/Documentation ${workpath}/${distname}
> + file copy /tmp/${distname}/Examples ${workpath}/${distname}
> + file copy /tmp/${distname}/Source ${workpath}/${distname}
> + file copy /tmp/${distname}/LICENSE.txt ${workpath}/${distname}
> +
> + system "hdiutil detach /tmp/${distname}"
> +}
I added the option "use_dmg yes" to MacPorts 1.7.0 so that you
wouldn't have to do all that yourself -- though I see it doesn't work
if you change the worksrcdir like you do. I will have to file a bug
about that. "use_dmg yes" also doesn't work if you're not root. I'll
file a bug about that too.
> +pre-configure {
> + foreach {i} {libaw awdriver awconfig} {
> + reinplace "s|/usr/local|${prefix}|g" "${worksrcpath}/$i/
> $i.xcodeproj/project.pbxproj"
> +
> + reinplace "s|/usr/share/man/man1/|${prefix}/include|g" "$
> {worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
> +
> + }
> +}
With the patch from #15514 I get:
Warning: reinplace s|/usr/share/man/man1/|/mp/include|g didn't change
anything in /mp/var/macports/build/
_Users_rschmidt_macports_dports_devel_activewire/work/aw_4.0/Source/
libaw/libaw.xcodeproj/project.pbxproj
Warning: reinplace s|/usr/local|/mp|g didn't change anything in /mp/
var/macports/build/_Users_rschmidt_macports_dports_devel_activewire/
work/aw_4.0/Source/awdriver/awdriver.xcodeproj/project.pbxproj
Warning: reinplace s|/usr/local|/mp|g didn't change anything in /mp/
var/macports/build/_Users_rschmidt_macports_dports_devel_activewire/
work/aw_4.0/Source/awconfig/awconfig.xcodeproj/project.pbxproj
So you may want to change this to
pre-configure {
reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/awconfig/
awconfig.xcodeproj/project.pbxproj
reinplace "s|/usr/share/man/man1/|${prefix}/include|g" $
{worksrcpath}/libaw/libaw.xcodeproj/project.pbxproj ${worksrcpath}/
awdriver/awdriver.xcodeproj/project.pbxproj
}
Actually, I'm pretty sure it's incorrect to replace "/usr/share/man/
man1" with "${prefix}/include". Replacing it with "${prefix}/share/
man/man1" is more likely, no?
> +proc xcode::get_build_args {args} {
> + global tcl_platform
> + global universal_archs universal_target macosx_deployment_target
> + global os.major os.arch
> + global developer_dir
> +
> + set xcode_build_args "OBJROOT=build/ SYMROOT=build/"
> +
> + # MACOSX_DEPLOYMENT_TARGET
> + if {[variant_isset universal] && [info exists
> universal_target]} {
> + append xcode_build_args " MACOSX_DEPLOYMENT_TARGET=$
> {universal_target}"
> + } else {
> + append xcode_build_args " MACOSX_DEPLOYMENT_TARGET=$
> {macosx_deployment_target}"
> + }
> +
> + # ARCHS
> + if {[variant_isset universal]} {
> + append xcode_build_args " ARCHS=\"${universal_archs}\""
> + } else {
> + if {${os.major} >= 10 && $tcl_platform(wordSize) == 8} {
> + append xcode_build_args " ARCHS=x86_64"
> + } elseif {${os.arch} == "powerpc"} {
> + append xcode_build_args " ARCHS=ppc"
> + } else {
> + append xcode_build_args " ARCHS=i386"
> + }
> + }
> +
> + # SDKROOT
> + if {[variant_isset universal] && ${os.arch} == "powerpc" && $
> {os.major} == "8"} {
> + if {[info exists developer_dir]} {
> + append xcode_build_args " SDKROOT=\"${developer_dir}/
> SDKs/MacOSX10.4u.sdk\""
> + } else {
> + append xcode_build_args " SDKROOT=\"/Developer/SDKs/
> MacOSX10.4u.sdk\""
> + }
> + }
> + return $xcode_build_args
> +}
What was the idea behind overriding this portgroup function? It looks
like you made only a 1-line change from r53725 of the portgroup, but
the portgroup has changed since then.
> +destroot {
> + xinstall -m 755 -d ${destroot}${prefix}/bin
> + xinstall -m 755 -d ${destroot}${prefix}/lib
You don't need to make those directories because MacPorts does it for
you.
More information about the macports-dev
mailing list