Re: [28665] trunk/dports/editors/scite
On Sep 6, 2007, at 07:27, source_changes@macosforge.org wrote:
Revision: 28665 http://trac.macosforge.org/projects/macports/changeset/28665 Author: nox@macports.org Date: 2007-09-06 05:27:36 -0700 (Thu, 06 Sep 2007)
Log Message: ----------- scite: Added universal support! Don't worry, be happy!
Modified Paths: -------------- trunk/dports/editors/scite/Portfile trunk/dports/editors/scite/files/patch-scite-gtk-makefile
Modified: trunk/dports/editors/scite/Portfile =================================================================== --- trunk/dports/editors/scite/Portfile 2007-09-06 12:22:19 UTC (rev 28664) +++ trunk/dports/editors/scite/Portfile 2007-09-06 12:27:36 UTC (rev 28665) @@ -42,7 +42,22 @@
pre-build { cd ${workpath}/scintilla/gtk - system "make GTK2=yes" + + if {[variant_isset universal]} { + foreach {arch} {i386 ppc} { + system "make GTK2=yes UNIVERSAL_CFLAGS=\"-isysroot /Developer/ SDKs/MacOSX10.4u.sdk -arch ${arch}\"" + + file mkdir ../bin/${arch} + move ../bin/scintilla.a ../bin/${arch}/scintilla.a
Shouldn't these paths be absolute paths? I didn't think the cwd was guaranteed to be anything in particular. I'm surprised that the "cd" command above works.
+ + system "make clean" + } + } else { + system "make GTK2=yes" + } + + cd ../bin + system "lipo -create -arch i386 i386/scintilla.a -arch ppc ppc/ scintilla.a -output scintilla.a"
Does this really work for the non-universal build? Don't you only want to lipo if the universal variant has been requested?
}
destroot.destdir prefix=${destroot}${prefix} @@ -51,7 +66,17 @@ xinstall -m 0444 ${worksrcpath}/../doc/scite.1 ${destroot}$ {prefix}/share/man/man1 }
+variant universal { + post-patch { + cd ${workpath} + + reinplace -E "/^CXXBASEFLAGS/s|\$| \$(UNIVERSAL_CFLAGS)|" scintilla/gtk/makefile + reinplace -E "/^CXXBASEFLAGS/s|\$| $ {configure.universal_cflags}|" \ + scite/gtk/makefile + } + + build.args-append "UNIVERSAL_LDFLAGS=\"$ {configure.universal_ldflags}\"" +} + livecheck.distname SciTE
-universal_variant no -
[snip]
Le 7 sept. 07 à 01:10, Ryan Schmidt a écrit :
On Sep 6, 2007, at 07:27, source_changes@macosforge.org wrote:
Revision: 28665 http://trac.macosforge.org/projects/macports/changeset/ 28665 Author: nox@macports.org Date: 2007-09-06 05:27:36 -0700 (Thu, 06 Sep 2007)
Log Message: ----------- scite: Added universal support! Don't worry, be happy!
Modified Paths: -------------- trunk/dports/editors/scite/Portfile trunk/dports/editors/scite/files/patch-scite-gtk-makefile
Modified: trunk/dports/editors/scite/Portfile =================================================================== --- trunk/dports/editors/scite/Portfile 2007-09-06 12:22:19 UTC (rev 28664) +++ trunk/dports/editors/scite/Portfile 2007-09-06 12:27:36 UTC (rev 28665) @@ -42,7 +42,22 @@
pre-build { cd ${workpath}/scintilla/gtk - system "make GTK2=yes" + + if {[variant_isset universal]} { + foreach {arch} {i386 ppc} { + system "make GTK2=yes UNIVERSAL_CFLAGS=\"-isysroot /Developer/ SDKs/MacOSX10.4u.sdk -arch ${arch}\"" + + file mkdir ../bin/${arch} + move ../bin/scintilla.a ../bin/${arch}/scintilla.a
Shouldn't these paths be absolute paths? I didn't think the cwd was guaranteed to be anything in particular. I'm surprised that the "cd" command above works.
I've always used cd and it has always worked.
+ + system "make clean" + } + } else { + system "make GTK2=yes" + } + + cd ../bin + system "lipo -create -arch i386 i386/scintilla.a -arch ppc ppc/ scintilla.a -output scintilla.a"
Does this really work for the non-universal build? Don't you only want to lipo if the universal variant has been requested?
Oh. Thanks. It should be in the if block, indeed.
}
destroot.destdir prefix=${destroot}${prefix} @@ -51,7 +66,17 @@ xinstall -m 0444 ${worksrcpath}/../doc/scite.1 ${destroot}$ {prefix}/share/man/man1 }
+variant universal { + post-patch { + cd ${workpath} + + reinplace -E "/^CXXBASEFLAGS/s|\$| \$(UNIVERSAL_CFLAGS)|" scintilla/gtk/makefile + reinplace -E "/^CXXBASEFLAGS/s|\$| $ {configure.universal_cflags}|" \ + scite/gtk/makefile + } + + build.args-append "UNIVERSAL_LDFLAGS=\"$ {configure.universal_ldflags}\"" +} + livecheck.distname SciTE
-universal_variant no -
[snip]
-- Anthony Ramine, the infamous MacPorts Trac slave. nox@macports.org
On Sep 7, 2007, at 5:34 AM, N_Ox wrote:
Shouldn't these paths be absolute paths? I didn't think the cwd was guaranteed to be anything in particular. I'm surprised that the "cd" command above works.
I've always used cd and it has always worked.
It works right now, but there have been some convincing arguments on the list that that behavior shouldn't be used and shouldn't be counted on to work in future macports versions. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
participants (3)
-
Daniel J. Luke
-
N_Ox
-
Ryan Schmidt