Browse Source

ucspi-unix: Marked as cross-compilable when requested and implemented cross-compiling support

crossperl
Christian Wiese 17 years ago committed by Alejandro Mery
parent
commit
3884f52f0b
  1. 85
      network/ucspi-unix/cross-conf.patch.cross
  2. 10
      network/ucspi-unix/ucspi-unix.conf
  3. 4
      network/ucspi-unix/ucspi-unix.desc

85
network/ucspi-unix/cross-conf.patch.cross

@ -0,0 +1,85 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../ucspi-unix/cross-conf.patch.cross
# Copyright (C) 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Author: Christian Wiese <morfoh@opensde.org>
Origin: OpenSDE (http:/opensde.org)
Description: ucspi-unix is using a binary 'installer' which has to be compiled
natively using the build system compiler for being able run it on
the build host to install the binaries provided by the package.
For that purpose we introduce the 'conf-hostcc' and 'conf-hostld'
configuration files for creating proper wrapper scripts which use
the build hosts compiler for compiling and linking the installer.
diff -ruN ucspi-unix-0.36/Makefile ucspi-unix-0.36-cross-conf/Makefile
--- ucspi-unix-0.36/Makefile 2002-06-11 00:12:06.000000000 +0300
+++ ucspi-unix-0.36-cross-conf/Makefile 2007-04-14 21:03:23.577800750 +0300
@@ -22,6 +22,14 @@
) >compile
chmod 755 compile
+host-compile: conf-hostcc
+ ( echo '#!/bin/sh'; \
+ echo 'source=$$1; shift'; \
+ echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
+ echo exec `head -1 conf-hostcc` '-I. -o $${base}.o -c $$source $${1+"$$@"}'; \
+ ) >host-compile
+ chmod 755 host-compile
+
conf_bin.c: conf-bin
head -1 conf-bin | \
sed -e 's/"/\\"/g' \
@@ -37,19 +45,19 @@
env.o: compile env.c
./compile env.c
-installer: load insthier.o
- ./load insthier -linstaller
+installer: host-load insthier.o
+ ./host-load insthier -linstaller
mv insthier installer
-instcheck: load insthier.o
- ./load insthier -linstcheck
+instcheck: host-load insthier.o
+ ./host-load insthier -linstcheck
mv insthier instcheck
-insthier.o: compile insthier.c conf_bin.c conf_man.c
- ./compile insthier.c
+insthier.o: host-compile insthier.c conf_bin.c conf_man.c
+ ./host-compile insthier.c
-instshow: load insthier.o
- ./load insthier -linstshow
+instshow: host-load insthier.o
+ ./host-load insthier -linstshow
mv insthier instshow
load: conf-ld
@@ -59,6 +67,13 @@
) >load
chmod 755 load
+host-load: conf-hostld
+ ( echo '#!/bin/sh';\
+ echo 'main="$$1"; shift';\
+ echo exec `head -1 conf-hostld` '-o "$$main" "$$main.o" $${1+"$$@"}' -lsysdeps;\
+ ) >host-load
+ chmod 755 host-load
+
programs: unixclient unixserver unixcat
socket.lib: compile load trylib.c

10
network/ucspi-unix/ucspi-unix.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# #
# Filename: package/.../ucspi-unix/ucspi-unix.conf # Filename: package/.../ucspi-unix/ucspi-unix.conf
# Copyright (C) 2006 The OpenSDE Project # Copyright (C) 2006 - 2008 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2004 Clifford Wolf # Copyright (C) 1998 - 2004 Clifford Wolf
# #
@ -21,8 +21,12 @@ pkg_ucspiunix_config() {
echo $root/$mandir > conf-man echo $root/$mandir > conf-man
echo $root/$bindir > conf-bin echo $root/$bindir > conf-bin
echo "gcc -W -Wall -O -g -I$root$( pkgprefix includedir bglibs )" > conf-cc echo "$CC -W -Wall -O -g -I$root$( pkgprefix includedir bglibs )" > conf-cc
echo "gcc -s -L$root$( pkgprefix libdir bglibs )" > conf-ld echo "$CC -s -L$root$( pkgprefix libdir bglibs )" > conf-ld
if ! atstage native ; then
echo "$HOSTCC -W -Wall -O -g -I$root/TOOLCHAIN/$toolsdir$(pkgprefix includedir bglibs)" > conf-hostcc
echo "$HOSTCC -s -L$root/TOOLCHAIN/$toolsdir$(pkgprefix libdir bglibs)" > conf-hostld
fi
} }
hook_add preconf 5 'pkg_ucspiunix_config' hook_add preconf 5 'pkg_ucspiunix_config'

4
network/ucspi-unix/ucspi-unix.desc

@ -3,7 +3,7 @@
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY] [COPY]
[COPY] Filename: package/.../ucspi-unix/ucspi-unix.desc [COPY] Filename: package/.../ucspi-unix/ucspi-unix.desc
[COPY] Copyright (C) 2006 The OpenSDE Project [COPY] Copyright (C) 2006 - 2008 The OpenSDE Project
[COPY] Copyright (C) 2004 - 2006 The T2 SDE Project [COPY] Copyright (C) 2004 - 2006 The T2 SDE Project
[COPY] Copyright (C) 1998 - 2004 Clifford Wolf [COPY] Copyright (C) 1998 - 2004 Clifford Wolf
[COPY] [COPY]
@ -34,7 +34,7 @@
[L] GPL [L] GPL
[S] Stable [S] Stable
[V] 0.36 [V] 0.36
[P] X -----5---9 203.100 [P] X -?---5---9 203.100
[D] 4021396071 ucspi-unix-0.36.tar.gz http://untroubled.org/ucspi-unix/ [D] 4021396071 ucspi-unix-0.36.tar.gz http://untroubled.org/ucspi-unix/

Loading…
Cancel
Save