diff options
author | Tony Theodore <tonyt@logyst.com> | 2017-08-13 04:54:46 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2017-08-13 04:54:46 (GMT) |
commit | b0fdbc9e8bd493f2fc7c240603568de8c3cb1af3 (patch) | |
tree | d01b2283ebf71e885aa562fd09c2a899ce47a431 /src | |
parent | 18ec6907bbd41b5b7398b66351912a4cb52acd16 (diff) | |
download | mxe-b0fdbc9e8bd493f2fc7c240603568de8c3cb1af3.zip mxe-b0fdbc9e8bd493f2fc7c240603568de8c3cb1af3.tar.gz mxe-b0fdbc9e8bd493f2fc7c240603568de8c3cb1af3.tar.bz2 |
libarchive: use pkgconfig instead of sed for static defs
Diffstat (limited to 'src')
-rw-r--r-- | src/libarchive-1-fixes.patch | 19 | ||||
-rw-r--r-- | src/libarchive.mk | 6 |
2 files changed, 20 insertions, 5 deletions
diff --git a/src/libarchive-1-fixes.patch b/src/libarchive-1-fixes.patch index c77a7ac..f4e3532 100644 --- a/src/libarchive-1-fixes.patch +++ b/src/libarchive-1-fixes.patch @@ -19,3 +19,22 @@ index 1111111..2222222 100644 -Libs.private: @LIBS@ +Libs.private: @LIBS@ -liconv +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sun, 13 Aug 2017 14:38:47 +1000 +Subject: [PATCH] libarchive.pc.in: add Cflags.private for static linking + +taken from: +https://github.com/libarchive/libarchive/pull/934 + +diff --git a/build/pkgconfig/libarchive.pc.in b/build/pkgconfig/libarchive.pc.in +index 1111111..2222222 100644 +--- a/build/pkgconfig/libarchive.pc.in ++++ b/build/pkgconfig/libarchive.pc.in +@@ -7,5 +7,6 @@ Name: libarchive + Description: library that can create and read several streaming archive formats + Version: @VERSION@ + Cflags: -I${includedir} ++Cflags.private: -DLIBARCHIVE_STATIC + Libs: -L${libdir} -larchive + Libs.private: @LIBS@ -liconv diff --git a/src/libarchive.mk b/src/libarchive.mk index 0959bbe..16bc3bc 100644 --- a/src/libarchive.mk +++ b/src/libarchive.mk @@ -19,10 +19,6 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - $(if $(BUILD_STATIC),\ - $(SED) -i '1i#ifndef LIBARCHIVE_STATIC\n#define LIBARCHIVE_STATIC\n#endif' -i '$(1)/libarchive/archive.h' - $(SED) -i '1i#ifndef LIBARCHIVE_STATIC\n#define LIBARCHIVE_STATIC\n#endif' -i '$(1)/libarchive/archive_entry.h') - # use nettle instead of bcrypt for CNG(Crypto Next Generation) cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ $(MXE_CONFIGURE_OPTS) \ @@ -38,5 +34,5 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libarchive.exe' \ - `'$(TARGET)-pkg-config' --libs-only-l libarchive` + `'$(TARGET)-pkg-config' --libs-only-l --cflags libarchive` endef |