annotate src/libarchive.mk @ 2855:47558e958113

Allow static/shared libraries to be configured in top-level Makefile.
author John W. Eaton <jwe@octave.org>
date Thu, 15 Nov 2012 16:11:45 -0500
parents 4d0f3a9da57e
children 100e618349f7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2245
diff changeset
1 # This file is part of MXE.
2353
99516e73b368 Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents: 2349
diff changeset
2 # See index.html for further information.
1017
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 PKG := libarchive
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 $(PKG)_IGNORE :=
2245
0ce613b66c8c update package libarchive
Mark Brand <mabrand@mabrand.nl>
parents: 1978
diff changeset
6 $(PKG)_CHECKSUM := b774e2675e5c1abafbd4d667402e8c3e72313944
1017
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
8 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9 $(PKG)_URL := http://libarchive.googlecode.com/files/$($(PKG)_FILE)
2245
0ce613b66c8c update package libarchive
Mark Brand <mabrand@mabrand.nl>
parents: 1978
diff changeset
10 $(PKG)_DEPS := gcc bzip2 libiconv libxml2 openssl xz zlib
1017
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
12 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2365
diff changeset
13 $(WGET) -q -O- 'http://code.google.com/p/libarchive/downloads/list?sort=-uploaded' | \
1017
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14 $(SED) -n 's,.*libarchive-\([0-9][^<]*\)\.tar.*,\1,p' | \
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 head -1
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 endef
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
17
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
18 define $(PKG)_BUILD
1063
89a26644a624 workaround for static linking of package libarchive
Volker Grabsch <vog@notjusthosting.com>
parents: 1056
diff changeset
19 $(SED) -i '1i#ifndef LIBARCHIVE_STATIC\n#define LIBARCHIVE_STATIC\n#endif' -i '$(1)/libarchive/archive.h'
89a26644a624 workaround for static linking of package libarchive
Volker Grabsch <vog@notjusthosting.com>
parents: 1056
diff changeset
20 $(SED) -i '1i#ifndef LIBARCHIVE_STATIC\n#define LIBARCHIVE_STATIC\n#endif' -i '$(1)/libarchive/archive_entry.h'
1017
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
21 cd '$(1)' && ./configure \
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22 --host='$(TARGET)' \
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
23 --prefix='$(PREFIX)/$(TARGET)' \
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2525
diff changeset
24 $(ENABLE_SHARED_OR_STATIC) \
1017
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
25 --disable-bsdtar \
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
26 --disable-bsdcpio \
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
27 XML2_CONFIG='$(PREFIX)/$(TARGET)'/bin/xml2-config
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
28 $(MAKE) -C '$(1)' -j '$(JOBS)' man_MANS=
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
29 $(MAKE) -C '$(1)' -j 1 install man_MANS=
1064
ae7bf5ed7620 test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents: 1063
diff changeset
30
ae7bf5ed7620 test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents: 1063
diff changeset
31 '$(TARGET)-gcc' \
ae7bf5ed7620 test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents: 1063
diff changeset
32 -W -Wall -Werror -ansi -pedantic \
ae7bf5ed7620 test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents: 1063
diff changeset
33 '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libarchive.exe' \
2245
0ce613b66c8c update package libarchive
Mark Brand <mabrand@mabrand.nl>
parents: 1978
diff changeset
34 `'$(TARGET)-pkg-config' --libs-only-l libarchive`
1017
56ceea3973a4 new package: libarchive (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
35 endef