summaryrefslogtreecommitdiff
path: root/packages/zlib
diff options
context:
space:
mode:
authorRaymond Danks <raymond@edanks.com>2006-07-24 16:25:03 +0000
committerRaymond Danks <raymond@edanks.com>2006-07-24 16:25:03 +0000
commitdb1f477d276d56b30b238187dcbc53b7b1529992 (patch)
treec9ee26ddf98051f70505467a8a8e533f30589d44 /packages/zlib
parent2d293982e75815160483c14a9f501f82c47162ce (diff)
zlib - Create a libtool package for other libtool builds to link against.
Diffstat (limited to 'packages/zlib')
-rw-r--r--packages/zlib/zlib-1.2.3/libtool_staging.patch28
-rw-r--r--packages/zlib/zlib-native_1.2.3.bb3
-rw-r--r--packages/zlib/zlib_1.2.3.bb9
3 files changed, 37 insertions, 3 deletions
diff --git a/packages/zlib/zlib-1.2.3/libtool_staging.patch b/packages/zlib/zlib-1.2.3/libtool_staging.patch
new file mode 100644
index 0000000000..f52e036108
--- /dev/null
+++ b/packages/zlib/zlib-1.2.3/libtool_staging.patch
@@ -0,0 +1,28 @@
+--- zlib-1.2.3/Makefile.in.sav 2006-06-13 09:09:53.000000000 -0600
++++ zlib-1.2.3/Makefile.in 2006-06-13 09:24:48.861200464 -0600
+@@ -24,11 +24,13 @@
+ #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
+ # -Wstrict-prototypes -Wmissing-prototypes
+
++LIBTOOL=libtool
+ LDFLAGS=libz.a
+ LDSHARED=$(CC)
+ CPP=$(CC) -E
+
+ LIBS=libz.a
++LIBTOOLLIB=libz.la
+ SHAREDLIB=libz.so
+ SHAREDLIBV=libz.so.1.2.3
+ SHAREDLIBM=libz.so.1
+@@ -67,7 +69,10 @@
+ echo ' *** zlib test FAILED ***'; \
+ fi
+
+-libz.a: $(OBJS) $(OBJA)
++$(LIBTOOLLIB): $(OBJS) $(OBJA)
++ $(LIBTOOL) --tag='CC' --mode=link $(CC) -o $@ $(OBJS) $(OBJA)
++
++libz.a: $(OBJS) $(OBJA) $(LIBTOOLLIB)
+ $(AR) $@ $(OBJS) $(OBJA)
+ -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
+
diff --git a/packages/zlib/zlib-native_1.2.3.bb b/packages/zlib/zlib-native_1.2.3.bb
index 14e1be63e1..c93f7a329a 100644
--- a/packages/zlib/zlib-native_1.2.3.bb
+++ b/packages/zlib/zlib-native_1.2.3.bb
@@ -1,5 +1,6 @@
SECTION = "libs"
include zlib_${PV}.bb
inherit native
-DEPENDS = ""
+
+DEPENDS = "libtool-native"
FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/zlib-${PV}', '${FILE_DIRNAME}/zlib', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
diff --git a/packages/zlib/zlib_1.2.3.bb b/packages/zlib/zlib_1.2.3.bb
index 1d342f51d1..c7a72c9107 100644
--- a/packages/zlib/zlib_1.2.3.bb
+++ b/packages/zlib/zlib_1.2.3.bb
@@ -6,15 +6,18 @@ HOMEPAGE = "http://www.gzip.org/zlib/"
LICENSE = "zlib"
SRC_URI = "http://www.zlib.net/zlib-1.2.3.tar.bz2 \
- file://visibility.patch;patch=1"
+ file://visibility.patch;patch=1 \
+ file://libtool_staging.patch;patch=1"
S = "${WORKDIR}/zlib-${PV}"
+DEPENDS = "libtool-cross"
+
export LDSHARED = "${CC} -shared -Wl,-soname,libz.so.1"
LDFLAGS_append = " -L. -lz"
CFLAGS_prepend = "-fPIC -DZLIB_DLL "
AR_append = " rc"
-EXTRA_OEMAKE = ""
+EXTRA_OEMAKE = " LIBTOOL=${TARGET_SYS}-libtool"
do_compile() {
./configure --prefix=${prefix} --exec_prefix=${exec_prefix} --shared --libdir=${libdir} --includedir=${includedir}
@@ -24,6 +27,8 @@ do_compile() {
do_stage() {
install -m 0644 zlib.h ${STAGING_INCDIR}/zlib.h
install -m 0644 zconf.h ${STAGING_INCDIR}/zconf.h
+
+ mv libz.la ${STAGING_LIBDIR}/
oe_libinstall -a -so libz ${STAGING_LIBDIR}
}