mxe/src/pcre.mk

42 lines
1.5 KiB
Makefile
Raw Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2009-02-27 18:04:14 +00:00
PKG := pcre
$(PKG)_WEBSITE := https://www.pcre.org/
$(PKG)_DESCR := PCRE
$(PKG)_IGNORE :=
2017-09-08 23:15:02 +01:00
$(PKG)_VERSION := 8.41
$(PKG)_CHECKSUM := e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530
$(PKG)_SUBDIR := pcre-$($(PKG)_VERSION)
$(PKG)_FILE := pcre-$($(PKG)_VERSION).tar.bz2
2017-03-05 03:41:39 +00:00
$(PKG)_URL := https://ftp.pcre.org/pub/pcre/$($(PKG)_FILE)
$(PKG)_URL_2 := https://$(SOURCEFORGE_MIRROR)/project/pcre/pcre/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
2009-02-27 18:04:14 +00:00
define $(PKG)_UPDATE
2017-03-05 03:41:39 +00:00
$(WGET) -q -O- 'https://ftp.pcre.org/pub/pcre/' | \
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
head -1
2009-02-27 18:04:14 +00:00
endef
define $(PKG)_BUILD_SHARED
2009-02-27 18:04:14 +00:00
cd '$(1)' && ./configure \
$(MXE_CONFIGURE_OPTS) \
2012-02-25 14:13:52 +00:00
--enable-pcre16 \
--enable-utf \
2009-02-27 18:04:14 +00:00
--enable-unicode-properties \
--enable-cpp \
2009-02-27 18:04:14 +00:00
--disable-pcregrep-libz \
--disable-pcregrep-libbz2 \
--disable-pcretest-libreadline
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_PROGRAMS) dist_html_DATA= dist_doc_DATA=
rm -f '$(PREFIX)/$(TARGET)'/share/man/man1/pcre*.1
rm -f '$(PREFIX)/$(TARGET)'/share/man/man3/pcre*.3
ln -sf '$(PREFIX)/$(TARGET)/bin/pcre-config' '$(PREFIX)/bin/$(TARGET)-pcre-config'
2009-02-27 18:04:14 +00:00
endef
define $(PKG)_BUILD
$(SED) -i 's,__declspec(dllimport),,' '$(1)/pcre.h.in'
$(SED) -i 's,__declspec(dllimport),,' '$(1)/pcreposix.h'
$($(PKG)_BUILD_SHARED)
endef