--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/ImageMagick/Makefile.sfw Wed Oct 21 17:43:30 2009 +0200
@@ -0,0 +1,169 @@
+#
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "@(#)Makefile.sfw 1.16 09/04/13 SMI"
+
+VER=ImageMagick-6.3.4
+VER64=$(VER)-64
+VERS=-2
+
+include ../Makefile.cmd
+
+SFW_PATH="$(SPRO_VROOT)/bin:/usr/sfw/bin:$(PATH)"
+
+CPPFLAGS += -I$(ROOT)/usr/include/libxml2
+CPPFLAGS += -I$(ROOT)/usr/sfw/include/freetype2
+CPPFLAGS += -I/usr/sfw/include
+CPPFLAGS += -I/usr/include/libxml2
+CPPFLAGS += -I/usr/sfw/include/freetype2
+CPPFLAGS += -I/usr/X/include/X11
+LDFLAGS += -L/usr/X/lib -R/usr/X/lib
+#LDFLAGS="-L$(ROOT)/usr/lib/64 -L$(ROOT)/usr/sfw/lib/64 -R$(ROOT)/usr/sfw/lib/64" \
+
+all: all-32 all-64
+
+all-32: $(VER)/config.status
+ $(INCREFIXUP) $(VER)
+ (cd $(VER); env \
+ "CC=$(CC)" \
+ "CXX=$(CCC)" \
+ PATH=$(SFW_PATH) \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="-xO3" \
+ CPPFLAGS="$(CPPFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" \
+ MAKE=$(CCSMAKE) $(CCSMAKE) )
+ @find . -name core -exec rm -f {} \;
+
+all-64: $(VER64)/config.status
+ (cd $(VER64); env \
+ "CC=$(CC)" \
+ "CXX=$(CCC)" \
+ PATH=$(SFW_PATH) \
+ CFLAGS="${CFLAGS64}" \
+ CXXFLAGS="$(CCFLAGS64) -xO3" \
+ CPPFLAGS="$(CPPFLAGS)" \
+ LDFLAGS="$(LDFLAGS64)" \
+ MAKE=$(CCSMAKE) $(CCSMAKE) )
+ @find . -name core -exec rm -f {} \;
+
+# Leave in symlinks for compatibility
+COMPAT= Magick++-config Magick-config animate composite conjure convert \
+ display identify import mogrify montage
+
+COMPATLINKS = $(COMPAT:%=$(ROOTSFWBIN)/%)
+$(COMPATLINKS):
+ $(RM) $@; $(SYMLINK) ../../bin/$(@F) $@
+
+install-32: install-64 all-32
+ # install the bits in the proto area
+ cd $(VER); env SRC=$(SRC) DESTDIR=$(ROOT) \
+ MANSCRIPT=../sunman-stability \
+ MAKE=$(CCSMAKE) $(CCSMAKE) install
+ # clean up the turds: libtool .la files, .packlists, ...
+ $(RM) $(ROOT)/usr/lib/$(VER)/modules-Q16/filters/*.la \
+ $(ROOT)/usr/lib/$(VER)/modules-Q16/coders/*.la \
+ $(ROOT)/usr/lib/libMagick.la $(ROOT)/usr/lib/libWand.la \
+ $(ROOT)/usr/lib/libMagick++.la
+ $(RM) $(ROOT)/usr/perl5/5.8.4/lib/`/bin/arch`-solaris-64int/perllocal.pod
+ - /bin/rmdir $(ROOT)/usr/perl5/5.8.4/lib/`/bin/arch`-solaris-64int
+ $(RM) $(ROOT)/usr/perl5/site_perl/5.8.4/`/bin/arch`-solaris-64int/auto/Image/Magick/.packlist
+
+install-64: all-64
+ # install the bits in the proto area
+ cd $(VER64); env SRC=$(SRC) DESTDIR=$(ROOT) \
+ MANSCRIPT=../sunman-stability \
+ MAKE=$(CCSMAKE) $(CCSMAKE) install
+ # clean up the turds: libtool .la files, .packlists, ...
+ $(RM) $(ROOT)/usr/lib/64/$(VER)/modules-Q16/filters/*.la \
+ $(ROOT)/usr/lib/64/$(VER)/modules-Q16/coders/*.la \
+ $(ROOT)/usr/lib/64/libMagick.la $(ROOT)/usr/lib/64/libWand.la \
+ $(ROOT)/usr/lib/64/libMagick++.la
+
+install: install-32 install-64 $(COMPATLINKS)
+ # fix the proto area
+ $(SRC)/tools/protofix --pkg SUNWimagick --perm
+
+$(VER)/config.status: $(VER)/configure
+ (cd $(VER); env \
+ "CC=$(CC)" \
+ "CXX=$(CCC)" \
+ PATH=$(SFW_PATH) \
+ INSTALL="$(SRC)/tools/install-proto" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="-xO3" \
+ CPPFLAGS="-I${ROOT}/usr/sfw/include -I${ROOT}/usr/include/libxml2 -I${ROOT}/usr/sfw/include/freetype2 -I/usr/sfw/include -I/usr/include/libxml2 -I/usr/sfw/include/freetype2 -I/usr/X/include/X11" \
+ LDFLAGS="-L${ROOT}/usr/lib -L${ROOT}/usr/sfw/lib -L/usr/sfw/lib -L/usr/X/lib -R/usr/sfw/lib:/usr/X/lib" \
+ MAKE=$(CCSMAKE) \
+ ./configure \
+ --prefix=/usr \
+ --with-modules \
+ --enable-shared=yes \
+ --enable-static=no \
+ --without-gvc \
+ )
+
+$(VER64)/config.status: $(VER64)/configure
+ (cd $(VER64); env \
+ "CC=$(CC)" \
+ "CXX=$(CCC)" \
+ PATH=$(SFW_PATH) \
+ INSTALL="$(SRC)/tools/install-proto" \
+ CFLAGS="${CFLAGS64}" \
+ CXXFLAGS="$(CCFLAGS64) -xO3" \
+ MAKE=$(CCSMAKE) \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib/64 \
+ --with-modules \
+ --enable-shared=yes \
+ --enable-static=no \
+ --without-gvc \
+ --without-perl \
+ )
+
+#
+# Patches:
+# 1. la.patch - So it uses .so files instead of .la files
+#
+
+$(VER)/configure: $(VER)$(VERS).tar.bz2
+ /usr/bin/bzip2 -dc $(VER)$(VERS).tar.bz2 | /usr/bin/tar oxpf -
+ /usr/bin/gpatch -p0 < la.patch
+ touch $(VER)/configure
+
+$(VER64)/configure: $(VER)$(VERS).tar.bz2
+ -$(RM) -r tmp ; mkdir tmp
+ (cd tmp ; \
+ /usr/bin/bzip2 -dc ../$(VER)$(VERS).tar.bz2 | /usr/bin/tar oxpf - ; \
+ /usr/bin/gpatch -p0 < ../la.patch)
+ -$(RM) -r $(VER64) ; mv tmp/$(VER) $(VER64)
+ touch $(VER64)/configure
+
+clean:
+ -$(RM) -r $(VER) $(VER64)
+
+include ../Makefile.targ
+
+FRC: