[arch-commits] Commit in martian-utils/repos (6 files)

Thomas Baechler thomas at archlinux.org
Sat Jun 7 10:00:35 UTC 2008


    Date: Saturday, June 7, 2008 @ 06:00:34
  Author: thomas
Revision: 2556

Merged revisions 2-2555 via svnmerge from 
svn+ssh://archlinux.org/home/svn-packages/martian-utils/trunk

........
  r356 | aaron | 2008-04-19 00:56:27 +0200 (Sa, 19 Apr 2008) | 1 line
  
  Added svn:keywords to all PKGBUILDs
........
  r2555 | thomas | 2008-06-07 11:59:40 +0200 (Sa, 07 Jun 2008) | 1 line
  
  upgpkg: martian-utils 20080407-1
........

Added:
  martian-utils/repos/extra-i686/fastcall.patch
    (from rev 2555, martian-utils/trunk/fastcall.patch)
  martian-utils/repos/extra-i686/martian
    (from rev 2555, martian-utils/trunk/martian)
  martian-utils/repos/extra-i686/martian.conf.d
    (from rev 2555, martian-utils/trunk/martian.conf.d)
  martian-utils/repos/extra-i686/stringify.patch
    (from rev 2555, martian-utils/trunk/stringify.patch)
Modified:
  martian-utils/repos/extra-i686/	(properties)
  martian-utils/repos/extra-i686/PKGBUILD

-----------------+
 PKGBUILD        |   48 ++++++++++-------
 fastcall.patch  |  148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 martian         |   50 ++++++++++++++++++
 martian.conf.d  |   14 +++++
 stringify.patch |   15 +++++
 5 files changed, 255 insertions(+), 20 deletions(-)


Property changes on: martian-utils/repos/extra-i686
___________________________________________________________________
Name: svnmerge-integrated
   - /martian-utils/trunk:1
   + /martian-utils/trunk:1-2555

Modified: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2008-06-07 09:59:40 UTC (rev 2555)
+++ extra-i686/PKGBUILD	2008-06-07 10:00:34 UTC (rev 2556)
@@ -1,31 +1,39 @@
 # $Id$
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
-# Contributor: Steve Vialle <steve_v at orcon.net.nz>
+# Contributor: Jonathan Liu <net147 at hotmail.com>
 
 pkgname=martian-utils
-pkgver=20061203
+pkgver=20080407
 pkgrel=1
-license=("GPL" "custom:Agere Systems license")
+pkgdesc="Alternative driver for the Agere Systems PCI WinModem."
 arch=('i686')
-_kernver=2.6.21-ARCH
-pkgdesc="Alternative drivers for the Mars chipset Lucent LT Winmodem (PCI). For beyond 2.6 kernel" 
 url="http://martian.barrelsoutofbond.org/"
-source=(http://www.barrelsoutofbond.org/downloads/martian/martian-full-${pkgver}.tar.gz martian.rc.d) 
+license=("GPL" "custom:Agere Systems WinModem License")
+makedepends=('kernel26>=2.6.25.3-1' 'kernel26<2.6.26')
 depends=('glibc')
-options=('NOSTRIP')
 replaces=('ltmodem-utils')
+backup=(etc/conf.d/martian)
+options=(!strip)
+source=(http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/martian-full-${pkgver}.tar.gz
+        fastcall.patch
+        stringify.patch
+        martian
+        martian.conf.d)
+md5sums=('11fc90f7522810a002b5632dccb0af5c'
+         'ad11cd70747c4217122c12172bca4ad0'
+         'b6b32f57e13d60f4427ba8361f52478a'
+         'e13f080f084db58f32bbc09141896e48'
+         'ee94c46259e9c4f7f16980060ccd3f4d')
 
+_kernver=2.6.25-ARCH
+
 build() { 
-
-#Build
-  cd $startdir/src/martian && make KERNEL_DIR=/usr/src/linux-${_kernver} all || return 1 
-
-#install helper app
-install -D -m 755 $startdir/src/martian/modem/martian_modem $startdir/pkg/usr/sbin/martian_modem
-
-#Install rc script
-install -D -m 755 $startdir/src/martian.rc.d $startdir/pkg/etc/rc.d/martian
-}  
-
-md5sums=('599dcd2441ce996bb466853cb95b9ec9'
-         '4e735ae1e74b8c2740637ff2308b9a33')
+  cd $startdir/src/martian-full-$pkgver
+  patch -Np1 -i ../fastcall.patch || return 1
+  patch -Np1 -i ../stringify.patch || return 1
+  make KERNEL_DIR=/usr/src/linux-${_kernver} all || return 1
+  install -D -m755 $startdir/src/martian-full-$pkgver/modem/martian_modem $startdir/pkg/usr/sbin/martian_modem
+  install -D -m755 $startdir/src/martian $startdir/pkg/etc/rc.d/martian
+  install -D -m644 $startdir/src/martian.conf.d $startdir/pkg/etc/conf.d/martian
+  install -D -m644 $startdir/src/martian-full-$pkgver/modem/ASWMLICENSE $startdir/pkg/usr/share/licenses/$pkgname/LICENSE
+}

