[csw-devel] SF.net SVN: gar:[4182] csw/mgar/pkg/ImageMagick/trunk

hson at users.sourceforge.net hson at users.sourceforge.net
Sat Apr 4 20:08:40 CEST 2009


Revision: 4182
          http://gar.svn.sourceforge.net/gar/?rev=4182&view=rev
Author:   hson
Date:     2009-04-04 18:08:40 +0000 (Sat, 04 Apr 2009)

Log Message:
-----------
imagemagick: Use fixme to patch libtool, rename compare to compare2 due to conflict with CSWschilyutils

Modified Paths:
--------------
    csw/mgar/pkg/ImageMagick/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh

Modified: csw/mgar/pkg/ImageMagick/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ImageMagick/trunk/Makefile	2009-04-04 18:02:20 UTC (rev 4181)
+++ csw/mgar/pkg/ImageMagick/trunk/Makefile	2009-04-04 18:08:40 UTC (rev 4182)
@@ -24,6 +24,7 @@
 REQUIRED_PKGS += CSWglib2 CSWgs CSWgtk2 CSWilmbase CSWjasper CSWjbigkit
 REQUIRED_PKGS += CSWjpeg CSWlcms CSWlibcairo CSWlibfpx CSWlibrsvg CSWlibxml2
 REQUIRED_PKGS += CSWopenexr CSWperl CSWpng CSWsunmath CSWtiff CSWwmf CSWzlib
+REQUIRED_PKGS += CSWlibtoolrt
 
 # We define upstream file regex so we can be notifed of new upstream software release
 UFILES_REGEX = ImageMagick-((\d+(?:\.\d+)*)-(\d+)?).tar.bz2
@@ -47,6 +48,11 @@
 
 include gar/category.mk
 
+post-configure-$(MODULATION):
+	@(echo "~~~ Fixing Libtool ~~~")
+	@$(FILEDIR)/fixme.sh $(WORKSRC)
+	@$(MAKECOOKIE)
+
 post-install-isa-sparcv8:
 	@cp $(FILEDIR)/libMagick.so.10.0.4.s $(INSTALLISADIR)$(libdir)/libMagick.so.10.0.4
 	@cp $(FILEDIR)/libWand.so.10.0.4.s $(INSTALLISADIR)$(libdir)/libWand.so.10.0.4
@@ -57,6 +63,8 @@
 	@ln -s ImageMagick-$(GARVERSION) $(INSTALLISADIR)$(docdir)/ImageMagick
 	echo $(DESTDIR)
 	@( cd $(INSTALLISADIR)$(libdir) ; gzip -dc $(DESTDIR)/../../$(FILEDIR)/lib_6.2.9_s.tar.gz |tar xf -)
+	@mv $(INSTALLISADIR)$(mandir)/man1/compare.1 $(INSTALLISADIR)$(mandir)/man1/compare2.1
+	@mv $(INSTALLISADIR)$(bindir)/compare $(INSTALLISADIR)$(bindir)/compare2
 	@$(MAKECOOKIE)
 
 post-install-isa-i386:
@@ -69,4 +77,6 @@
 	@ln -s ImageMagick-$(GARVERSION) $(INSTALLISADIR)$(docdir)/ImageMagick
 	echo $(DESTDIR)
 	@( cd $(INSTALLISADIR)$(libdir) ; gzip -dc $(DESTDIR)/../../$(FILEDIR)/lib_6.2.9_i.tar.gz |tar xf -)
+	@mv $(INSTALLISADIR)$(mandir)/man1/compare.1 $(INSTALLISADIR)$(mandir)/man1/compare2.1
+	@mv $(INSTALLISADIR)$(bindir)/compare $(INSTALLISADIR)$(bindir)/compare2
 	@$(MAKECOOKIE)

Added: csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh
===================================================================
--- csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh	                        (rev 0)
+++ csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh	2009-04-04 18:08:40 UTC (rev 4182)
@@ -0,0 +1,49 @@
+#!/bin/bash
+####################################################
+#
+#  fixme.sh
+#  Intended to remove the use of libtool's 
+#  pseudo-libraries for opencsw builds.
+#
+#  Author: Mike Watters  mwatters_at_opencsw.org
+#  Initial Version: 0.1
+#
+####################################################
+
+umask 0022
+PATH=/opt/csw/bin
+
+if [ $# -ne 1 ]; then
+    gecho "USAGE: $(basename $0) WORKSRC"
+    exit 1
+fi
+BASEPATH=$1
+
+## Fix Makefiles
+for mk in $(gfind ${BASEPATH} -name Makefile -print); do
+    LT_FILES=$(ggrep '/opt/csw.*/lib/.*\.la' ${mk} | \
+        gsed "s/^.*\(\/opt\/csw.*\/lib\/.*\.la\).*$/\1/")
+    
+    for file in ${LT_FILES}; do
+        LIB_NAME=$(ggrep 'dlname=' ${file} | \
+            gsed -e "s/.*'\(.*\)'/\1/" \
+                -e "s/^lib//" \
+                -e "s/\.so.*$//")
+        fixpath=$(gecho $file |gsed 's/\//\\\//g')
+        gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >Makefile.new
+        gmv Makefile.new ${mk}
+    done
+done
+
+## Fix libtool Script
+for lt in $(gfind ${BASEPATH} -name libtool -print); do
+    gsed "/for search_ext in .*\.la/s/\.la//" ${lt} >${lt}.new
+    gmv ${lt}.new ${lt}
+done
+
+LTMAIN=$(gfind ${BASEPATH} -name ltmain.sh -print)
+if [ -f ${LTMAIN} ]; then
+    gsed "/for search_ext in .*\.la/s/\.la//" ${LTMAIN} >${LTMAIN}.new
+    gmv ${LTMAIN}.new ${LTMAIN}
+fi
+


Property changes on: csw/mgar/pkg/ImageMagick/trunk/files/fixme.sh
___________________________________________________________________
Added: svn:executable
   + *


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list