[32523] trunk/dports/lang/squeak/Portfile

saispo at macports.org saispo at macports.org
Sun Jan 6 09:24:49 PST 2008


Revision: 32523
          http://trac.macosforge.org/projects/macports/changeset/32523
Author:   saispo at macports.org
Date:     2008-01-06 09:24:47 -0800 (Sun, 06 Jan 2008)

Log Message:
-----------
Update squeak port with tickets #13849

Modified Paths:
--------------
    trunk/dports/lang/squeak/Portfile

Modified: trunk/dports/lang/squeak/Portfile
===================================================================
--- trunk/dports/lang/squeak/Portfile	2008-01-06 16:25:00 UTC (rev 32522)
+++ trunk/dports/lang/squeak/Portfile	2008-01-06 17:24:47 UTC (rev 32523)
@@ -42,14 +42,19 @@
 default_variants	+quartz
 
 extract.only		${squeak_vm_src}.gz
-post-extract		{
-	system "cd ${workpath} && mv Squeak-${squeak_vm_version} Squeak-${squeak_img_version}"
-	file mkdir ${worksrcpath}/build
+post-extract {
+	system		"cd ${workpath} && mv Squeak-${squeak_vm_version} Squeak-${squeak_img_version}"
+	file mkdir	${worksrcpath}/build
+	# should do that but requires to rerun autoconf, I prefer to just patch inisqueak instead
+	# reinplace	"s|imgdir=`eval echo \${libdir}/squeak`|imgdir=`eval echo \${datadir}`|" ${worksrcpath}/platforms/unix/config/configure.ac
+	# reinplace	"s|plgdir=`eval echo \${imgdir}/\${VM_VERSION}`|plgdir=`eval echo \${libdir}/squeak/\${VM_VERSION}|" ${worksrcpath}/platforms/unix/config/configure.ac
 }
 
 configure.cmd		../platforms/unix/config/configure
 configure.dir		${worksrcpath}/build
-configure.args		--libdir=${prefix}/share --without-quartz --without-x
+configure.args		--libdir=${prefix}/lib \
+			--mandir=${prefix}/share/man \
+			--without-quartz --without-x
 
 build.dir		${worksrcpath}/build
 build.type		gnu
@@ -60,35 +65,37 @@
 	set unzip	"[binaryInPath "unzip"] -o"
 	set gzip	"[binaryInPath "gzip"] -f"
 	
-	# Have inisqueak look for a specific version image
-	reinplace	"s|IMAGE=squeak|IMAGE=squeak.${squeak_img_version}-${squeak_patch_no}|g" ${worksrcpath}/build/inisqueak
-	reinplace	"s|CHANGES=squeak|CHANGES=squeak.${squeak_img_version}-${squeak_patch_no}|g" ${worksrcpath}/build/inisqueak
+	set datadir	${prefix}/share/squeak
+	
+	# Have inisqueak look at the right place
+	reinplace	"s|MAJOR=3|MAJOR=${squeak_short_vrsn}|" ${worksrcpath}/build/inisqueak
+	reinplace	"s|imgdir=${prefix}/lib/squeak|imgdir=${datadir}|" ${worksrcpath}/build/inisqueak
 
-	# Install it
+	# Install inisqueak
 	xinstall	-m 755 ${worksrcpath}/build/inisqueak \
 				${destroot}${prefix}/bin/
 	
-	# Now extract the image
-	file		copy ${distpath}/${squeak_img_src} ${worksrcpath}
-	file		copy ${distpath}/${squeak_vm_src}.gz ${worksrcpath}
-	system 		"cd ${worksrcpath} && ${unzip} ${squeak_img_src}"
-	system 		"cd ${worksrcpath} && ${gzip} -d ${squeak_vm_src}.gz"
-
-	# And install the image
-	xinstall 	-d ${destroot}${prefix}/share/squeak
-	xinstall 	-m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img} \
-				${destroot}${prefix}/share/squeak/
-	xinstall 	-m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img_changes} \
-				${destroot}${prefix}/share/squeak/
+	# fix bad doc install path (should use --docdir or --datarootdir during configure)
+	xinstall 	-d ${destroot}${datadir}
+	move		${destroot}${prefix}/doc ${destroot}${prefix}/share
+	
+	# Recompress and install the default image
+	system 		"cd ${worksrcpath} && ${unzip} ${distpath}/${squeak_img_src}"
+	system		"cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img}"
+	system		"cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img_changes}"
+	xinstall 	-d ${destroot}${datadir}
+	xinstall 	-m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img}.gz \
+				${destroot}${datadir}
+	xinstall 	-m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img_changes}.gz \
+				${destroot}${datadir}
 	xinstall	-m 644 ${worksrcpath}/${squeak_img_name}/WelcomeSqueak${squeak_short_vrsn} \
-				${destroot}${prefix}/share/squeak/
+				${destroot}${datadir}
 	xinstall	-m 644 ${worksrcpath}/${squeak_img_name}/SqueakV${squeak_short_vrsn}.sources \
-				${destroot}${prefix}/share/squeak/
+				${destroot}${datadir}
 
-	# And compress the image
-	system		"cd ${destroot}${prefix}/share/squeak && ${gzip} ${squeak_img}"
-	system		"cd ${destroot}${prefix}/share/squeak && ${gzip} ${squeak_img_changes}"
-
+	# Link compressed image and changes
+	system		"cd ${destroot}${datadir} && ln -s ${squeak_img}.gz squeak.image.gz"
+	system		"cd ${destroot}${datadir} && ln -s ${squeak_img_changes}.gz squeak.changes.gz"
 }
 
 variant quartz	{ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080106/f6401150/attachment.html


More information about the macports-changes mailing list