Copied: martian-utils/repos/extra-i686/fastcall.patch (from rev 2555, martian-utils/trunk/fastcall.patch)
===================================================================
--- extra-i686/fastcall.patch	                        (rev 0)
+++ extra-i686/fastcall.patch	2008-06-07 10:00:34 UTC (rev 2556)
@@ -0,0 +1,148 @@
+diff -ru martian-full-20080407.orig/kmodule/marsio.c martian-full-20080407/kmodule/marsio.c
+--- martian-full-20080407.orig/kmodule/marsio.c	2006-12-01 13:13:01.000000000 +1100
++++ martian-full-20080407/kmodule/marsio.c	2008-06-07 15:05:35.000000000 +1000
+@@ -4,7 +4,7 @@
+ #include "kmartian.h"
+ #include "../martian.h"
+ 
+-u8 fastcall mars_read_register (struct martian_common *common, u8 reg)
++u8 __attribute__((fastcall)) mars_read_register (struct martian_common *common, u8 reg)
+ {
+ 	outb (  reg,
+ 
+@@ -16,13 +16,13 @@
+ 	return inb (common->BaseAddressData);
+ }
+ 
+-void fastcall mars_write_register (struct martian_common *common, u8 reg, u8 val) 
++void __attribute__((fastcall)) mars_write_register (struct martian_common *common, u8 reg, u8 val) 
+ {
+ 	outb (reg, common->BaseAddress);
+ 	return outb (val, common->BaseAddressData);
+ }
+ 
+-void fastcall mars_write_word (struct martian_common *common, u16 addr, u16 val)
++void __attribute__((fastcall)) mars_write_word (struct martian_common *common, u16 addr, u16 val)
+ {
+ 	addr = common->BaseAddress + addr;
+ 	outw (val, addr);
+@@ -248,7 +248,7 @@
+ 	// ASSERT (mfifo_ok(&mdev->dce_tx), mcb->kfifo_tx_bad++;);
+ }
+ 
+-int fastcall process_stream (struct martian *mdev) {
++int __attribute__((fastcall)) process_stream (struct martian *mdev) {
+ 	struct martian_common *mcb = mdev->common;
+ 	u32 io_dce_rx_rptr = mcb->io_dce_rx_rptr;
+ 	u32 io_dce_rx_wptr = mcb->io_dce_rx_wptr;
+diff -ru martian-full-20080407.orig/kmodule/marsio.h martian-full-20080407/kmodule/marsio.h
+--- martian-full-20080407.orig/kmodule/marsio.h	2006-07-20 11:57:08.000000000 +1000
++++ martian-full-20080407/kmodule/marsio.h	2008-06-07 15:05:35.000000000 +1000
+@@ -5,9 +5,9 @@
+ #ifndef __MARSIO_H
+ #define __MARSIO_H
+ 
+-u8   FASTCALL( mars_read_register (struct martian_common *common, u8 reg) );
+-void FASTCALL( mars_write_register (struct martian_common *common, u8 reg, u8 val) );
+-void FASTCALL( mars_write_word (struct martian_common *common, u16 addr, u16 val) );
+-int FASTCALL( process_stream (struct martian *mdev) );
++u8   __attribute__((fastcall))( mars_read_register (struct martian_common *common, u8 reg) );
++void __attribute__((fastcall))( mars_write_register (struct martian_common *common, u8 reg, u8 val) );
++void __attribute__((fastcall))( mars_write_word (struct martian_common *common, u16 addr, u16 val) );
++int __attribute__((fastcall))( process_stream (struct martian *mdev) );
+ 
+ #endif  // __MARSIO_H
+diff -ru martian-full-20080407.orig/kmodule/mfifo.c martian-full-20080407/kmodule/mfifo.c
+--- martian-full-20080407.orig/kmodule/mfifo.c	2006-07-23 17:07:40.000000000 +1000
++++ martian-full-20080407/kmodule/mfifo.c	2008-06-07 15:05:35.000000000 +1000
+@@ -1,22 +1,22 @@
+ #include "mfifo.h"
+ #include <linux/string.h>
+ 
+-static void fastcall mfifo_wrap_bin (mfifo_t *fifo, int *ending) {
++static void __attribute__((fastcall)) mfifo_wrap_bin (mfifo_t *fifo, int *ending) {
+ 	*ending &= fifo->mask;
+ }
+ 
+-static int fastcall mfifo_space_bin (mfifo_t *fifo) {
++static int __attribute__((fastcall)) mfifo_space_bin (mfifo_t *fifo) {
+ 	return CIRC_SPACE (fifo->head, fifo->tail, fifo->size);
+ }
+ 
+-static void fastcall mfifo_wrap_gen (mfifo_t *fifo, int *ending) {
++static void __attribute__((fastcall)) mfifo_wrap_gen (mfifo_t *fifo, int *ending) {
+ 	if (*ending >= fifo->size)
+ 		*ending %= fifo->size;
+ 	else if (*ending < 0) 
+ 		*ending = (*ending % fifo->size) + fifo->size;
+ }
+ 
+-static int fastcall mfifo_space_gen (mfifo_t *fifo) {
++static int __attribute__((fastcall)) mfifo_space_gen (mfifo_t *fifo) {
+ 	int head = fifo->head + 1;
+ 	int tail = (fifo->tail >= head) ? fifo->tail 
+ 					      : fifo->tail + fifo->size;
+@@ -25,36 +25,36 @@
+ }
+ 
+ /* set to the head */
+-static void fastcall mfifo_setu8 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setu8 (mfifo_t *fifo, void *e) {
+ 	((u8 *) fifo->buf) [fifo->head] = * (u8 *) e;
+ }
+ 
+-static void fastcall mfifo_setu16 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setu16 (mfifo_t *fifo, void *e) {
+ 	((u16 *) fifo->buf) [fifo->head] = * (u16 *) e;
+ }
+ 
+-static void fastcall mfifo_setu32 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setu32 (mfifo_t *fifo, void *e) {
+ 	((u32 *) fifo->buf) [fifo->head] = * (u32 *) e;
+ }
+ 
+-static void fastcall mfifo_setgen (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setgen (mfifo_t *fifo, void *e) {
+ 	memcpy (fifo->head * fifo->esize + (char *) fifo->buf, e, fifo->esize);
+ }
+ 
+ /* get from tail */
+-static void fastcall mfifo_getu8 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getu8 (mfifo_t *fifo, void *e) {
+ 	* (u8 *) e = ((u8 *) fifo->buf) [fifo->tail];
+ }
+ 
+-static void fastcall mfifo_getu16 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getu16 (mfifo_t *fifo, void *e) {
+ 	 * (u16 *) e = ((u16 *) fifo->buf) [fifo->tail];
+ }
+ 
+-static void fastcall mfifo_getu32 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getu32 (mfifo_t *fifo, void *e) {
+ 	* (u32 *) e = ((u32 *) fifo->buf) [fifo->tail];
+ }
+ 
+-static void fastcall mfifo_getgen (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getgen (mfifo_t *fifo, void *e) {
+ 	memcpy (e, fifo->tail * fifo->esize + (char *) fifo->buf, fifo->esize);
+ }
+ 
+diff -ru martian-full-20080407.orig/kmodule/mfifo.h martian-full-20080407/kmodule/mfifo.h
+--- martian-full-20080407.orig/kmodule/mfifo.h	2006-11-29 08:34:26.000000000 +1100
++++ martian-full-20080407/kmodule/mfifo.h	2008-06-07 15:05:35.000000000 +1000
+@@ -15,11 +15,11 @@
+ typedef struct _mfifo mfifo_t;
+ 
+ struct mfifo_ops {
+-	void fastcall (*set) (mfifo_t *fifo, void *el);
+-	void fastcall (*get) (mfifo_t *fifo, void *el);
++	void __attribute__((fastcall)) (*set) (mfifo_t *fifo, void *el);
++	void __attribute__((fastcall)) (*get) (mfifo_t *fifo, void *el);
+ 
+-	void FASTCALL ((*wrap) (mfifo_t *fifo, int *ending) );
+-	int FASTCALL ( (*space) (mfifo_t *fifo) );
++	void __attribute__((fastcall)) ((*wrap) (mfifo_t *fifo, int *ending) );
++	int __attribute__((fastcall)) ( (*space) (mfifo_t *fifo) );
+ };
+ 
+ struct _mfifo {

Copied: martian-utils/repos/extra-i686/martian (from rev 2555, martian-utils/trunk/martian)
===================================================================
--- extra-i686/martian	                        (rev 0)
+++ extra-i686/martian	2008-06-07 10:00:34 UTC (rev 2556)
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+MARTIAN_TTY=
+MARTIAN_USER=
+MARTIAN_GROUP=
+MARTIAN_COUNTRY=
+[ -f /etc/conf.d/martian ] && . /etc/conf.d/martian
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PIDFILE="/var/run/martian.pid"
+PID=`pidof -o %PPID /usr/sbin/martian_modem`
+
+case "$1" in
+  start)
+    stat_busy "Starting Martian Drivers"
+    [ -z "$PID" ] && martian_modem --daemon \
+      ${MARTIAN_USER:+--user=${MARTIAN_USER}} \
+      ${MARTIAN_GROUP:+--group=${MARTIAN_GROUP}} \
+      ${MARTIAN_COUNTRY:+--country=${MARTIAN_COUNTRY}} \
+      ${MARTIAN_TTY:+${MARTIAN_TTY}} &>/dev/null &
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      pidof -o %PPID /usr/sbin/martian_modem > "$PIDFILE"
+      add_daemon martian
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping Martian Drivers"
+    [ -f "$PIDFILE" ] && kill `cat $PIDFILE` &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm -f "$PIDFILE" &> /dev/null
+      rm_daemon martian
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "Usage $0 {start|stop|restart}"
+    ;;
+esac

Copied: martian-utils/repos/extra-i686/martian.conf.d (from rev 2555, martian-utils/trunk/martian.conf.d)
===================================================================
--- extra-i686/martian.conf.d	                        (rev 0)
+++ extra-i686/martian.conf.d	2008-06-07 10:00:34 UTC (rev 2556)
@@ -0,0 +1,14 @@
+# Martian Modem Configuration (martian_modem)
+
+# tty to create for accessing the modem
+MARTIAN_TTY=/dev/ttySM0
+
+# tty owner user (--user)
+MARTIAN_USER=
+
+# tty owner group (--group)
+MARTIAN_GROUP=
+
+# Country (--country)
+# Print supported countries: martian_modem --info countries
+MARTIAN_COUNTRY=

Copied: martian-utils/repos/extra-i686/stringify.patch (from rev 2555, martian-utils/trunk/stringify.patch)
===================================================================
--- extra-i686/stringify.patch	                        (rev 0)
+++ extra-i686/stringify.patch	2008-06-07 10:00:34 UTC (rev 2556)
@@ -0,0 +1,15 @@
+diff -ru martian-full-20080407.orig/kmodule/kmartian.h martian-full-20080407/kmodule/kmartian.h
+--- martian-full-20080407.orig/kmodule/kmartian.h	2006-12-01 13:13:01.000000000 +1100
++++ martian-full-20080407/kmodule/kmartian.h	2008-06-07 13:43:11.000000000 +1000
+@@ -11,6 +11,11 @@
+ #include "fifo.h"
+ #include "mfifo.h"
+ 
++#ifndef __stringify
++#define __stringify_nomacro(x)	#x
++#define __stringify(x)		__stringify_nomacro (x)
++#endif
++
+ #define MPREFIX			__stringify (KBUILD_MODNAME)
+ 
+ #define MINFO(fmt...)		printk (KERN_INFO MPREFIX ": " fmt)





More information about the arch-commits mailing list