[SCM] Image Reduction and Analysis Facility branch, debian, updated. 18647787b2ebba99d52756e22cdfb92c9326b167

Ole Streicher debian at liska.ath.cx
Sun Jun 30 19:34:27 UTC 2013


The following commit has been merged in the debian branch:
commit 18647787b2ebba99d52756e22cdfb92c9326b167
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Sun Jun 30 19:34:20 2013 +0000

    Add armhf architecture (and maybe armel)

diff --git a/debian/patches/add_other_archs.patch b/debian/patches/add_other_archs.patch
new file mode 100644
index 0000000..a9b2870
--- /dev/null
+++ b/debian/patches/add_other_archs.patch
@@ -0,0 +1,463 @@
+--- a/unix/hlib/irafarch.csh
++++ b/unix/hlib/irafarch.csh
+@@ -158,6 +158,8 @@
+ 
+     case redhat:
+     case linux:
++    case linuxarm:
++    case linuxppc:
+     case linux64:
+         if ($?IRAFARCH) then
+             set mach 		= "$IRAFARCH"
+@@ -170,6 +172,14 @@
+                 set mach 	= "linux64"
+                 set hmach 	= "linux64"
+ 	        set nbits	= 64
++	    else if ($MNAME_M =~ arm*) then		# Linux arm
++                set mach 	= "linuxarm"
++                set hmach 	= "linuxarm"
++	        set nbits	= 32
++	    else if ($MNAME_M =~ ppc*) then		# Linux arm
++                set mach 	= "linuxppc"
++                set hmach 	= "linuxppc"
++	        set nbits	= 32
+             else					# Linux
+                 set mach 	= "linux"
+                 set hmach 	= "linux"
+--- /dev/null
++++ b/unix/as.linuxarm/zsvjmp.s
+@@ -0,0 +1,38 @@
++	.file	"zsvjmp.s"
++
++@ Copyright (c) 2013 Ole Streicher <debian at liska.ath.cx>
++@
++@ This file contains the Linux armel/armhf version of ZSVJMP for Debian.
++
++	.arch armv6
++	.text
++	.global	zsvjmp_
++	.type	zsvjmp_, %function
++
++zsvjmp_:
++	mov	r2, #0         @ 
++	str	r2, [r1, #0]   @ *status = 0
++	str	r1, [r0, #0]   @ buf[0] = status
++	add	r0, r0, #4     @ &buf[1] --> 1st arg for sigsetjmp
++	mov	r1, #0         @ 0       --> 2nd arg for sigsetjmp
++	b	__sigsetjmp    @ call sigsetjmp
++
++@ This is a precompiled version from unix/os/zwhen.c
++@	.align	2
++@	.global	gfpucw_
++@	.type	gfpucw_, %function
++ at gfpucw_:
++@	mrc p10, 7, r3, cr1, cr0, 0
++@	str	r3, [r0, #0]
++@	mov	r0, r3
++@	bx	lr
++@	.size	gfpucw_, .-gfpucw_
++
++@	.align	2
++@	.global	sfpucw_
++@	.type	sfpucw_, %function
++ at sfpucw_:
++@	ldr	r0, [r0, #0]
++@	mcr p10, 7, r0, cr1, cr0, 0
++@	bx	lr
++@	.size	sfpucw_, .-sfpucw_
+--- a/unix/hlib/sysinfo
++++ b/unix/hlib/sysinfo
+@@ -128,6 +128,14 @@
+ 	    set LIBFILES    	= ""
+ 	    set LS		= "/bin/ls -s"
+ 	    set LSDF		= "-lLt"
++        else if (`$uname_cmd -m` =~ arm*) then	# LinuxPPC
++            set mach 		= "linuxarm"
++            set hmach 		= "linuxarm"
++	    set TAPES		= "/dev/*st[0-7]"
++	    set shlib		= "no"
++	    set LIBFILES    	= ""
++	    set LS		= "/bin/ls -s"
++	    set LSDF		= "-lLt"
+         else
+             if (-f /etc/redhat-release) then		# RedHat Linux
+                 set mach 	= "redhat"
+--- a/unix/os/irafpath.c
++++ b/unix/os/irafpath.c
+@@ -71,66 +71,7 @@
+ 	/* Look first in HBIN.
+ 	 */
+ 	strcpy (pathname, (char *)hostdir);
+-	strcat (pathname, "bin.");
+-
+-#ifdef LINUXPPC
+-	strcat (pathname, "linuxppc");
+-#else
+-#ifdef CYGWIN
+-	strcat (pathname, "cygwin");
+-#else
+-#ifdef LINUX64
+-	strcat (pathname, "linux64");
+-#else
+-#ifdef REDHAT
+-	strcat (pathname, "redhat");
+-#else
+-#ifdef LINUX
+-	strcat (pathname, "linux");
+-#else
+-#ifdef BSD
+-	strcat (pathname, "freebsd");
+-#else
+-#ifdef IPAD
+-	strcat (pathname, "ipad");
+-#else
+-#ifdef MACOSX
+-	/* Setup for cross-compilation.
+-	 */
+-	{ char *irafpath;
+-
+-            if ((irafarch = getenv("IRAFARCH"))) {
+-                if (strcmp (irafarch, "macosx") == 0) 
+-		    strcat (pathname, "macosx");
+-                else if (strcmp (irafarch, "macintel") == 0) 
+-		    strcat (pathname, "macintel");
+-                else 
+-		    strcat (pathname, "macosx");
+-            }
+-        }
+-#else
+-#ifdef SOLARIS
+-#ifdef X86
+-	strcat (pathname, "sunos");
+-#else
+-	strcat (pathname, "ssol");
+-#endif
+-#else
+-#ifdef sparc
+-	strcat (pathname, "sparc");
+-#else
+-#endif
+-#endif
+-#endif
+-#endif
+-#endif
+-#endif
+-#endif
+-#endif
+-#endif
+-#endif
+-
+-	strcat (pathname, "/");
++	strcat (pathname, "bin/");
+ 	strcat (pathname, fname);
+ 	if (access (pathname, 0) == 0)
+ 	    return (pathname);
+--- a/unix/hlib/irafuser.csh
++++ b/unix/hlib/irafuser.csh
+@@ -86,6 +86,8 @@
+     breaksw
+ 
+ case linux:
++case linuxppc:
++case linuxarm:
+ case redhat:
+     setenv HSI_CF "${CFLAGS} -I/usr/include -I${hlib}libc -DLINUX -DPOSIX -DSYSV -DHOST_F2C -DHOST_CURL -DHOST_EXPAT -DHOST_XMLRPC -DHOST_CFITSIO"
+     setenv HSI_XF "-Inolibc -I${hlib}libc -w -/Wunused"
+--- a/unix/hlib/install
++++ b/unix/hlib/install
+@@ -166,13 +166,17 @@
+ 	    set shlib		= "no"
+ 	    set LIBFILES    	= ""
+         else if (`$uname_cmd -m` == "ppc") then		    # LinuxPPC
+-            if (-f /etc/redhat-release) then
+                 set mach 	= "linuxppc"
+                 set hmach 	= "linuxppc"
+ 		set TAPES	= "/dev/*st[0-7]"
+ 		set shlib	= "no"
+ 		set LIBFILES    = ""
+-            endif
++        else if (`$uname_cmd -m` =~ arm*) then		    # LinuxARM
++            set mach 	= "linuxarm"
++            set hmach 	= "linuxarm"
++	    set TAPES	= "/dev/*st[0-7]"
++	    set shlib	= "no"
++	    set LIBFILES    = ""
+         else
+             if (-f /etc/redhat-release) then		    # RedHat/Fedora
+                 set mach 	= "redhat"
+--- a/unix/hlib/cl.csh
++++ b/unix/hlib/cl.csh
+@@ -103,7 +103,11 @@
+     if ("$os_mach" == "linux") then		# handle linux systems
+         if (`uname -m` == "x86_64") then
+             setenv mach linux64
+-        else
++        else if (`uname -m` == "ppc") then
++            setenv mach linuxppc
++        else if (`uname -m` == arm*) then
++            setenv mach linuxarm
++	else
+             setenv mach linux
+         endif
+     else if ("$os_mach" == "darwin") then	# handle Mac systems
+--- a/unix/hlib/mkpkg.inc
++++ b/unix/hlib/mkpkg.inc
+@@ -38,6 +38,10 @@
+ $set	XFLAGS		= "-c -w"	# default XC compile flags
+ $set	XVFLAGS		= "-c -w"	# VOPS XC compile flags
+ $set	LFLAGS		= "-Nz"		# default XC link flags
++$else $ifeq (MACH, linuxarm) then
++$set	XFLAGS		= "-c -w"	# default XC compile flags
++$set	XVFLAGS		= "-c -w"	# VOPS XC compile flags
++$set	LFLAGS		= "-Nz"		# default XC link flags
+ $else $ifeq (MACH, sunos) then
+ $set	XFLAGS		= "-c -w"	# default XC compile flags
+ $set	XVFLAGS		= "-c -w"	# VOPS XC compile flags
+@@ -64,7 +68,7 @@
+ 
+ $ifeq (MACH, linux, redhat, macosx, macintel, ipad) then
+     $include "hlib$mkpkg.sf.MACX"
+-$else $ifeq (MACH, linux, redhat, linuxppc) then
++$else $ifeq (MACH, linux, redhat, linuxarm, linuxppc) then
+     $include "hlib$mkpkg.sf.LNUX"
+ $else $ifeq (MACH, linux64) then
+     $include "hlib$mkpkg.sf.LNUX64"
+--- a/pkg/ecl/mkpkg
++++ b/pkg/ecl/mkpkg
+@@ -6,7 +6,7 @@
+ update:					# make ecl.e and install in bin$
+         $ifeq (MACH, sparc) then
+             $set    XFLAGS          = "$(XFLAGS) -/DNO_READLINE"
+-        $else $ifneq (MACH, linux, linux64) then
++        $else $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
+             $call   libs at readline
+         $endif
+         $endif
+@@ -27,7 +27,7 @@
+ 	    $endif
+ 	    $ifolder (ytab.c,  grammar.y)
+ 		$echo "rebuilding ytab.c"
+-		$ifeq (MACH, linux, linux64, redhat, suse)
++		$ifeq (MACH, linux, linux64, linuxppc, linuxarm)
+ 		    !yacc -vd grammar.y; 
+ 		    !egrep -v "\<stdlib.h\>" y.tab.c > ytab.c; 
+ 		    !egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c
+@@ -54,7 +54,7 @@
+ 
+ 	$ifeq (MACH, sparc) then
+ 	    $set    XFLAGS          = "$(XFLAGS) -/DNO_READLINE"
+-	$else  $ifneq (MACH, linux, linux64) then
++	$else  $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
+ 	    $call	libs at readline
+         $endif
+ 	$endif
+@@ -72,9 +72,7 @@
+ link:
+ 	$set	LIBS = "-lc -lcur -lds -lstg"
+ 	$ifneq (MACH, sparc) then
+-	  $ifeq (MACH, linux) then
+-	    $set	LIBS2 = "-lreadline -/L/usr/lib32 -lncurses"
+-	  $else $ifeq (MACH, linux64) then
++	  $ifeq (MACH, linux, linux64, linuxppc, linuxarm) then
+ 	    $set	LIBS2 = "-lreadline -lncurses"
+     	  $else
+ 	    $set	LIBS2 = "libreadline.a -lncurses"
+--- a/pkg/vocl/mkpkg
++++ b/pkg/vocl/mkpkg
+@@ -6,7 +6,7 @@
+ update:					# make vocl.e and install in bin$
+         $ifeq (MACH, sparc) then
+             $set    XFLAGS          = "$(XFLAGS) -/DNO_READLINE"
+-        $else $ifneq (MACH, linux, linux64) then
++        $else $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
+             $call   libs at readline
+         $endif
+         $endif
+@@ -27,7 +27,7 @@
+ 	    $endif
+ 	    $ifolder (ytab.c,  grammar.y)
+ 		$echo "rebuilding ytab.c"
+-		$ifeq (MACH, linux, linux64, redhat, suse)
++		$ifeq (MACH, linux, linux64, linuxppc, linuxarm)
+ 		    !yacc -vd grammar.y; 
+ 		    !egrep -v "\<stdlib.h\>" y.tab.c > ytab.c; 
+ 		    !egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c
+@@ -54,7 +54,7 @@
+ 
+ 	$ifeq (MACH, sparc) then
+ 	    $set    XFLAGS          = "$(XFLAGS) -/DNO_READLINE"
+-	$else  $ifneq (MACH, linux, linux64) then
++	$else  $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
+ 	    $call	libs at readline
+         $endif
+ 	$endif
+@@ -72,9 +72,7 @@
+ link:
+ 	$set	LIBS = "-lc -lcur -lds -lstg"
+ 	$ifneq (MACH, sparc) then
+-	  $ifeq (MACH, linux) then
+-	    $set	LIBS2 = "-lreadline -/L/usr/lib32 -lncurses"
+-	  $else $ifeq (MACH, linux64) then
++	  $ifeq (MACH, linux, linux64, linuxppc, linuxarm) then
+ 	    $set	LIBS2 = "-lreadline -lncurses"
+     	  $else
+ 	    $set	LIBS2 = "libreadline.a -lncurses"
+--- a/vendor/voclient/getarch
++++ b/vendor/voclient/getarch
+@@ -132,6 +132,8 @@
+ 
+     case redhat:
+     case linux:
++    case linuxppc:
++    case linuxarm:
+     case linux64:
+         if ($?VOCARCH) then
+             set mach 		= "$VOCARCH"
+@@ -142,6 +144,12 @@
+             if ($MNAME_M == "x86_64") then		# Linux x86_64
+                 set mach 	= "linux64"
+ 	        set nbits	= 64
++            else if ($MNAME_M == "ppc") then		# Linux PPC
++                set mach 	= "linuxppc"
++	        set nbits	= 32
++            else if ($MNAME_M == "arm") then		# Linux PPC
++                set mach 	= "linuxarm"
++	        set nbits	= 32
+             else					# Linux
+                 set mach 	= "linux"
+ 	        set nbits	= 32
+--- a/Makefile
++++ b/Makefile
+@@ -111,6 +111,10 @@
+ 	(util/mkarch linux)
+ linux64::
+ 	(util/mkarch linux64)
++linuxppc::
++	(util/mkarch linuxppc)
++linuxarm::
++	(util/mkarch linuxarm)
+ freebsd::
+ 	(util/mkarch freebsd)
+ cygwin::
+--- a/vo/mkpkg
++++ b/vo/mkpkg
+@@ -61,6 +61,22 @@
+         $set DIRS = "lib src"
+         !$(hlib)/mkfloat.csh linux -d $(DIRS)
+         ;
++linuxppc:                                  # install Linux binaries
++	$ifnfile (bin.linuxppc)
++	    !mkdir bin.linuxppc
++	$endif
++        $verbose off
++        $set DIRS = "lib src"
++        !$(hlib)/mkfloat.csh linuxppc -d $(DIRS)
++        ;
++linuxarm:                                  # install Linux binaries
++	$ifnfile (bin.linuxarm)
++	    !mkdir bin.linuxarm
++	$endif
++        $verbose off
++        $set DIRS = "lib src"
++        !$(hlib)/mkfloat.csh linuxarm -d $(DIRS)
++        ;
+ linux64:                                # install x86_64 binaries
+ 	$ifnfile (bin.linux64)
+ 	    !mkdir bin.linux64
+--- a/mkpkg
++++ b/mkpkg
+@@ -145,6 +145,16 @@
+         !$(hlib)/mkfloat.csh linux
+         !(cd ./unix; setenv MACH linux; sh setarch.sh)
+         ;
++linuxppc:				# install linux (32-bit) binaries
++        $verbose off
++        !$(hlib)/mkfloat.csh linuxppc
++        !(cd ./unix; setenv MACH linuxppc; sh setarch.sh)
++        ;
++linuxarm:				# install linux (32-bit) binaries
++        $verbose off
++        !$(hlib)/mkfloat.csh linuxarm
++        !(cd ./unix; setenv MACH linuxarm; sh setarch.sh)
++        ;
+ linux64:				# install linux (64-bit) binaries
+         $verbose off
+         !$(hlib)/mkfloat.csh linux64
+--- a/noao/mkpkg
++++ b/noao/mkpkg
+@@ -260,6 +260,18 @@
+ 	             nproto nobsolete rv surfphot twodspec obsutil"
+ 	!$(hlib)/mkfloat.csh linux -d $(DIRS)
+ 	;
++linuxppc:				# install Linux binaries
++	$verbose off
++	$set DIRS = "lib artdata astcat astutil digiphot imred mtlocal onedspec\
++	             nproto nobsolete rv surfphot twodspec obsutil"
++	!$(hlib)/mkfloat.csh linuxppc -d $(DIRS)
++	;
++linuxarm:				# install Linux binaries
++	$verbose off
++	$set DIRS = "lib artdata astcat astutil digiphot imred mtlocal onedspec\
++	             nproto nobsolete rv surfphot twodspec obsutil"
++	!$(hlib)/mkfloat.csh linuxppc -d $(DIRS)
++	;
+ linux64:				# install Linux x86_64 binaries
+ 	$verbose off
+ 	$set DIRS = "lib artdata astcat astutil digiphot imred mtlocal onedspec\
+--- a/unix/os/zxwhen.c
++++ b/unix/os/zxwhen.c
+@@ -453,7 +453,6 @@
+ }
+ 
+ 
+-#ifdef LINUX64
+ 
+ int
+ gfpucw_ (XINT *xcw)
+@@ -472,4 +471,3 @@
+         return cw;
+ }
+ 
+-#endif
+--- a/unix/boot/spp/xc.c
++++ b/unix/boot/spp/xc.c
+@@ -787,9 +787,6 @@
+ 	    }
+ 	}
+ #endif
+-#if (defined(LINUX) && !defined(MACH64))
+-	arglist[nargs++] = "-m32";
+-#endif
+ #if (defined(BSD))
+ 	arglist[nargs++] = "-m32";
+ #endif
+@@ -868,9 +865,6 @@
+ 	    }
+ 	}
+ #endif
+-#if (defined(LINUX) && !defined(MACH64))
+-	arglist[nargs++] = "-m32";
+-#endif
+ #if (defined(BSD))
+ 	arglist[nargs++] = "-m32";
+ #endif
+@@ -939,9 +933,6 @@
+ #ifdef LINUX64
+ 	arglist[nargs++] = "-DLINUX64";		/* needed for zmain.c */
+ #endif
+-#if (defined(LINUX) && !defined(MACH64))
+-	arglist[nargs++] = "-m32";
+-#endif
+ #ifdef LINUX
+ 	arglist[nargs++] = "-DLINUX";
+ #ifdef REDHAT
+@@ -1067,9 +1058,6 @@
+ #if (defined(LINUX) && !defined(MACH64))
+ 	arglist[nargs++] = "-Wl,--defsym,mem_=0";
+ #endif
+-#if (defined(LINUX) && !defined(MACH64))
+-	arglist[nargs++] = "-m32";
+-#endif
+ #if (defined(BSD))
+ 	arglist[nargs++] = "-m32";
+ 	arglist[nargs++] = "-L/usr/lib32";
diff --git a/debian/patches/series b/debian/patches/series
index 6c0db9a..0c4c057 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ fortran.patch
 unop_int.patch
 compiler-flags.patch
 fix_compiler_errors.patch
