[argyllcms] [FreeBSD, patch] Jamtop (configure) patch

  • From: Boris Samorodov <bsam@xxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Fri, 22 Feb 2013 14:24:47 +0400

Hello, List!

I try to create a port of argyllcms at FreeBSD. So far I succeeded and
I'd like to offer some patches and ask some questions. It will be one
patch/question per e-mail. I'm new to the list and if something is wrong
please show me the right direction. Thanks for your patience.

Hereby my first patch (attached). Some comments.

1. All non-base system files are installed to PREFIX at FreeBSD.
The default is "/usr/local".

2. All library paths are not suffixed by "64" at HOST64 platform,
all 32-bit library paths are suffixed by "32" instead.
I.e. /usr/lib are used for native 64-bit code and /usr/lib32 for
32-bit libraries. So native (i.e. 32-bit libraries at 32-bit
platform as well as 64-bit libraries at 64-bit platforms) are
locate at /usr/lib.

3. JPEG library is called libjpeg (not libjpg).

The patch was tested at FreeBSD 9-i386 and 10-amd64.

HTH
-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
--- Jamtop.orig 2012-04-19 11:50:31.000000000 +0400
+++ Jamtop      2013-02-22 12:48:32.000000000 +0400
@@ -54,6 +54,8 @@ if $(UNIX) {
        } else {
                if [ GLOB /usr/X11R6/include/X11 : X.h ] {
                        LibWinH = /usr/X11R6/include ;
+               } else if [ GLOB /usr/local/include/X11 : X.h ] {
+                       LibWinH = /usr/local/include ;
                } else if [ GLOB /usr/include/X11 : X.h ] {
                        LibWinH = /usr/include ;
                } else {
@@ -63,6 +65,8 @@ if $(UNIX) {
                if $(HOST64) {
                        if [ GLOB /usr/X11R6/lib : libX11.so ] {
                                LibWinD = /usr/X11R6/lib ;
+                       } else if [ GLOB /usr/local/lib : libX11.so ] {
+                               LibWinD = /usr/local/lib ;
                        } else if [ GLOB /usr/lib/x86_64-linux-gnu : libX11.so 
] {
                                LibWinD = /usr/lib/x86_64-linux-gnu ;
                        } else if [ GLOB /usr/lib64 : libX11.so ] {
@@ -73,6 +77,8 @@ if $(UNIX) {
                } else {
                        if [ GLOB /usr/X11R6/lib : libX11.so ] {
                                LibWinD = /usr/X11R6/lib ;
+                       } else if [ GLOB /usr/local/lib : libX11.so ] {
+                               LibWinD = /usr/local/lib ;
                        } else if [ GLOB /usr/lib : libX11.so ] {
                                LibWinD = /usr/lib ;
                        } else {
@@ -90,10 +96,11 @@ if $(UNIX) {
 
 # See if we have a system TIFF library.
 if ! $(BUILTIN_TIFF) && $(UNIX) {
-       if [ GLOB /usr/include : tiffio.h ]  {
+       if [ GLOB /usr/include : tiffio.h ] || [ GLOB /usr/local/include : 
tiffio.h ] { 
                if  ! $(HOST64) && ( [ GLOB /usr/lib : libtiff.so ] || [ GLOB 
/usr/lib : libtiff.a ] )
                 ||   $(HOST64) && ( [ GLOB /usr/lib64 : libtiff.so ] || [ GLOB 
/usr/lib64 : libtiff.a ] )
-                ||   $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : 
libtiff.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libtiff.a ] ) {
+                ||   $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : 
libtiff.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libtiff.a ] )
+                ||                ( [ GLOB /usr/local/lib : libtiff.so ] || [ 
GLOB /usr/local/lib : libtiff.a ] ) {
                        echo "Using system TIFF library" ;
                        TIFFLIB = ;
                        TIFFINC = ;
@@ -112,10 +119,11 @@ if ! $(HAVE_TIFF) || $(BUILTIN_TIFF) {
 
 # See if we have a system JPEG library.
 if ! $(BUILTIN_JPEG) && $(UNIX) {
-       if [ GLOB /usr/include : jpeglib.h ]  {
+       if [ GLOB /usr/include : jpeglib.h ] || [ GLOB /usr/local/include : 
jpeglib.h ] {
                if  ! $(HOST64) && ( [ GLOB /usr/lib : libjpg.so ] || [ GLOB 
/usr/lib : libjpg.a ] )
                 ||   $(HOST64) && ( [ GLOB /usr/lib64 : libjpg.so ] || [ GLOB 
/usr/lib64 : libjpg.a ] )
-                ||   $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : 
libjpg.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libjpg.a ] ) {
+                ||   $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : 
libjpg.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libjpg.a ] )
+                ||                ( [ GLOB /usr/local/lib : libjpeg.so ] || [ 
GLOB /usr/local/lib : libjpeg.a ] ) {
                        echo "Using system JPEG library" ;
                        JPEGLIB = ;
                        JPEGINC = ;

Other related posts: