tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MirBSD support for Python 2.6



> Hello all,

> I added MirBSD support to lang/python26. I would like to have some
> feedback on the patch before committing it.

> --Benny.

As far as I know MirBSD core components are very close to those from
OpenBSD. What pkgsrc and MirBSD developers think about introducing a
per-package variable, say, MIMIC_OPENBSD in order to avoid patches like
the following. Its purpose would be to to replace uname(1) and use it by
"configure" and "build" targets (via prepanding PATH with a directory
containing the fake uname(1))?  I guess such a fake uname(1) will be
good enough for most packages failed under MirBSD. BTW, this approach
can improve OpenBSD support automatically. In addition to uname(1) a few
defines for compiler may also be needed.

> Index: lang/python26/patches/patch-al
> ===================================================================
> RCS file: /cvsroot/pkgsrc/lang/python26/patches/patch-al,v
> retrieving revision 1.7
> diff -u -d -r1.7 patch-al
> --- lang/python26/patches/patch-al    5 Feb 2011 09:34:05 -0000       1.7
> +++ lang/python26/patches/patch-al    11 Sep 2011 13:47:34 -0000
> +@@ -2833,7 +2833,7 @@ case $ac_sys_system/$ac_sys_release in
> +   # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
> +   # In addition, Stefan Krah confirms that issue #1244610 exists through
> +   # OpenBSD 4.6, but is fixed in 4.7.
> +-  OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
> ++  OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456] | MirBSD/*)
> +     define_xopen_source=no
> +     # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
> +     # also defined. This can be overridden by defining _BSD_SOURCE
>  @@ -4736,15 +4736,10 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
>         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
>         INSTSONAME="$LDLIBRARY".$SOVERSION
>             ;;
>  -    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
> -+    Linux*|GNU*|NetBSD*|FreeBSD*|Interix*|DragonFly*|OpenBSD*)
> ++    Linux*|GNU*|NetBSD*|FreeBSD*|Interix*|DragonFly*|OpenBSD*|MirBSD*)
>         LDLIBRARY='libpython$(VERSION).so'
>         BLDLIBRARY='-L. -lpython$(VERSION)'
>         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
> -@@ -7445,6 +7441,7 @@ then
> +@@ -7444,7 +7441,8 @@ then
> +              fi;;
>       Linux*|GNU*) CCSHARED="-fPIC";;
>       BSD/OS*/4*) CCSHARED="-fpic";;
> -     FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
> +-    FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
> ++    FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*) CCSHARED="-fPIC";;
>  +    Interix*) CCSHARED="";;
>       OpenUNIX*|UnixWare*)
>               if test "$GCC" = "yes"
>               then CCSHARED="-fPIC"
> -@@ -7502,6 +7499,7 @@ then
> +@@ -7497,11 +7495,12 @@ then
> +     OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
> +     SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
> +     ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
> +-    FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
> ++    FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*)
> +             if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
>               then
>                       LINKFORSHARED="-Wl,--export-dynamic"
>               fi;;

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index