view src/nettle.mk @ 3048:5ef49fb3299d

treat gcc and binutils as build tools use a separate target for building the cmake toolchain file don't unpack gcc or binutils if we are using the system compiler
author John W. Eaton <jwe@octave.org>
date Fri, 14 Jun 2013 16:51:29 -0400
parents b6c7244a2f66
children 9c56d108c141
line wrap: on
line source

# This file is part of MXE.
# See index.html for further information.

PKG             := nettle
$(PKG)_IGNORE   :=
$(PKG)_CHECKSUM := 1061754feb69dd01354525fa7eb6154b28ac887d
$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := http://www.lysator.liu.se/~nisse/archive/$($(PKG)_FILE)
$(PKG)_DEPS     := gmp

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://www.lysator.liu.se/~nisse/archive/' | \
    $(SED) -n 's,.*nettle-\([0-9][^>]*\)\.tar.*,\1,p' | \
    grep -v 'pre' | \
    tail -1
endef

define $(PKG)_BUILD
    cd '$(1)' && ./configure \
        $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
        $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
        $(ENABLE_SHARED_OR_STATIC) \
        --prefix='$(HOST_PREFIX)'
    $(MAKE) -C '$(1)' -j '$(JOBS)' getopt.o getopt1.o
    $(MAKE) -C '$(1)' -j '$(JOBS)'
    $(MAKE) -C '$(1)' -j 1 install

    if [ -d $(HOST_PREFIX)/lib64 ]; then \
      $(INSTALL) -d $(HOST_LIBDIR)/pkgconfig; \
      mv $(HOST_PREFIX)/lib64/pkgconfig/* $(HOST_LIBDIR)/pkgconfig; \
      rmdir $(HOST_PREFIX)/lib64/pkgconfig; \
      mv $(HOST_PREFIX)/lib64/* $(HOST_LIBDIR); \
    fi
endef