mxe/src/log4cxx.mk

43 lines
1.6 KiB
Makefile
Raw Permalink Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2012-05-02 08:06:54 +01:00
PKG := log4cxx
2017-03-05 03:41:39 +00:00
$(PKG)_WEBSITE := https://logging.apache.org/log4cxx/
2012-05-02 08:06:54 +01:00
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.10.0
$(PKG)_CHECKSUM := 0de0396220a9566a580166e66b39674cb40efd2176f52ad2c65486c99c920c8c
2012-05-02 08:06:54 +01:00
$(PKG)_SUBDIR := apache-log4cxx-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
2019-09-02 21:40:09 +01:00
$(PKG)_URL := https://archive.apache.org/dist/logging/log4cxx/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://www.apache.org/dist/logging/log4cxx/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := cc apr-util
2012-05-02 08:06:54 +01:00
define $(PKG)_UPDATE
2017-03-05 03:41:39 +00:00
$(WGET) -q -O- 'https://logging.apache.org/log4cxx/download.html' | \
$(SED) -n 's,.*log4cxx-\([0-9.]*\)\.tar.*,\1,p' | \
head -1
endef
2012-05-02 08:06:54 +01:00
define $(PKG)_BUILD
# configure script is ancient and isn't easy to regenerate
# filter out invalid options
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(subst docdir$(comma),,$(MXE_CONFIGURE_OPTS)) \
2012-05-02 08:06:54 +01:00
--with-apr='$(PREFIX)/$(TARGET)' \
--with-apr-util='$(PREFIX)/$(TARGET)' \
CFLAGS=-D_WIN32_WINNT=0x0500 \
CXXFLAGS=-D_WIN32_WINNT=0x0500
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_PROGRAMS)
mkdir -p '$(PREFIX)/$(TARGET)/share/cmake/log4cxx'
cp '$(1)/log4cxx-config.cmake' '$(PREFIX)/$(TARGET)/share/cmake/log4cxx/log4cxx-config.cmake'
'$(TARGET)-g++' \
-W -Wall -Werror -ansi -pedantic \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-log4cxx.exe' \
`$(TARGET)-pkg-config liblog4cxx --libs`
2012-05-02 08:06:54 +01:00
endef
$(PKG)_BUILD_SHARED =