summaryrefslogtreecommitdiff
path: root/packages/zlib
diff options
context:
space:
mode:
authorFlorian Boor <florian.boor@kernelconcepts.de>2006-08-07 11:11:46 +0000
committerFlorian Boor <florian.boor@kernelconcepts.de>2006-08-07 11:11:46 +0000
commit298dd441a0efb859be6fc0da4b3ae069e3b1de3f (patch)
tree32c081aca477ae67b953f441331ccb186654e009 /packages/zlib
parentaf5f0bd309b34453fcc397c05ed34c33f53f33ef (diff)
parent578337a073332bac0da58ce23ded325ae294b035 (diff)
merge of 70cd861a84040db0f14008d8552b1f2dbc5c8084
and a7904b535294d222e83d153c9fc22b575a5952c4
Diffstat (limited to 'packages/zlib')
-rw-r--r--packages/zlib/zlib-1.2.3/sane-target.patch38
-rw-r--r--packages/zlib/zlib-native_1.1.4.bb2
-rw-r--r--packages/zlib/zlib-native_1.2.2.bb2
-rw-r--r--packages/zlib/zlib-native_1.2.3.bb12
-rw-r--r--packages/zlib/zlib_1.2.3.bb11
5 files changed, 59 insertions, 6 deletions
diff --git a/packages/zlib/zlib-1.2.3/sane-target.patch b/packages/zlib/zlib-1.2.3/sane-target.patch
new file mode 100644
index 0000000000..bacdd031af
--- /dev/null
+++ b/packages/zlib/zlib-1.2.3/sane-target.patch
@@ -0,0 +1,38 @@
+Index: zlib-1.2.3/configure
+===================================================================
+--- zlib-1.2.3.orig/configure 2005-07-11 22:11:57.000000000 +0200
++++ zlib-1.2.3/configure 2006-08-06 20:22:47.000000000 +0200
+@@ -35,6 +35,7 @@
+ gcc=0
+ old_cc="$CC"
+ old_cflags="$CFLAGS"
++target=`(uname -s || echo unknown) 2>/dev/null`
+
+ while test $# -ge 1
+ do
+@@ -42,7 +43,7 @@
+ -h* | --h*)
+ echo 'usage:'
+ echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]'
+- echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
++ echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--target=TARGET]'
+ exit 0;;
+ -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
+ -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
+@@ -53,6 +54,7 @@
+ -l* | --l*) libdir="$2"; shift; shift;;
+ -i* | --i*) includedir="$2"; shift; shift;;
+ -s* | --s*) shared=1; shift;;
++ --target=*) target=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
+ *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
+ esac
+ done
+@@ -75,7 +77,7 @@
+ CC="$cc"
+ SFLAGS=${CFLAGS-"-fPIC -O3"}
+ CFLAGS="$cflags"
+- case `(uname -s || echo unknown) 2>/dev/null` in
++ case $target in
+ Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
+ CYGWIN* | Cygwin* | cygwin* | OS/2* )
+ EXE='.exe';;
diff --git a/packages/zlib/zlib-native_1.1.4.bb b/packages/zlib/zlib-native_1.1.4.bb
index 5edd4b0b28..eb551364ac 100644
--- a/packages/zlib/zlib-native_1.1.4.bb
+++ b/packages/zlib/zlib-native_1.1.4.bb
@@ -1,4 +1,4 @@
SECTION = "libs"
-include zlib_${PV}.bb
+require zlib_${PV}.bb
inherit native
DEPENDS = ""
diff --git a/packages/zlib/zlib-native_1.2.2.bb b/packages/zlib/zlib-native_1.2.2.bb
index 5edd4b0b28..eb551364ac 100644
--- a/packages/zlib/zlib-native_1.2.2.bb
+++ b/packages/zlib/zlib-native_1.2.2.bb
@@ -1,4 +1,4 @@
SECTION = "libs"
-include zlib_${PV}.bb
+require zlib_${PV}.bb
inherit native
DEPENDS = ""
diff --git a/packages/zlib/zlib-native_1.2.3.bb b/packages/zlib/zlib-native_1.2.3.bb
index c93f7a329a..c7defb6aac 100644
--- a/packages/zlib/zlib-native_1.2.3.bb
+++ b/packages/zlib/zlib-native_1.2.3.bb
@@ -1,6 +1,16 @@
SECTION = "libs"
-include zlib_${PV}.bb
+require zlib_${PV}.bb
+ZLIB_EXTRA = ""
inherit native
DEPENDS = "libtool-native"
FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/zlib-${PV}', '${FILE_DIRNAME}/zlib', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+
+
+# darwin hacks
+ZLIB_SHARED_build-darwin ="libz.1.2.3.dylib"
+do_compile_build-darwin() {
+ unset LDSHARED
+ ./configure --prefix=${prefix} --exec_prefix=${exec_prefix} --shared --libdir=${libdir} --includedir=${includedir}
+ oe_runmake
+}
diff --git a/packages/zlib/zlib_1.2.3.bb b/packages/zlib/zlib_1.2.3.bb
index c7a72c9107..8a48a89fdf 100644
--- a/packages/zlib/zlib_1.2.3.bb
+++ b/packages/zlib/zlib_1.2.3.bb
@@ -7,7 +7,8 @@ LICENSE = "zlib"
SRC_URI = "http://www.zlib.net/zlib-1.2.3.tar.bz2 \
file://visibility.patch;patch=1 \
- file://libtool_staging.patch;patch=1"
+ file://libtool_staging.patch;patch=1 \
+ file://sane-target.patch;patch=1 "
S = "${WORKDIR}/zlib-${PV}"
@@ -19,9 +20,13 @@ CFLAGS_prepend = "-fPIC -DZLIB_DLL "
AR_append = " rc"
EXTRA_OEMAKE = " LIBTOOL=${TARGET_SYS}-libtool"
+# extra configure options, can be reset in the -native variant
+ZLIB_EXTRA = "--target=${TARGET_OS}"
+ZLIB_SHARED= "libz.so.${PV}"
+
do_compile() {
- ./configure --prefix=${prefix} --exec_prefix=${exec_prefix} --shared --libdir=${libdir} --includedir=${includedir}
- oe_runmake -e MAKEFLAGS="" libz.so.${PV} libz.a
+ ./configure --prefix=${prefix} --exec_prefix=${exec_prefix} --shared --libdir=${libdir} --includedir=${includedir} ${ZLIB_EXTRA}
+ oe_runmake -e MAKEFLAGS="" ${ZLIB_SHARED} libz.a
}
do_stage() {