diff mbox

Buildroot SKIPS PATCHES ???

Message ID 4F9341C9.8000508@petroprogram.com
State Not Applicable, archived
Headers show

Commit Message

Stefan Fröberg April 21, 2012, 11:24 p.m. UTC
Good day


I have tried adding two new packages to my local copy of buildroot,
first one is xplc-package (version 0.3.13) and the second one is
wvstreams (version 4.2.2) which needs xplc.

The first one, xplc, builds nicely.


But for some reason, for wvstreams package the Buildroot does not apply
the patches at all.
Buildroot just skips all the nine wvstreams patch-files and continues
configuring ...
:-(

I have included all files (Config.in, .mk-files and patches) for both
packages here.
I would be very gratefull if somebody could help to solve this mystery.

Please contact me at:
stefan.froberg@petroprogram.com

First the xplc:
#####################################
# xplc Config.in
####################################
config BR2_PACKAGE_XPLC
    bool "xplc"
    help
      xplc

      http://xplc.sourceforge.net

#############################################################
#
# xplc - xplc.mk
#
#############################################################

XPLC_VERSION = 0.3.13
XPLC_SOURCE = xplc-$(XPLC_VERSION).tar.gz
XPLC_SITE = http://downloads.sourceforge.net/project/xplc/xplc/0.3.13
XPLC_MAKE = $(MAKE1)

$(eval $(call AUTOTARGETS))

#############################################################
# xplc-0.3.13-as-needed.patch
#############################################################
     $(INSTALL_DATA) uniconf/tests/uni.8 $(DESTDIR)$(mandir)/man8
 
#############################################################
#
# wvstreams-4.2.2-wireless-user.patch
#
#############################################################

diff -Naur wvstreams-4.2.2.org/linuxstreams/wvinterface.cc
wvstreams-4.2.2/linuxstreams/wvinterface.cc
--- wvstreams-4.2.2.org/linuxstreams/wvinterface.cc    2012-04-22
01:18:54.728004220 +0300
+++ wvstreams-4.2.2/linuxstreams/wvinterface.cc    2012-04-22
01:36:12.254240578 +0300
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <linux/sockios.h>
 
+#include <sys/sysctl.h>
 #define _LINUX_IF_H /* Hack to prevent loading linux/if.h */
 #include <linux/wireless.h>

Comments

Thomas De Schampheleire April 23, 2012, 12:33 p.m. UTC | #1
Hi Stefan,

On Sun, Apr 22, 2012 at 1:24 AM, Stefan Fröberg
<stefan.froberg@petroprogram.com> wrote:
> Good day
>
>
> I have tried adding two new packages to my local copy of buildroot,
> first one is xplc-package (version 0.3.13) and the second one is
> wvstreams (version 4.2.2) which needs xplc.
>
> The first one, xplc, builds nicely.
>
>
> But for some reason, for wvstreams package the Buildroot does not apply
> the patches at all.
> Buildroot just skips all the nine wvstreams patch-files and continues
> configuring ...
> :-(
>
> I have included all files (Config.in, .mk-files and patches) for both
> packages here.
> I would be very gratefull if somebody could help to solve this mystery.
>
> Please contact me at:
> stefan.froberg@petroprogram.com
>

Have you solved this problem already?

I have copied your wvstreams .mk file and one of the patches, and did
not have problems applying the patches.
Which version of buildroot are you using?
Have you tried deleting the entire output/build/wvstreams* directory
(thus removing the stamp files) ?
What is the output of the wvstreams build? It should print a message
about each phase (download, extract, patch, configure, ...).

Do you have other patches or directories inside package/wvstreams ?
The current rules for patching are somewhat complicated and can depend
on such other files. The rules are in package/Makefile.package.in.

Best regards,
Thomas
ludovic.desroches@atmel.com April 23, 2012, 1:25 p.m. UTC | #2
Hi Stefan,

Le 04/23/2012 02:33 PM, Thomas De Schampheleire a écrit :
> Hi Stefan,
>
> On Sun, Apr 22, 2012 at 1:24 AM, Stefan Fröberg
> <stefan.froberg@petroprogram.com>  wrote:
>> Good day
>>
>>
>> I have tried adding two new packages to my local copy of buildroot,
>> first one is xplc-package (version 0.3.13) and the second one is
>> wvstreams (version 4.2.2) which needs xplc.
>>
>> The first one, xplc, builds nicely.
>>
>>
>> But for some reason, for wvstreams package the Buildroot does not apply
>> the patches at all.
>> Buildroot just skips all the nine wvstreams patch-files and continues
>> configuring ...
>> :-(
>>
>> I have included all files (Config.in, .mk-files and patches) for both
>> packages here.
>> I would be very gratefull if somebody could help to solve this mystery.
>>
>> Please contact me at:
>> stefan.froberg@petroprogram.com
>>
>
> Have you solved this problem already?
>
> I have copied your wvstreams .mk file and one of the patches, and did
> not have problems applying the patches.
> Which version of buildroot are you using?
> Have you tried deleting the entire output/build/wvstreams* directory
> (thus removing the stamp files) ?
> What is the output of the wvstreams build? It should print a message
> about each phase (download, extract, patch, configure, ...).
>
> Do you have other patches or directories inside package/wvstreams ?
> The current rules for patching are somewhat complicated and can depend
> on such other files. The rules are in package/Makefile.package.in.
>
> Best regards,
> Thomas

Have a look here: http://patchwork.ozlabs.org/patch/152912/

Maybe you have not this patch.

Regards

Ludovic
Thomas De Schampheleire April 25, 2012, 5:39 a.m. UTC | #3
Hi Stefan,

[Please keep the buildroot list in copy, and don't top-post]

On Mon, Apr 23, 2012 at 6:44 PM, Stefan Fröberg
<stefan.froberg@petroprogram.com> wrote:
> Hi Thomas
>
> Thank You very much of investigating this.
>
> Yes,  everytime the patching failed I first deleted the whole wvstreams
> source directory from output/build and tried rebuilding it again but no joy.
>
> What version of Buildroot are you using ?
>

I had tested this with revision 5ee4614c4e72dfab4e8f36186fc8ef4ab05fb9a9.

> I have included here the screenshots of my version of Buildroot and the
> very beginning of wvstreams building process.
> It just skips all the files in patching process, even tought the
> xplc-package has no problem at all of applying that single patch it has.
>
> So should I get a latest version of Buildroot and try it there ?

I guess that you are not subscribed to the mailing list, and thus have
not seen Ludovic's response:
http://lists.busybox.net/pipermail/buildroot/2012-April/052921.html

He refers to this patch:
http://git.buildroot.net/buildroot/commit/?id=7c717bbfffea0c55d348435e9b98e492b11b9177

If this is indeed the problem in your case, I see three ways forward:
- check if you have any .patch file in the root of the buildroot
directory. If I understood the problem that Ludovic fixed correctly,
it is only triggered if there is a .patch file in there. If you have
such a file, move it elsewhere.

- Use a snapshot of a recent buildroot tree, see
http://buildroot.org/downloads/snapshots/

- Keep the version you are currently using, but apply the mentioned
patch manually.

If your problem is not solved by any of these steps, I suggest you add
some traces in the package/Makefile.package.in Makefile around the
patch code, and in the apply-patches.sh script.

Best regards,
Thomas



> 23.4.2012 15:33, Thomas De Schampheleire kirjoitti:
>> Hi Stefan,
>>
>> On Sun, Apr 22, 2012 at 1:24 AM, Stefan Fröberg
>> <stefan.froberg@petroprogram.com> wrote:
>>> Good day
>>>
>>>
>>> I have tried adding two new packages to my local copy of buildroot,
>>> first one is xplc-package (version 0.3.13) and the second one is
>>> wvstreams (version 4.2.2) which needs xplc.
>>>
>>> The first one, xplc, builds nicely.
>>>
>>>
>>> But for some reason, for wvstreams package the Buildroot does not apply
>>> the patches at all.
>>> Buildroot just skips all the nine wvstreams patch-files and continues
>>> configuring ...
>>> :-(
>>>
>>> I have included all files (Config.in, .mk-files and patches) for both
>>> packages here.
>>> I would be very gratefull if somebody could help to solve this mystery.
>>>
>>> Please contact me at:
>>> stefan.froberg@petroprogram.com
>>>
>> Have you solved this problem already?
>>
>> I have copied your wvstreams .mk file and one of the patches, and did
>> not have problems applying the patches.
>> Which version of buildroot are you using?
>> Have you tried deleting the entire output/build/wvstreams* directory
>> (thus removing the stamp files) ?
>> What is the output of the wvstreams build? It should print a message
>> about each phase (download, extract, patch, configure, ...).
>>
>> Do you have other patches or directories inside package/wvstreams ?
>> The current rules for patching are somewhat complicated and can depend
>> on such other files. The rules are in package/Makefile.package.in.
>>
>> Best regards,
>> Thomas
>
Stefan Fröberg April 25, 2012, 5:41 p.m. UTC | #4
Hi Thomas,

25.4.2012 8:39, Thomas De Schampheleire kirjoitti:
> Hi Stefan,
>
> [Please keep the buildroot list in copy, and don't top-post]
>
> On Mon, Apr 23, 2012 at 6:44 PM, Stefan Fröberg
> <stefan.froberg@petroprogram.com> wrote:
>> Hi Thomas
>>
>> Thank You very much of investigating this.
>>
>> Yes,  everytime the patching failed I first deleted the whole wvstreams
>> source directory from output/build and tried rebuilding it again but no joy.
>>
>> What version of Buildroot are you using ?
>>
> I had tested this with revision 5ee4614c4e72dfab4e8f36186fc8ef4ab05fb9a9.
>
>> I have included here the screenshots of my version of Buildroot and the
>> very beginning of wvstreams building process.
>> It just skips all the files in patching process, even tought the
>> xplc-package has no problem at all of applying that single patch it has.
>>
>> So should I get a latest version of Buildroot and try it there ?
> I guess that you are not subscribed to the mailing list, and thus have
> not seen Ludovic's response:
> http://lists.busybox.net/pipermail/buildroot/2012-April/052921.html

Yes, Im very sorry for that.
I just now subscribed to mailing list.

> He refers to this patch:
> http://git.buildroot.net/buildroot/commit/?id=7c717bbfffea0c55d348435e9b98e492b11b9177
>
> If this is indeed the problem in your case, I see three ways forward:
> - check if you have any .patch file in the root of the buildroot
> directory. If I understood the problem that Ludovic fixed correctly,
> it is only triggered if there is a .patch file in there. If you have
> such a file, move it elsewhere.
>
> - Use a snapshot of a recent buildroot tree, see
> http://buildroot.org/downloads/snapshots/
>
> - Keep the version you are currently using, but apply the mentioned
> patch manually.
>
> If your problem is not solved by any of these steps, I suggest you add
> some traces in the package/Makefile.package.in Makefile around the
> patch code, and in the apply-patches.sh script.
>
> Best regards,
> Thomas
>

You are right. There was indeed wvstreams patch files also in the root
of the buildroot directory.
But to be sure, I grapped the freshest copy of buildroot, just in case,
and now wvstreams compiles nicely
 :-)

Thank you!

By the way, what is the normal process of offering new packages to
buildroot ?
I tried looking from buildroot pages for that info but could not find it.

In addition to this wvstreams package I have wvdial, firefox (not really
an embedded system browser, but I can't live without it), slim and Linux
Pam packages under work.

Should I just offer them on buildroot mailing list for reviewing or where ?

Best regards
Stefan
Peter Korsgaard April 25, 2012, 8:52 p.m. UTC | #5
>>>>> "Stefan" == Stefan Fröberg <stefan.froberg@petroprogram.com> writes:


 Stefan> By the way, what is the normal process of offering new packages
 Stefan> to buildroot ?  I tried looking from buildroot pages for that
 Stefan> info but could not find it.

 Stefan> In addition to this wvstreams package I have wvdial, firefox
 Stefan> (not really an embedded system browser, but I can't live
 Stefan> without it), slim and Linux Pam packages under work.

 Stefan> Should I just offer them on buildroot mailing list for
 Stefan> reviewing or where ?

Yes, please send git-style patches to the mailing list for
review. Please also sign off on your patches (Linux kernel style) using
the -s option on git format-patch.

Once reviewed, then I'll commit the patches to git.

This is (very) shortly documented on the website:

http://buildroot.net/git.html
diff mbox

Patch

diff -Naur xplc-0.3.13.org/config/rules.mk xplc-0.3.13/config/rules.mk
--- xplc-0.3.13.org/config/rules.mk    2012-04-21 23:26:12.908682280 +0300
+++ xplc-0.3.13/config/rules.mk    2012-04-21 23:27:24.243748600 +0300
@@ -44,7 +44,7 @@ 
     $(RANLIB) $@
 
 %.so:
-    $(LINK.cc) $(SHARED) $^ -o $@
+    $(LINK.cc) $(SHARED) $^ $(LDLIBS) -o $@
 
 %.dll:
     $(LINK.cc) $(SHARED) $^ -o $@
diff -Naur xplc-0.3.13.org/xplc/vars.mk xplc-0.3.13/xplc/vars.mk
--- xplc-0.3.13.org/xplc/vars.mk    2012-04-21 23:26:12.903681645 +0300
+++ xplc-0.3.13/xplc/vars.mk    2012-04-21 23:27:24.245748855 +0300
@@ -32,7 +32,7 @@ 
 
 ifneq ("$(enable_loader)", "no")
 ifneq ("$(with_dlopen)", "no")
-libxplc.so: LDFLAGS+=$(with_dlopen)
+libxplc.so: LDLIBS+=$(with_dlopen)
 endif
 endif

And then wvstreams:

#############################################################
#
# wvstreams - Config.in
#
#############################################################
config BR2_PACKAGE_WVSTREAMS
    bool "wvstreams"
    select BR2_PACKAGE_OPENSSL
    select BR2_PACKAGE_ZLIB
    select BR2_PACKAGE_XPLC
    help
      wvstreams

      http://wvstreams.googlecode.com/files/

#############################################################
#
# wvstreams - wvstreams.mk
#
#############################################################

WVSTREAMS_VERSION = 4.2.2
WVSTREAMS_SOURCE = wvstreams-$(WVSTREAMS_VERSION).tar.gz
WVSTREAMS_SITE = http://wvstreams.googlecode.com/files/
WVSTREAMS_CONF_OPT = --disable-optimization --with-openssl
--without-tcl--without-qt --with-zlib --without-valgrind
WVSTREAMS_AUTORECONF = YES
WVSTREAMS_DEPENDENCIES = openssl zlib xplc
WVSTREAMS_MAKE = $(MAKE1)

$(eval $(call AUTOTARGETS))


And then the problematic 9 wvstreams package patches. All these patches
were taken from old gentoo Linux build so they work.
It just that buildroot does not apply them.

#############################################################
#
# wvstreams-4.2.2-as-needed.patch
#
#############################################################
diff -Naur wvstreams-4.2.2.org/configure.ac wvstreams-4.2.2/configure.ac
--- wvstreams-4.2.2.org/configure.ac    2012-04-22 01:18:54.757022406 +0300
+++ wvstreams-4.2.2/configure.ac    2012-04-22 01:20:23.211458391 +0300
@@ -517,16 +517,19 @@ 
         wv_cv_with_qt=no
         CPPFLAGS_save="$CPPFLAGS"
         LDFLAGS_save="$LDFLAGS"
+        LIBS_save="$LIBS"
         for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH; do
             eval wv_qtdir="$wv_qtdir"
             CPPFLAGS="$CPPFLAGS_save -I$wv_qtdir/include
-I$wv_qtdir/include/qt3"
-            LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib -lqt-mt"
+            LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib"
+            LIBS="$LIBS_save -lqt-mt"
             AC_TRY_LINK([#include <qstring.h>],
                         [QString x("hello"); return 0; ],
                         [wv_cv_with_qt=$wv_qtdir; break])
         done
         CPPFLAGS="$CPPFLAGS_save"
         LDFLAGS="$LDFLAGS_save"
+        LIBS="$LIBS_save"
     ])
     with_qt=$wv_cv_with_qt
     if test "$with_qt" != no; then
diff -Naur wvstreams-4.2.2.org/wvrules.mk wvstreams-4.2.2/wvrules.mk
--- wvstreams-4.2.2.org/wvrules.mk    2012-04-22 01:18:54.727003592 +0300
+++ wvstreams-4.2.2/wvrules.mk    2012-04-22 01:20:23.215460901 +0300
@@ -272,7 +272,7 @@ 
 %.so: SONAME=$@$(if $(SO_VERSION),.$(SO_VERSION))
 wvsoname=$(if $($1-SONAME),$($1-SONAME),$(if $(SONAME),$(SONAME),$1))
 define wvlink_so
-    $(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -Wl,-soname,$(call
wvsoname,$1) -shared -o $1 $(filter %.o %.a %.so,$2) $($1-LIBS) $(LIBS)
$(XX_LIBS)
+    $(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -Wl,-soname,$(call
wvsoname,$1) -shared -o $1 $(filter %.o %.a,$2) $(filter %.so,$2)
$($1-LIBS) $(LIBS) $(XX_LIBS)
     $(if $(filter-out $(call wvsoname,$1),$1),$(call wvlns,$1,$(call
wvsoname,$1)))
 endef

#############################################################
#
# wvstreams-4.2.2-external-xplc.patch
#
#############################################################

diff -Naur wvstreams-4.2.2.org/configure.ac wvstreams-4.2.2/configure.ac
--- wvstreams-4.2.2.org/configure.ac    2012-04-22 01:18:54.757022406 +0300
+++ wvstreams-4.2.2/configure.ac    2012-04-22 01:27:24.736635806 +0300
@@ -542,7 +542,6 @@ 
 
 # xplc
 if test "$with_xplc" != "no"; then
-    if test "$with_xplc" = ""; then
     if pkg-config --modversion xplc-${xplc_version}; then
             WV_APPEND(CPPFLAGS, [`pkg-config --cflags
xplc-${xplc_version}`])
         WV_APPEND(LDFLAGS, [`pkg-config --libs xplc-${xplc_version}`])
@@ -554,15 +553,6 @@ 
     else
         with_xplc='no'
     fi
-    else
-        WV_APPEND(CPPFLAGS, [-I$with_xplc/include])
-    WV_APPEND(LDFLAGS, [-L$with_xplc])
-    AC_CHECK_HEADERS(xplc/core.h,, [with_xplc=no], [#define UNSTABLE])
-    LIBS_save="$LIBS"
-    AC_CHECK_LIB(xplc, XPLC_getServiceManager,, [with_xplc=no])
-    LIBS="$LIBS_save"
-    xplc_pc="xplc-${xplc_version}"
-    fi
     # What if we can't find it?
     if test "$with_xplc" = "no" && test -d xplc; then
         WV_APPEND(CPPFLAGS, [-I\$(WVSTREAMS)/xplc/include])
@@ -570,7 +560,7 @@ 
         AC_CONFIG_SUBDIRS(xplc)
         build_xplc=yes
         with_xplc='$(WVSTREAMS)/xplc'
-    xplc_pc='wvxplc'
+        xplc_pc='wvxplc'
     fi
 fi
 
#############################################################
#
# wvstreams-4.2.2-gcc41.patch
#
#############################################################

diff -Naur wvstreams-4.2.2.org/include/uniconfkey.h
wvstreams-4.2.2/include/uniconfkey.h
--- wvstreams-4.2.2.org/include/uniconfkey.h    2012-04-22
01:18:54.794045609 +0300
+++ wvstreams-4.2.2/include/uniconfkey.h    2012-04-22
01:30:22.574089737 +0300
@@ -113,7 +113,7 @@ 
     bool iswild() const;
 
     /** Returns true if the key has a trailing slash. */
-    bool UniConfKey::hastrailingslash() const;
+    bool hastrailingslash() const;
 
     /**
      * Returns the number of segments in this path.
diff -Naur wvstreams-4.2.2.org/include/wvhttppool.h
wvstreams-4.2.2/include/wvhttppool.h
--- wvstreams-4.2.2.org/include/wvhttppool.h    2012-04-22
01:18:54.794045609 +0300
+++ wvstreams-4.2.2/include/wvhttppool.h    2012-04-22
01:30:22.575090364 +0300
@@ -57,7 +57,7 @@ 
     WvString linkname;
     WvUrl url;
 
-    WvUrlLink::WvUrlLink(WvStringParm _linkname, WvStringParm _url)
+    WvUrlLink(WvStringParm _linkname, WvStringParm _url)
     : linkname(_linkname), url(_url)
     {}
 };
diff -Naur wvstreams-4.2.2.org/include/wvstring.h
wvstreams-4.2.2/include/wvstring.h
--- wvstreams-4.2.2.org/include/wvstring.h    2012-04-22
01:18:54.795046236 +0300
+++ wvstreams-4.2.2/include/wvstring.h    2012-04-22 01:30:22.578092245
+0300
@@ -393,7 +393,7 @@ 
    
 protected:
     void copy_constructor(const WvFastString &s);
-    inline void WvString::construct(const char *_str)
+    inline void construct(const char *_str)
         {
             link(&nullbuf, _str);
    
diff -Naur wvstreams-4.2.2.org/include/wvx509.h
wvstreams-4.2.2/include/wvx509.h
--- wvstreams-4.2.2.org/include/wvx509.h    2012-04-22
01:18:54.794045609 +0300
+++ wvstreams-4.2.2/include/wvx509.h    2012-04-22 01:30:22.581094126 +0300
@@ -349,19 +349,19 @@ 
      * Set the Certificate to use X509v3, since that's all modern
      * PKI uses anyways :)
      */
-    void WvX509Mgr::set_version();
+    void set_version();
 
     /**
      * Get and set the keyUsage field.
      */
-    WvString WvX509Mgr::get_key_usage();
-    void WvX509Mgr::set_key_usage(WvStringParm values);
+    WvString get_key_usage();
+    void set_key_usage(WvStringParm values);
 
     /**
      * Get and set the extendedKeyUsage field.
      */
-    WvString WvX509Mgr::get_ext_key_usage();
-    void WvX509Mgr::set_ext_key_usage(WvStringParm values);
+    WvString get_ext_key_usage();
+    void set_ext_key_usage(WvStringParm values);
    
     /**
      * Return the Subject alt name if it exists, and WvString::null if

#############################################################
#
# wvstreams-4.2.2-linux-serial.patch
#
#############################################################

diff -Naur wvstreams-4.2.2.org/streams/wvmodem.cc
wvstreams-4.2.2/streams/wvmodem.cc
--- wvstreams-4.2.2.org/streams/wvmodem.cc    2012-04-22
01:18:54.772031811 +0300
+++ wvstreams-4.2.2/streams/wvmodem.cc    2012-04-22 01:31:22.310527636
+0300
@@ -192,22 +192,22 @@ 
     drain();
    
 #if HAVE_LINUX_SERIAL_H
-    struct serial_struct old_sinfo, sinfo;
-    sinfo.reserved_char[0] = 0;
-    if (ioctl(getrfd(), TIOCGSERIAL, &old_sinfo) < 0)
-    log("Cannot get information for serial port.");
-    else
-    {
-    sinfo = old_sinfo;
-    // Why there are two closing wait timeouts, is beyond me
-    // but there are... apparently the second one is deprecated
-    // but why take a chance...
-    sinfo.closing_wait = ASYNC_CLOSING_WAIT_NONE;
-    sinfo.closing_wait2 = ASYNC_CLOSING_WAIT_NONE;
-
-    if (ioctl(getrfd(), TIOCSSERIAL, &sinfo) < 0)
-        log("Cannot set information for serial port.");
-    }
+     if (getuid() == 0)
+     {
+         struct serial_struct sinfo;
+         if (ioctl(getrfd(), TIOCGSERIAL, &sinfo) >= 0) //Ignore errors
because some modems (at least slmodem) do not support this
+         {
+             // Why there are two closing wait timeouts, is beyond me
+             // but there are... apparently the second one is deprecated
+             // but why take a chance...
+             sinfo.closing_wait = ASYNC_CLOSING_WAIT_NONE;
+             sinfo.closing_wait2 = ASYNC_CLOSING_WAIT_NONE;
+
+             //Ignore errors because ltmodem module implement
TIOCGSERIAL but do not implement TIOCSSERIAL (go figure...)
+            //see http://bugs.gentoo.org/show_bug.cgi?id=85754
+            ioctl(getrfd(), TIOCSSERIAL, &sinfo);
+         }
+     }
 #endif
 
     // set up the terminal characteristics.

#############################################################
#
# wvstreams-4.2.2-MOC-fix.patch
#
#############################################################
diff -Naur wvstreams-4.2.2.org/wvrules.mk wvstreams-4.2.2/wvrules.mk
--- wvstreams-4.2.2.org/wvrules.mk    2012-04-22 01:18:54.727003592 +0300
+++ wvstreams-4.2.2/wvrules.mk    2012-04-22 01:32:26.713890383 +0300
@@ -296,7 +296,7 @@ 
 %.E: %.cc;    $(call wvcxx,$@,$<,$*,,-E)
 %.E: %.cpp;    $(call wvcxx,$@,$<,$*,,-E)
 
-%.moc: %.h;    moc -o $@ $<
+%.moc: %.h;    $(MOC) -o $@ $<
 
 %: %.o;        $(call wvlink,$@,$^)
 %.t: %.t.o;    $(call wvlink,$@,$(call reverse,$(filter %.o,$^))
$(filter-out %.o,$^) $(LIBWVTEST))

#############################################################
#
# wvstreams-4.2.2-sane-cflags.patch
#
#############################################################

diff -Naur wvstreams-4.2.2.org/vars.mk wvstreams-4.2.2/vars.mk
--- wvstreams-4.2.2.org/vars.mk    2012-04-22 01:18:54.797047490 +0300
+++ wvstreams-4.2.2/vars.mk    2012-04-22 01:33:11.898208209 +0300
@@ -66,10 +66,10 @@ 
 CXXFLAGS+=-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 CFLAGS+=-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 
-ifeq ($(DEBUG),)
-CXXFLAGS+=-g
-CFLAGS+=-g
-endif
+#ifeq ($(DEBUG),)
+#CXXFLAGS+=-g
+#CFLAGS+=-g
+#endif
 
 ifneq ($(DEBUG),)
 CXXFLAGS+=-ggdb -DDEBUG$(if $(filter-out yes,$(DEBUG)), -DDEBUG_$(DEBUG))
@@ -91,9 +91,9 @@ 
 endif
 
 ifneq ("$(enable_optimization)", "no")
-CXXFLAGS+=-O2
+#CXXFLAGS+=-O2
 #CXXFLAGS+=-felide-constructors
-CFLAGS+=-O2
+#CFLAGS+=-O2
 endif
 
 ifneq ("$(enable_warnings)", "no")
diff -Naur wvstreams-4.2.2.org/wvrules.mk wvstreams-4.2.2/wvrules.mk
--- wvstreams-4.2.2.org/wvrules.mk    2012-04-22 01:18:54.727003592 +0300
+++ wvstreams-4.2.2/wvrules.mk    2012-04-22 01:33:11.899208836 +0300
@@ -82,9 +82,9 @@ 
 endif
 
 ifneq ("$(enable_optimization)", "no")
-  CXXFLAGS+=-O2
+  #CXXFLAGS+=-O2
   #CXXFLAGS+=-felide-constructors
-  CFLAGS+=-O2
+  #CFLAGS+=-O2
 endif
 
 ifneq ("$(enable_warnings)", "no")
@@ -177,11 +177,11 @@ 
   C_AND_CXX_FLAGS += -ggdb -DDEBUG=1
   LDFLAGS += -ggdb
 else
-  C_AND_CXX_FLAGS += -g -DDEBUG=0
+  C_AND_CXX_FLAGS += -DDEBUG=0
   #CFLAGS += -DNDEBUG    # I don't like disabling assertions...
   #CFLAGS += -fomit-frame-pointer  # really evil
   #CXXFLAGS += -fno-implement-inlines  # causes trouble with egcs 1.0
-  LDFLAGS += -g
+  #LDFLAGS += -g
 endif
 
 ifeq ($(PROFILE),1)

#############################################################
#
# wvstreams-4.2.2-tcl_8_4.patch
#
#############################################################

diff -Naur wvstreams-4.2.2.org/configure.ac wvstreams-4.2.2/configure.ac
--- wvstreams-4.2.2.org/configure.ac    2012-04-22 01:18:54.757022406 +0300
+++ wvstreams-4.2.2/configure.ac    2012-04-22 01:33:53.496278467 +0300
@@ -483,9 +483,9 @@ 
 # tcl
 if test "$with_tcl" != "no"; then
     CPPFLAGS_save="$CPPFLAGS"
-    WV_APPEND(CPPFLAGS, -I/usr/include/tcl8.3)
+    WV_APPEND(CPPFLAGS, -I/usr/include)
     AC_CHECK_HEADERS(tcl.h,, [with_tcl=no])
-    AC_CHECK_LIB(tcl8.3, TclInterpInit,, [with_tcl=no])
+    AC_CHECK_LIB(tcl8.4, TclInterpInit,, [with_tcl=no])
     if test "$with_tcl" != "no"; then
         CPPFLAGS="$CPPFLAGS_save"
     fi
diff -Naur wvstreams-4.2.2.org/vars.mk wvstreams-4.2.2/vars.mk
--- wvstreams-4.2.2.org/vars.mk    2012-04-22 01:18:54.797047490 +0300
+++ wvstreams-4.2.2/vars.mk    2012-04-22 01:33:53.498279721 +0300
@@ -234,3 +234,5 @@ 
 
 libwvgtk.a libwvgtk.so: $(call objects,gtk)
 libwvgtk.so: -lgtk -lgdk libwvstreams.so libwvutils.so
+
+libuniconf_tcl.so: bindings/uniconf_tcl.o -ltcl8.4 -luniconf

#############################################################
#
# wvstreams-4.2.2-uniconfd-ini.patch
#
#############################################################

diff -Naur wvstreams-4.2.2.org/Makefile wvstreams-4.2.2/Makefile
--- wvstreams-4.2.2.org/Makefile    2012-04-22 01:18:54.759023660 +0300
+++ wvstreams-4.2.2/Makefile    2012-04-22 01:34:39.038820799 +0300
@@ -182,8 +182,8 @@ 
     $(INSTALL_PROGRAM) uniconf/tests/uni $(DESTDIR)$(bindir)/
     $(INSTALL) -d $(DESTDIR)$(sbindir)
     $(INSTALL_PROGRAM) uniconf/daemon/uniconfd $(DESTDIR)$(sbindir)/
-    $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/uniconf
-    touch $(DESTDIR)$(localstatedir)/lib/uniconf/uniconfd.ini
+    $(INSTALL) -d $(DESTDIR)$(localstatedir)/uniconf
+    $(INSTALL_DATA) uniconf/daemon/uniconfd.ini
$(DESTDIR)$(localstatedir)/uniconf
     $(INSTALL) -d $(DESTDIR)$(mandir)/man8
     $(INSTALL_DATA) uniconf/daemon/uniconfd.8 $(DESTDIR)$(mandir)/man8