# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171310 -7200 # Node ID bf1e61b0917ccd406c0d8acf3a89ddc09cf83452 # Parent 241043c7d6579ee03f25b6979fdbad5f9b4526f9 Port driver to Solaris 11 which dropped support for certain DDI constructs. diff -r 241043c7d657 -r bf1e61b0917c tun/tun.spec --- a/tun/tun.spec Tue Aug 28 18:28:20 2012 +0200 +++ b/tun/tun.spec Tue Aug 28 18:28:30 2012 +0200 @@ -1,6 +1,6 @@ ## ## tun.spec -- OpenPKG RPM Specification -## Copyright (c) 2009 Michael Schloh von Bennewitz +## Copyright (c) 2012 Michael Schloh von Bennewitz ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -36,19 +36,15 @@ Group: Driver License: GPL Version: 1.1 -Release: 20090106 +Release: 20120800 # list of sources Source0: http://vtun.sourceforge.net/tun/tun-%{version}.tar.gz Patch0: tun.patch # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20050726, make -PreReq: OpenPKG, openpkg >= 20050726 -AutoReq: no -AutoReqProv: no +BuildPreReq: OpenPKG, openpkg >= 20100101, make +PreReq: OpenPKG, openpkg >= 20100101 %description Tun provides packet reception and transmission for user space @@ -67,6 +63,14 @@ %prep %setup -q -n tun-%{version} %patch -p0 + case "%{l_platform -t}" in + *-sunos5.11 ) + %{l_shtool} subst \ + -e 's;ddi_power\([ \t]*/\* devo_power \*/\);NULL\1;' \ + -e 's;\(else if( (cmd == DDI_SUSPEND)\) || (cmd == DDI_PM_SUSPEND) );\1);' \ + solaris/tun.c + ;; + esac %build CC="%{l_cc}" \ @@ -79,7 +83,6 @@ ) || exit $? %install - rm -rf $RPM_BUILD_ROOT %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/lib/tun locplat=`grep 'OS_DIR *=' Makefile | sed -e 's;OS_DIR[^=][^=]*= *\([^ ][^ ]*\);\1;'` @@ -92,7 +95,6 @@ %files -f files %clean - rm -rf $RPM_BUILD_ROOT %post if [ $1 -eq 1 -o $1 -eq 2 ]; then