OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   12-Oct-2006 19:42:00
  Branch: HEAD                             Handle: 2006101218420000

  Modified files:
    openpkg-src/openser     openser.patch openser.spec

  Log:
    port to Solaris

  Summary:
    Revision    Changes     Path
    1.3         +92 -2      openpkg-src/openser/openser.patch
    1.23        +8  -4      openpkg-src/openser/openser.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openser/openser.patch
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 openser.patch
  --- openpkg-src/openser/openser.patch 16 Jul 2006 08:01:00 -0000      1.2
  +++ openpkg-src/openser/openser.patch 12 Oct 2006 17:42:00 -0000      1.3
  @@ -1,6 +1,6 @@
   Index: Makefile.defs
  ---- Makefile.defs.orig       2006-07-10 19:57:20 +0200
  -+++ Makefile.defs    2006-07-16 09:54:39 +0200
  +--- Makefile.defs.orig       2006-07-10 19:57:20.000000000 +0200
  ++++ Makefile.defs    2006-10-12 16:46:28.371048766 +0200
   @@ -987,6 +987,8 @@
    
    endif #mode=release
  @@ -21,3 +21,93 @@
    endif
    
    ifneq ($(found_lock_method), yes)
  +Index: cfg.y
  +--- cfg.y.orig       2006-07-10 15:37:02.000000000 +0200
  ++++ cfg.y    2006-10-12 16:46:28.371878474 +0200
  +@@ -854,7 +854,7 @@
  +                                                             
tos=IPTOS_THROUGHPUT;
  +                                                     } else if 
(strcasecmp($3,"IPTOS_RELIABILITY")) {
  +                                                             
tos=IPTOS_RELIABILITY;
  +-#if !defined(__OS_solaris) || !defined(__OS_netbsd)
  ++#if (!defined(__OS_solaris) || !defined(__OS_netbsd)) && 
defined(IPTOS_MINCOST)
  +                                                     } else if 
(strcasecmp($3,"IPTOS_MINCOST")) {
  +                                                             
tos=IPTOS_MINCOST;
  + #endif
  +Index: rtpproxy/main.c
  +--- rtpproxy/main.c.orig     2006-07-05 02:14:19.000000000 +0200
  ++++ rtpproxy/main.c  2006-10-12 18:52:30.244787676 +0200
  +@@ -38,7 +38,7 @@
  + #include <sys/select.h>
  + #include <sys/stat.h>
  + #include <assert.h>
  +-#if !defined(__solaris__)
  ++#if !defined(__sun__)
  + #include <err.h>
  + #endif
  + #include <errno.h>
  +@@ -128,7 +128,11 @@
  +     bindhost = NULL;
  + 
  +     if ((n = resolve(ia, pf, bindhost, servname, AI_PASSIVE)) != 0)
  ++#if defined(__sun__)
  ++    errx(1, "setbindhost");
  ++#else
  +     errx(1, "setbindhost: %s", gai_strerror(n));
  ++#endif
  + }
  + 
  + static void
  +@@ -386,10 +390,9 @@
  + 
  +     rtpp_log_write(RTPP_LOG_DBUG, glog, "received command \"%s\"", buf);
  + 
  +-    cp = buf;
  +     argc = 0;
  +     memset(argv, 0, sizeof(argv));
  +-    for (ap = argv; (*ap = strsep(&cp, "\r\n\t ")) != NULL;)
  ++    for (ap = argv, cp = strtok(buf, "\r\n\t "); (cp = strtok(NULL, "\r\n\t 
")) != NULL;)
  +     if (**ap != '\0') {
  +         argc++;
  +         if (++ap >= &argv[10])
  +@@ -642,7 +645,11 @@
  +             }
  +         } else {
  +             rtpp_log_write(RTPP_LOG_ERR, glog, "getaddrinfo: %s",
  ++#if defined(__sun__)
  ++              "unknown");
  ++#else
  +               gai_strerror(n));
  ++#endif
  +         }
  +     }
  +     }
  +@@ -1170,7 +1177,7 @@
  +     if (umode == 0) {
  +     unlink(cmd_sock);
  +     memset(&ifsun, '\0', sizeof ifsun);
  +-#if !defined(__linux__) && !defined(__solaris__)
  ++#if !defined(__linux__) && !defined(__sun__)
  +     ifsun.sun_len = strlen(cmd_sock);
  + #endif
  +     ifsun.sun_family = AF_LOCAL;
  +@@ -1203,7 +1210,7 @@
  +     flags = fcntl(controlfd, F_GETFL);
  +     fcntl(controlfd, F_SETFL, flags | O_NONBLOCK);
  + 
  +-#if !defined(__solaris__)
  ++#if !defined(__sun__)
  +     if (nodaemon == 0) {
  +     if (daemon(0, 0) == -1)
  +         err(1, "can't switch into daemon mode");
  +Index: rtpproxy/rtpp_util.h
  +--- rtpproxy/rtpp_util.h.orig        2006-04-13 06:29:19.000000000 +0200
  ++++ rtpproxy/rtpp_util.h     2006-10-12 16:50:58.099769521 +0200
  +@@ -83,7 +83,7 @@
  + #define     DEFFILEMODE     
(S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
  + #endif
  + 
  +-#if defined(__solaris__)
  ++#if defined(__sun__)
  + #define err(exitcode, format, args...) \
  +   errx(exitcode, format ": %s", ## args, strerror(errno))
  + #define errx(exitcode, format, args...) \
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openser/openser.spec
  ============================================================================
  $ cvs diff -u -r1.22 -r1.23 openser.spec
  --- openpkg-src/openser/openser.spec  23 Sep 2006 11:37:18 -0000      1.22
  +++ openpkg-src/openser/openser.spec  12 Oct 2006 17:42:00 -0000      1.23
  @@ -37,7 +37,7 @@
   Group:        VoIP
   License:      GPL
   Version:      %{V_openser}
  -Release:      20060923
  +Release:      20061012
   
   #   package options
   %option       with_fsl  yes
  @@ -55,7 +55,7 @@
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
  -BuildPreReq:  OpenPKG, openpkg >= 20060823, make, gcc, flex, bison
  +BuildPreReq:  OpenPKG, openpkg >= 20060823, make, gcc, flex, bison, sed
   PreReq:       OpenPKG, openpkg >= 20060823
   %if "%{with_fsl}" == "yes"
   BuildPreReq:  fsl >= 1.2.0
  @@ -124,8 +124,12 @@
   
       #   build rtpproxy extension
       ( cd rtpproxy
  -      CC="%{l_cc}" \
  -      CFLAGS="%{l_cflags -O}" \
  +      export CC="%{l_cc}"
  +      export CFLAGS="%{l_cflags -O}"
  +      export LIBS=""
  +      case "%{l_platform -t}" in
  +          *-sunos* ) LIBS="$LIBS -lsocket -lnsl -lrt" ;;
  +      esac
         ./configure
         %{l_make} %{l_mflags}
       ) || exit $?
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to