diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-01-11 12:29:23 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-01-11 12:29:23 +0100 |
commit | 407f9b8fde3ad9cc55f39f7a548cde6056dab494 (patch) | |
tree | 0375ea8ddab3502bf6883066f43fc7e328d5c704 /package/bzip2 | |
parent | 2ecefcf609e484d04d1546581191831e07ad71ec (diff) | |
parent | abb858ae43374dc13a5fcef19b9e0ba9442013bb (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/bzip2')
-rw-r--r-- | package/bzip2/Makefile | 17 | ||||
-rw-r--r-- | package/bzip2/patches/patch-Makefile-libbz2_so | 29 |
2 files changed, 36 insertions, 10 deletions
diff --git a/package/bzip2/Makefile b/package/bzip2/Makefile index 2f6bb7f8b..a2cb7a709 100644 --- a/package/bzip2/Makefile +++ b/package/bzip2/Makefile @@ -9,6 +9,7 @@ PKG_RELEASE:= 3 PKG_MD5SUM:= 00b516f4704d4a7cb50a1d97e6e8e15b PKG_DESCR:= bzip2 compression utility PKG_SECTION:= archive +PKG_BUILDDEP:= bzip2-host PKG_DEPENDS:= libbz2 PKG_URL:= http://www.bzip.org/ PKG_SITES:= http://www.bzip.org/${PKG_VERSION}/ @@ -23,17 +24,32 @@ ifeq ($(ADK_STATIC),y) PKG_OPTS+= libmix endif +include ${TOPDIR}/mk/host.mk include ${TOPDIR}/mk/package.mk +$(eval $(call HOST_template,BZIP2,bzip2,${PKG_VERSION}-${PKG_RELEASE})) $(eval $(call PKG_template,BZIP2,bzip2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBBZ2,libbz2,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBZ2},${PKGSC_LIBBZ2},${PKG_OPTS})) +HOST_STYLE:= manual MAKE_FILE:= Makefile-libbz2_so CONFIG_STYLE:= manual TARGET_CFLAGS+= -fPIC XAKE_FLAGS+= PREFIX=${WRKINST}/usr INSTALL_STYLE:= manual +host-build: + (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + PREFIX=${HOST_WRKINST}/usr ${HOST_ALL_TARGET}) + +bzip2-hostinstall: + ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/lib + ${INSTALL_DIR} $(STAGING_HOST_DIR)/usr/include + $(CP) ${WRKBUILD}/libbz2.so* \ + ${STAGING_HOST_DIR}/usr/lib + (cd ${STAGING_HOST_DIR}/usr/lib; ln -sf libbz2.so.1.0.6 libbz2.so) + $(CP) $(WRKBUILD)/bzlib.h $(STAGING_HOST_DIR)/usr/include + libbz2-install: ${INSTALL_DIR} ${IDIR_LIBBZ2}/usr/lib $(CP) ${WRKBUILD}/libbz2.so* \ @@ -49,4 +65,5 @@ bzip2-install: ${INSTALL_DIR} ${IDIR_BZIP2}/usr/bin ${INSTALL_BIN} ${WRKBUILD}/bzip2-shared ${IDIR_BZIP2}/usr/bin/bzip2 +include ${TOPDIR}/mk/host-bottom.mk include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bzip2/patches/patch-Makefile-libbz2_so b/package/bzip2/patches/patch-Makefile-libbz2_so index e71dab136..605be4e5c 100644 --- a/package/bzip2/patches/patch-Makefile-libbz2_so +++ b/package/bzip2/patches/patch-Makefile-libbz2_so @@ -1,15 +1,24 @@ --- bzip2-1.0.6.orig/Makefile-libbz2_so 2010-09-11 01:07:52.000000000 +0200 -+++ bzip2-1.0.6/Makefile-libbz2_so 2013-07-30 14:15:29.000000000 +0200 -@@ -22,9 +22,10 @@ - - - SHELL=/bin/sh --CC=gcc -+CC?=gcc ++++ bzip2-1.0.6/Makefile-libbz2_so 2014-01-10 21:37:37.000000000 +0100 +@@ -25,6 +25,12 @@ SHELL=/bin/sh + CC=gcc BIGFILES=-D_FILE_OFFSET_BITS=64 --CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) -+CFLAGS?= -+CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES) + CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) ++OS=$(shell uname) ++ifeq ($(OS),Darwin) ++LDOPT=-install_name ++else ++LDOPT=-soname ++endif OBJS= blocksort.o \ huffman.o \ +@@ -35,7 +41,7 @@ OBJS= blocksort.o \ + bzlib.o + + all: $(OBJS) +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) ++ $(CC) -shared -Wl,$(LDOPT) -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 + rm -f libbz2.so.1.0 + ln -s libbz2.so.1.0.6 libbz2.so.1.0 |