[28665] trunk/dports/editors/scite

N_Ox nox at macports.org
Fri Sep 7 02:34:30 PDT 2007


Le 7 sept. 07 à 01:10, Ryan Schmidt a écrit :

>
> On Sep 6, 2007, at 07:27, source_changes at macosforge.org wrote:
>
>> Revision: 28665
>>           http://trac.macosforge.org/projects/macports/changeset/ 
>> 28665
>> Author:   nox at 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 at macports.org





More information about the macports-dev mailing list