+add_other_archs.patch
diff --git a/debian/rules b/debian/rules
index 13060d4..9e6e74b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,8 +20,26 @@ export CC=gcc
 	dh $@
 
 tmp_links:
+	if [ ! -d bin.${IRAFARCH} ] ; then \
+	    mkdir -p bin.${IRAFARCH} ; \
+	    touch bin.${IRAFARCH}/IRAF.NET
+	    touch bin.${IRAFARCH}/IB.LNUX
+	fi
 	ln -sf bin.${IRAFARCH} bin
+	if [ ! -d noao/bin.${IRAFARCH} ] ; then \
+	    mkdir -p noao/bin.${IRAFARCH} ; \
+	    touch noao/bin.${IRAFARCH}/IRAF.NET
+	    touch noao/bin.${IRAFARCH}/IB.LNUX
+	fi
 	ln -sf bin.${IRAFARCH} noao/bin
+	if [ ! -d unix/bin.${IRAFARCH} ] ; then \
+	    mkdir -p unix/bin.${IRAFARCH} ; \
+	fi
+	ln -sf bin.${IRAFARCH} unix/bin
+	if [ ! -d unix/as.linuxarm ] ; then \
+	    mkdir -p unix/as.linuxarm ; \
+        fi
+	( cd unix/as.linuxarm ; ln -s ../as.linux/*[cx] . )
 	ln -sf mach`getconf LONG_BIT`.h ${hlib}mach.h
 	ln -sf iraf`getconf LONG_BIT`.h ${hlib}iraf.h
 
@@ -94,5 +112,9 @@ override_dh_clean:
 	find . -name \*.[ao] |xargs rm -f
 	rm -f sys/vops/ak/*.x
 	rm -f unix/bin.*/[a-z]* vo/bin.*/[a-z]*
+	rm -f unix/as.linuxarm/*[cx]
+	rm -rf bin.linuxarm bin.linuxppc noao/bin.linuxarm
+	rm -rf unix/bin.*
+	rm -rf noao/bin.linuxarm noao/bin.linuxppc
 	rm -rf vendor/voclient/include/
 	dh_clean
\ No newline at end of file

-- 
Image Reduction and Analysis Facility



More information about the debian-science-commits mailing list