Re: traceroute-1.4a12 / current / Darwin

2007-07-20 Thread Ralf S. Engelschall
On Thu, Jul 19, 2007, Olivier Kaloudoff wrote:

>   to compile traceroute on Darwin, I had to tweak 2 files with a  very 
> short
> change (aclocal.m4 and findsaddr-socket.c). Something more heavy was
> needed, replace original config.sub and config.guess by the one provided by
> Apple (last update, 1999 whereas traceroute has 1996). Change is about 2000
> lines ..

For bringing the config.* files to a newer level you can just require
the "config" package and then run "%{l_prefix}/bin/config install ."
in the traceroute.spec:%build. This way you especially do not need the
aclocal.m4 patch and no dependency to AutoXXX.

>   running "aclocal ; autoconf ; configure ; make" works like a charm after
> this...
>
>   Are patches for Darwin accepted in current for openpkg ? If yes, what
> should I do about config.guess and config.sub ? Push patch for the moment,
> ask the upstream packager to update their version, and remove the patch
> when done ?

Sure, Darwin is just fine. Kick your "findsaddr-socket.c" fix and the
the above "config install" into our "traceroute" package, please.
>
   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: traceroute-1.4a12 / current / Darwin

2007-07-20 Thread Christoph Schug
Hi,

I don't have a Mac available so here is some blind patch. You might try
to pick up those files from the config package with following diff:

diff -u -d -r1.23 traceroute.spec
--- traceroute.spec 1 Jan 2007 17:42:26 -   1.23
+++ traceroute.spec 20 Jul 2007 12:26:09 -
@@ -33,7 +33,7 @@
 Group:Mapping
 License:  BSD
 Version:  1.4a12
-Release:  20061013
+Release:  20070720
 
 #   list of sources
 Source0:  ftp://ftp.ee.lbl.gov/traceroute-%{version}.tar.gz
@@ -42,7 +42,7 @@
 #   build information
 Prefix:   %{l_prefix}
 BuildRoot:%{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20040130
+BuildPreReq:  OpenPKG, openpkg >= 20040130, config
 PreReq:   OpenPKG, openpkg >= 20040130
 AutoReq:  no
 AutoReqProv:  no
@@ -65,6 +65,7 @@
 %prep
 %setup -q
 %patch -p0
+%{l_prefix}/bin/config install
 
 %build
 CC="%{l_cc}" \

-cs
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


traceroute-1.4a12 / current / Darwin

2007-07-20 Thread Olivier Kaloudoff

Hello !

	to compile traceroute on Darwin, I had to tweak 2 files with a  very short change (aclocal.m4 and findsaddr-socket.c). Something more 
heavy was needed, replace original config.sub and config.guess by the one provided by Apple (last update, 1999 whereas traceroute has 1996). Change 
is about 2000 lines ..


running "aclocal ; autoconf ; configure ; make" works like a charm 
after this...

	Are patches for Darwin accepted in current for openpkg ? If yes, what should I do about config.guess and config.sub ? Push patch for the 
moment, ask the upstream packager to update their version, and remove the patch when done ?




diff -Naur traceroute-1.4a12/aclocal.m4 
traceroute-1.4a12.patched/aclocal.m4

--- traceroute-1.4a12/aclocal.m41999-08-15 01:50:09 +0200
+++ traceroute-1.4a12.patched/aclocal.m42007-07-19 00:42:08 +0200
@@ -677,7 +677,7 @@
 AC_TRY_LINK(dnl
 ifelse([$2], [main], , dnl Avoid conflicting decl of main.
 [/* Override any gcc2 internal prototype to avoid an error.  */
-]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+]ifelse(_AC_LANG_CURRENT, CPLUSPLUS, [#ifdef __cplusplus
 extern "C"
 #endif
 ])dnl


(to fix configure.in:30: error: AC_LANG: unknown language: when running 
autoconf)



diff -Naur traceroute-1.4a12/findsaddr-socket.c 
traceroute-1.4a12.patched/findsaddr-socket.c

--- traceroute-1.4a12/findsaddr-socket.c2000-11-23 21:17:21 +0100
+++ traceroute-1.4a12.patched/findsaddr-socket.c2007-07-19 
00:42:08 +0200

@@ -190,6 +190,7 @@

default:
/* empty */
+   ;
}

if (SALEN(sa) == 0)


(to fix error: label at end of compound statement at line 193)



Best Regards,


Olivier Kaloudoff

__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org