[73410] trunk/dports/graphics

michaelld at macports.org michaelld at macports.org
Fri Nov 12 12:12:00 PST 2010


Revision: 73410
          http://trac.macports.org/changeset/73410
Author:   michaelld at macports.org
Date:     2010-11-12 12:11:56 -0800 (Fri, 12 Nov 2010)
Log Message:
-----------
argyll: initial checkin

Added Paths:
-----------
    trunk/dports/graphics/argyll/
    trunk/dports/graphics/argyll/Portfile
    trunk/dports/graphics/argyll/files/
    trunk/dports/graphics/argyll/files/patch-jamfiles.diff
    trunk/dports/graphics/argyll/files/patch-spectro_usbio.c.diff

Added: trunk/dports/graphics/argyll/Portfile
===================================================================
--- trunk/dports/graphics/argyll/Portfile	                        (rev 0)
+++ trunk/dports/graphics/argyll/Portfile	2010-11-12 20:11:56 UTC (rev 73410)
@@ -0,0 +1,113 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: $
+
+PortSystem              1.0
+
+name                    argyll
+version                 1.3.2
+categories              graphics
+platforms               darwin
+maintainers             nomaintainer
+license                 gpl
+
+description             Argyll Color Management System
+long_description        ArgyllCMS is an ICC compatible color management \
+system. It supports accurate ICC profile creation for scanners, cameras \
+and film recorders, and calibration and profiling of displays and RGB \& \
+CMYK printers. Argyll includes a general purpose ICC V2 profile format \
+access library, icclib, and a general purpose CGATS file format I/O library.
+
+homepage                http://www.argyllcms.com/
+
+use_zip                 yes
+master_sites            http://www.argyllcms.com/
+distname                Argyll_V${version}_src
+
+checksums               md5     dd0b8e2da65e4bb7fc38aef377e73afd \
+                        sha1    51af2f880fa209dbc658cedf19c11abadbdc43e6 \
+                        rmd160  a447041d7fb05078c627aeeeca6837f908991c76
+
+worksrcdir              Argyll_V${version}
+
+depends_build           port:jam
+
+depends_lib             port:tiff \
+                        port:libusb-compat
+
+patchfiles              patch-jamfiles.diff \
+                        patch-spectro_usbio.c.diff
+
+post-patch {
+    # hard-wire libusb-compat info for now
+    reinplace "s, at LIBUSBLIBDIR@,${prefix}/lib,g" \
+        ${worksrcpath}/Jamtop
+    reinplace "s, at LIBUSBINCDIR@,${prefix}/include,g" \
+        ${worksrcpath}/Jamtop
+    reinplace "s, at LIBUSBNAME@,libusb,g" \
+        ${worksrcpath}/Jamtop
+
+    # fix IOKit header include: G -> g
+    reinplace "/include/s,IOKit/Graphics/IOGraphicsLib,IOKit/graphics/IOGraphicsLib,g" ${worksrcpath}/spectro/dispwin.h
+
+    # set to install headers and libraries
+    foreach fixfile [exec find ${worksrcpath} -name Jamfile] {
+        reinplace "s,#InstallLib,InstallLib,g" ${fixfile}
+    }
+    foreach fixfile [exec find ${worksrcpath} -name Jamfile] {
+        reinplace "s,#InstallFile,InstallFile,g" ${fixfile}
+    }
+}
+
+configure {
+    # fix CC / CXX / LD arch flag settings
+    reinplace "s, at CCFLAGS@,${configure.cc_archflags},g" \
+         ${worksrcpath}/Jambase
+    reinplace "s, at CXXFLAGS@,${configure.cxx_archflags},g" \
+         ${worksrcpath}/Jambase
+    reinplace "s, at LDFLAGS@,${configure.ld_archflags},g" \
+         ${worksrcpath}/Jambase
+}
+
+# uses Carbon 32-bit, so restrict
+supported_archs         i386 ppc
+
+# 'destroot' actually just installed files locally to
+# the worksrcpath
+
+post-destroot {
+    # Install documentation.
+    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
+    xinstall -m 644 -W ${worksrcpath} \
+        License.txt License2.txt License3.txt \
+        notes.txt Readme.txt ttbd.txt \
+        ${destroot}${prefix}/share/doc/${name}
+
+    # Install binaries
+    delete ${worksrcpath}/bin/License.txt
+    xinstall -m 755 -d ${destroot}${prefix}/bin
+    eval xinstall -m 755 [glob ${worksrcpath}/bin/*] \
+        ${destroot}${prefix}/bin
+
+    # Install headers
+    xinstall -m 755 -d ${destroot}${prefix}/include/${name}
+    eval xinstall -m 644 [glob ${worksrcpath}/h/*.h] \
+        ${destroot}${prefix}/include/${name}
+
+    # Install libraries
+    xinstall -m 755 -d ${destroot}${prefix}/lib
+    eval xinstall -m 644 [glob ${worksrcpath}/lib/lib*] \
+        ${destroot}${prefix}/lib
+
+    # Install references
+    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/ref
+    eval xinstall -m 644 [glob ${worksrcpath}/ref/*] \
+        ${destroot}${prefix}/share/${name}/ref
+
+    # xinstall does not remove 'quarantine' attribute;
+    # do that manually.
+    fs-traverse fixfile ${destroot} {
+        if {[exec xattr -l ${fixfile}] != ""} {
+            system "xattr -d com.apple.quarantine ${fixfile}"
+        }
+    }
+}

Added: trunk/dports/graphics/argyll/files/patch-jamfiles.diff
===================================================================
--- trunk/dports/graphics/argyll/files/patch-jamfiles.diff	                        (rev 0)
+++ trunk/dports/graphics/argyll/files/patch-jamfiles.diff	2010-11-12 20:11:56 UTC (rev 73410)
@@ -0,0 +1,122 @@
+--- Jamfile.orig	2010-11-12 10:46:15.000000000 -0500
++++ Jamfile	2010-11-12 10:46:45.000000000 -0500
+@@ -31,21 +31,6 @@
+ SubInclude tweak ;
+ SubInclude render ;
+ 
+-if ! $(HAVE_TIFF) {
+-	SubInclude tiff ;
+-}
+-
+-if $(USE_LIBUSB1) = true {
+-	SubInclude libusb1 ;
+-} else {
+-	if $(NT) {
+-		SubInclude libusbw ;
+-	}
+-	if $(UNIX) {
+-		SubInclude libusb ;
+-	}
+-}
+-
+ if $(UNIX) && $(OS) != MACOSX {
+ 	SubInclude jcnf ;
+ 	SubInclude ucmm ;
+--- Jambase.orig	2010-11-12 12:25:15.000000000 -0500
++++ Jambase	2010-11-12 12:26:44.000000000 -0500
+@@ -856,6 +856,9 @@
+ 		CCFLAGS   		+= -Wno-sign-compare ;		# supress new gcc4 warnings ?
+ 		CCFLAGS   		+= -fpascal-strings ;		# for compatibility with the OSX API
+ 		LINKFLAGS 		+= -framework Carbon ;		# A good default
++		CCFLAGS   		+= @CCFLAGS@ ;
++		C++FLAGS   		+= @CXXFLAGS@ ;
++		LINKFLAGS 		+= @LDFLAGS@ ;
+ 	}
+ 
+ 	# Make things work on 64 bit Linux
+--- Jamtop.orig	2010-11-12 13:28:02.000000000 -0500
++++ Jamtop	2010-11-12 13:36:05.000000000 -0500
+@@ -7,18 +7,13 @@
+ # Tell standalone libraries that they are part of Argyll:
+ DEFINES += ARGYLLCMS ;
+ 
+-# Use libusb1 rather than libusb0 & libusb0-win32
+-USE_LIBUSB1 = true ;
+-# Make the USB V1 library static
+-LIBUSB_IS_DLL = false ;
+-
+-# Always use DLL for MSWin, because driver install expects it (.inf)
+-if $(NT) {
+-	LIBUSB_IS_DLL = true ;
+-}
+-
+-# Set the libubs1 library name.
+-LIBUSB1NAME = libusb-1.0A ;
++echo "Using system LIBUSB1 library" ;
++HAVE_LIBUSB = true ;
++USE_LIBUSB1 = false ;
++LIBUSB_IS_DLL = true ;
++LIBUSBLIBDIR = @LIBUSBLIBDIR@ ;
++LIBUSBINCDIR = @LIBUSBINCDIR@ ;
++LIBUSBNAME = @LIBUSBNAME@ ;
+ 
+ # Information for compiling and linking GUI programs
+ 
+@@ -46,27 +41,11 @@
+ 	}
+ }
+ 
+-# See if we have a system TIFF library.
+-if ! $(BUILTIN_TIFF) && $(UNIX) {
+-	if [ GLOB /usr/include : tiffio.h ]  {
+-		if  [ GLOB /usr/lib : libtiff.so ] 
+-		 || [ GLOB /usr/lib : libtiff.a ]  {
+-			echo "Using system TIFF library" ;
+-			TIFFLIB = ;
+-			TIFFINC = ;
+-			LINKFLAGS += $(LINKFLAG)tiff ;
+-			HAVE_TIFF = true ;
+-		}
+-	}
+-}
+-
+-# If nothing else, use Argyll supplied TIFF library
+-if ! $(HAVE_TIFF) || $(BUILTIN_TIFF) {
+-	echo "Using built in TIFF library" ;
+-	TIFFLIB = ../tiff/libtiff.lib ;
+-#	TIFFINC = ../tiff ../tiff/libtiff ;
+-	TIFFINC = ../tiff ;
+-}
++echo "Using system TIFF library" ;
++TIFFLIB = ;
++TIFFINC = ;
++LINKFLAGS += $(LINKFLAG)tiff ;
++HAVE_TIFF = true ;
+ 
+ # testing
+ #DSTDIR = var ;
+--- spectro/Jamfile.orig	2010-11-12 13:28:18.000000000 -0500
++++ spectro/Jamfile	2010-11-12 13:32:21.000000000 -0500
+@@ -38,9 +38,19 @@
+ 		}
+ 		DEFINES += USE_LIBUSB1 ;
+ 	} else {
+-		LIBUSBDIR = ../libusb ;
+-		LIBUSBHDRS = ../libusb ;
+-		LIBUSB = libusb ;
++            if $(HAVE_LIBUSB) = true {
++		LIBUSBDIR = $(LIBUSBLIBDIR) ;
++		LIBUSBHDRS = $(LIBUSBINCDIR) ;
++            } else {
++		LIBUSBDIR = ../libusb1 ;
++		LIBUSBHDRS = ../libusb1 ;
++            }
++	    if $(LIBUSB_IS_DLL) = true {
++		    LIBUSB = $(LIBUSBNAME)$(SUFIMPLIB) ;
++		    LIBUSBSH = $(LIBUSBNAME)$(SUFSHLIB) ;
++	    } else {
++		    LIBUSB = $(LIBUSBNAME)$(SUFLIB) ;
++	    }
+ 	}
+ 	IOFILE = unixio.c ;
+ 	CONVFILE = pollem.c ;

Added: trunk/dports/graphics/argyll/files/patch-spectro_usbio.c.diff
===================================================================
--- trunk/dports/graphics/argyll/files/patch-spectro_usbio.c.diff	                        (rev 0)
+++ trunk/dports/graphics/argyll/files/patch-spectro_usbio.c.diff	2010-11-12 20:11:56 UTC (rev 73410)
@@ -0,0 +1,16 @@
+--- spectro/usbio.c.orig	2010-11-12 13:51:54.000000000 -0500
++++ spectro/usbio.c	2010-11-12 13:54:08.000000000 -0500
+@@ -44,6 +44,13 @@
+ 
+ #undef DEBUG
+ 
++#if !defined(USE_LIBUSB1) && defined(ENABLE_USB)
++/* hack in function to make argyll happy */
++int usb_argyll_patched(void) {
++        return 2;
++}
++#endif
++
+ #ifdef ENABLE_USB
+ 
+ /* Check a USB Vendor and product ID, and add the device */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101112/b24984a1/attachment-0001.html>


More information about the macports-changes mailing list