Mercurial > mxe-octave
annotate src/bzip2.mk @ 4179:6409a12147fd
bzip2: use aff patch
* src/bzip2.mk: remove SED mods to source
* src/bzip2-1-fixes.patch: new file
* dist-files.mk: add bzip2-1-fixes.patch
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 26 Jul 2016 05:59:06 -0400 |
parents | 13be64f9f16d |
children | 7914e218df3e |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
1390
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. |
414
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
306
diff
changeset
|
3 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
4 PKG := bzip2 |
448
e9afec55fd6b
improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents:
417
diff
changeset
|
5 $(PKG)_IGNORE := |
3480
13be64f9f16d
move version info from index.html to src/*.mk files
John W. Eaton <jwe@octave.org>
parents:
3412
diff
changeset
|
6 $(PKG)_VERSION := 1.0.6 |
1170 | 7 $(PKG)_CHECKSUM := 3f89f861209ce81a6bab1fd1998c0ef311712002 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
8 $(PKG)_SUBDIR := bzip2-$($(PKG)_VERSION) |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
9 $(PKG)_FILE := bzip2-$($(PKG)_VERSION).tar.gz |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
10 $(PKG)_URL := http://www.bzip.org/$($(PKG)_VERSION)/$($(PKG)_FILE) |
3048
5ef49fb3299d
treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents:
3031
diff
changeset
|
11 $(PKG)_DEPS := |
204 | 12 |
13 define $(PKG)_UPDATE | |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2365
diff
changeset
|
14 $(WGET) -q -O- 'http://www.bzip.org/downloads.html' | \ |
204 | 15 grep 'bzip2-' | \ |
266
b94424e6c37f
improved the regexes for package version recognition
Volker Grabsch <vog@notjusthosting.com>
parents:
265
diff
changeset
|
16 $(SED) -n 's,.*bzip2-\([0-9][^>]*\)\.tar.*,\1,p' | \ |
204 | 17 head -1 |
18 endef | |
19 | |
3071
d11e7f8eab5e
[MSVC] enable bzip2 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
20 ifneq ($(filter mingw msvc,$(MXE_SYSTEM)),) |
204 | 21 define $(PKG)_BUILD |
4179
6409a12147fd
bzip2: use aff patch
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
22 #$(SED) -i 's,sys\\stat\.h,sys/stat.h,g' '$(1)/bzip2.c' |
6409a12147fd
bzip2: use aff patch
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
23 #$(SED) -i 's,WINAPI,,g' '$(1)/bzlib.h' |
3412
b52660819c01
bzip2: Make and install bzip2.exe in mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3293
diff
changeset
|
24 $(MAKE) -C '$(1)' -j '$(JOBS)' libbz2.a bzip2 \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
3006
diff
changeset
|
25 PREFIX='$(HOST_PREFIX)' \ |
2997 | 26 CC='$(MXE_CC)' \ |
27 AR='$(MXE_AR)' \ | |
28 RANLIB='$(MXE_RANLIB)' | |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
29 $(INSTALL) -d '$(3)$(HOST_INCDIR)' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
30 $(INSTALL) -m644 '$(1)/bzlib.h' '$(3)$(HOST_INCDIR)' |
2889 | 31 |
32 if [ $(BUILD_SHARED) = yes ]; then \ | |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
33 $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CC)' '$(1)/libbz2.a' --install '$(INSTALL)' --libdir '$(3)$(HOST_LIBDIR)' --bindir '$(3)$(HOST_BINDIR)'; \ |
2889 | 34 fi |
3021
6ea3d6ad4f44
Update for build static compile option
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
35 |
6ea3d6ad4f44
Update for build static compile option
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
36 if [ $(BUILD_STATIC) = yes ]; then \ |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
37 $(INSTALL) '$(1)/libbz2.a' '$(3)$(HOST_LIBDIR)/'; \ |
3021
6ea3d6ad4f44
Update for build static compile option
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
38 fi |
3412
b52660819c01
bzip2: Make and install bzip2.exe in mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3293
diff
changeset
|
39 |
b52660819c01
bzip2: Make and install bzip2.exe in mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3293
diff
changeset
|
40 $(INSTALL) -d '$(3)$(HOST_BINDIR)' |
b52660819c01
bzip2: Make and install bzip2.exe in mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3293
diff
changeset
|
41 $(INSTALL) '$(1)/bzip2' '$(3)$(HOST_BINDIR)/bzip2.exe' |
b52660819c01
bzip2: Make and install bzip2.exe in mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3293
diff
changeset
|
42 |
204 | 43 endef |
2997 | 44 else |
45 define $(PKG)_BUILD | |
4179
6409a12147fd
bzip2: use aff patch
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
46 #$(SED) -i 's,sys\\stat\.h,sys/stat.h,g' '$(1)/bzip2.c' |
6409a12147fd
bzip2: use aff patch
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
47 #$(SED) -i 's,WINAPI,,g' '$(1)/bzlib.h' |
2997 | 48 $(MAKE) -C '$(1)' -j '$(JOBS)' -f Makefile-libbz2_so \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
3006
diff
changeset
|
49 PREFIX='$(HOST_PREFIX)' \ |
2997 | 50 CC='$(MXE_CC)' \ |
51 AR='$(MXE_AR)' \ | |
52 RANLIB='$(MXE_RANLIB)' | |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
53 $(INSTALL) -d '$(3)$(HOST_LIBDIR)' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
54 $(INSTALL) -m755 '$(1)/libbz2.so.1.0.6' '$(3)$(HOST_LIBDIR)' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
55 rm -f '$(3)$(HOST_LIBDIR)/libbz2.so.1.0' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
56 $(LN_SF) libbz2.so.1.0.6 '$(3)$(HOST_LIBDIR)/libbz2.so.1.0' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
57 $(INSTALL) -d '$(3)$(HOST_INCDIR)' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3071
diff
changeset
|
58 $(INSTALL) -m644 '$(1)/bzlib.h' '$(3)$(HOST_INCDIR)' |
2997 | 59 endef |
60 endif |